diff --git a/Upgrade.lua b/Upgrade.lua index 11f3ede..881e89d 100644 --- a/Upgrade.lua +++ b/Upgrade.lua @@ -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") diff --git a/changelog.txt b/changelog.txt index 32d9fff..bf41f15 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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 diff --git a/control.lua b/control.lua index 6c6c4a6..6ed1f38 100644 --- a/control.lua +++ b/control.lua @@ -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 diff --git a/libs/BaseUtils.lua b/libs/BaseUtils.lua index 7dc061f..991c7c4 100644 --- a/libs/BaseUtils.lua +++ b/libs/BaseUtils.lua @@ -508,6 +508,7 @@ function baseUtils.createBase(map, chunk, tick) activeNests = 0, destroyPlayerBuildings = 0, lostEnemyUnits = 0, + totalLostEnemyUnits = 0, lostEnemyBuilding = 0, rocketLaunched = 0, builtEnemyBuilding = 0,