mirror of
https://github.com/veden/Rampant.git
synced 2025-02-09 13:36:53 +02:00
Batch unit death point deductions
Base point deductions for unit losses are now batched in 20 to reduce chat spam when using the print AI points to chat options
This commit is contained in:
parent
1bf1825320
commit
7657167978
@ -636,6 +636,7 @@ function upgrade.attempt(universe)
|
||||
base.maxExpansionGroups = 0
|
||||
base.sentExpansionGroups = 0
|
||||
base.resetExpensionGroupsTick = 0
|
||||
base.totalLostEnemyUnits = 0
|
||||
end
|
||||
|
||||
game.print("Rampant - Version 3.2.0")
|
||||
|
@ -19,6 +19,7 @@ Version: 3.2.0
|
||||
- Dropped number of enemy levels see during the game from 10 to 6, new tiers will now appear at 0, 0.25, 0.5, 0.75, 0.85, 0.925
|
||||
- Moved neturalObject scan chunk to after a chunk is determined to be passable
|
||||
- Centralized base points manipulation and chat messaging
|
||||
- Base point deductions for unit losses are now batched in 20 to reduce chat spam when using the print AI points to chat options
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 3.1.2
|
||||
|
@ -461,11 +461,14 @@ local function onDeath(event)
|
||||
if (entityType == "unit") and not ENTITY_SKIP_COUNT_LOOKUP[entity.name] then
|
||||
if base then
|
||||
base.lostEnemyUnits = base.lostEnemyUnits + 1
|
||||
base.totalLostEnemyUnits = base.totalLostEnemyUnits + 1
|
||||
if damageTypeName then
|
||||
base.damagedBy[damageTypeName] = (base.damagedBy[damageTypeName] or 0) + 0.01
|
||||
base.deathEvents = base.deathEvents + 1
|
||||
end
|
||||
modifyBasePoints(base, UNIT_DEATH_POINT_COST*-1.0, "Unit Lost")
|
||||
if base.totalLostEnemyUnits % 20 == 0 then
|
||||
modifyBasePoints(base, 20*UNIT_DEATH_POINT_COST*-1.0, "20 Units Lost")
|
||||
end
|
||||
if (universe.random() < universe.rallyThreshold) and not surface.peaceful_mode then
|
||||
rallyUnits(chunk, map, tick, base)
|
||||
end
|
||||
|
@ -508,6 +508,7 @@ function baseUtils.createBase(map, chunk, tick)
|
||||
activeNests = 0,
|
||||
destroyPlayerBuildings = 0,
|
||||
lostEnemyUnits = 0,
|
||||
totalLostEnemyUnits = 0,
|
||||
lostEnemyBuilding = 0,
|
||||
rocketLaunched = 0,
|
||||
builtEnemyBuilding = 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user