mirror of
https://github.com/veden/Rampant.git
synced 2025-03-17 20:58:35 +02:00
fixed damageType selection for mutations and added print mutation events
This commit is contained in:
parent
cd9443953e
commit
d9b766ca58
@ -65,6 +65,8 @@ Date: 23. 11. 2021
|
||||
- Potential desync fix in relation to reference comparison and deserialization
|
||||
- Fixed squad attack move would not properly place warding pheromone on taken path
|
||||
- Fixed players added to a chunk not taking player surface into account when
|
||||
- Fixed picking damageType during faction mutation (Thank you Garrotte13)
|
||||
- Fixed surfaceTileChange trying to use a boolean inplace of an object (Thank you Garrotte13)
|
||||
Framework:
|
||||
- Fixed Rampant in-memory map visualization tool for debugging
|
||||
- Added debug mod settings for showing enemy structures being upgraded in place
|
||||
|
@ -373,7 +373,8 @@ local function upgradeBaseBasedOnDamage(map, base)
|
||||
base.damagedBy[damageTypeName] = amount / total
|
||||
end
|
||||
for damageType,amount in pairs(base.damagedBy) do
|
||||
if ((roll - amount) <= 0) then
|
||||
roll = roll - amount
|
||||
if (roll <= 0) then
|
||||
pickedDamage = damageType
|
||||
break
|
||||
end
|
||||
@ -429,14 +430,26 @@ function baseUtils.processBase(chunk, map, tick, base)
|
||||
|
||||
if ((base.deathEvents > deathThreshold) and (upgradeRoll > 0.95)) then
|
||||
if (base.mutations < universe.MAX_BASE_MUTATIONS) then
|
||||
upgradeBaseBasedOnDamage(map, base)
|
||||
base.mutations = base.mutations + 1
|
||||
upgradeBaseBasedOnDamage(map, base)
|
||||
elseif (base.mutations == universe.MAX_BASE_MUTATIONS) then
|
||||
local roll = map.random()
|
||||
if (roll < 0.001) then
|
||||
base.mutations = 0
|
||||
if (map.universe.printBaseAdaptation) then
|
||||
game.print({"description.rampant--adaptationResetDebugMessage",
|
||||
base.x,
|
||||
base.y,
|
||||
base.mutations,
|
||||
map.universe.MAX_BASE_MUTATIONS})
|
||||
end
|
||||
elseif (roll > 0.999) then
|
||||
base.mutations = base.mutations + 1
|
||||
if (map.universe.printBaseAdaptation) then
|
||||
game.print({"description.rampant--adaptationFrozenDebugMessage",
|
||||
base.x,
|
||||
base.y})
|
||||
end
|
||||
end
|
||||
end
|
||||
base.damagedBy = {}
|
||||
|
@ -19002,6 +19002,8 @@ rampant--temperamentRateModifier=Change how quickly Rampant will hit extremes in
|
||||
rampant-bobs-nee-newEnemies=Bobs enemies or NEE has been detected with Rampants new enemies,\nthe artifacts from each of these mods will still work with Rampants new enemies.\nThe generation of bobs or NEE unit spawners explicitly by Rampant is\nno longer supported when the Rampants new enemies are active.
|
||||
rampant--adaptation2DebugMessage=Faction has mutated bacause the damage type called __1__. Now the Faction will produce __2__ and __3__. Faction mutations __6__ out of __7__. [gps=__4__,__5__]
|
||||
rampant--adaptation1DebugMessage=Faction has mutated bacause the damage type called __1__. Now the Faction will produce __2__. Faction mutations __5__ out of __6__. [gps=__3__,__4__]
|
||||
rampant--adaptationFrozenDebugMessage=Faction will no longer mutate into new factions. [gps=__1__,__2__]
|
||||
rampant--adaptationResetDebugMessage=Faction mutations have been reset. __2__ of __3__ mutations remaining. [gps=__1__,__2__]
|
||||
rampant--laserEnemyName=Laser Biter
|
||||
rampant--waspEnemyName=Wasp Biter
|
||||
rampant--spawnerEnemyName=Spawner Biter
|
||||
|
Loading…
x
Reference in New Issue
Block a user