1
0
mirror of https://github.com/veden/Rampant.git synced 2024-12-26 20:54:12 +02:00

FACTO-185: Increased spawner faction egg regeneration and Increased

number of shots per spawner spitters
This commit is contained in:
Aaron Veden 2022-06-18 12:07:19 -07:00
parent 32e547fe8e
commit f6452be8b2
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
4 changed files with 127 additions and 121 deletions

View File

@ -14,6 +14,8 @@ Version: 3.1.2
- Increased major,minor resistance percents and Increased minor weakness percents primarily in the lower enemy levels - Increased major,minor resistance percents and Increased minor weakness percents primarily in the lower enemy levels
- Increased spawner faction spawned biters health by 25% - Increased spawner faction spawned biters health by 25%
- Capped max unit resistance at 99% - Capped max unit resistance at 99%
- Increased number of spawner spitter shots per unit
- Increased spawner faction eggs regeneration
Bugfixes: Bugfixes:
- Fixed sent aggressive squads, builder count, squad count could be negative - Fixed sent aggressive squads, builder count, squad count could be negative
- Added missing sent and max siege groups on debug log - Added missing sent and max siege groups on debug log

View File

@ -1014,14 +1014,14 @@ if settings.startup["rampant--spawnerEnemy"].value then
type = "drone", type = "drone",
attackAttributes = {"touch", "acid"}, attackAttributes = {"touch", "acid"},
name = "spitter-egg", name = "spitter-egg",
attributes = {"stationary", "bigger", {"clusterDeath", "spawn"}, "skipKillCount"}, attributes = {"stationary", "bigger", "highestRegen", {"clusterDeath", "spawn"}, "skipKillCount"},
drops = {} drops = {}
}, },
{ {
type = "drone", type = "drone",
attackAttributes = {"touch", "acid"}, attackAttributes = {"touch", "acid"},
name = "worm-egg", name = "worm-egg",
attributes = {"stationary", "bigger", {"clusterDeath", "spawn"}, "skipKillCount"}, attributes = {"stationary", "bigger", "highestRegen", {"clusterDeath", "spawn"}, "skipKillCount"},
drops = {} drops = {}
}, },
{ {

View File

@ -700,8 +700,8 @@ local function fillEntityTemplate(entity)
if (entity.type == "drone") then if (entity.type == "drone") then
ti = 1 ti = 1
end end
entity["hitSprayName"] = entity[key] .. "-" .. "damaged-fountain-rampant" entity["hitSprayName"] = entity.faction .. "-" .. "damaged-fountain-rampant"
entity[key] = entity[key] .. "-" .. bloodFountains[ti] entity["explosion"] = entity.faction .. "-" .. bloodFountains[ti]
elseif (key == "evolutionFunction") then elseif (key == "evolutionFunction") then
entity["evolutionRequirement"] = distort(xorRandom, value(tier)) entity["evolutionRequirement"] = distort(xorRandom, value(tier))
elseif (key == "majorResistances") then elseif (key == "majorResistances") then
@ -723,125 +723,128 @@ local function fillEntityTemplate(entity)
elseif (key == "explosionTiers") then elseif (key == "explosionTiers") then
entity.attackExplosion = entity.explosionTiers[tier] entity.attackExplosion = entity.explosionTiers[tier]
entity.attackScorchmark = entity.scorchmarkTiers[tier] entity.attackScorchmark = entity.scorchmarkTiers[tier]
elseif (key == "attributes") then end
for i=1,#entity[key] do end
local attribute = entity[key][i]
if (attribute == "lowHealth") then if entity.attributes then
entity["health"] = entity["health"] * 0.75 for i=1,#entity.attributes do
elseif (attribute == "lowestHealth") then local attribute = entity.attributes[i]
entity["health"] = entity["health"] * 0.50 if (attribute == "lowHealth") then
elseif (attribute == "quickCooldown") then entity["health"] = entity["health"] * 0.75
entity["cooldown"] = entity["cooldown"] * 0.50 elseif (attribute == "lowestHealth") then
entity["damage"] = entity["damage"] * 0.65 entity["health"] = entity["health"] * 0.50
if entity["damagePerTick"] then elseif (attribute == "quickCooldown") then
entity["damagePerTick"] = entity["damagePerTick"] * 0.65 entity["cooldown"] = entity["cooldown"] * 0.50
end entity["damage"] = entity["damage"] * 0.65
elseif (attribute == "slowMovement") then if entity["damagePerTick"] then
entity["movement"] = entity["movement"] * 0.35 entity["damagePerTick"] = entity["damagePerTick"] * 0.65
entity["distancePerFrame"] = entity["distancePerFrame"] * 0.65 end
elseif (attribute == "quickMovement") then elseif (attribute == "slowMovement") then
entity["movement"] = entity["movement"] * 1.25 entity["movement"] = entity["movement"] * 0.35
entity["distancePerFrame"] = entity["distancePerFrame"] * 1.35 entity["distancePerFrame"] = entity["distancePerFrame"] * 0.65
elseif (attribute == "quickSpawning") then elseif (attribute == "quickMovement") then
if entity["spawningCooldownStart"] then entity["movement"] = entity["movement"] * 1.25
entity["spawningCooldownStart"] = entity["spawningCooldownStart"] * 0.85 entity["distancePerFrame"] = entity["distancePerFrame"] * 1.35
entity["spawningCooldownEnd"] = entity["spawningCooldownEnd"] * 0.85 elseif (attribute == "quickSpawning") then
end if entity["spawningCooldownStart"] then
if entity["spawningTimeModifer"] then entity["spawningCooldownStart"] = entity["spawningCooldownStart"] * 0.85
entity["spawningTimeModifer"] = entity["spawningTimeModifer"] * 0.85 entity["spawningCooldownEnd"] = entity["spawningCooldownEnd"] * 0.85
end end
elseif (attribute == "altBiterArmored") then if entity["spawningTimeModifer"] then
entity["altBiter"] = "armored" entity["spawningTimeModifer"] = entity["spawningTimeModifer"] * 0.85
elseif (attribute == "highRegen") then end
entity["healing"] = entity["healing"] * 1.5 elseif (attribute == "altBiterArmored") then
elseif (attribute == "highestRegen") then entity["altBiter"] = "armored"
entity["healing"] = entity["healing"] * 3.5 elseif (attribute == "highRegen") then
elseif (attribute == "big") then entity["healing"] = entity["healing"] * 1.5
entity["scale"] = entity["scale"] * 1.2 elseif (attribute == "highestRegen") then
elseif (attribute == "bigger") then entity["healing"] = entity["healing"] * 3.5
entity["scale"] = entity["scale"] * 1.35 elseif (attribute == "big") then
elseif (attribute == "longReach") then entity["scale"] = entity["scale"] * 1.2
entity["range"] = entity["range"] * 3 elseif (attribute == "bigger") then
elseif (attribute == "smallest") then entity["scale"] = entity["scale"] * 1.35
entity["scale"] = entity["scale"] * 0.5 elseif (attribute == "longReach") then
elseif (attribute == "fragile") then entity["range"] = entity["range"] * 3
entity["health"] = entity["health"] * 0.35 elseif (attribute == "smallest") then
elseif (attribute == "selfDamaging") then entity["scale"] = entity["scale"] * 0.5
local divider elseif (attribute == "fragile") then
if entity.health < 100 then entity["health"] = entity["health"] * 0.35
divider = 2 entity["explosion"] = entity.faction .. "-" .. "damaged-fountain-rampant"
else elseif (attribute == "selfDamaging") then
divider = 2.5 local divider
end if entity.health < 100 then
entity.healthDamage = entity.health / divider divider = 5
entity.sourceEffect = function (attributes) else
return divider = 7
end
entity.healthDamage = entity.health / divider
entity.sourceEffect = function (attributes)
return
{
{ {
{ type = "damage",
type = "damage", affects_target = true,
affects_target = true, damage = {amount = attributes.healthDamage or 5, type = attributes.damageType or "physical"}
damage = {amount = attributes.healthDamage or 5, type = attributes.damageType or "physical"}
}
} }
end }
elseif (attribute == "killsSelf") then end
entity.healthDamage = entity.health * 3 elseif (attribute == "killsSelf") then
elseif (attribute == "unstable") then entity.healthDamage = entity.health * 3
entity["healing"] = entity["healing"] * -1 elseif (attribute == "unstable") then
elseif (attribute == "checkBuildability") then entity["healing"] = entity["healing"] * -1
entity.checkBuildability = true elseif (attribute == "checkBuildability") then
elseif (attribute == "spawnDuringDays") then entity.checkBuildability = true
entity.minSpawnDarkness = 0 elseif (attribute == "spawnDuringDays") then
entity.maxSpawnDarkness = 0.45 entity.minSpawnDarkness = 0
elseif (attribute == "followsPlayer") then entity.maxSpawnDarkness = 0.45
entity.followsPlayer = true elseif (attribute == "followsPlayer") then
elseif (attribute == "stationary") then entity.followsPlayer = true
entity.movement = 0 elseif (attribute == "stationary") then
entity.distancePerFrame = 0 entity.movement = 0
elseif (attribute == "highHealth") then entity.distancePerFrame = 0
entity["health"] = entity["health"] * 1.50 elseif (attribute == "highHealth") then
elseif (attribute == "poisonDeathCloud") then entity["health"] = entity["health"] * 1.50
entity.dyingEffect = { elseif (attribute == "poisonDeathCloud") then
type = "create-entity", entity.dyingEffect = {
entity_name = "poison-cloud-v" .. tier .. "-cloud-rampant" type = "create-entity",
} entity_name = "poison-cloud-v" .. tier .. "-cloud-rampant"
elseif (attribute == "highestHealth") then }
entity["health"] = entity["health"] * 2 elseif (attribute == "highestHealth") then
elseif (attribute == "skipKillCount") then entity["health"] = entity["health"] * 2
if not entity["appendFlags"] then elseif (attribute == "skipKillCount") then
entity["appendFlags"] = {} if not entity["appendFlags"] then
end entity["appendFlags"] = {}
entity["appendFlags"]["not-in-kill-statistics"] = true end
elseif type(attribute) == "table" then entity["appendFlags"]["not-in-kill-statistics"] = true
if (attribute[1] == "clusterDeath") then elseif type(attribute) == "table" then
entity.deathGenerator = function (attack) if (attribute[1] == "clusterDeath") then
return { entity.deathGenerator = function (attack)
{ return {
type = "cluster", {
cluster_count = attack.clusters, type = "cluster",
distance = attack.clusterDistance, cluster_count = attack.clusters,
distance_deviation = 3, distance = attack.clusterDistance,
action_delivery = distance_deviation = 3,
{ action_delivery =
type = "projectile", {
projectile = createCapsuleProjectile(attack, type = "projectile",
attack.faction .. "-" .. attribute[2] projectile = createCapsuleProjectile(attack,
.. "-v" .. attack.variation .. "-t" attack.faction .. "-" .. attribute[2]
.. attack.effectiveLevel .. "-rampant"), .. "-v" .. attack.variation .. "-t"
direction_deviation = 0.6, .. attack.effectiveLevel .. "-rampant"),
starting_speed = 0.25, direction_deviation = 0.6,
max_range = attack.range, starting_speed = 0.25,
starting_speed_deviation = 0.3 max_range = attack.range,
} starting_speed_deviation = 0.3
} }
} }
end }
else
error("Unknown table attribute " .. attribute[1])
end end
else else
error("Unknown attribute " .. attribute) error("Unknown table attribute " .. attribute[1])
end end
else
error("Unknown attribute " .. attribute)
end end
end end
end end
@ -1003,6 +1006,7 @@ function swarmUtils.buildEntitySpawner(template)
unitSpawner.effectiveLevel = effectiveLevel unitSpawner.effectiveLevel = effectiveLevel
unitSpawner.variation = i unitSpawner.variation = i
generateApperance(unitSpawner, true) generateApperance(unitSpawner, true)
unitSpawner.death = (unitSpawner.deathGenerator and unitSpawner.deathGenerator(unitSpawner)) or nil
fillEntityTemplate(unitSpawner) fillEntityTemplate(unitSpawner)
if unitSpawner.autoplace then if unitSpawner.autoplace then
@ -1031,6 +1035,7 @@ function swarmUtils.buildUnitSpawner(template)
local unitTable = unitSetToProbabilityTable(template.unitSet) local unitTable = unitSetToProbabilityTable(template.unitSet)
unitSpawner.unitSet = unitTable unitSpawner.unitSet = unitTable
generateApperance(unitSpawner) generateApperance(unitSpawner)
unitSpawner.death = (unitSpawner.deathGenerator and unitSpawner.deathGenerator(unitSpawner)) or nil
fillEntityTemplate(unitSpawner) fillEntityTemplate(unitSpawner)
if unitSpawner.autoplace then if unitSpawner.autoplace then
@ -1056,6 +1061,7 @@ function swarmUtils.buildWorm(template)
worm.effectiveLevel = effectiveLevel worm.effectiveLevel = effectiveLevel
worm.variation = i worm.variation = i
generateApperance(worm) generateApperance(worm)
worm.death = (worm.deathGenerator and worm.deathGenerator(worm)) or nil
fillEntityTemplate(worm) fillEntityTemplate(worm)
worm.standupSounds = wormStandupSounds[effectiveLevel] worm.standupSounds = wormStandupSounds[effectiveLevel]

View File

@ -298,8 +298,7 @@ function biterUtils.makeBiter(attributes)
working_sound = attributes.workingSounds, working_sound = attributes.workingSounds,
walking_sound = attributes.walkingSounds, walking_sound = attributes.walkingSounds,
running_sound_animation_positions = {2,}, running_sound_animation_positions = {2,},
run_animation = biterrunanimation(attributes.scale, attributes.tint, attributes.tint2 or attributes.tint, attributes.altBiter), run_animation = biterrunanimation(attributes.scale, attributes.tint, attributes.tint2 or attributes.tint, attributes.altBiter)
ai_settings = { destroy_when_commands_fail = false, allow_try_return_to_spawner = true }
} }
if attributes.collisionMask then if attributes.collisionMask then
entity.collision_mask = attributes.collisionMask entity.collision_mask = attributes.collisionMask
@ -358,8 +357,7 @@ function biterUtils.makeSpitter(attributes)
water_reflection = spitter_water_reflection(attributes.scale), water_reflection = spitter_water_reflection(attributes.scale),
damaged_trigger_effect = ((not settings.startup["rampant--removeBloodParticles"].value) and makeDamagedParticle(attributes)) or nil, damaged_trigger_effect = ((not settings.startup["rampant--removeBloodParticles"].value) and makeDamagedParticle(attributes)) or nil,
affected_by_tiles = settings.startup["rampant--unitsAffectedByTiles"].value, affected_by_tiles = settings.startup["rampant--unitsAffectedByTiles"].value,
run_animation = spitterrunanimation(attributes.scale, attributes.tint, attributes.tint2 or attributes.tint), run_animation = spitterrunanimation(attributes.scale, attributes.tint, attributes.tint2 or attributes.tint)
ai_settings = { destroy_when_commands_fail = false, allow_try_return_to_spawner = true }
} }
if attributes.collisionMask then if attributes.collisionMask then
entity.collision_mask = attributes.collisionMask entity.collision_mask = attributes.collisionMask