diff --git a/libs/Constants.lua b/libs/Constants.lua index 592b5fb..bc9b892 100755 --- a/libs/Constants.lua +++ b/libs/Constants.lua @@ -851,7 +851,6 @@ if settings.startup["rampant-laserEnemy"].value then } end - if settings.startup["rampant-fireEnemy"].value then constants.FACTION_SET[#constants.FACTION_SET+1] = { type = "fire", @@ -1012,6 +1011,133 @@ if settings.startup["rampant-electricEnemy"].value then } end +if settings.startup["rampant-physicalEnemy"].value then + constants.FACTION_SET[#constants.FACTION_SET+1] = { + type = "physical", + tint = {r=0.9, g=0.9, b=0.9, a=1}, + tint2 = {r=0, g=0, b=0, a=1}, + evo = 0.12, + units = { + { + type = "biter", + attackAttributes = {"melee"}, + name = "biter", + majorResistances = {"physical", "explosion"}, + minorWeaknesses = {"laser", "electric"}, + attributes = {"highHealth","big", "highRegen", "slowMovement"}, + drops = {"redArtifact"} + } + }, + buildings = { + { + type = "biter-spawner", + name = "biter-spawner", + majorResistances = {"physical", "explosion"}, + minorWeaknesses = {"laser", "electric"}, + attributes = {"highHealth", "big", "highRegen"}, + drops = {"redArtifact"}, + buildSets = { + {"biter", 1, 10} + } + }, + { + type = "turret", + name = "worm", + majorResistances = {"physical", "explosion"}, + minorWeaknesses = {"laser", "electric"}, + attackAttributes = {"spit", "physical"}, + attributes = {"highHealth", "big", "highRegen"}, + drops = {"redArtifact"} + } + } + } +end + +if settings.startup["rampant-trollEnemy"].value then + constants.FACTION_SET[#constants.FACTION_SET+1] = { + type = "troll", + tint = {r=0.4, g=0.4, b=0.4, a=1}, + tint2 = {r=0.8, g=0.8, b=0.8, a=1}, + evo = 0.17, + units = { + { + type = "biter", + attackAttributes = {"melee"}, + name = "biter", + minorResistances = {"physical", "explosion"}, + majorWeaknesses = {"fire"}, + attributes = {"highestHealth", "bigger", "highestRegen", "slowMovement"}, + drops = {"greenArtifact"} + } + }, + buildings = { + { + type = "biter-spawner", + name = "biter-spawner", + minorResistances = {"physical", "explosion"}, + majorWeaknesses = {"fire"}, + attributes = {"highestHealth", "bigger", "highestRegen"}, + drops = {"greenArtifact"}, + buildSets = { + {"biter", 1, 10} + } + }, + { + type = "turret", + name = "worm", + minorResistances = {"physical", "explosion"}, + majorWeaknesses = {"fire"}, + attackAttributes = {"spit", "physical"}, + attributes = {"highestHealth", "bigger", "highestRegen"}, + drops = {"greenArtifact"} + } + } + } +end + +if settings.startup["rampant-suicideEnemy"].value then + constants.FACTION_SET[#constants.FACTION_SET+1] = { + type = "suicide", + tint = {r=1, g=1, b=1, a=1}, + tint2 = {r=0.85, g=0.85, b=0, a=1}, + evo = 0.12, + units = { + { + type = "biter", + attackAttributes = {"bomb"}, + name = "biter", + majorWeaknesses = {"explosion"}, + minorResistances = {"poison"}, + attributes = {"lowestHealth", "quickSpawning", "quickMovement"}, + drops = {"yellowArtifact"} + } + }, + buildings = { + { + type = "biter-spawner", + name = "biter-spawner", + majorResistances = {"explosion"}, + minorResistances = {"poison"}, + attributes = {}, + drops = {"yellowArtifact", "quickSpawning", "lowUnits"}, + buildSets = { + {"biter", 1, 10} + } + }, + { + type = "turret", + name = "worm", + majorResistances = {"explosion"}, + minorResistances = {"poison"}, + attackAttributes = {"spit", "acid", "slow"}, + attributes = {}, + drops = {"yellowArtifact"} + } + } + } +end + + if settings.startup["rampant-nuclearEnemy"].value then constants.FACTION_SET[#constants.FACTION_SET+1] = { type = "nuclear", @@ -1021,22 +1147,21 @@ if settings.startup["rampant-nuclearEnemy"].value then units = { { type = "biter", - attackAttributes = {"beam", "electric"}, + attackAttributes = {"nuclear"}, name = "biter", - majorResistances = {"electric"}, - minorResistances = {"laser"}, - attributes = {"lowestHealth", "quickSpawning"}, - drops = {"blueArtifact"} + majorWeaknesses = {"explosion"}, + attributes = {"lowestHealth", "quickSpawning", "quickMovement"}, + drops = {"yellowArtifact"} } }, buildings = { { type = "biter-spawner", name = "biter-spawner", - majorResistances = {"electric"}, - minorResistances = {"laser"}, + majorResistances = {"explosion"}, + minorResistances = {"fire"}, attributes = {}, - drops = {"blueArtifact"}, + drops = {"yellowArtifact", "quickSpawning", "lowUnits"}, buildSets = { {"biter", 1, 10} } @@ -1044,11 +1169,11 @@ if settings.startup["rampant-nuclearEnemy"].value then { type = "turret", name = "worm", - majorResistances = {"electric"}, - minorResistances = {"laser"}, - attackAttributes = {"spit", "electric", "cluster"}, + majorResistances = {"explosion"}, + minorResistances = {"fire"}, + attackAttributes = {"spit", "acid", "slow"}, attributes = {}, - drops = {"blueArtifact"} + drops = {"yellowArtifact"} } } } diff --git a/prototypes/Physical.lua b/prototypes/Physical.lua index 291ddb1..aa04049 100755 --- a/prototypes/Physical.lua +++ b/prototypes/Physical.lua @@ -232,7 +232,7 @@ function physical.addFaction() }, { type= "create-entity", - entity_name = attributes.explosion + entity_name = attributes.attackExplosion } } end diff --git a/prototypes/SwarmUtils.lua b/prototypes/SwarmUtils.lua index 7ff4fce..c9c98df 100755 --- a/prototypes/SwarmUtils.lua +++ b/prototypes/SwarmUtils.lua @@ -1,6 +1,7 @@ local swarmUtils = {} -- imports +local bombUtils = require("utils/BombUtils") local attackFlame = require("utils/AttackFlame") local energyThief = require("EnergyThief") local beamUtils = require("utils/BeamUtils") @@ -8,6 +9,7 @@ local acidBall = require("utils/AttackBall") local droneUtils = require("utils/DroneUtils") local biterUtils = require("utils/BiterUtils") local particleUtils = require("utils/ParticleUtils") +local stickerUtils = require("utils/StickerUtils") local constants = require("__Rampant__/libs/Constants") local mathUtils = require("__Rampant__/libs/MathUtils") @@ -28,12 +30,16 @@ local TIER_UPGRADE_SET_10 = constants.TIER_UPGRADE_SET_10 local xorRandom = mathUtils.xorRandom(settings.startup["rampant-enemySeed"].value) +local makeSticker = stickerUtils.makeSticker +local makeAtomicBlast = bombUtils.makeAtomicBlast local makeLaser = beamUtils.makeLaser local createAttackBall = acidBall.createAttackBall local createRangedAttack = biterUtils.createRangedAttack local createMeleeAttack = biterUtils.createMeleeAttack local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable +local createSuicideAttack = biterUtils.createSuicideAttack + local createAttackFlame = attackFlame.createAttackFlame local createStreamAttack = biterUtils.createStreamAttack @@ -58,6 +64,19 @@ local makeUnitSpawner = biterUtils.makeUnitSpawner -- module code +local explosionTiers = { + "explosion", + "explosion", + "big-explosion", + "big-explosion", + "big-explosion", + "big-explosion", + "massive-explosion", + "massive-explosion", + "massive-explosion", + "massive-explosion" +} + local bloodFountains = { "blood-explosion-small-rampant", "blood-explosion-small-rampant", @@ -71,6 +90,26 @@ local bloodFountains = { "blood-explosion-huge-rampant", } +local nuclearAttackNumeric = { + ["damage"] = { 50, 60, 80, 100, 120, 130, 140, 150, 180, 240 }, + ["repeatCount"] = { 150, 175, 250, 300, 350, 400, 450, 500, 550, 600 }, + ["radius"] = { 5, 10, 10, 12, 14, 16, 16, 18, 18, 20 }, + ["explosionDistance"] = { 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 }, + ["explosionCount"] = { 3, 3, 3, 4, 4, 4, 5, 5, 6, 6 } +} + +local bombAttackNumeric = { + ["damage"] = { 100, 200, 300, 400, 600, 800, 1000, 1200, 1500, 2000 }, + ["radius"] = { 3.5, 3.5, 4, 5, 6, 6, 7, 7, 7.5, 8 }, + ["explosionDistance"] = { 2, 2, 2, 2, 2, 2.5, 2.5, 2.5, 3, 3 }, + ["explosionCount"] = { 2, 3, 4, 5, 6, 8, 10, 12, 13, 14 } +} + +local slowStickerNumeric = { + ["stickerMovementModifier"] = { 0.8, 0.8, 0.7, 0.7, 0.6, 0.6, 0.5, 0.5, 0.4, 0.4 }, + ["stickerDuration"] = { 1800, 1800, 1900, 1900, 2000, 2000, 2100, 2100, 2200, 2200 } +} + local streamAttackNumeric = { ["stickerDamagePerTick"] = { 0.6, 0.6, 0.8, 0.8, 0.8, 0.9, 1, 1, 1.3, 1.5 }, ["particleTimeout"] = { 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 }, @@ -441,18 +480,47 @@ local function fillEntityTemplate(entity) for i=1,#value do addMinorWeakness(entity, value[i], tier) end + elseif (key == "explosionTiers") then + entity.attackExplosion = entity.explosionTiers[tier] elseif (key == "attributes") then for i=1,#entity[key] do - if (entity[key] == "lowHealth") then + local attribute = entity[key][i] + if (attribute == "lowHealth") then entity["health"] = entity["health"] * 0.75 - elseif (entity[key] == "quickCooldown") then + elseif (attribute == "lowestHealth") then + entity["health"] = entity["health"] * 0.50 + elseif (attribute == "quickCooldown") then entity["cooldown"] = entity["cooldown"] * 0.85 - elseif (entity[key] == "quickMovement") then - entity["movement"] = entity["movement"] * 0.85 + elseif (attribute == "slowMovement") then + entity["movement"] = entity["movement"] * 0.9 + entity["distancePerFrame"] = entity["distancePerFrame"] * 0.85 + elseif (attribute == "quickMovement") then + entity["movement"] = entity["movement"] * 1.05 entity["distancePerFrame"] = entity["distancePerFrame"] * 1.15 - elseif (entity[key] == "quickSpawning") then - entity["spawningCooldownStart"] = entity["spawningCooldownStart"] * 0.85 - entity["spawningCooldownEnd"] = entity["spawningCooldownEnd"] * 0.85 + elseif (attribute == "quickSpawning") then + if entity["spawningCooldownStart"] then + entity["spawningCooldownStart"] = entity["spawningCooldownStart"] * 0.85 + entity["spawningCooldownEnd"] = entity["spawningCooldownEnd"] * 0.85 + end + if entity["spawningTimeModifer"] then + entity["spawningTimeModifer"] = entity["spawningTimeModifer"] * 0.85 + end + elseif (attribute == "altBiter") then + entity["altBiter"] = true + elseif (attribute == "highRegen") then + entity["healing"] = entity["healing"] * 1.5 + elseif (attribute == "highestRegen") then + entity["healing"] = entity["healing"] * 3.5 + elseif (attribute == "big") then + entity["scale"] = entity["scale"] * 1.2 + elseif (attribute == "bigger") then + entity["scale"] = entity["scale"] * 1.35 + elseif (attribute == "highHealth") then + entity["health"] = entity["health"] * 1.20 + elseif (attribute == "highestHealth") then + entity["health"] = entity["health"] * 1.35 + else + error("Unknown attribute " .. attribute) end end end @@ -700,6 +768,23 @@ local function buildAttack(faction, template) } } end + elseif (attack == "physical") then + template.explosionTiers = explosionTiers + template.damageType = "physical" + template.fireDamagePerTickType = "physical" + template.stickerDamagePerTickType = "physical" + template.attackPointEffects = function (attributes) + return { + { + type= "create-entity", + entity_name = "small-scorchmark" + }, + { + type= "create-entity", + entity_name = attributes.attackExplosion + } + } + end elseif (attack == "acid") then template.damageType = "acid" template.fireDamagePerTickType = "acid" @@ -763,6 +848,49 @@ local function buildAttack(faction, template) } } end + elseif (attack == "slow") then + template.force = "enemy" + template.stickerAnimation = { + filename = "__base__/graphics/entity/slowdown-sticker/slowdown-sticker.png", + priority = "extra-high", + width = 11, + height = 11, + frame_count = 13, + animation_speed = 0.4 + } + template.areaEffects = function (attributes) + return { + { + type = "damage", + damage = { amount = attributes.damage, type = "acid" } + }, + { + type = "create-sticker", + sticker = makeSticker(attributes) + } + } + end + elseif (attack == "nuclear") then + template.addon[#template.addon+1] = nuclearAttackNumeric + template.explosionTiers = explosionTiers + template.nuclear = true + template.attackGenerator = function (attack) + return createSuicideAttack(attack, + makeAtomicBlast(attack), + (template.attackAnimation and template.attackAnimation(attack.scale, + attack.tint, + attack.tint2)) or nil) + end + elseif (attack == "bomb") then + template.addon[#template.addon+1] = bombAttackNumeric + template.explosionTiers = explosionTiers + template.attackGenerator = function (attack) + return createSuicideAttack(attack, + nil, + (template.attackAnimation and template.attackAnimation(attack.scale, + attack.tint, + attack.tint2)) or nil) + end end end end diff --git a/prototypes/utils/BiterUtils.lua b/prototypes/utils/BiterUtils.lua index e01697f..8382925 100755 --- a/prototypes/utils/BiterUtils.lua +++ b/prototypes/utils/BiterUtils.lua @@ -6,6 +6,7 @@ local wormUtils = require("WormUtils") -- local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].value +local biterrunanimation = unitUtils.biterrunanimation local spitter_alternative_attacking_animation_sequence = unitUtils.spitter_alternative_attacking_animation_sequence local spawner_integration = unitSpawnerUtils.spawner_integration local spawner_idle_animation = unitSpawnerUtils.spawner_idle_animation @@ -251,7 +252,7 @@ function biterFunctions.makeBiter(attributes) affected_by_tiles = true, dying_sound = make_biter_dying_sounds(0.3 + (0.05 * attributes.effectiveLevel)), working_sound = make_biter_calls(0.2 + (0.05 * attributes.effectiveLevel)), - run_animation = biterrunanimation(attributes.scale, attributes.tint, attributes.tint2 or attributes.tint), + 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, path_resolution_modifier = -5, do_seperation = true } } if attributes.collisionMask then @@ -468,7 +469,7 @@ function biterFunctions.createSuicideAttack(attributes, blastWave, animation) category = "biological" }, sound = make_biter_roars(0.3 + (attributes.effectiveLevel * 0.05)), - animation = animation(attributes.scale, attributes.tint, attributes.tint2 or attributes.tint) + animation = animation } if attributes.nuclear then @@ -529,7 +530,7 @@ function biterFunctions.createSuicideAttack(attributes, blastWave, animation) type = "cluster", cluster_count = attributes.explosionCount, distance = attributes.explosionDistance, - distance_deviation = 3, + distance_deviation = attributes.explosionDistance, action_delivery = { type = "instant", @@ -540,7 +541,7 @@ function biterFunctions.createSuicideAttack(attributes, blastWave, animation) }, { type = "create-entity", - entity_name = attributes.attackScorchmark, + entity_name = attributes.attackScorchmark or "small-scorchmark", check_buildability = true } } @@ -580,7 +581,7 @@ function biterFunctions.createSuicideAttack(attributes, blastWave, animation) }, { type = "create-entity", - entity_name = attributes.attackScorchmark, + entity_name = attributes.attackScorchmark or "small-scorchmark", check_buildability = true } } @@ -602,7 +603,7 @@ function biterFunctions.createSuicideAttack(attributes, blastWave, animation) }, { type = "create-entity", - entity_name = attributes.attackScorchmark, + entity_name = attributes.attackScorchmark or "small-scorchmark", check_buildability = true }, { diff --git a/prototypes/utils/BombUtils.lua b/prototypes/utils/BombUtils.lua index ac3c485..96f4235 100755 --- a/prototypes/utils/BombUtils.lua +++ b/prototypes/utils/BombUtils.lua @@ -32,7 +32,8 @@ function bombUtils.makeAtomicBlast(attributes) target_effects = { type = "damage", - damage = {amount = (attributes.damage * 2) or 400, type = attributes.damageType or "explosion"} + damage = {amount = (attributes.damage * 2) or 400, + type = attributes.damageType or "explosion"} } } } diff --git a/prototypes/utils/UnitUtils.lua b/prototypes/utils/UnitUtils.lua index 5d9870f..178259a 100755 --- a/prototypes/utils/UnitUtils.lua +++ b/prototypes/utils/UnitUtils.lua @@ -17,4 +17,344 @@ function unitUtils.spitter_alternative_attacking_animation_sequence() } end +local function crabRunBiter(scale, tint1, tint2) + return + { + layers= + { + { + filenames = + { + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-01.png", + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-02.png", + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-03.png", + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-04.png", + }, + slice = 8, + lines_per_file = 8, + line_length = 8, + width = 280, + height = 200, + frame_count = 16, + direction_count = 16, + shift = {0,0}, + scale = scale, + tint = tint1, + -- hr_version = + -- { + -- filenames = + -- { + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-01.png", + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-02.png", + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-03.png", + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-04.png", + -- }, + -- slice = 8, + -- lines_per_file = 8, + -- line_length = 8, + -- width = 398, + -- height = 310, + -- frame_count = 16, + -- shift = util.mul_shift(util.by_pixel(-1, -5), scale), + -- direction_count = 16, + -- scale = 0.5 * scale, + -- } + }, + { + filenames = + { + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-mask1-01.png", + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-mask1-02.png", + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-mask1-03.png", + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-mask1-04.png", + }, + slice = 8, + lines_per_file = 8, + flags = { "mask" }, + line_length = 8, + width = 280, + height = 200, + frame_count = 16, + direction_count = 16, + shift = {0,0}, + scale = scale, + tint = tint2, + -- hr_version = + -- { + -- filenames = + -- { + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-mask1-01.png", + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-mask1-02.png", + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-mask1-03.png", + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-mask1-04.png", + -- }, + -- slice = 8, + -- lines_per_file = 8, + -- line_length = 8, + -- width = 238, + -- height = 182, + -- frame_count = 16, + -- shift = util.mul_shift(util.by_pixel(-1, -37), scale), + -- direction_count = 16, + -- scale = 0.5 * scale, + -- tint = tint1, + -- } + }, + { + filenames = + { + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-mask2-01.png", + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-mask2-02.png", + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-mask2-03.png", + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-mask2-04.png", + }, + slice = 8, + lines_per_file = 8, + flags = { "mask" }, + line_length = 8, + width = 280, + height = 200, + frame_count = 16, + direction_count = 16, + shift = {0,0}, + scale = scale, + tint = tint2, + -- hr_version = + -- { + -- filenames = + -- { + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-mask2-01.png", + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-mask2-02.png", + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-mask2-03.png", + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-mask2-04.png", + -- }, + -- slice = 8, + -- lines_per_file = 8, + -- line_length = 8, + -- width = 232, + -- height = 184, + -- frame_count = 16, + -- shift = util.mul_shift(util.by_pixel(0, -38), scale), + -- direction_count = 16, + -- scale = 0.5 * scale, + -- tint = tint2, + -- } + }, + { + filenames = + { + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-shadow-01.png", + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-shadow-02.png", + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-shadow-03.png", + "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/biter-run-shadow-04.png", + }, + slice = 8, + lines_per_file = 8, + line_length = 8, + width = 280, + height = 200, + frame_count = 16, + shift = {0,0}, + direction_count = 16, + scale = scale, + draw_as_shadow = true, + -- hr_version = + -- { + -- filenames = + -- { + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-shadow-01.png", + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-shadow-02.png", + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-shadow-03.png", + -- "__Rampant__/graphics/entities/CybranM_Biter_Run_Anim/hr-biter-run-shadow-04.png", + -- }, + -- slice = 8, + -- lines_per_file = 8, + -- line_length = 8, + -- width = 432, + -- height = 292, + -- frame_count = 16, + -- shift = util.mul_shift(util.by_pixel(8, -1), scale), + -- direction_count = 16, + -- scale = 0.5 * scale, + -- draw_as_shadow = true, + -- } + } + } + } +end + +local function vanillaRunBiter(scale, tint1, tint2) + return + { + layers= + { + { + filenames = + { + "__base__/graphics/entity/biter/biter-run-01.png", + "__base__/graphics/entity/biter/biter-run-02.png", + "__base__/graphics/entity/biter/biter-run-03.png", + "__base__/graphics/entity/biter/biter-run-04.png", + }, + slice = 8, + lines_per_file = 8, + line_length = 8, + width = 202, + height = 158, + frame_count = 16, + direction_count = 16, + shift = util.mul_shift(util.by_pixel(-2, -6), scale), + scale = scale, + hr_version = + { + filenames = + { + "__base__/graphics/entity/biter/hr-biter-run-01.png", + "__base__/graphics/entity/biter/hr-biter-run-02.png", + "__base__/graphics/entity/biter/hr-biter-run-03.png", + "__base__/graphics/entity/biter/hr-biter-run-04.png", + }, + slice = 8, + lines_per_file = 8, + line_length = 8, + width = 398, + height = 310, + frame_count = 16, + shift = util.mul_shift(util.by_pixel(-1, -5), scale), + direction_count = 16, + scale = 0.5 * scale, + } + }, + { + filenames = + { + "__base__/graphics/entity/biter/biter-run-mask1-01.png", + "__base__/graphics/entity/biter/biter-run-mask1-02.png", + "__base__/graphics/entity/biter/biter-run-mask1-03.png", + "__base__/graphics/entity/biter/biter-run-mask1-04.png", + }, + slice = 8, + lines_per_file = 8, + flags = { "mask" }, + line_length = 8, + width = 118, + height = 94, + frame_count = 16, + direction_count = 16, + shift = util.mul_shift(util.by_pixel(0, -38), scale), + scale = scale, + tint = tint1, + hr_version = + { + filenames = + { + "__base__/graphics/entity/biter/hr-biter-run-mask1-01.png", + "__base__/graphics/entity/biter/hr-biter-run-mask1-02.png", + "__base__/graphics/entity/biter/hr-biter-run-mask1-03.png", + "__base__/graphics/entity/biter/hr-biter-run-mask1-04.png", + }, + slice = 8, + lines_per_file = 8, + line_length = 8, + width = 238, + height = 182, + frame_count = 16, + shift = util.mul_shift(util.by_pixel(-1, -37), scale), + direction_count = 16, + scale = 0.5 * scale, + tint = tint1, + } + }, + { + filenames = + { + "__base__/graphics/entity/biter/biter-run-mask2-01.png", + "__base__/graphics/entity/biter/biter-run-mask2-02.png", + "__base__/graphics/entity/biter/biter-run-mask2-03.png", + "__base__/graphics/entity/biter/biter-run-mask2-04.png", + }, + slice = 8, + lines_per_file = 8, + flags = { "mask" }, + line_length = 8, + width = 120, + height = 92, + frame_count = 16, + direction_count = 16, + shift = util.mul_shift(util.by_pixel(-2, -38), scale), + scale = scale, + tint = tint2, + hr_version = + { + filenames = + { + "__base__/graphics/entity/biter/hr-biter-run-mask2-01.png", + "__base__/graphics/entity/biter/hr-biter-run-mask2-02.png", + "__base__/graphics/entity/biter/hr-biter-run-mask2-03.png", + "__base__/graphics/entity/biter/hr-biter-run-mask2-04.png", + }, + slice = 8, + lines_per_file = 8, + line_length = 8, + width = 232, + height = 184, + frame_count = 16, + shift = util.mul_shift(util.by_pixel(0, -38), scale), + direction_count = 16, + scale = 0.5 * scale, + tint = tint2, + } + }, + { + filenames = + { + "__base__/graphics/entity/biter/biter-run-shadow-01.png", + "__base__/graphics/entity/biter/biter-run-shadow-02.png", + "__base__/graphics/entity/biter/biter-run-shadow-03.png", + "__base__/graphics/entity/biter/biter-run-shadow-04.png", + }, + slice = 8, + lines_per_file = 8, + line_length = 8, + width = 216, + height = 144, + frame_count = 16, + shift = util.mul_shift(util.by_pixel(8, 0), scale), + direction_count = 16, + scale = scale, + draw_as_shadow = true, + hr_version = + { + filenames = + { + "__base__/graphics/entity/biter/hr-biter-run-shadow-01.png", + "__base__/graphics/entity/biter/hr-biter-run-shadow-02.png", + "__base__/graphics/entity/biter/hr-biter-run-shadow-03.png", + "__base__/graphics/entity/biter/hr-biter-run-shadow-04.png", + }, + slice = 8, + lines_per_file = 8, + line_length = 8, + width = 432, + height = 292, + frame_count = 16, + shift = util.mul_shift(util.by_pixel(8, -1), scale), + direction_count = 16, + scale = 0.5 * scale, + draw_as_shadow = true, + } + } + } + } +end + +function unitUtils.biterrunanimation(scale, tint1, tint2, altBiter) + if altBiter then + return crabRunBiter(scale, tint1, tint2) + else + return vanillaRunBiter(scale, tint1, tint2) + end +end + + return unitUtils diff --git a/prototypes/utils/WormUtils.lua b/prototypes/utils/WormUtils.lua old mode 100644 new mode 100755