diff --git a/control.lua b/control.lua index d88e56f..742fc9f 100755 --- a/control.lua +++ b/control.lua @@ -304,9 +304,6 @@ local function onConfigChanged() upgraded, natives = upgrade.attempt(natives) if upgraded and onModSettingsChange(nil) then rebuildMap() - if natives.newEnemies then - rebuildNativeTables(natives, game.surfaces[1], game.create_random_generator(natives.enemySeed)) - end -- clear pending chunks, will be added when loop runs below global.pendingChunks = {} @@ -324,6 +321,9 @@ local function onConfigChanged() processPendingChunks(natives, map, surface, pendingChunks, tick, game.forces.enemy.evolution_factor, true) end + if natives.newEnemies then + rebuildNativeTables(natives, game.surfaces[1], game.create_random_generator(natives.enemySeed)) + end end script.on_nth_tick(INTERVAL_PROCESS, diff --git a/data-final-fixes.lua b/data-final-fixes.lua index c4b51d2..89a9c91 100755 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -1,22 +1,40 @@ local vanillaBuildings = require("prototypes/buildings/UpdatesVanilla") +local neutral = require("prototypes/Neutral") +local acid = require("prototypes/Acid") +local physical = require("prototypes/Physical") +local suicide = require("prototypes/Suicide") +local fire = require("prototypes/Fire") +local electric = require("prototypes/Electric") +local nuclear = require("prototypes/Nuclear") +local inferno = require("prototypes/Inferno") +local fast = require("prototypes/Fast") +local troll = require("prototypes/Troll") +-- require("prototypes/Decaying") +-- require("prototypes/Poison") +-- require("prototypes/Undying") +local spawner = require("prototypes/Spawner") +local wasp = require("prototypes/Wasp") +local laser = require("prototypes/Laser") + if settings.startup["rampant-newEnemies"].value then - require("prototypes/Neutral") - require("prototypes/Acid") - require("prototypes/Physical") - require("prototypes/Suicide") - require("prototypes/Fire") - require("prototypes/Electric") - require("prototypes/Nuclear") - require("prototypes/Inferno") - require("prototypes/Fast") - require("prototypes/Troll") + + neutral.addFaction() + acid.addFaction() + physical.addFaction() + suicide.addFaction() + fire.addFaction() + electric.addFaction() + nuclear.addFaction() + inferno.addFaction() + fast.addFaction() + troll.addFaction() -- require("prototypes/Decaying") -- require("prototypes/Poison") -- require("prototypes/Undying") - require("prototypes/Spawner") - require("prototypes/Wasp") - require("prototypes/Laser") + spawner.addFaction() + wasp.addFaction() + laser.addFaction() for _, unitSpawner in pairs(data.raw["unit-spawner"]) do if (unitSpawner.name ~= "biter-spawner") then diff --git a/data-updates.lua b/data-updates.lua index befe355..88ec648 100755 --- a/data-updates.lua +++ b/data-updates.lua @@ -3,6 +3,9 @@ local bobsUpdates = require("prototypes/utils/UpdatesBobs") local NEUpdates = require("prototypes/utils/UpdatesNE") local constants = require("libs/Constants") +local attackBobs = require("prototypes/utils/AttackBobs") +local attackNE = require("prototypes/utils/AttackNE") + if settings.startup["rampant-removeBloodParticles"].value then local explosions = data.raw["explosion"] @@ -16,14 +19,13 @@ if settings.startup["rampant-useDumbProjectiles"].value then local option = settings.startup["bobmods-enemies-enableartifacts"] if option then - - require("prototypes/utils/AttackBobs") + attackBobs.addAttacks() bobsUpdates.useDumbProjectiles() end option = settings.startup["NE_Difficulty"] if option then - require("prototypes/utils/AttackNE") + attackNE.addAttacks() NEUpdates.useDumbProjectiles() if settings.startup["rampant-useNEUnitLaunchers"].value then NEUpdates.useNEUnitLaunchers() diff --git a/libs/ChunkUtils.lua b/libs/ChunkUtils.lua index 26598ea..ded1203 100755 --- a/libs/ChunkUtils.lua +++ b/libs/ChunkUtils.lua @@ -369,6 +369,8 @@ end function chunkUtils.analyzeChunk(chunk, natives, surface, map) local playerObjects = chunkUtils.scorePlayerBuildings(surface, map, natives) setPlayerBaseGenerator(map, chunk, playerObjects) + local resources = surface.count_entities_filtered(map.countResourcesQuery) * RESOURCE_NORMALIZER + setResourceGenerator(map, chunk, resources) end function chunkUtils.createChunk(topX, topY) diff --git a/prototypes/Acid.lua b/prototypes/Acid.lua index fdb2dd5..7164ba4 100755 --- a/prototypes/Acid.lua +++ b/prototypes/Acid.lua @@ -8,6 +8,8 @@ local constants = require("Constants") -- constants +local acid = {} + local ACID_UNIT_TIERS = constants.ACID_UNIT_TIERS local ACID_UNIT_VARIATIONS = constants.ACID_UNIT_VARIATIONS @@ -36,21 +38,1177 @@ local biterLoot = makeUnitAlienLootTable("green") local spawnerLoot = makeSpawnerAlienLootTable("green") local wormLoot = makeWormAlienLootTable("green") --- acid biters -buildUnitSpawner( - { - unit = { - name = "acid-biter", +function acid.addFaction() - attributes = { - explosion = "blood-explosion-small" + -- acid biters + buildUnitSpawner( + { + unit = { + name = "acid-biter", + + attributes = { + explosion = "blood-explosion-small" + }, + attack = { + damageType = "acid" + }, + resistances = {}, + + type = "biter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + loot = biterLoot, + tint1 = {r=0, g=0.85, b=0.13, a=0.65}, + tint2 = {r=0, g=0.85, b=0.13, a=0.65} }, + + unitSpawner = { + name = "acid-biter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0, g=0.85, b=0.13, a=0.65} + } + }, + + { + unit = { + { + type = "attribute", + name = "health", + [1] = 15, + [2] = 75, + [3] = 150, + [4] = 250, + [5] = 400, + [6] = 750, + [7] = 1500, + [8] = 3000, + [9] = 5000, + [10] = 10000 + }, + + { + type = "attack", + name = "cooldown", + [1] = 35, + [2] = 35, + [3] = 35, + [4] = 35, + [5] = 35, + [6] = 35, + [7] = 50, + [8] = 50, + [9] = 55, + [10] = 57 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1750, + [4] = 3500, + [5] = 5000, + [6] = 10000, + [7] = 20000, + [8] = 25000, + [9] = 30000, + [10] = 40000 + }, + + { + type = "attack", + name = "damage", + [1] = 7, + [2] = 15, + [3] = 22.5, + [4] = 35, + [5] = 45, + [6] = 60, + [7] = 75, + [8] = 90, + [9] = 150, + [10] = 200 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + { + type = "attribute", + name = "movement", + [1] = 0.2, + [2] = 0.19, + [3] = 0.185, + [4] = 0.18, + [5] = 0.175, + [6] = 0.17, + [7] = 0.17, + [8] = 0.17, + [9] = 0.17, + [10] = 0.17 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.1, + [2] = 0.125, + [3] = 0.15, + [4] = 0.19, + [5] = 0.195, + [6] = 0.2, + [7] = 0.2, + [8] = 0.2, + [9] = 0.2, + [10] = 0.2 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 4, + [4] = 5, + [5] = 6, + [6] = 8, + [7] = 9, + [8] = 9, + [9] = 10, + [10] = 10 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 0, + [5] = 0, + [6] = 0, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "resistance", + name = "acid", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + }, + + { + + type = "attack", + name = "range", + [1] = 0.5, + [2] = 0.5, + [3] = 0.75, + [4] = 0.75, + [5] = 1.0, + [6] = 1.0, + [7] = 1.25, + [8] = 1.50, + [9] = 1.75, + [10] = 2.0 + } + }, + + unitSpawner = { + + { + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + }, + + { + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + }, + + { + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + }, + { + type = "attribute", + name = "unitsToSpawn", + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 60, + [2] = 60, + [3] = 62, + [4] = 62, + [5] = 63, + [6] = 63, + [7] = 64, + [8] = 64, + [9] = 65, + [10] = 65 + } + }, + + { + type = "resistance", + name = "acid", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + } + + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + createMeleeAttack, + + { + unit = ACID_UNIT_VARIATIONS, + unitSpawner = ACID_NEST_VARIATIONS + }, + + { + unit = ACID_UNIT_TIERS, + unitSpawner = ACID_NEST_TIERS + } + ) + + -- acid spitters + buildUnitSpawner( + { + unit = { + name = "acid-spitter", + + loot = biterLoot, + attributes = { + explosion = "blood-explosion-small" + }, + attack = { + type = "projectile", + directionOnly = true, + softSmokeName = softSmoke + }, + resistances = {}, + + type = "spitter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + attackName = "acid-spitter", + tint = {r=0, g=0.85, b=0.1, a=0.65}, + pTint = {r=0, g=1, b=0.1, a=0.5}, + sTint = {r=0, g=1, b=0.1, a=0.5} + }, + + unitSpawner = { + name = "acid-spitter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0, g=0.85, b=0.13, a=1} + } + }, + + { + unit = { + { + type = "attribute", + name = "health", + [1] = 10, + [2] = 50, + [3] = 200, + [4] = 350, + [5] = 750, + [6] = 1000, + [7] = 1500, + [8] = 2500, + [9] = 4500, + [10] = 7000 + }, + + { + type = "attack", + name = "cooldown", + [1] = 100, + [2] = 100, + [3] = 97, + [4] = 97, + [5] = 95, + [6] = 95, + [7] = 93, + [8] = 93, + [9] = 90, + [10] = 90 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1200, + [4] = 1750, + [5] = 2500, + [6] = 5000, + [7] = 10000, + [8] = 12500, + [9] = 15000, + [10] = 20000 + }, + + { + type = "attack", + name = "damage", + [1] = 4, + [2] = 9, + [3] = 14, + [4] = 23, + [5] = 30, + [6] = 37, + [7] = 45, + [8] = 57, + [9] = 70, + [10] = 80 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + + { + type = "attribute", + name = "movement", + [1] = 0.185, + [2] = 0.18, + [3] = 0.18, + [4] = 0.17, + [5] = 0.17, + [6] = 0.16, + [7] = 0.16, + [8] = 0.15, + [9] = 0.15, + [10] = 0.14 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.04, + [2] = 0.045, + [3] = 0.050, + [4] = 0.055, + [5] = 0.060, + [6] = 0.065, + [7] = 0.070, + [8] = 0.075, + [9] = 0.08, + [10] = 0.084 + }, + + { + + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + } + + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 10, + [4] = 10, + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 + } + }, + + { + + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 70, + [2] = 70, + [3] = 72, + [4] = 72, + [5] = 73, + [6] = 73, + [7] = 74, + [8] = 74, + [9] = 75, + [10] = 75 + } + + }, + + { + + type = "resistance", + name = "acid", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + + }, + + { + type = "attack", + name = "range", + [1] = 13, + [2] = 13, + [3] = 14, + [4] = 14, + [5] = 15, + [6] = 15, + [7] = 16, + [8] = 16, + [9] = 17, + [10] = 17 + }, + + { + type = "attack", + name = "radius", + [1] = 1.2, + [2] = 1.3, + [3] = 1.4, + [4] = 1.5, + [5] = 1.6, + [6] = 1.7, + [7] = 1.8, + [8] = 1.9, + [9] = 2.0, + [10] = 2.5 + }, + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 + + } + }, + + unitSpawner = { + + { + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + }, + + { + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + }, + + { + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + }, + { + type = "attribute", + name = "unitsToSpawn", + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 60, + [2] = 60, + [3] = 62, + [4] = 62, + [5] = 63, + [6] = 63, + [7] = 64, + [8] = 64, + [9] = 65, + [10] = 65 + } + }, + + { + type = "resistance", + name = "acid", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + } + + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + function (attributes) + return createRangedAttack(attributes, + createAttackBall(attributes), + spitterattackanimation(attributes.scale, + attributes.tint)) + end, + + { + unit = ACID_UNIT_VARIATIONS, + unitSpawner = ACID_NEST_VARIATIONS + }, + + { + unit = ACID_UNIT_TIERS, + unitSpawner = ACID_NEST_TIERS + } + ) + + -- acid worms + buildWorm( + { + name = "acid-worm", + + loot = wormLoot, + attributes = {}, attack = { - damageType = "acid" + type = "projectile", + softSmokeName = softSmoke }, resistances = {}, - type = "biter", scales = { [1] = 0.5, [2] = 0.6, @@ -63,318 +1221,41 @@ buildUnitSpawner( [9] = 1.3, [10] = 1.4 }, - loot = biterLoot, - tint1 = {r=0, g=0.85, b=0.13, a=0.65}, - tint2 = {r=0, g=0.85, b=0.13, a=0.65} + attackName = "acid-worm", + tint = {r=0, g=0.85, b=0.1, a=0.65}, + pTint = {r=0, g=1, b=0.1, a=0.5}, + sTint = {r=0, g=1, b=0.1, a=0.5} }, - unitSpawner = { - name = "acid-biter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=0, g=0.85, b=0.13, a=0.65} - } - }, - - { - unit = { + { { type = "attribute", name = "health", - [1] = 15, - [2] = 75, - [3] = 150, - [4] = 250, - [5] = 400, - [6] = 750, + [1] = 200, + [2] = 350, + [3] = 500, + [4] = 750, + [5] = 900, + [6] = 1000, [7] = 1500, [8] = 3000, [9] = 5000, - [10] = 10000 + [10] = 9000 }, { type = "attack", name = "cooldown", - [1] = 35, - [2] = 35, - [3] = 35, - [4] = 35, - [5] = 35, - [6] = 35, - [7] = 50, - [8] = 50, - [9] = 55, - [10] = 57 - }, - - { - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1750, - [4] = 3500, - [5] = 5000, - [6] = 10000, - [7] = 20000, - [8] = 25000, - [9] = 30000, - [10] = 40000 - }, - - { - type = "attack", - name = "damage", - [1] = 7, - [2] = 15, - [3] = 22.5, - [4] = 35, - [5] = 45, - [6] = 60, - [7] = 75, - [8] = 90, - [9] = 150, - [10] = 200 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "movement", - [1] = 0.2, - [2] = 0.19, - [3] = 0.185, - [4] = 0.18, - [5] = 0.175, - [6] = 0.17, - [7] = 0.17, - [8] = 0.17, - [9] = 0.17, - [10] = 0.17 - }, - { - type = "attribute", - name = "distancePerFrame", - [1] = 0.1, - [2] = 0.125, - [3] = 0.15, - [4] = 0.19, - [5] = 0.195, - [6] = 0.2, - [7] = 0.2, - [8] = 0.2, - [9] = 0.2, - [10] = 0.2 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 4, - [4] = 5, - [5] = 6, - [6] = 8, - [7] = 9, - [8] = 9, - [9] = 10, - [10] = 10 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 0, - [5] = 0, - [6] = 0, - [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - - { - type = "resistance", - name = "acid", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - }, - - { - - type = "attack", - name = "range", - [1] = 0.5, - [2] = 0.5, - [3] = 0.75, - [4] = 0.75, - [5] = 1.0, - [6] = 1.0, - [7] = 1.25, - [8] = 1.50, - [9] = 1.75, - [10] = 2.0 - } - }, - - unitSpawner = { - - { - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - }, - - { - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - }, - - { - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 + [1] = 50, + [2] = 50, + [3] = 45, + [4] = 45, + [5] = 40, + [6] = 40, + [7] = 35, + [8] = 35, + [9] = 30, + [10] = 30 }, { @@ -391,313 +1272,18 @@ buildUnitSpawner( [9] = 0.8, [10] = 0.9 }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - }, - { - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, - [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 60, - [2] = 60, - [3] = 62, - [4] = 62, - [5] = 63, - [6] = 63, - [7] = 64, - [8] = 64, - [9] = 65, - [10] = 65 - } - }, - - { - type = "resistance", - name = "acid", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - createMeleeAttack, - - { - unit = ACID_UNIT_VARIATIONS, - unitSpawner = ACID_NEST_VARIATIONS - }, - - { - unit = ACID_UNIT_TIERS, - unitSpawner = ACID_NEST_TIERS - } -) - --- acid spitters -buildUnitSpawner( - { - unit = { - name = "acid-spitter", - - loot = biterLoot, - attributes = { - explosion = "blood-explosion-small" - }, - attack = { - type = "projectile", - directionOnly = true, - softSmokeName = softSmoke - }, - resistances = {}, - - type = "spitter", - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "acid-spitter", - tint = {r=0, g=0.85, b=0.1, a=0.65}, - pTint = {r=0, g=1, b=0.1, a=0.5}, - sTint = {r=0, g=1, b=0.1, a=0.5} - }, - - unitSpawner = { - name = "acid-spitter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=0, g=0.85, b=0.13, a=1} - } - }, - - { - unit = { - { - type = "attribute", - name = "health", - [1] = 10, - [2] = 50, - [3] = 200, - [4] = 350, - [5] = 750, - [6] = 1000, - [7] = 1500, - [8] = 2500, - [9] = 4500, - [10] = 7000 - }, - - { - type = "attack", - name = "cooldown", - [1] = 100, - [2] = 100, - [3] = 97, - [4] = 97, - [5] = 95, - [6] = 95, - [7] = 93, - [8] = 93, - [9] = 90, - [10] = 90 - }, - - { - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1200, - [4] = 1750, - [5] = 2500, - [6] = 5000, - [7] = 10000, - [8] = 12500, - [9] = 15000, - [10] = 20000 - }, - { type = "attack", name = "damage", - [1] = 4, - [2] = 9, - [3] = 14, - [4] = 23, - [5] = 30, - [6] = 37, - [7] = 45, - [8] = 57, + [1] = 12, + [2] = 20, + [3] = 25, + [4] = 30, + [5] = 35, + [6] = 40, + [7] = 50, + [8] = 60, [9] = 70, [10] = 80 }, @@ -717,38 +1303,52 @@ buildUnitSpawner( [10] = 0.16 }, - { type = "attribute", - name = "movement", - [1] = 0.185, - [2] = 0.18, - [3] = 0.18, - [4] = 0.17, - [5] = 0.17, - [6] = 0.16, - [7] = 0.16, - [8] = 0.15, - [9] = 0.15, - [10] = 0.14 + name = "prepareRange", + [1] = 30, + [2] = 30, + [3] = 31, + [4] = 31, + [5] = 32, + [6] = 32, + [7] = 33, + [8] = 33, + [9] = 34, + [10] = 34 }, + { type = "attribute", - name = "distancePerFrame", - [1] = 0.04, - [2] = 0.045, - [3] = 0.050, - [4] = 0.055, - [5] = 0.060, - [6] = 0.065, - [7] = 0.070, - [8] = 0.075, - [9] = 0.08, - [10] = 0.084 + name = "foldingSpeed", + [1] = 0.15, + [2] = 0.15, + [3] = 0.16, + [4] = 0.16, + [5] = 0.16, + [6] = 0.17, + [7] = 0.17, + [8] = 0.18, + [9] = 0.18, + [10] = 0.19 + }, + + { + type = "attribute", + name = "preparingSpeed", + [1] = 0.025, + [2] = 0.025, + [3] = 0.026, + [4] = 0.026, + [5] = 0.027, + [6] = 0.027, + [7] = 0.028, + [8] = 0.028, + [9] = 0.029, + [10] = 0.029 }, { - type = "resistance", name = "physical", decrease = { @@ -763,7 +1363,6 @@ buildUnitSpawner( [9] = 12, [10] = 12 } - }, { @@ -796,38 +1395,6 @@ buildUnitSpawner( }, { - - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 70, - [2] = 70, - [3] = 72, - [4] = 72, - [5] = 73, - [6] = 73, - [7] = 74, - [8] = 74, - [9] = 75, - [10] = 75 - } - - }, - - { - type = "resistance", name = "acid", decrease = { @@ -854,37 +1421,67 @@ buildUnitSpawner( [9] = 90, [10] = 90 } - }, - { + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 70, + [2] = 70, + [3] = 72, + [4] = 72, + [5] = 73, + [6] = 73, + [7] = 74, + [8] = 74, + [9] = 75, + [10] = 75 + } + }, + + { + type = "attack", name = "range", - [1] = 13, - [2] = 13, - [3] = 14, - [4] = 14, - [5] = 15, - [6] = 15, - [7] = 16, - [8] = 16, - [9] = 17, - [10] = 17 + [1] = 21, + [2] = 22, + [3] = 23, + [4] = 23, + [5] = 24, + [6] = 26, + [7] = 26, + [8] = 28, + [9] = 30, + [10] = 32 }, { type = "attack", name = "radius", - [1] = 1.2, - [2] = 1.3, - [3] = 1.4, - [4] = 1.5, - [5] = 1.6, - [6] = 1.7, - [7] = 1.8, - [8] = 1.9, - [9] = 2.0, - [10] = 2.5 + [1] = 1.5, + [2] = 1.6, + [3] = 1.7, + [4] = 1.8, + [5] = 1.9, + [6] = 2.0, + [7] = 2.2, + [8] = 2.3, + [9] = 2.5, + [10] = 3.0 + }, { @@ -936,604 +1533,14 @@ buildUnitSpawner( } }, - unitSpawner = { + function (attributes) + return createRangedAttack(attributes, + createAttackBall(attributes)) + end, - { - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - }, + ACID_WORM_VARIATIONS, + ACID_WORM_TIERS + ) +end - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - }, - - { - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - }, - - { - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - }, - { - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, - [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 60, - [2] = 60, - [3] = 62, - [4] = 62, - [5] = 63, - [6] = 63, - [7] = 64, - [8] = 64, - [9] = 65, - [10] = 65 - } - }, - - { - type = "resistance", - name = "acid", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - } - - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - function (attributes) - return createRangedAttack(attributes, - createAttackBall(attributes), - spitterattackanimation(attributes.scale, - attributes.tint)) - end, - - { - unit = ACID_UNIT_VARIATIONS, - unitSpawner = ACID_NEST_VARIATIONS - }, - - { - unit = ACID_UNIT_TIERS, - unitSpawner = ACID_NEST_TIERS - } -) - --- acid worms -buildWorm( - { - name = "acid-worm", - - loot = wormLoot, - attributes = {}, - attack = { - type = "projectile", - softSmokeName = softSmoke - }, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "acid-worm", - tint = {r=0, g=0.85, b=0.1, a=0.65}, - pTint = {r=0, g=1, b=0.1, a=0.5}, - sTint = {r=0, g=1, b=0.1, a=0.5} - }, - - { - { - type = "attribute", - name = "health", - [1] = 200, - [2] = 350, - [3] = 500, - [4] = 750, - [5] = 900, - [6] = 1000, - [7] = 1500, - [8] = 3000, - [9] = 5000, - [10] = 9000 - }, - - { - type = "attack", - name = "cooldown", - [1] = 50, - [2] = 50, - [3] = 45, - [4] = 45, - [5] = 40, - [6] = 40, - [7] = 35, - [8] = 35, - [9] = 30, - [10] = 30 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attack", - name = "damage", - [1] = 12, - [2] = 20, - [3] = 25, - [4] = 30, - [5] = 35, - [6] = 40, - [7] = 50, - [8] = 60, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "prepareRange", - [1] = 30, - [2] = 30, - [3] = 31, - [4] = 31, - [5] = 32, - [6] = 32, - [7] = 33, - [8] = 33, - [9] = 34, - [10] = 34 - }, - - { - type = "attribute", - name = "foldingSpeed", - [1] = 0.15, - [2] = 0.15, - [3] = 0.16, - [4] = 0.16, - [5] = 0.16, - [6] = 0.17, - [7] = 0.17, - [8] = 0.18, - [9] = 0.18, - [10] = 0.19 - }, - - { - type = "attribute", - name = "preparingSpeed", - [1] = 0.025, - [2] = 0.025, - [3] = 0.026, - [4] = 0.026, - [5] = 0.027, - [6] = 0.027, - [7] = 0.028, - [8] = 0.028, - [9] = 0.029, - [10] = 0.029 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 - } - }, - - { - type = "resistance", - name = "acid", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 70, - [2] = 70, - [3] = 72, - [4] = 72, - [5] = 73, - [6] = 73, - [7] = 74, - [8] = 74, - [9] = 75, - [10] = 75 - } - }, - - { - - type = "attack", - name = "range", - [1] = 21, - [2] = 22, - [3] = 23, - [4] = 23, - [5] = 24, - [6] = 26, - [7] = 26, - [8] = 28, - [9] = 30, - [10] = 32 - }, - - { - type = "attack", - name = "radius", - [1] = 1.5, - [2] = 1.6, - [3] = 1.7, - [4] = 1.8, - [5] = 1.9, - [6] = 2.0, - [7] = 2.2, - [8] = 2.3, - [9] = 2.5, - [10] = 3.0 - - }, - - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - - } - }, - - function (attributes) - return createRangedAttack(attributes, - createAttackBall(attributes)) - end, - - ACID_WORM_VARIATIONS, - ACID_WORM_TIERS -) +return acid diff --git a/prototypes/Electric.lua b/prototypes/Electric.lua index 578e9cf..bdccdb0 100755 --- a/prototypes/Electric.lua +++ b/prototypes/Electric.lua @@ -9,6 +9,8 @@ local constants = require("Constants") -- constants +local electric = {} + local ELECTRIC_UNIT_TIERS = constants.ELECTRIC_UNIT_TIERS local ELECTRIC_UNIT_VARIATIONS = constants.ELECTRIC_UNIT_VARIATIONS @@ -33,34 +35,640 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable -local biterLoot = makeUnitAlienLootTable("blue") -local spawnerLoot = makeSpawnerAlienLootTable("blue") -local wormLoot = makeWormAlienLootTable("blue") +function electric.addFaction() -local electricBubble = makeBubble({ - name = "electric-worm", - lTint = {r=0, g=0.1, b=1, a=1} -}) + local biterLoot = makeUnitAlienLootTable("blue") + local spawnerLoot = makeSpawnerAlienLootTable("blue") + local wormLoot = makeWormAlienLootTable("blue") + + local electricBubble = makeBubble({ + name = "electric-worm", + lTint = {r=0, g=0.1, b=1, a=1} + }) -local softSmoke = "the-soft-smoke-rampant" + local softSmoke = "the-soft-smoke-rampant" --- electric biters -buildUnitSpawner( - { - unit = { - name = "electric-biter", + -- electric biters + buildUnitSpawner( + { + unit = { + name = "electric-biter", - attributes = { - explosion = "blood-explosion-small" + attributes = { + explosion = "blood-explosion-small" + }, + loot = biterLoot, + attack = { + damageType = "electric" + }, + resistances = {}, + + type = "biter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + attackName = "biter-electric", + tint1 = {r=0, g=0.25, b=0.83, a=0.65}, + tint2 = {r=0, g=0.25, b=0.63, a=0.65} }, - loot = biterLoot, + + unitSpawner = { + name = "electric-biter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0, g=0.25, b=0.83, a=0.65} + } + }, + + { + unit = { + { + type = "attribute", + name = "health", + [1] = 10, + [2] = 50, + [3] = 200, + [4] = 350, + [5] = 750, + [6] = 1000, + [7] = 1500, + [8] = 2500, + [9] = 4500, + [10] = 7000 + }, + + { + type = "attack", + name = "cooldown", + [1] = 35, + [2] = 35, + [3] = 35, + [4] = 35, + [5] = 35, + [6] = 35, + [7] = 50, + [8] = 50, + [9] = 55, + [10] = 57 + }, + + { + type = "attack", + name = "width", + [1] = 1.5, + [2] = 1.5, + [3] = 1.6, + [4] = 1.6, + [5] = 1.7, + [6] = 1.7, + [7] = 1.8, + [8] = 1.8, + [9] = 1.9, + [10] = 1.9 + }, + + { + type = "attack", + name = "damageInterval", + [1] = 20, + [2] = 20, + [3] = 21, + [4] = 21, + [5] = 22, + [6] = 22, + [7] = 23, + [8] = 23, + [9] = 24, + [10] = 24 + }, + + { + type = "attack", + name = "duration", + [1] = 20, + [2] = 20, + [3] = 21, + [4] = 21, + [5] = 22, + [6] = 22, + [7] = 23, + [8] = 23, + [9] = 24, + [10] = 24 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1750, + [4] = 3500, + [5] = 5000, + [6] = 10000, + [7] = 20000, + [8] = 25000, + [9] = 30000, + [10] = 40000 + }, + + { + type = "attack", + name = "damage", + [1] = 7, + [2] = 15, + [3] = 22.5, + [4] = 35, + [5] = 45, + [6] = 60, + [7] = 75, + [8] = 90, + [9] = 150, + [10] = 200 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + + { + type = "attribute", + name = "movement", + [1] = 0.2, + [2] = 0.19, + [3] = 0.185, + [4] = 0.18, + [5] = 0.175, + [6] = 0.17, + [7] = 0.17, + [8] = 0.17, + [9] = 0.17, + [10] = 0.17 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.1, + [2] = 0.125, + [3] = 0.15, + [4] = 0.19, + [5] = 0.195, + [6] = 0.2, + [7] = 0.2, + [8] = 0.2, + [9] = 0.2, + [10] = 0.2 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 4, + [4] = 5, + [5] = 6, + [6] = 8, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 0, + [5] = 0, + [6] = 0, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "resistance", + name = "electric", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + }, + + { + type = "attack", + name = "range", + [1] = 11, + [2] = 11, + [3] = 12, + [4] = 12, + [5] = 13, + [6] = 13, + [7] = 14, + [8] = 14, + [9] = 15, + [10] = 15 + } + }, + + unitSpawner = { + + { + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + }, + + { + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + }, + + { + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + }, + + { + type = "attribute", + name = "unitsToSpawn", + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 60, + [2] = 60, + [3] = 62, + [4] = 62, + [5] = 63, + [6] = 63, + [7] = 64, + [8] = 64, + [9] = 65, + [10] = 65 + } + }, + + { + type = "resistance", + name = "electric", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + } + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + function (attributes) + return createElectricAttack(attributes, + makeBeam(attributes), + biterattackanimation(attributes.scale, attributes.tint1, attributes.tint2)) + end, + + { + unit = ELECTRIC_UNIT_VARIATIONS, + unitSpawner = ELECTRIC_NEST_VARIATIONS + }, + + { + unit = ELECTRIC_UNIT_TIERS, + unitSpawner = ELECTRIC_NEST_TIERS + } + ) + + -- electric worms + buildWorm( + { + name = "electric-worm", + + loot = wormLoot, + attributes = {}, attack = { - damageType = "electric" + type = "projectile", + bubble = electricBubble, + damageType = "electric", + softSmokeName = softSmoke, + pointEffects = function(attributes) + return + { + { + type="nested-result", + action = { + { + type = "cluster", + cluster_count = attributes.clusters, + distance = attributes.clusterDistance, + distance_deviation = 3, + action_delivery = + { + type = "projectile", + projectile = attributes.laserName, + duration = 20, + direction_deviation = 0.6, + starting_speed = attributes.startingSpeed, + starting_speed_deviation = 0.3 + } + } + }, + } + } + end }, resistances = {}, - type = "biter", scales = { [1] = 0.5, [2] = 0.6, @@ -73,153 +681,118 @@ buildUnitSpawner( [9] = 1.3, [10] = 1.4 }, - attackName = "biter-electric", - tint1 = {r=0, g=0.25, b=0.83, a=0.65}, - tint2 = {r=0, g=0.25, b=0.63, a=0.65} + attackName = "worm-electric", + tint = {r=0, g=0.25, b=0.83, a=0.65}, + pTint = {r=0, g=0.1, b=1, a=1}, + sTint = {r=0, g=0.1, b=1, a=1}, + lTint = {r=0, g=0.1, b=1, a=1} }, - unitSpawner = { - name = "electric-biter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 + { + { + type = "attack", + name = "startingSpeed", + [1] = 0.25, + [2] = 0.25, + [3] = 0.27, + [4] = 0.27, + [5] = 0.29, + [6] = 0.29, + [7] = 0.31, + [8] = 0.31, + [9] = 0.33, + [10] = 0.33 }, - tint = {r=0, g=0.25, b=0.83, a=0.65} - } - }, - - { - unit = { - { + + { + type = "attack", + name = "clusterDistance", + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 5, + [6] = 5, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + + { + type = "attack", + name = "clusters", + min = 2, + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + { type = "attribute", name = "health", - [1] = 10, - [2] = 50, - [3] = 200, - [4] = 350, - [5] = 750, + [1] = 200, + [2] = 350, + [3] = 500, + [4] = 750, + [5] = 900, [6] = 1000, [7] = 1500, - [8] = 2500, - [9] = 4500, - [10] = 7000 + [8] = 3000, + [9] = 5000, + [10] = 9000 }, { type = "attack", name = "cooldown", - [1] = 35, - [2] = 35, - [3] = 35, - [4] = 35, - [5] = 35, - [6] = 35, - [7] = 50, - [8] = 50, - [9] = 55, - [10] = 57 + [1] = 50, + [2] = 50, + [3] = 45, + [4] = 45, + [5] = 40, + [6] = 40, + [7] = 35, + [8] = 35, + [9] = 30, + [10] = 30 }, { - type = "attack", - name = "width", - [1] = 1.5, - [2] = 1.5, - [3] = 1.6, - [4] = 1.6, - [5] = 1.7, - [6] = 1.7, - [7] = 1.8, - [8] = 1.8, - [9] = 1.9, - [10] = 1.9 - }, - - { - type = "attack", - name = "damageInterval", - [1] = 20, - [2] = 20, - [3] = 21, - [4] = 21, - [5] = 22, - [6] = 22, - [7] = 23, - [8] = 23, - [9] = 24, - [10] = 24 - }, - - { - type = "attack", - name = "duration", - [1] = 20, - [2] = 20, - [3] = 21, - [4] = 21, - [5] = 22, - [6] = 22, - [7] = 23, - [8] = 23, - [9] = 24, - [10] = 24 + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 }, - { - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1750, - [4] = 3500, - [5] = 5000, - [6] = 10000, - [7] = 20000, - [8] = 25000, - [9] = 30000, - [10] = 40000 - }, - { type = "attack", name = "damage", - [1] = 7, - [2] = 15, - [3] = 22.5, - [4] = 35, - [5] = 45, - [6] = 60, - [7] = 75, - [8] = 90, - [9] = 150, - [10] = 200 + [1] = 12, + [2] = 20, + [3] = 25, + [4] = 30, + [5] = 35, + [6] = 40, + [7] = 50, + [8] = 60, + [9] = 70, + [10] = 80 }, { @@ -237,34 +810,49 @@ buildUnitSpawner( [10] = 0.16 }, + { + type = "attribute", + name = "prepareRange", + [1] = 30, + [2] = 30, + [3] = 31, + [4] = 31, + [5] = 32, + [6] = 32, + [7] = 33, + [8] = 33, + [9] = 34, + [10] = 34 + }, + + { + type = "attribute", + name = "foldingSpeed", + [1] = 0.15, + [2] = 0.15, + [3] = 0.16, + [4] = 0.16, + [5] = 0.16, + [6] = 0.17, + [7] = 0.17, + [8] = 0.18, + [9] = 0.18, + [10] = 0.19 + }, { type = "attribute", - name = "movement", - [1] = 0.2, - [2] = 0.19, - [3] = 0.185, - [4] = 0.18, - [5] = 0.175, - [6] = 0.17, - [7] = 0.17, - [8] = 0.17, - [9] = 0.17, - [10] = 0.17 - }, - { - type = "attribute", - name = "distancePerFrame", - [1] = 0.1, - [2] = 0.125, - [3] = 0.15, - [4] = 0.19, - [5] = 0.195, - [6] = 0.2, - [7] = 0.2, - [8] = 0.2, - [9] = 0.2, - [10] = 0.2 + name = "preparingSpeed", + [1] = 0.025, + [2] = 0.025, + [3] = 0.026, + [4] = 0.026, + [5] = 0.027, + [6] = 0.027, + [7] = 0.028, + [8] = 0.028, + [9] = 0.029, + [10] = 0.029 }, { @@ -273,26 +861,14 @@ buildUnitSpawner( decrease = { [1] = 0, [2] = 0, - [3] = 4, + [3] = 5, [4] = 5, - [5] = 6, + [5] = 8, [6] = 8, [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 + [8] = 10, + [9] = 12, + [10] = 12 } }, @@ -302,29 +878,29 @@ buildUnitSpawner( decrease = { [1] = 0, [2] = 0, - [3] = 0, - [4] = 0, - [5] = 0, - [6] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 + [8] = 10, + [9] = 12, + [10] = 12 }, percent = { [1] = 0, [2] = 0, - [3] = 0, + [3] = 10, [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 } }, - + { type = "resistance", name = "electric", @@ -353,188 +929,7 @@ buildUnitSpawner( [10] = 90 } }, - - { - type = "attack", - name = "range", - [1] = 11, - [2] = 11, - [3] = 12, - [4] = 12, - [5] = 13, - [6] = 13, - [7] = 14, - [8] = 14, - [9] = 15, - [10] = 15 - } - }, - - unitSpawner = { - - { - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - }, - - { - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - }, - - { - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - }, - - { - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, - [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - + { type = "resistance", name = "fire", @@ -551,493 +946,105 @@ buildUnitSpawner( [10] = 7 }, percent = { - [1] = 60, - [2] = 60, - [3] = 62, - [4] = 62, - [5] = 63, - [6] = 63, - [7] = 64, - [8] = 64, - [9] = 65, - [10] = 65 + [1] = 70, + [2] = 70, + [3] = 72, + [4] = 72, + [5] = 73, + [6] = 73, + [7] = 74, + [8] = 74, + [9] = 75, + [10] = 75 } }, { - type = "resistance", - name = "electric", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - function (attributes) - return createElectricAttack(attributes, - makeBeam(attributes), - biterattackanimation(attributes.scale, attributes.tint1, attributes.tint2)) - end, - - { - unit = ELECTRIC_UNIT_VARIATIONS, - unitSpawner = ELECTRIC_NEST_VARIATIONS - }, - - { - unit = ELECTRIC_UNIT_TIERS, - unitSpawner = ELECTRIC_NEST_TIERS - } -) - --- electric worms -buildWorm( - { - name = "electric-worm", - - loot = wormLoot, - attributes = {}, - attack = { - type = "projectile", - bubble = electricBubble, - damageType = "electric", - softSmokeName = softSmoke, - pointEffects = function(attributes) - return - { - { - type="nested-result", - action = { - { - type = "cluster", - cluster_count = attributes.clusters, - distance = attributes.clusterDistance, - distance_deviation = 3, - action_delivery = - { - type = "projectile", - projectile = attributes.laserName, - duration = 20, - direction_deviation = 0.6, - starting_speed = attributes.startingSpeed, - starting_speed_deviation = 0.3 - } - } - }, - } - } - end - }, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "worm-electric", - tint = {r=0, g=0.25, b=0.83, a=0.65}, - pTint = {r=0, g=0.1, b=1, a=1}, - sTint = {r=0, g=0.1, b=1, a=1}, - lTint = {r=0, g=0.1, b=1, a=1} - }, - - { - { - type = "attack", - name = "startingSpeed", - [1] = 0.25, - [2] = 0.25, - [3] = 0.27, - [4] = 0.27, - [5] = 0.29, - [6] = 0.29, - [7] = 0.31, - [8] = 0.31, - [9] = 0.33, - [10] = 0.33 - }, - - { - type = "attack", - name = "clusterDistance", - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 5, - [6] = 5, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - - { - type = "attack", - name = "clusters", - min = 2, - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "attribute", - name = "health", - [1] = 200, - [2] = 350, - [3] = 500, - [4] = 750, - [5] = 900, - [6] = 1000, - [7] = 1500, - [8] = 3000, - [9] = 5000, - [10] = 9000 - }, - - { - type = "attack", - name = "cooldown", - [1] = 50, - [2] = 50, - [3] = 45, - [4] = 45, - [5] = 40, - [6] = 40, - [7] = 35, - [8] = 35, - [9] = 30, - [10] = 30 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attack", - name = "damage", - [1] = 12, - [2] = 20, - [3] = 25, - [4] = 30, - [5] = 35, - [6] = 40, - [7] = 50, - [8] = 60, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "prepareRange", - [1] = 30, - [2] = 30, - [3] = 31, - [4] = 31, - [5] = 32, - [6] = 32, - [7] = 33, - [8] = 33, - [9] = 34, - [10] = 34 - }, - - { - type = "attribute", - name = "foldingSpeed", - [1] = 0.15, - [2] = 0.15, - [3] = 0.16, - [4] = 0.16, - [5] = 0.16, - [6] = 0.17, - [7] = 0.17, - [8] = 0.18, - [9] = 0.18, - [10] = 0.19 - }, - - { - type = "attribute", - name = "preparingSpeed", - [1] = 0.025, - [2] = 0.025, - [3] = 0.026, - [4] = 0.026, - [5] = 0.027, - [6] = 0.027, - [7] = 0.028, - [8] = 0.028, - [9] = 0.029, - [10] = 0.029 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 + type = "attack", + name = "range", + [1] = 21, + [2] = 22, + [3] = 23, + [4] = 23, + [5] = 24, + [6] = 26, + [7] = 26, + [8] = 28, + [9] = 30, + [10] = 32 }, - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 - } - }, - { - type = "resistance", - name = "electric", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 + }, + + { + type = "attack", + name = "radius", + [1] = 1.5, + [2] = 1.6, + [3] = 1.7, + [4] = 1.8, + [5] = 1.9, + [6] = 2.0, + [7] = 2.2, + [8] = 2.3, + [9] = 2.5, + [10] = 3.0 } }, - { - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 70, - [2] = 70, - [3] = 72, - [4] = 72, - [5] = 73, - [6] = 73, - [7] = 74, - [8] = 74, - [9] = 75, - [10] = 75 - } - }, + function (attributes) + attributes.laserName = makeLaser(attributes) + return createRangedAttack(attributes, + createAttackBall(attributes)) + end, - { - type = "attack", - name = "range", - [1] = 21, - [2] = 22, - [3] = 23, - [4] = 23, - [5] = 24, - [6] = 26, - [7] = 26, - [8] = 28, - [9] = 30, - [10] = 32 - }, + ELECTRIC_WORM_VARIATIONS, + ELECTRIC_WORM_TIERS + ) +end - - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - }, - - { - type = "attack", - name = "radius", - [1] = 1.5, - [2] = 1.6, - [3] = 1.7, - [4] = 1.8, - [5] = 1.9, - [6] = 2.0, - [7] = 2.2, - [8] = 2.3, - [9] = 2.5, - [10] = 3.0 - } - }, - - function (attributes) - attributes.laserName = makeLaser(attributes) - return createRangedAttack(attributes, - createAttackBall(attributes)) - end, - - ELECTRIC_WORM_VARIATIONS, - ELECTRIC_WORM_TIERS -) +return electric diff --git a/prototypes/Fast.lua b/prototypes/Fast.lua index 90243db..9cc07ff 100755 --- a/prototypes/Fast.lua +++ b/prototypes/Fast.lua @@ -8,6 +8,8 @@ local constants = require("Constants") -- constants +local fast = {} + local FAST_UNIT_TIERS = constants.FAST_UNIT_TIERS local FAST_UNIT_VARIATIONS = constants.FAST_UNIT_VARIATIONS @@ -35,22 +37,1036 @@ local biterLoot = makeUnitAlienLootTable("purple") local spawnerLoot = makeSpawnerAlienLootTable("purple") local wormLoot = makeWormAlienLootTable("purple") +function fast.addFaction() + -- fast biters + buildUnitSpawner( + { + unit = { + name = "fast-biter", --- fast biters -buildUnitSpawner( - { - unit = { - name = "fast-biter", + attributes = { + explosion = "blood-explosion-small" + }, + attack = {}, + resistances = {}, - attributes = { - explosion = "blood-explosion-small" + loot = biterLoot, + type = "biter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint1 = {r=0.26, g=0.76, b=0.72, a=0.65}, + tint2 = {r=1, g=0.63, b=0, a=0.4} + }, + + unitSpawner = { + name = "fast-biter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0.26, g=0.76, b=0.72, a=0.65} + } + }, + + { + unit = { + { + + type = "attribute", + name = "health", + [1] = 15, + [2] = 75, + [3] = 150, + [4] = 250, + [5] = 400, + [6] = 750, + [7] = 1500, + [8] = 3000, + [9] = 5000, + [10] = 10000 + + }, + + { + + type = "attack", + name = "cooldown", + [1] = 35, + [2] = 36, + [3] = 38, + [4] = 38, + [5] = 40, + [6] = 42, + [7] = 42, + [8] = 43, + [9] = 43, + [10] = 45 + + }, + + { + + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 2, + [6] = 5, + [7] = 8, + [8] = 8, + [9] = 10, + [10] = 10 + + }, + + { + + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1750, + [4] = 3500, + [5] = 5000, + [6] = 10000, + [7] = 20000, + [8] = 25000, + [9] = 30000, + [10] = 40000 + + }, + + { + + type = "attack", + name = "damage", + [1] = 7, + [2] = 15, + [3] = 22.5, + [4] = 35, + [5] = 45, + [6] = 60, + [7] = 75, + [8] = 90, + [9] = 150, + [10] = 200 + + }, + + { + + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + + }, + + { + + type = "attribute", + name = "movement", + [1] = 0.22, + [2] = 0.22, + [3] = 0.23, + [4] = 0.23, + [5] = 0.23, + [6] = 0.23, + [7] = 0.24, + [8] = 0.24, + [9] = 0.24, + [10] = 0.25 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.12, + [2] = 0.145, + [3] = 0.17, + [4] = 0.21, + [5] = 0.215, + [6] = 0.22, + [7] = 0.22, + [8] = 0.24, + [9] = 0.24, + [10] = 0.26 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 4, + [4] = 5, + [5] = 6, + [6] = 8, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 0, + [5] = 0, + [6] = 0, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "attack", + name = "range", + [1] = 0.5, + [2] = 0.5, + [3] = 0.75, + [4] = 0.75, + [5] = 1.0, + [6] = 1.0, + [7] = 1.25, + [8] = 1.50, + [9] = 1.75, + [10] = 2.0 + + } + }, + + unitSpawner = { + + { + + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + + }, + + { + + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + + }, + + { + + type = "attribute", + name = "spawingCooldownStart", + [1] = 330, + [2] = 330, + [3] = 325, + [4] = 325, + [5] = 320, + [6] = 320, + [7] = 315, + [8] = 315, + [9] = 310, + [10] = 310 + + }, + + { + + type = "attribute", + name = "spawingCooldownEnd", + [1] = 120, + [2] = 120, + [3] = 125, + [4] = 125, + [5] = 120, + [6] = 120, + [7] = 115, + [8] = 115, + [9] = 110, + [10] = 110 + + }, + + { + + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.12, + [3] = 0.22, + [4] = 0.32, + [5] = 0.42, + [6] = 0.52, + [7] = 0.62, + [8] = 0.72, + [9] = 0.82, + [10] = 0.92 + + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + + }, + { + + type = "attribute", + name = "unitsToSpawn", + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 60, + [2] = 60, + [3] = 62, + [4] = 62, + [5] = 63, + [6] = 63, + [7] = 64, + [8] = 64, + [9] = 65, + [10] = 65 + } + } + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + createMeleeAttack, + + { + unit = FAST_UNIT_VARIATIONS, + unitSpawner = FAST_NEST_VARIATIONS + }, + + { + unit = FAST_UNIT_TIERS, + unitSpawner = FAST_NEST_TIERS + } + ) + + -- fast spitters + buildUnitSpawner( + { + unit = { + name = "fast-spitter", + + loot = biterLoot, + attributes = { + explosion = "blood-explosion-small" + }, + attack = { + type = "projectile", + directionOnly = true, + softSmokeName = softSmoke + }, + resistances = {}, + + type = "spitter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + attackName = "fast-ball", + tint = {r=0.26, g=0.76, b=0.72, a=0.65}, + pTint = {r=0, g=1, b=1, a=0.5}, + sTint = {r=0, g=1, b=1, a=0.5} + }, + + unitSpawner = { + name = "fast-spitter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0.26, g=0.76, b=0.72, a=1} + } + }, + + { + unit = { + { + type = "attribute", + name = "health", + [1] = 10, + [2] = 50, + [3] = 200, + [4] = 350, + [5] = 750, + [6] = 1000, + [7] = 1500, + [8] = 2500, + [9] = 4500, + [10] = 7000 + }, + + { + + type = "attack", + name = "cooldown", + [1] = 80, + [2] = 80, + [3] = 77, + [4] = 77, + [5] = 75, + [6] = 75, + [7] = 73, + [8] = 73, + [9] = 70, + [10] = 70 + + }, + + { + + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 2, + [6] = 5, + [7] = 8, + [8] = 8, + [9] = 10, + [10] = 10 + + }, + + { + + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1200, + [4] = 1750, + [5] = 2500, + [6] = 5000, + [7] = 10000, + [8] = 12500, + [9] = 15000, + [10] = 20000 + + }, + + { + + type = "attack", + name = "damage", + [1] = 4, + [2] = 9, + [3] = 14, + [4] = 23, + [5] = 30, + [6] = 37, + [7] = 45, + [8] = 57, + [9] = 70, + [10] = 80 + + }, + + { + + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + + }, + + + { + type = "attribute", + name = "movement", + [1] = 0.205, + [2] = 0.20, + [3] = 0.20, + [4] = 0.21, + [5] = 0.21, + [6] = 0.22, + [7] = 0.22, + [8] = 0.23, + [9] = 0.23, + [10] = 0.24 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.06, + [2] = 0.065, + [3] = 0.070, + [4] = 0.075, + [5] = 0.080, + [6] = 0.085, + [7] = 0.090, + [8] = 0.095, + [9] = 0.10, + [10] = 0.104 + }, + + { + type = "resistance", + name = "explosion", + percent = { + [1] = 0, + [2] = 0, + [3] = 10, + [4] = 10, + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 + } + }, + + { + type = "attack", + name = "range", + [1] = 13, + [2] = 13, + [3] = 14, + [4] = 14, + [5] = 15, + [6] = 15, + [7] = 16, + [8] = 16, + [9] = 17, + [10] = 17 + }, + + { + type = "attack", + name = "radius", + [1] = 1.2, + [2] = 1.3, + [3] = 1.4, + [4] = 1.5, + [5] = 1.6, + [6] = 1.7, + [7] = 1.8, + [8] = 1.9, + [9] = 2.0, + [10] = 2.5 + + }, + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.7, + [2] = 0.7, + [3] = 0.8, + [4] = 0.8, + [5] = 0.9, + [6] = 0.9, + [7] = 0.10, + [8] = 0.10, + [9] = 1.1, + [10] = 1.1 + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 + } + }, + + unitSpawner = { + + { + + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + + }, + + { + + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + + }, + + { + + type = "attribute", + name = "spawingCooldownStart", + [1] = 330, + [2] = 330, + [3] = 325, + [4] = 325, + [5] = 320, + [6] = 320, + [7] = 315, + [8] = 315, + [9] = 310, + [10] = 310 + + }, + + { + + type = "attribute", + name = "spawingCooldownEnd", + [1] = 120, + [2] = 120, + [3] = 115, + [4] = 115, + [5] = 110, + [6] = 110, + [7] = 105, + [8] = 105, + [9] = 100, + [10] = 100 + + }, + + { + + type = "attribute", + name = "evolutionRequirement", + [1] = 0.08, + [2] = 0.16, + [3] = 0.24, + [4] = 0.35, + [5] = 0.40, + [6] = 0.45, + [7] = 0.55, + [8] = 0.65, + [9] = 0.75, + [10] = 0.9 + + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + + }, + { + + type = "attribute", + name = "unitsToSpawn", + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 60, + [2] = 60, + [3] = 62, + [4] = 62, + [5] = 63, + [6] = 63, + [7] = 64, + [8] = 64, + [9] = 65, + [10] = 65 + } + } + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + function (attributes) + return createRangedAttack(attributes, + createAttackBall(attributes), + spitterattackanimation(attributes.scale, + attributes.tint)) + end, + + { + unit = FAST_UNIT_VARIATIONS, + unitSpawner = FAST_NEST_VARIATIONS + }, + + { + unit = FAST_UNIT_TIERS, + unitSpawner = FAST_NEST_TIERS + } + ) + + -- fast worms + buildWorm( + { + name = "fast-worm", + + loot = wormLoot, + attributes = {}, + attack = { + type = "projectile", + softSmokeName = softSmoke }, - attack = {}, resistances = {}, - loot = biterLoot, - type = "biter", scales = { [1] = 0.5, [2] = 0.6, @@ -63,121 +1079,74 @@ buildUnitSpawner( [9] = 1.3, [10] = 1.4 }, - tint1 = {r=0.26, g=0.76, b=0.72, a=0.65}, - tint2 = {r=1, g=0.63, b=0, a=0.4} + attackName = "worm-fast", + tint = {r=0.56, g=0.46, b=0.42, a=0.65}, + pTint = {r=0, g=1, b=1, a=0.5}, + sTint = {r=0, g=1, b=1, a=0.5} }, - unitSpawner = { - name = "fast-biter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=0.26, g=0.76, b=0.72, a=0.65} - } - }, - - { - unit = { - { - + { + { type = "attribute", name = "health", - [1] = 15, - [2] = 75, - [3] = 150, - [4] = 250, - [5] = 400, - [6] = 750, + [1] = 200, + [2] = 350, + [3] = 500, + [4] = 750, + [5] = 900, + [6] = 1000, [7] = 1500, [8] = 3000, [9] = 5000, - [10] = 10000 - + [10] = 9000 }, - { - + { type = "attack", name = "cooldown", - [1] = 35, - [2] = 36, - [3] = 38, - [4] = 38, + [1] = 50, + [2] = 50, + [3] = 45, + [4] = 45, [5] = 40, - [6] = 42, - [7] = 42, - [8] = 43, - [9] = 43, - [10] = 45 - + [6] = 40, + [7] = 35, + [8] = 35, + [9] = 30, + [10] = 30 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 }, - { - - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 2, - [6] = 5, - [7] = 8, - [8] = 8, - [9] = 10, - [10] = 10 - - }, - - { - - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1750, - [4] = 3500, - [5] = 5000, - [6] = 10000, - [7] = 20000, - [8] = 25000, - [9] = 30000, - [10] = 40000 - - }, - - { - + { type = "attack", name = "damage", - [1] = 7, - [2] = 15, - [3] = 22.5, - [4] = 35, - [5] = 45, - [6] = 60, - [7] = 75, - [8] = 90, - [9] = 150, - [10] = 200 - + [1] = 12, + [2] = 20, + [3] = 25, + [4] = 30, + [5] = 35, + [6] = 40, + [7] = 50, + [8] = 60, + [9] = 70, + [10] = 80 }, - { - + { type = "attribute", name = "healing", [1] = 0.01, @@ -190,37 +1159,51 @@ buildUnitSpawner( [8] = 0.12, [9] = 0.14, [10] = 0.16 - }, - { - + { type = "attribute", - name = "movement", - [1] = 0.22, - [2] = 0.22, - [3] = 0.23, - [4] = 0.23, - [5] = 0.23, - [6] = 0.23, - [7] = 0.24, - [8] = 0.24, - [9] = 0.24, - [10] = 0.25 + name = "prepareRange", + [1] = 30, + [2] = 30, + [3] = 31, + [4] = 31, + [5] = 32, + [6] = 32, + [7] = 33, + [8] = 33, + [9] = 34, + [10] = 34 }, - { + + { type = "attribute", - name = "distancePerFrame", - [1] = 0.12, - [2] = 0.145, - [3] = 0.17, - [4] = 0.21, - [5] = 0.215, - [6] = 0.22, - [7] = 0.22, - [8] = 0.24, - [9] = 0.24, - [10] = 0.26 + name = "foldingSpeed", + [1] = 0.17, + [2] = 0.17, + [3] = 0.18, + [4] = 0.18, + [5] = 0.18, + [6] = 0.19, + [7] = 0.19, + [8] = 0.20, + [9] = 0.20, + [10] = 0.21 + }, + + { + type = "attribute", + name = "preparingSpeed", + [1] = 0.027, + [2] = 0.027, + [3] = 0.028, + [4] = 0.028, + [5] = 0.029, + [6] = 0.029, + [7] = 0.030, + [8] = 0.030, + [9] = 0.031, + [10] = 0.031 }, { @@ -229,219 +1212,14 @@ buildUnitSpawner( decrease = { [1] = 0, [2] = 0, - [3] = 4, + [3] = 5, [4] = 5, - [5] = 6, + [5] = 8, [6] = 8, [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 0, - [5] = 0, - [6] = 0, - [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - - { - type = "attack", - name = "range", - [1] = 0.5, - [2] = 0.5, - [3] = 0.75, - [4] = 0.75, - [5] = 1.0, - [6] = 1.0, - [7] = 1.25, - [8] = 1.50, - [9] = 1.75, - [10] = 2.0 - - } - }, - - unitSpawner = { - - { - - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - - }, - - { - - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - - }, - - { - - type = "attribute", - name = "spawingCooldownStart", - [1] = 330, - [2] = 330, - [3] = 325, - [4] = 325, - [5] = 320, - [6] = 320, - [7] = 315, - [8] = 315, - [9] = 310, - [10] = 310 - - }, - - { - - type = "attribute", - name = "spawingCooldownEnd", - [1] = 120, - [2] = 120, - [3] = 125, - [4] = 125, - [5] = 120, - [6] = 120, - [7] = 115, - [8] = 115, - [9] = 110, - [10] = 110 - - }, - - { - - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.12, - [3] = 0.22, - [4] = 0.32, - [5] = 0.42, - [6] = 0.52, - [7] = 0.62, - [8] = 0.72, - [9] = 0.82, - [10] = 0.92 - - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - - }, - { - - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, + [8] = 10, [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + [10] = 12 } }, @@ -449,28 +1227,28 @@ buildUnitSpawner( type = "resistance", name = "explosion", decrease = { - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 }, percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + [1] = 0, + [2] = 0, + [3] = 10, + [4] = 10, + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 } }, @@ -490,284 +1268,47 @@ buildUnitSpawner( [10] = 7 }, percent = { - [1] = 60, - [2] = 60, - [3] = 62, - [4] = 62, - [5] = 63, - [6] = 63, - [7] = 64, - [8] = 64, - [9] = 65, - [10] = 65 - } - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - createMeleeAttack, - - { - unit = FAST_UNIT_VARIATIONS, - unitSpawner = FAST_NEST_VARIATIONS - }, - - { - unit = FAST_UNIT_TIERS, - unitSpawner = FAST_NEST_TIERS - } -) - --- fast spitters -buildUnitSpawner( - { - unit = { - name = "fast-spitter", - - loot = biterLoot, - attributes = { - explosion = "blood-explosion-small" - }, - attack = { - type = "projectile", - directionOnly = true, - softSmokeName = softSmoke - }, - resistances = {}, - - type = "spitter", - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "fast-ball", - tint = {r=0.26, g=0.76, b=0.72, a=0.65}, - pTint = {r=0, g=1, b=1, a=0.5}, - sTint = {r=0, g=1, b=1, a=0.5} - }, - - unitSpawner = { - name = "fast-spitter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=0.26, g=0.76, b=0.72, a=1} - } - }, - - { - unit = { - { - type = "attribute", - name = "health", - [1] = 10, - [2] = 50, - [3] = 200, - [4] = 350, - [5] = 750, - [6] = 1000, - [7] = 1500, - [8] = 2500, - [9] = 4500, - [10] = 7000 - }, - - { - - type = "attack", - name = "cooldown", - [1] = 80, - [2] = 80, - [3] = 77, - [4] = 77, - [5] = 75, - [6] = 75, - [7] = 73, - [8] = 73, - [9] = 70, - [10] = 70 - - }, - - { - - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 2, - [6] = 5, - [7] = 8, - [8] = 8, - [9] = 10, - [10] = 10 - - }, - - { - - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1200, - [4] = 1750, - [5] = 2500, - [6] = 5000, - [7] = 10000, - [8] = 12500, - [9] = 15000, - [10] = 20000 - - }, - - { - - type = "attack", - name = "damage", - [1] = 4, - [2] = 9, - [3] = 14, - [4] = 23, - [5] = 30, - [6] = 37, - [7] = 45, - [8] = 57, - [9] = 70, - [10] = 80 - - }, - - { - - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - - }, - - - { - type = "attribute", - name = "movement", - [1] = 0.205, - [2] = 0.20, - [3] = 0.20, - [4] = 0.21, - [5] = 0.21, - [6] = 0.22, - [7] = 0.22, - [8] = 0.23, - [9] = 0.23, - [10] = 0.24 - }, - { - type = "attribute", - name = "distancePerFrame", - [1] = 0.06, - [2] = 0.065, - [3] = 0.070, - [4] = 0.075, - [5] = 0.080, - [6] = 0.085, - [7] = 0.090, - [8] = 0.095, - [9] = 0.10, - [10] = 0.104 - }, - - { - type = "resistance", - name = "explosion", - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 + [1] = 70, + [2] = 70, + [3] = 72, + [4] = 72, + [5] = 73, + [6] = 73, + [7] = 74, + [8] = 74, + [9] = 75, + [10] = 75 } }, { type = "attack", name = "range", - [1] = 13, - [2] = 13, - [3] = 14, - [4] = 14, - [5] = 15, - [6] = 15, - [7] = 16, - [8] = 16, - [9] = 17, - [10] = 17 + [1] = 21, + [2] = 22, + [3] = 23, + [4] = 23, + [5] = 24, + [6] = 26, + [7] = 26, + [8] = 28, + [9] = 30, + [10] = 32 }, { type = "attack", name = "radius", - [1] = 1.2, - [2] = 1.3, - [3] = 1.4, - [4] = 1.5, - [5] = 1.6, - [6] = 1.7, - [7] = 1.8, - [8] = 1.9, - [9] = 2.0, - [10] = 2.5 - + [1] = 1.5, + [2] = 1.6, + [3] = 1.7, + [4] = 1.8, + [5] = 1.9, + [6] = 2.0, + [7] = 2.2, + [8] = 2.3, + [9] = 2.5, + [10] = 3.0 }, { @@ -785,22 +1326,22 @@ buildUnitSpawner( [10] = 0.05 }, - { + { type = "attack", name = "particleHoizontalSpeed", - [1] = 0.7, - [2] = 0.7, - [3] = 0.8, - [4] = 0.8, - [5] = 0.9, - [6] = 0.9, - [7] = 0.10, - [8] = 0.10, - [9] = 1.1, - [10] = 1.1 + [1] = 0.8, + [2] = 0.8, + [3] = 0.9, + [4] = 0.9, + [5] = 1, + [6] = 1, + [7] = 1.1, + [8] = 1.1, + [9] = 1.2, + [10] = 1.2 }, - { + { type = "attack", name = "particleHoizontalSpeedDeviation", [1] = 0.0025, @@ -815,551 +1356,15 @@ buildUnitSpawner( [10] = 0.0021 } }, - - unitSpawner = { - { - - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - - }, + function (attributes) + return createRangedAttack(attributes, + createAttackBall(attributes)) + end, - { - - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - - }, + FAST_WORM_VARIATIONS, + FAST_WORM_TIERS + ) +end - { - - type = "attribute", - name = "spawingCooldownStart", - [1] = 330, - [2] = 330, - [3] = 325, - [4] = 325, - [5] = 320, - [6] = 320, - [7] = 315, - [8] = 315, - [9] = 310, - [10] = 310 - - }, - - { - - type = "attribute", - name = "spawingCooldownEnd", - [1] = 120, - [2] = 120, - [3] = 115, - [4] = 115, - [5] = 110, - [6] = 110, - [7] = 105, - [8] = 105, - [9] = 100, - [10] = 100 - - }, - - { - - type = "attribute", - name = "evolutionRequirement", - [1] = 0.08, - [2] = 0.16, - [3] = 0.24, - [4] = 0.35, - [5] = 0.40, - [6] = 0.45, - [7] = 0.55, - [8] = 0.65, - [9] = 0.75, - [10] = 0.9 - - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - - }, - { - - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, - [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - { - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 60, - [2] = 60, - [3] = 62, - [4] = 62, - [5] = 63, - [6] = 63, - [7] = 64, - [8] = 64, - [9] = 65, - [10] = 65 - } - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - function (attributes) - return createRangedAttack(attributes, - createAttackBall(attributes), - spitterattackanimation(attributes.scale, - attributes.tint)) - end, - - { - unit = FAST_UNIT_VARIATIONS, - unitSpawner = FAST_NEST_VARIATIONS - }, - - { - unit = FAST_UNIT_TIERS, - unitSpawner = FAST_NEST_TIERS - } -) - --- fast worms -buildWorm( - { - name = "fast-worm", - - loot = wormLoot, - attributes = {}, - attack = { - type = "projectile", - softSmokeName = softSmoke - }, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "worm-fast", - tint = {r=0.56, g=0.46, b=0.42, a=0.65}, - pTint = {r=0, g=1, b=1, a=0.5}, - sTint = {r=0, g=1, b=1, a=0.5} - }, - - { - { - type = "attribute", - name = "health", - [1] = 200, - [2] = 350, - [3] = 500, - [4] = 750, - [5] = 900, - [6] = 1000, - [7] = 1500, - [8] = 3000, - [9] = 5000, - [10] = 9000 - }, - - { - type = "attack", - name = "cooldown", - [1] = 50, - [2] = 50, - [3] = 45, - [4] = 45, - [5] = 40, - [6] = 40, - [7] = 35, - [8] = 35, - [9] = 30, - [10] = 30 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attack", - name = "damage", - [1] = 12, - [2] = 20, - [3] = 25, - [4] = 30, - [5] = 35, - [6] = 40, - [7] = 50, - [8] = 60, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "prepareRange", - [1] = 30, - [2] = 30, - [3] = 31, - [4] = 31, - [5] = 32, - [6] = 32, - [7] = 33, - [8] = 33, - [9] = 34, - [10] = 34 - }, - - { - type = "attribute", - name = "foldingSpeed", - [1] = 0.17, - [2] = 0.17, - [3] = 0.18, - [4] = 0.18, - [5] = 0.18, - [6] = 0.19, - [7] = 0.19, - [8] = 0.20, - [9] = 0.20, - [10] = 0.21 - }, - - { - type = "attribute", - name = "preparingSpeed", - [1] = 0.027, - [2] = 0.027, - [3] = 0.028, - [4] = 0.028, - [5] = 0.029, - [6] = 0.029, - [7] = 0.030, - [8] = 0.030, - [9] = 0.031, - [10] = 0.031 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 70, - [2] = 70, - [3] = 72, - [4] = 72, - [5] = 73, - [6] = 73, - [7] = 74, - [8] = 74, - [9] = 75, - [10] = 75 - } - }, - - { - type = "attack", - name = "range", - [1] = 21, - [2] = 22, - [3] = 23, - [4] = 23, - [5] = 24, - [6] = 26, - [7] = 26, - [8] = 28, - [9] = 30, - [10] = 32 - }, - - { - type = "attack", - name = "radius", - [1] = 1.5, - [2] = 1.6, - [3] = 1.7, - [4] = 1.8, - [5] = 1.9, - [6] = 2.0, - [7] = 2.2, - [8] = 2.3, - [9] = 2.5, - [10] = 3.0 - }, - - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.8, - [2] = 0.8, - [3] = 0.9, - [4] = 0.9, - [5] = 1, - [6] = 1, - [7] = 1.1, - [8] = 1.1, - [9] = 1.2, - [10] = 1.2 - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - } - }, - - function (attributes) - return createRangedAttack(attributes, - createAttackBall(attributes)) - end, - - FAST_WORM_VARIATIONS, - FAST_WORM_TIERS -) +return fast diff --git a/prototypes/Fire.lua b/prototypes/Fire.lua index 73754a7..5208b23 100755 --- a/prototypes/Fire.lua +++ b/prototypes/Fire.lua @@ -8,6 +8,8 @@ local constants = require("Constants") -- constants +local fire = {} + local FIRE_UNIT_TIERS = constants.FIRE_UNIT_TIERS local FIRE_UNIT_VARIATIONS = constants.FIRE_UNIT_VARIATIONS @@ -35,452 +37,406 @@ local biterLoot = makeUnitAlienLootTable("red") local spawnerLoot = makeSpawnerAlienLootTable("red") local wormLoot = makeWormAlienLootTable("red") +function fire.addFaction() + -- fire biters + buildUnitSpawner( + { + unit = { + name = "fire-biter", --- fire biters -buildUnitSpawner( - { - unit = { - name = "fire-biter", - - loot = biterLoot, - attributes = { - explosion = "blood-explosion-small" - }, - attack = { - damageType = "acid" - }, - resistances = {}, - - type = "biter", - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint1 = {r=0.65, g=0, b=0, a=0.65}, - tint2 = {r=1, g=1, b=1, a=0.4} - }, - - unitSpawner = { - name = "fire-biter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - scales = { - [1] = 0.5, - [2] = 0.5, - [3] = 0.5, - [4] = 0.5, - [5] = 0.5, - [6] = 0.5, - [7] = 0.5, - [8] = 0.5, - [9] = 0.5, - [10] = 0.5 - }, - tint = {r=1.0, g=0, b=0, a=1.0} - } - }, - - { - unit = { - { - - type = "attribute", - name = "health", - [1] = 15, - [2] = 75, - [3] = 150, - [4] = 250, - [5] = 400, - [6] = 750, - [7] = 1500, - [8] = 3000, - [9] = 5000, - [10] = 10000 - - }, - - { - - type = "attack", - name = "cooldown", - [1] = 35, - [2] = 35, - [3] = 35, - [4] = 35, - [5] = 35, - [6] = 35, - [7] = 50, - [8] = 50, - [9] = 55, - [10] = 57 - - }, - - { - - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - - }, - - { - - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1750, - [4] = 3500, - [5] = 5000, - [6] = 10000, - [7] = 20000, - [8] = 25000, - [9] = 30000, - [10] = 40000 - - }, - - { - - type = "attack", - name = "damage", - [1] = 7, - [2] = 15, - [3] = 22.5, - [4] = 35, - [5] = 45, - [6] = 60, - [7] = 75, - [8] = 90, - [9] = 150, - [10] = 200 - - }, - - { - - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - - }, - - { - - type = "attribute", - name = "movement", - [1] = 0.2, - [2] = 0.19, - [3] = 0.185, - [4] = 0.18, - [5] = 0.175, - [6] = 0.17, - [7] = 0.17, - [8] = 0.17, - [9] = 0.17, - [10] = 0.17 - }, - { - type = "attribute", - name = "distancePerFrame", - [1] = 0.1, - [2] = 0.125, - [3] = 0.15, - [4] = 0.19, - [5] = 0.195, - [6] = 0.2, - [7] = 0.2, - [8] = 0.2, - [9] = 0.2, - [10] = 0.2 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 4, - [4] = 5, - [5] = 6, - [6] = 8, - [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 + loot = biterLoot, + attributes = { + explosion = "blood-explosion-small" }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 0, - [5] = 0, - [6] = 0, - [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 + attack = { + damageType = "acid" }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, + resistances = {}, - { - type = "resistance", - name = "fire", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 + type = "biter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } + tint1 = {r=0.65, g=0, b=0, a=0.65}, + tint2 = {r=1, g=1, b=1, a=0.4} }, - { - type = "attack", - name = "range", - [1] = 0.5, - [2] = 0.5, - [3] = 0.75, - [4] = 0.75, - [5] = 1.0, - [6] = 1.0, - [7] = 1.25, - [8] = 1.50, - [9] = 1.75, - [10] = 2.0 - + unitSpawner = { + name = "fire-biter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + scales = { + [1] = 0.5, + [2] = 0.5, + [3] = 0.5, + [4] = 0.5, + [5] = 0.5, + [6] = 0.5, + [7] = 0.5, + [8] = 0.5, + [9] = 0.5, + [10] = 0.5 + }, + tint = {r=1.0, g=0, b=0, a=1.0} } }, - - unitSpawner = { - { - - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - - }, + { + unit = { + { - { - - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - - }, - - { - - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - - }, - - { - - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - - }, - - { - - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.12, - [3] = 0.22, - [4] = 0.32, - [5] = 0.42, - [6] = 0.52, - [7] = 0.62, - [8] = 0.72, - [9] = 0.82, - [10] = 0.92 - - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - - }, - { - - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, - [9] = 12, - [10] = 14 - }, - percent = { + type = "attribute", + name = "health", [1] = 15, + [2] = 75, + [3] = 150, + [4] = 250, + [5] = 400, + [6] = 750, + [7] = 1500, + [8] = 3000, + [9] = 5000, + [10] = 10000 + + }, + + { + + type = "attack", + name = "cooldown", + [1] = 35, + [2] = 35, + [3] = 35, + [4] = 35, + [5] = 35, + [6] = 35, + [7] = 50, + [8] = 50, + [9] = 55, + [10] = 57 + + }, + + { + + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + + }, + + { + + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1750, + [4] = 3500, + [5] = 5000, + [6] = 10000, + [7] = 20000, + [8] = 25000, + [9] = 30000, + [10] = 40000 + + }, + + { + + type = "attack", + name = "damage", + [1] = 7, [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + [3] = 22.5, + [4] = 35, + [5] = 45, + [6] = 60, + [7] = 75, + [8] = 90, + [9] = 150, + [10] = 200 + + }, + + { + + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + + }, + + { + + type = "attribute", + name = "movement", + [1] = 0.2, + [2] = 0.19, + [3] = 0.185, + [4] = 0.18, + [5] = 0.175, + [6] = 0.17, + [7] = 0.17, + [8] = 0.17, + [9] = 0.17, + [10] = 0.17 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.1, + [2] = 0.125, + [3] = 0.15, + [4] = 0.19, + [5] = 0.195, + [6] = 0.2, + [7] = 0.2, + [8] = 0.2, + [9] = 0.2, + [10] = 0.2 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 4, + [4] = 5, + [5] = 6, + [6] = 8, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 0, + [5] = 0, + [6] = 0, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + }, + + { + type = "attack", + name = "range", + [1] = 0.5, + [2] = 0.5, + [3] = 0.75, + [4] = 0.75, + [5] = 1.0, + [6] = 1.0, + [7] = 1.25, + [8] = 1.50, + [9] = 1.75, + [10] = 2.0 + } }, + + unitSpawner = { - { - type = "resistance", - name = "explosion", - decrease = { + { + + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + + }, + + { + + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + + }, + + { + + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + + }, + + { + + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + + }, + + { + + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.12, + [3] = 0.22, + [4] = 0.32, + [5] = 0.42, + [6] = 0.52, + [7] = 0.62, + [8] = 0.72, + [9] = 0.82, + [10] = 0.92 + + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + + }, + { + + type = "attribute", + name = "unitsToSpawn", [1] = 5, [2] = 5, [3] = 6, @@ -492,127 +448,783 @@ buildUnitSpawner( [9] = 9, [10] = 9 }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + }, + + { + + type = "resistance", + name = "acid", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + } }, - { - type = "resistance", - name = "fire", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - }, - - { - - type = "resistance", - name = "acid", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, } }, - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, + createMeleeAttack, + + { + unit = FIRE_UNIT_VARIATIONS, + unitSpawner = FIRE_NEST_VARIATIONS + }, + + { + unit = FIRE_UNIT_TIERS, + unitSpawner = FIRE_NEST_TIERS } - }, + ) - createMeleeAttack, + -- fire spitters + buildUnitSpawner( + { + unit = { + name = "fire-spitter", - { - unit = FIRE_UNIT_VARIATIONS, - unitSpawner = FIRE_NEST_VARIATIONS - }, + attributes = { + explosion = "blood-explosion-small" + }, + loot = biterLoot, + attack = { + type = "projectile", + damageType = "acid", + directionOnly = true, + softSmokeName = softSmoke + }, + resistances = {}, - { - unit = FIRE_UNIT_TIERS, - unitSpawner = FIRE_NEST_TIERS - } -) - --- fire spitters -buildUnitSpawner( - { - unit = { - name = "fire-spitter", - - attributes = { - explosion = "blood-explosion-small" + type = "spitter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + attackName = "fire-spitter", + tint = {r=0.65, g=0, b=0, a=0.65}, + pTint = {r=1, g=1, b=1, a=0.5}, + sTint = {r=1, g=1, b=1, a=0.5} }, - loot = biterLoot, + + unitSpawner = { + name = "fire-spitter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + + scales = { + [1] = 0.5, + [2] = 0.5, + [3] = 0.5, + [4] = 0.5, + [5] = 0.5, + [6] = 0.5, + [7] = 0.5, + [8] = 0.5, + [9] = 0.5, + [10] = 0.5 + }, + tint = {r=0.99, g=0.09, b=0.09, a=1} + } + }, + + { + unit = { + { + type = "attribute", + name = "health", + [1] = 10, + [2] = 50, + [3] = 200, + [4] = 350, + [5] = 750, + [6] = 1000, + [7] = 1500, + [8] = 2500, + [9] = 4500, + [10] = 7000 + }, + + { + + type = "attack", + name = "cooldown", + [1] = 100, + [2] = 100, + [3] = 97, + [4] = 97, + [5] = 95, + [6] = 95, + [7] = 93, + [8] = 93, + [9] = 90, + [10] = 90 + + }, + + { + + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + + }, + + { + + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1200, + [4] = 1750, + [5] = 2500, + [6] = 5000, + [7] = 10000, + [8] = 12500, + [9] = 15000, + [10] = 20000 + + }, + + { + + type = "attack", + name = "damage", + [1] = 4, + [2] = 9, + [3] = 14, + [4] = 23, + [5] = 30, + [6] = 37, + [7] = 45, + [8] = 57, + [9] = 70, + [10] = 80 + + }, + + { + + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + + }, + + + { + type = "attribute", + name = "movement", + [1] = 0.185, + [2] = 0.18, + [3] = 0.18, + [4] = 0.17, + [5] = 0.17, + [6] = 0.16, + [7] = 0.16, + [8] = 0.15, + [9] = 0.15, + [10] = 0.14 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.04, + [2] = 0.045, + [3] = 0.050, + [4] = 0.055, + [5] = 0.060, + [6] = 0.065, + [7] = 0.070, + [8] = 0.075, + [9] = 0.08, + [10] = 0.084 + }, + + { + type = "resistance", + name = "explosion", + percent = { + [1] = 0, + [2] = 0, + [3] = 10, + [4] = 10, + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + }, + + { + + type = "resistance", + name = "acid", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + + }, + + { + type = "attack", + name = "range", + [1] = 13, + [2] = 13, + [3] = 14, + [4] = 14, + [5] = 15, + [6] = 15, + [7] = 16, + [8] = 16, + [9] = 17, + [10] = 17 + }, + + { + type = "attack", + name = "radius", + [1] = 1.2, + [2] = 1.3, + [3] = 1.4, + [4] = 1.5, + [5] = 1.6, + [6] = 1.7, + [7] = 1.8, + [8] = 1.9, + [9] = 2.0, + [10] = 2.5 + + }, + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 + } + }, + + unitSpawner = { + + { + + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + + }, + + { + + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + + }, + + { + + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + + }, + + { + + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + + }, + + { + + type = "attribute", + name = "evolutionRequirement", + [1] = 0.08, + [2] = 0.16, + [3] = 0.24, + [4] = 0.35, + [5] = 0.40, + [6] = 0.45, + [7] = 0.55, + [8] = 0.65, + [9] = 0.75, + [10] = 0.9 + + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + + }, + { + + type = "attribute", + name = "unitsToSpawn", + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + }, + + { + + type = "resistance", + name = "acid", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + + } + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + function (attributes) + return createRangedAttack(attributes, + createAttackBall(attributes), + spitterattackanimation(attributes.scale, + attributes.tint)) + end, + + { + unit = FIRE_UNIT_VARIATIONS, + unitSpawner = FIRE_NEST_VARIATIONS + }, + + { + unit = FIRE_UNIT_TIERS, + unitSpawner = FIRE_NEST_TIERS + } + ) + + -- fire worms + buildWorm( + { + name = "fire-worm", + + attributes = {}, + loot = wormLoot, attack = { type = "projectile", damageType = "acid", - directionOnly = true, softSmokeName = softSmoke }, resistances = {}, - type = "spitter", scales = { [1] = 0.5, [2] = 0.6, @@ -625,122 +1237,74 @@ buildUnitSpawner( [9] = 1.3, [10] = 1.4 }, - attackName = "fire-spitter", + attackName = "fire-worm", tint = {r=0.65, g=0, b=0, a=0.65}, pTint = {r=1, g=1, b=1, a=0.5}, sTint = {r=1, g=1, b=1, a=0.5} }, - unitSpawner = { - name = "fire-spitter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.5, - [3] = 0.5, - [4] = 0.5, - [5] = 0.5, - [6] = 0.5, - [7] = 0.5, - [8] = 0.5, - [9] = 0.5, - [10] = 0.5 - }, - tint = {r=0.99, g=0.09, b=0.09, a=1} - } - }, - - { - unit = { - { + { + { type = "attribute", name = "health", - [1] = 10, - [2] = 50, - [3] = 200, - [4] = 350, - [5] = 750, + [1] = 200, + [2] = 350, + [3] = 500, + [4] = 750, + [5] = 900, [6] = 1000, [7] = 1500, - [8] = 2500, - [9] = 4500, - [10] = 7000 + [8] = 3000, + [9] = 5000, + [10] = 9000 }, - { - + { type = "attack", name = "cooldown", - [1] = 100, - [2] = 100, - [3] = 97, - [4] = 97, - [5] = 95, - [6] = 95, - [7] = 93, - [8] = 93, - [9] = 90, - [10] = 90 - + [1] = 50, + [2] = 50, + [3] = 45, + [4] = 45, + [5] = 40, + [6] = 40, + [7] = 35, + [8] = 35, + [9] = 30, + [10] = 30 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 }, - { - - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - - }, - - { - - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1200, - [4] = 1750, - [5] = 2500, - [6] = 5000, - [7] = 10000, - [8] = 12500, - [9] = 15000, - [10] = 20000 - - }, - - { - + { type = "attack", name = "damage", - [1] = 4, - [2] = 9, - [3] = 14, - [4] = 23, - [5] = 30, - [6] = 37, - [7] = 45, - [8] = 57, + [1] = 12, + [2] = 20, + [3] = 25, + [4] = 30, + [5] = 35, + [6] = 40, + [7] = 50, + [8] = 60, [9] = 70, [10] = 80 - }, - { - + { type = "attribute", name = "healing", [1] = 0.01, @@ -753,42 +1317,85 @@ buildUnitSpawner( [8] = 0.12, [9] = 0.14, [10] = 0.16 - }, - - { + { type = "attribute", - name = "movement", - [1] = 0.185, - [2] = 0.18, - [3] = 0.18, - [4] = 0.17, - [5] = 0.17, - [6] = 0.16, - [7] = 0.16, - [8] = 0.15, - [9] = 0.15, - [10] = 0.14 + name = "prepareRange", + [1] = 30, + [2] = 30, + [3] = 31, + [4] = 31, + [5] = 32, + [6] = 32, + [7] = 33, + [8] = 33, + [9] = 34, + [10] = 34 }, - { + + { type = "attribute", - name = "distancePerFrame", - [1] = 0.04, - [2] = 0.045, - [3] = 0.050, - [4] = 0.055, - [5] = 0.060, - [6] = 0.065, - [7] = 0.070, - [8] = 0.075, - [9] = 0.08, - [10] = 0.084 + name = "foldingSpeed", + [1] = 0.15, + [2] = 0.15, + [3] = 0.16, + [4] = 0.16, + [5] = 0.16, + [6] = 0.17, + [7] = 0.17, + [8] = 0.18, + [9] = 0.18, + [10] = 0.19 + }, + + { + type = "attribute", + name = "preparingSpeed", + [1] = 0.025, + [2] = 0.025, + [3] = 0.026, + [4] = 0.026, + [5] = 0.027, + [6] = 0.027, + [7] = 0.028, + [8] = 0.028, + [9] = 0.029, + [10] = 0.029 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + } }, { type = "resistance", name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, percent = { [1] = 0, [2] = 0, @@ -862,36 +1469,35 @@ buildUnitSpawner( } }, - + { type = "attack", name = "range", - [1] = 13, - [2] = 13, - [3] = 14, - [4] = 14, - [5] = 15, - [6] = 15, - [7] = 16, - [8] = 16, - [9] = 17, - [10] = 17 + [1] = 21, + [2] = 22, + [3] = 23, + [4] = 23, + [5] = 24, + [6] = 26, + [7] = 26, + [8] = 28, + [9] = 30, + [10] = 32 }, { type = "attack", name = "radius", - [1] = 1.2, - [2] = 1.3, - [3] = 1.4, - [4] = 1.5, - [5] = 1.6, - [6] = 1.7, - [7] = 1.8, - [8] = 1.9, - [9] = 2.0, - [10] = 2.5 - + [1] = 1.5, + [2] = 1.6, + [3] = 1.7, + [4] = 1.8, + [5] = 1.9, + [6] = 2.0, + [7] = 2.2, + [8] = 2.3, + [9] = 2.5, + [10] = 3.0 }, { @@ -909,7 +1515,7 @@ buildUnitSpawner( [10] = 0.05 }, - { + { type = "attack", name = "particleHoizontalSpeed", [1] = 0.6, @@ -924,7 +1530,7 @@ buildUnitSpawner( [10] = 1 }, - { + { type = "attack", name = "particleHoizontalSpeedDeviation", [1] = 0.0025, @@ -939,616 +1545,16 @@ buildUnitSpawner( [10] = 0.0021 } }, - - unitSpawner = { - { - - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - - }, + function (attributes) + return createRangedAttack(attributes, + createAttackBall(attributes)) + end, - { - - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - - }, + FIRE_WORM_VARIATIONS, + FIRE_WORM_TIERS + ) +end - { - - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - - }, - { - - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - - }, - - { - - type = "attribute", - name = "evolutionRequirement", - [1] = 0.08, - [2] = 0.16, - [3] = 0.24, - [4] = 0.35, - [5] = 0.40, - [6] = 0.45, - [7] = 0.55, - [8] = 0.65, - [9] = 0.75, - [10] = 0.9 - - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - - }, - { - - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, - [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - }, - - { - - type = "resistance", - name = "acid", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - function (attributes) - return createRangedAttack(attributes, - createAttackBall(attributes), - spitterattackanimation(attributes.scale, - attributes.tint)) - end, - - { - unit = FIRE_UNIT_VARIATIONS, - unitSpawner = FIRE_NEST_VARIATIONS - }, - - { - unit = FIRE_UNIT_TIERS, - unitSpawner = FIRE_NEST_TIERS - } -) - --- fire worms -buildWorm( - { - name = "fire-worm", - - attributes = {}, - loot = wormLoot, - attack = { - type = "projectile", - damageType = "acid", - softSmokeName = softSmoke - }, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "fire-worm", - tint = {r=0.65, g=0, b=0, a=0.65}, - pTint = {r=1, g=1, b=1, a=0.5}, - sTint = {r=1, g=1, b=1, a=0.5} - }, - - { - { - type = "attribute", - name = "health", - [1] = 200, - [2] = 350, - [3] = 500, - [4] = 750, - [5] = 900, - [6] = 1000, - [7] = 1500, - [8] = 3000, - [9] = 5000, - [10] = 9000 - }, - - { - type = "attack", - name = "cooldown", - [1] = 50, - [2] = 50, - [3] = 45, - [4] = 45, - [5] = 40, - [6] = 40, - [7] = 35, - [8] = 35, - [9] = 30, - [10] = 30 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attack", - name = "damage", - [1] = 12, - [2] = 20, - [3] = 25, - [4] = 30, - [5] = 35, - [6] = 40, - [7] = 50, - [8] = 60, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "prepareRange", - [1] = 30, - [2] = 30, - [3] = 31, - [4] = 31, - [5] = 32, - [6] = 32, - [7] = 33, - [8] = 33, - [9] = 34, - [10] = 34 - }, - - { - type = "attribute", - name = "foldingSpeed", - [1] = 0.15, - [2] = 0.15, - [3] = 0.16, - [4] = 0.16, - [5] = 0.16, - [6] = 0.17, - [7] = 0.17, - [8] = 0.18, - [9] = 0.18, - [10] = 0.19 - }, - - { - type = "attribute", - name = "preparingSpeed", - [1] = 0.025, - [2] = 0.025, - [3] = 0.026, - [4] = 0.026, - [5] = 0.027, - [6] = 0.027, - [7] = 0.028, - [8] = 0.028, - [9] = 0.029, - [10] = 0.029 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - }, - - { - - type = "resistance", - name = "acid", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - - }, - - { - type = "attack", - name = "range", - [1] = 21, - [2] = 22, - [3] = 23, - [4] = 23, - [5] = 24, - [6] = 26, - [7] = 26, - [8] = 28, - [9] = 30, - [10] = 32 - }, - - { - type = "attack", - name = "radius", - [1] = 1.5, - [2] = 1.6, - [3] = 1.7, - [4] = 1.8, - [5] = 1.9, - [6] = 2.0, - [7] = 2.2, - [8] = 2.3, - [9] = 2.5, - [10] = 3.0 - }, - - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - } - }, - - function (attributes) - return createRangedAttack(attributes, - createAttackBall(attributes)) - end, - - FIRE_WORM_VARIATIONS, - FIRE_WORM_TIERS -) +return fire diff --git a/prototypes/Inferno.lua b/prototypes/Inferno.lua index 7c88cdb..531b30a 100755 --- a/prototypes/Inferno.lua +++ b/prototypes/Inferno.lua @@ -9,6 +9,8 @@ local math3d = require("math3d") -- constants +local inferno = {} + local INFERNO_UNIT_TIERS = constants.INFERNO_UNIT_TIERS local INFERNO_UNIT_VARIATIONS = constants.INFERNO_UNIT_VARIATIONS @@ -38,18 +40,684 @@ local biterLoot = makeUnitAlienLootTable("orange") local spawnerLoot = makeSpawnerAlienLootTable("orange") local wormLoot = makeWormAlienLootTable("orange") +function inferno.addFaction() --- inferno spitters -buildUnitSpawner( - { - unit = { - name = "inferno-spitter", + -- inferno spitters + buildUnitSpawner( + { + unit = { + name = "inferno-spitter", - loot = biterLoot, - attributes = { - explosion = "blood-explosion-small" + loot = biterLoot, + attributes = { + explosion = "blood-explosion-small" + }, + attack = { + type = "stream", + damageType = "acid", + fireDamagePerTickType = "acid", + softSmokeName = softSmoke, + smokeWithGlowName = smokeGlow, + smokeWithoutGlowName = smokeWithoutGlow, + smokeAddingFuelName = smokeFuel, + stickerAnimation = { + filename = "__base__/graphics/entity/fire-flame/fire-flame-13.png", + line_length = 8, + width = 60, + height = 118, + frame_count = 25, + axially_symmetrical = false, + direction_count = 1, + blend_mode = "normal", + animation_speed = 1, + scale = 0.2, + tint = { r = 1, g = 1, b = 1, a = 0.35 }, + shift = math3d.vector2.mul({-0.078125, -1.8125}, 0.1), + }, + stickerDamagePerTickType = "acid" + }, + resistances = {}, + + type = "spitter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + attackName = "spitter-inferno", + tint = {r=0.65, g=0, b=0, a=1}, + pTint = {r=1, g=1, b=1, a=0.5}, + sTint = {r=1, g=1, b=1, a=0.5} }, + + unitSpawner = { + name = "inferno-spitter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0.99, g=0.09, b=0.09, a=1} + } + }, + + { + unit = { + { + type = "attribute", + name = "health", + [1] = 10, + [2] = 50, + [3] = 200, + [4] = 350, + [5] = 750, + [6] = 1000, + [7] = 1500, + [8] = 2500, + [9] = 4500, + [10] = 7000 + }, + + { + type = "attack", + name = "stickerDamagePerTick", + [1] = 1.6, + [2] = 1.6, + [3] = 1.8, + [4] = 1.8, + [5] = 2, + [6] = 2, + [7] = 2.5, + [8] = 2.5, + [9] = 3, + [10] = 3 + }, + + { + type = "attack", + name = "particleTimeout", + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 5, + [6] = 5, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + + { + type = "attack", + name = "fireSpreadRadius", + [1] = 0.75, + [2] = 0.75, + [3] = 0.77, + [4] = 0.77, + [5] = 0.79, + [6] = 0.79, + [7] = 0.83, + [8] = 0.83, + [9] = 0.85, + [10] = 0.85 + }, + + { + type = "attack", + name = "damageMaxMultipler", + [1] = 6, + [2] = 6, + [3] = 7, + [4] = 7, + [5] = 8, + [6] = 8, + [7] = 9, + [8] = 9, + [9] = 10, + [10] = 10 + }, + + { + type = "attack", + name = "damageMaxMultipler", + [1] = 6, + [2] = 6, + [3] = 7, + [4] = 7, + [5] = 8, + [6] = 8, + [7] = 9, + [8] = 9, + [9] = 10, + [10] = 10 + }, + + { + type = "attack", + name = "stickerMovementModifier", + [1] = 1.1, + [2] = 1.1, + [3] = 1.1, + [4] = 1.1, + [5] = 1.1, + [6] = 1.1, + [7] = 1.1, + [8] = 1.1, + [9] = 1.1, + [10] = 1.1 + }, + + { + type = "attack", + name = "fireSpreadCooldown", + [1] = 30, + [2] = 30, + [3] = 29, + [4] = 29, + [5] = 28, + [6] = 28, + [7] = 27, + [8] = 27, + [9] = 25, + [10] = 25 + }, + + { + type = "attack", + name = "stickerDuration", + [1] = 1800, + [2] = 1800, + [3] = 1900, + [4] = 1900, + [5] = 2000, + [6] = 2000, + [7] = 2100, + [8] = 2100, + [9] = 2200, + [10] = 2200 + }, + + { + type = "attack", + name = "cooldown", + [1] = 100, + [2] = 100, + [3] = 97, + [4] = 97, + [5] = 95, + [6] = 95, + [7] = 93, + [8] = 93, + [9] = 90, + [10] = 90 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1200, + [4] = 1750, + [5] = 2500, + [6] = 5000, + [7] = 10000, + [8] = 12500, + [9] = 15000, + [10] = 20000 + }, + + { + type = "attack", + name = "damage", + [1] = 4, + [2] = 4, + [3] = 5, + [4] = 5, + [5] = 6, + [6] = 6, + [7] = 7, + [8] = 7, + [9] = 8, + [10] = 8 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + + { + type = "attribute", + name = "movement", + [1] = 0.185, + [2] = 0.18, + [3] = 0.18, + [4] = 0.17, + [5] = 0.17, + [6] = 0.16, + [7] = 0.16, + [8] = 0.15, + [9] = 0.15, + [10] = 0.14 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.04, + [2] = 0.045, + [3] = 0.050, + [4] = 0.055, + [5] = 0.060, + [6] = 0.065, + [7] = 0.070, + [8] = 0.075, + [9] = 0.08, + [10] = 0.084 + }, + + { + type = "resistance", + name = "explosion", + percent = { + [1] = 0, + [2] = 0, + [3] = 10, + [4] = 10, + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 10, + [2] = 10, + [3] = 14, + [4] = 14, + [5] = 16, + [6] = 16, + [7] = 18, + [8] = 18, + [9] = 20, + [10] = 20 + }, + percent = { + [1] = 75, + [2] = 75, + [3] = 80, + [4] = 85, + [5] = 85, + [6] = 90, + [7] = 90, + [8] = 95, + [9] = 95, + [10] = 97 + } + }, + + { + type = "attack", + name = "range", + [1] = 13, + [2] = 13, + [3] = 14, + [4] = 14, + [5] = 15, + [6] = 15, + [7] = 16, + [8] = 16, + [9] = 17, + [10] = 17 + }, + + { + type = "attack", + name = "radius", + [1] = 1.2, + [2] = 1.3, + [3] = 1.4, + [4] = 1.5, + [5] = 1.6, + [6] = 1.7, + [7] = 1.8, + [8] = 1.9, + [9] = 2.0, + [10] = 2.5 + }, + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 + } + }, + + unitSpawner = { + + { + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + }, + + { + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + }, + + { + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0.08, + [2] = 0.16, + [3] = 0.24, + [4] = 0.35, + [5] = 0.40, + [6] = 0.45, + [7] = 0.55, + [8] = 0.65, + [9] = 0.75, + [10] = 0.9 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + }, + { + type = "attribute", + name = "unitsToSpawn", + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 10, + [2] = 10, + [3] = 14, + [4] = 14, + [5] = 16, + [6] = 16, + [7] = 18, + [8] = 18, + [9] = 20, + [10] = 20 + }, + percent = { + [1] = 75, + [2] = 75, + [3] = 80, + [4] = 85, + [5] = 85, + [6] = 90, + [7] = 90, + [8] = 95, + [9] = 95, + [10] = 97 + } + } + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + function (attributes) + return createRangedAttack(attributes, + createAttackFlame(attributes), + spitterattackanimation(attributes.scale, + attributes.tint)) + end, + + { + unit = INFERNO_UNIT_VARIATIONS, + unitSpawner = INFERNO_NEST_VARIATIONS + }, + + { + unit = INFERNO_UNIT_TIERS, + unitSpawner = INFERNO_NEST_TIERS + } + ) + + -- inferno worms + buildWorm( + { + name = "inferno-worm", + + loot = wormLoot, + attributes = {}, attack = { type = "stream", damageType = "acid", @@ -76,7 +744,6 @@ buildUnitSpawner( }, resistances = {}, - type = "spitter", scales = { [1] = 0.5, [2] = 0.6, @@ -89,50 +756,26 @@ buildUnitSpawner( [9] = 1.3, [10] = 1.4 }, - attackName = "spitter-inferno", - tint = {r=0.65, g=0, b=0, a=1}, + attackName = "worm-inferno", + tint = {r=0.65, g=0, b=0, a=0.65}, pTint = {r=1, g=1, b=1, a=0.5}, sTint = {r=1, g=1, b=1, a=0.5} }, - unitSpawner = { - name = "inferno-spitter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=0.99, g=0.09, b=0.09, a=1} - } - }, - - { - unit = { - { + { + { type = "attribute", name = "health", - [1] = 10, - [2] = 50, - [3] = 200, - [4] = 350, - [5] = 750, + [1] = 200, + [2] = 350, + [3] = 500, + [4] = 750, + [5] = 900, [6] = 1000, [7] = 1500, - [8] = 2500, - [9] = 4500, - [10] = 7000 + [8] = 3000, + [9] = 5000, + [10] = 9000 }, { @@ -255,51 +898,36 @@ buildUnitSpawner( [10] = 2200 }, - { + { type = "attack", name = "cooldown", - [1] = 100, - [2] = 100, - [3] = 97, - [4] = 97, - [5] = 95, - [6] = 95, - [7] = 93, - [8] = 93, - [9] = 90, - [10] = 90 + [1] = 50, + [2] = 50, + [3] = 45, + [4] = 45, + [5] = 40, + [6] = 40, + [7] = 35, + [8] = 35, + [9] = 30, + [10] = 30 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 }, - { - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1200, - [4] = 1750, - [5] = 2500, - [6] = 5000, - [7] = 10000, - [8] = 12500, - [9] = 15000, - [10] = 20000 - }, - { type = "attack", name = "damage", @@ -315,7 +943,7 @@ buildUnitSpawner( [10] = 8 }, - { + { type = "attribute", name = "healing", [1] = 0.01, @@ -330,39 +958,83 @@ buildUnitSpawner( [10] = 0.16 }, - - { + { type = "attribute", - name = "movement", - [1] = 0.185, - [2] = 0.18, - [3] = 0.18, - [4] = 0.17, - [5] = 0.17, - [6] = 0.16, - [7] = 0.16, - [8] = 0.15, - [9] = 0.15, - [10] = 0.14 + name = "prepareRange", + [1] = 30, + [2] = 30, + [3] = 31, + [4] = 31, + [5] = 32, + [6] = 32, + [7] = 33, + [8] = 33, + [9] = 34, + [10] = 34 }, - { + + { type = "attribute", - name = "distancePerFrame", - [1] = 0.04, - [2] = 0.045, - [3] = 0.050, - [4] = 0.055, - [5] = 0.060, - [6] = 0.065, - [7] = 0.070, - [8] = 0.075, - [9] = 0.08, - [10] = 0.084 + name = "foldingSpeed", + [1] = 0.15, + [2] = 0.15, + [3] = 0.16, + [4] = 0.16, + [5] = 0.16, + [6] = 0.17, + [7] = 0.17, + [8] = 0.18, + [9] = 0.18, + [10] = 0.19 + }, + + { + type = "attribute", + name = "preparingSpeed", + [1] = 0.025, + [2] = 0.025, + [3] = 0.026, + [4] = 0.026, + [5] = 0.027, + [6] = 0.027, + [7] = 0.028, + [8] = 0.028, + [9] = 0.029, + [10] = 0.029 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + } }, { type = "resistance", name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, percent = { [1] = 0, [2] = 0, @@ -381,59 +1053,59 @@ buildUnitSpawner( type = "resistance", name = "fire", decrease = { - [1] = 10, - [2] = 10, - [3] = 14, - [4] = 14, - [5] = 16, - [6] = 16, - [7] = 18, - [8] = 18, - [9] = 20, - [10] = 20 + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 }, percent = { - [1] = 75, - [2] = 75, - [3] = 80, - [4] = 85, - [5] = 85, - [6] = 90, - [7] = 90, - [8] = 95, - [9] = 95, - [10] = 97 + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 } }, - + { type = "attack", name = "range", - [1] = 13, - [2] = 13, - [3] = 14, - [4] = 14, - [5] = 15, - [6] = 15, - [7] = 16, - [8] = 16, - [9] = 17, - [10] = 17 + [1] = 21, + [2] = 22, + [3] = 23, + [4] = 23, + [5] = 24, + [6] = 26, + [7] = 26, + [8] = 28, + [9] = 30, + [10] = 32 }, { type = "attack", name = "radius", - [1] = 1.2, - [2] = 1.3, - [3] = 1.4, - [4] = 1.5, - [5] = 1.6, - [6] = 1.7, - [7] = 1.8, - [8] = 1.9, - [9] = 2.0, - [10] = 2.5 + [1] = 1.5, + [2] = 1.6, + [3] = 1.7, + [4] = 1.8, + [5] = 1.9, + [6] = 2.0, + [7] = 2.2, + [8] = 2.3, + [9] = 2.5, + [10] = 3.0 }, { @@ -451,7 +1123,7 @@ buildUnitSpawner( [10] = 0.05 }, - { + { type = "attack", name = "particleHoizontalSpeed", [1] = 0.6, @@ -466,7 +1138,7 @@ buildUnitSpawner( [10] = 1 }, - { + { type = "attack", name = "particleHoizontalSpeedDeviation", [1] = 0.0025, @@ -481,681 +1153,15 @@ buildUnitSpawner( [10] = 0.0021 } }, - - unitSpawner = { - { - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - }, + function (attributes) + return createRangedAttack(attributes, + createAttackFlame(attributes)) + end, - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - }, + INFERNO_WORM_VARIATIONS, + INFERNO_WORM_TIERS + ) +end - { - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - }, - - { - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0.08, - [2] = 0.16, - [3] = 0.24, - [4] = 0.35, - [5] = 0.40, - [6] = 0.45, - [7] = 0.55, - [8] = 0.65, - [9] = 0.75, - [10] = 0.9 - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - }, - { - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, - [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = 10, - [2] = 10, - [3] = 14, - [4] = 14, - [5] = 16, - [6] = 16, - [7] = 18, - [8] = 18, - [9] = 20, - [10] = 20 - }, - percent = { - [1] = 75, - [2] = 75, - [3] = 80, - [4] = 85, - [5] = 85, - [6] = 90, - [7] = 90, - [8] = 95, - [9] = 95, - [10] = 97 - } - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - function (attributes) - return createRangedAttack(attributes, - createAttackFlame(attributes), - spitterattackanimation(attributes.scale, - attributes.tint)) - end, - - { - unit = INFERNO_UNIT_VARIATIONS, - unitSpawner = INFERNO_NEST_VARIATIONS - }, - - { - unit = INFERNO_UNIT_TIERS, - unitSpawner = INFERNO_NEST_TIERS - } -) - --- inferno worms -buildWorm( - { - name = "inferno-worm", - - loot = wormLoot, - attributes = {}, - attack = { - type = "stream", - damageType = "acid", - fireDamagePerTickType = "acid", - softSmokeName = softSmoke, - smokeWithGlowName = smokeGlow, - smokeWithoutGlowName = smokeWithoutGlow, - smokeAddingFuelName = smokeFuel, - stickerAnimation = { - filename = "__base__/graphics/entity/fire-flame/fire-flame-13.png", - line_length = 8, - width = 60, - height = 118, - frame_count = 25, - axially_symmetrical = false, - direction_count = 1, - blend_mode = "normal", - animation_speed = 1, - scale = 0.2, - tint = { r = 1, g = 1, b = 1, a = 0.35 }, - shift = math3d.vector2.mul({-0.078125, -1.8125}, 0.1), - }, - stickerDamagePerTickType = "acid" - }, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "worm-inferno", - tint = {r=0.65, g=0, b=0, a=0.65}, - pTint = {r=1, g=1, b=1, a=0.5}, - sTint = {r=1, g=1, b=1, a=0.5} - }, - - { - { - type = "attribute", - name = "health", - [1] = 200, - [2] = 350, - [3] = 500, - [4] = 750, - [5] = 900, - [6] = 1000, - [7] = 1500, - [8] = 3000, - [9] = 5000, - [10] = 9000 - }, - - { - type = "attack", - name = "stickerDamagePerTick", - [1] = 1.6, - [2] = 1.6, - [3] = 1.8, - [4] = 1.8, - [5] = 2, - [6] = 2, - [7] = 2.5, - [8] = 2.5, - [9] = 3, - [10] = 3 - }, - - { - type = "attack", - name = "particleTimeout", - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 5, - [6] = 5, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - - { - type = "attack", - name = "fireSpreadRadius", - [1] = 0.75, - [2] = 0.75, - [3] = 0.77, - [4] = 0.77, - [5] = 0.79, - [6] = 0.79, - [7] = 0.83, - [8] = 0.83, - [9] = 0.85, - [10] = 0.85 - }, - - { - type = "attack", - name = "damageMaxMultipler", - [1] = 6, - [2] = 6, - [3] = 7, - [4] = 7, - [5] = 8, - [6] = 8, - [7] = 9, - [8] = 9, - [9] = 10, - [10] = 10 - }, - - { - type = "attack", - name = "damageMaxMultipler", - [1] = 6, - [2] = 6, - [3] = 7, - [4] = 7, - [5] = 8, - [6] = 8, - [7] = 9, - [8] = 9, - [9] = 10, - [10] = 10 - }, - - { - type = "attack", - name = "stickerMovementModifier", - [1] = 1.1, - [2] = 1.1, - [3] = 1.1, - [4] = 1.1, - [5] = 1.1, - [6] = 1.1, - [7] = 1.1, - [8] = 1.1, - [9] = 1.1, - [10] = 1.1 - }, - - { - type = "attack", - name = "fireSpreadCooldown", - [1] = 30, - [2] = 30, - [3] = 29, - [4] = 29, - [5] = 28, - [6] = 28, - [7] = 27, - [8] = 27, - [9] = 25, - [10] = 25 - }, - - { - type = "attack", - name = "stickerDuration", - [1] = 1800, - [2] = 1800, - [3] = 1900, - [4] = 1900, - [5] = 2000, - [6] = 2000, - [7] = 2100, - [8] = 2100, - [9] = 2200, - [10] = 2200 - }, - - { - type = "attack", - name = "cooldown", - [1] = 50, - [2] = 50, - [3] = 45, - [4] = 45, - [5] = 40, - [6] = 40, - [7] = 35, - [8] = 35, - [9] = 30, - [10] = 30 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attack", - name = "damage", - [1] = 4, - [2] = 4, - [3] = 5, - [4] = 5, - [5] = 6, - [6] = 6, - [7] = 7, - [8] = 7, - [9] = 8, - [10] = 8 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "prepareRange", - [1] = 30, - [2] = 30, - [3] = 31, - [4] = 31, - [5] = 32, - [6] = 32, - [7] = 33, - [8] = 33, - [9] = 34, - [10] = 34 - }, - - { - type = "attribute", - name = "foldingSpeed", - [1] = 0.15, - [2] = 0.15, - [3] = 0.16, - [4] = 0.16, - [5] = 0.16, - [6] = 0.17, - [7] = 0.17, - [8] = 0.18, - [9] = 0.18, - [10] = 0.19 - }, - - { - type = "attribute", - name = "preparingSpeed", - [1] = 0.025, - [2] = 0.025, - [3] = 0.026, - [4] = 0.026, - [5] = 0.027, - [6] = 0.027, - [7] = 0.028, - [8] = 0.028, - [9] = 0.029, - [10] = 0.029 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - }, - - { - type = "attack", - name = "range", - [1] = 21, - [2] = 22, - [3] = 23, - [4] = 23, - [5] = 24, - [6] = 26, - [7] = 26, - [8] = 28, - [9] = 30, - [10] = 32 - }, - - { - type = "attack", - name = "radius", - [1] = 1.5, - [2] = 1.6, - [3] = 1.7, - [4] = 1.8, - [5] = 1.9, - [6] = 2.0, - [7] = 2.2, - [8] = 2.3, - [9] = 2.5, - [10] = 3.0 - }, - - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - } - }, - - function (attributes) - return createRangedAttack(attributes, - createAttackFlame(attributes)) - end, - - INFERNO_WORM_VARIATIONS, - INFERNO_WORM_TIERS -) +return inferno diff --git a/prototypes/Laser.lua b/prototypes/Laser.lua index 52b3524..fcb48b5 100755 --- a/prototypes/Laser.lua +++ b/prototypes/Laser.lua @@ -20,6 +20,8 @@ local LASER_WORM_VARIATIONS = constants.LASER_WORM_VARIATIONS -- imported functions +local laser = {} + local buildUnitSpawner = swarmUtils.buildUnitSpawner local buildWorm = swarmUtils.buildWorm local createAttackBall = acidBall.createAttackBall @@ -39,433 +41,388 @@ local biterLoot = makeUnitAlienLootTable("blue") local spawnerLoot = makeSpawnerAlienLootTable("blue") local wormLoot = makeWormAlienLootTable("blue") +function laser.addFaction() -local laserBubble = makeBubble({ - name = "laser-worm", - lTint = {r=0, g=0, b=0.42, a=0.65} -}) + local laserBubble = makeBubble({ + name = "laser-worm", + lTint = {r=0, g=0, b=0.42, a=0.65} + }) --- laser biters -buildUnitSpawner( - { - unit = { - name = "laser-biter", + -- laser biters + buildUnitSpawner( + { + unit = { + name = "laser-biter", - attributes = { - damageType = "laser", - explosion = "blood-explosion-small" - }, - attack = {}, - resistances = {}, - - loot = biterLoot, - type = "biter", - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint1 = {r=0, g=0, b=0.42, a=0.65}, - tint2 = {r=0, g=0, b=0.42, a=0.4} - }, - - unitSpawner = { - name = "laser-biter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=0, g=0, b=0.42, a=0.65} - } - }, - - { - unit = { - { - - type = "attribute", - name = "health", - [1] = 15, - [2] = 75, - [3] = 150, - [4] = 250, - [5] = 400, - [6] = 750, - [7] = 1500, - [8] = 3000, - [9] = 5000, - [10] = 10000 - - }, - - { - type = "attack", - name = "cooldown", - [1] = 35, - [2] = 35, - [3] = 35, - [4] = 35, - [5] = 35, - [6] = 35, - [7] = 50, - [8] = 50, - [9] = 55, - [10] = 57 - }, - - { - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1750, - [4] = 3500, - [5] = 5000, - [6] = 10000, - [7] = 20000, - [8] = 25000, - [9] = 30000, - [10] = 40000 - }, - - { - type = "attack", - name = "damage", - [1] = 7, - [2] = 15, - [3] = 22.5, - [4] = 35, - [5] = 45, - [6] = 60, - [7] = 75, - [8] = 90, - [9] = 150, - [10] = 200 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "movement", - [1] = 0.2, - [2] = 0.19, - [3] = 0.185, - [4] = 0.18, - [5] = 0.175, - [6] = 0.17, - [7] = 0.17, - [8] = 0.17, - [9] = 0.17, - [10] = 0.17 - }, - { - type = "attribute", - name = "distancePerFrame", - [1] = 0.1, - [2] = 0.125, - [3] = 0.15, - [4] = 0.19, - [5] = 0.195, - [6] = 0.2, - [7] = 0.2, - [8] = 0.2, - [9] = 0.2, - [10] = 0.2 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 4, - [4] = 5, - [5] = 6, - [6] = 8, - [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 + attributes = { + damageType = "laser", + explosion = "blood-explosion-small" }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 0, - [5] = 0, - [6] = 0, - [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 + attack = {}, + resistances = {}, + + loot = biterLoot, + type = "biter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } + tint1 = {r=0, g=0, b=0.42, a=0.65}, + tint2 = {r=0, g=0, b=0.42, a=0.4} }, - { - type = "resistance", - name = "laser", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - }, + unitSpawner = { + name = "laser-biter-nest", - { - type = "attack", - name = "range", - [1] = 0.5, - [2] = 0.5, - [3] = 0.75, - [4] = 0.75, - [5] = 1.0, - [6] = 1.0, - [7] = 1.25, - [8] = 1.50, - [9] = 1.75, - [10] = 2.0 - + loot = spawnerLoot, + attributes = {}, + resistances = {}, + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0, g=0, b=0.42, a=0.65} } }, - - unitSpawner = { - { - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - }, + { + unit = { + { - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - }, - - { - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - }, - - { - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.12, - [3] = 0.22, - [4] = 0.32, - [5] = 0.42, - [6] = 0.52, - [7] = 0.62, - [8] = 0.72, - [9] = 0.82, - [10] = 0.92 - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - - }, - { - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, - [9] = 12, - [10] = 14 - }, - percent = { + type = "attribute", + name = "health", [1] = 15, + [2] = 75, + [3] = 150, + [4] = 250, + [5] = 400, + [6] = 750, + [7] = 1500, + [8] = 3000, + [9] = 5000, + [10] = 10000 + + }, + + { + type = "attack", + name = "cooldown", + [1] = 35, + [2] = 35, + [3] = 35, + [4] = 35, + [5] = 35, + [6] = 35, + [7] = 50, + [8] = 50, + [9] = 55, + [10] = 57 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1750, + [4] = 3500, + [5] = 5000, + [6] = 10000, + [7] = 20000, + [8] = 25000, + [9] = 30000, + [10] = 40000 + }, + + { + type = "attack", + name = "damage", + [1] = 7, [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + [3] = 22.5, + [4] = 35, + [5] = 45, + [6] = 60, + [7] = 75, + [8] = 90, + [9] = 150, + [10] = 200 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + { + type = "attribute", + name = "movement", + [1] = 0.2, + [2] = 0.19, + [3] = 0.185, + [4] = 0.18, + [5] = 0.175, + [6] = 0.17, + [7] = 0.17, + [8] = 0.17, + [9] = 0.17, + [10] = 0.17 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.1, + [2] = 0.125, + [3] = 0.15, + [4] = 0.19, + [5] = 0.195, + [6] = 0.2, + [7] = 0.2, + [8] = 0.2, + [9] = 0.2, + [10] = 0.2 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 4, + [4] = 5, + [5] = 6, + [6] = 8, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 0, + [5] = 0, + [6] = 0, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "resistance", + name = "laser", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + }, + + { + type = "attack", + name = "range", + [1] = 0.5, + [2] = 0.5, + [3] = 0.75, + [4] = 0.75, + [5] = 1.0, + [6] = 1.0, + [7] = 1.25, + [8] = 1.50, + [9] = 1.75, + [10] = 2.0 + } }, + + unitSpawner = { - { - type = "resistance", - name = "explosion", - decrease = { + { + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + }, + + { + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + }, + + { + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.12, + [3] = 0.22, + [4] = 0.32, + [5] = 0.42, + [6] = 0.52, + [7] = 0.62, + [8] = 0.72, + [9] = 0.82, + [10] = 0.92 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + + }, + { + type = "attribute", + name = "unitsToSpawn", [1] = 5, [2] = 5, [3] = 6, @@ -477,123 +434,797 @@ buildUnitSpawner( [9] = 9, [10] = 9 }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 60, + [2] = 60, + [3] = 62, + [4] = 62, + [5] = 63, + [6] = 63, + [7] = 64, + [8] = 64, + [9] = 65, + [10] = 65 + } + }, + + { + type = "resistance", + name = "laser", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } } }, - { - type = "resistance", - name = "fire", - decrease = { + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + createMeleeAttack, + + { + unit = LASER_UNIT_VARIATIONS, + unitSpawner = LASER_NEST_VARIATIONS + }, + + { + unit = LASER_UNIT_TIERS, + unitSpawner = LASER_NEST_TIERS + } + ) + + -- laser spitters + buildUnitSpawner( + { + unit = { + name = "laser-spitter", + + loot = biterLoot, + attributes = { + damageType = "laser", + explosion = "blood-explosion-small" + }, + attack = { + type = "projectile", + bubble = laserBubble, + softSmokeName = softSmoke, + damageType = "laser", + directionOnly = true, + pointEffects = function(attributes) + return + { + { + type="nested-result", + action = { + { + type = "cluster", + cluster_count = attributes.clusters, + distance = attributes.clusterDistance, + distance_deviation = 3, + action_delivery = + { + type = "projectile", + projectile = attributes.laserName, + duration = 20, + direction_deviation = 0.6, + starting_speed = attributes.startingSpeed, + starting_speed_deviation = 0.3 + }, + repeat_count = 2 + } + } + } + } + end + }, + resistances = {}, + + type = "spitter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + attackName = "laser-spitter", + tint = {r=0, g=0, b=0.42, a=0.65}, + pTint = {r=0, g=0, b=1, a=0.5}, + sTint = {r=0, g=0, b=1, a=0.5} + }, + + unitSpawner = { + name = "laser-spitter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0, g=0, b=0.42, a=0.65} + } + }, + + { + unit = { + { + type = "attribute", + name = "health", + [1] = 10, + [2] = 50, + [3] = 200, + [4] = 350, + [5] = 750, + [6] = 1000, + [7] = 1500, + [8] = 2500, + [9] = 4500, + [10] = 7000 + }, + + { + type = "attack", + name = "cooldown", + [1] = 100, + [2] = 100, + [3] = 97, + [4] = 97, + [5] = 95, + [6] = 95, + [7] = 93, + [8] = 93, + [9] = 90, + [10] = 90 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1200, + [4] = 1750, + [5] = 2500, + [6] = 5000, + [7] = 10000, + [8] = 12500, + [9] = 15000, + [10] = 20000 + }, + + { + type = "attack", + name = "damage", + [1] = 4, + [2] = 9, + [3] = 14, + [4] = 23, + [5] = 30, + [6] = 37, + [7] = 45, + [8] = 57, + [9] = 70, + [10] = 80 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + + { + type = "attribute", + name = "movement", + [1] = 0.185, + [2] = 0.18, + [3] = 0.18, + [4] = 0.17, + [5] = 0.17, + [6] = 0.16, + [7] = 0.16, + [8] = 0.15, + [9] = 0.15, + [10] = 0.14 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.04, + [2] = 0.045, + [3] = 0.050, + [4] = 0.055, + [5] = 0.060, + [6] = 0.065, + [7] = 0.070, + [8] = 0.075, + [9] = 0.08, + [10] = 0.084 + }, + + { + type = "resistance", + name = "explosion", + percent = { + [1] = 0, + [2] = 0, + [3] = 10, + [4] = 10, + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 + } + }, + + { + type = "resistance", + name = "laser", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + }, + + { + type = "attack", + name = "startingSpeed", + [1] = 0.25, + [2] = 0.25, + [3] = 0.27, + [4] = 0.27, + [5] = 0.29, + [6] = 0.29, + [7] = 0.31, + [8] = 0.31, + [9] = 0.33, + [10] = 0.33 + }, + + { + type = "attack", + name = "clusterDistance", [1] = 3, [2] = 3, [3] = 4, [4] = 4, - [5] = 6, - [6] = 6, + [5] = 5, + [6] = 5, [7] = 6, [8] = 6, [9] = 7, [10] = 7 }, - percent = { - [1] = 60, - [2] = 60, - [3] = 62, - [4] = 62, - [5] = 63, - [6] = 63, - [7] = 64, - [8] = 64, - [9] = 65, - [10] = 65 + + { + type = "attack", + name = "clusters", + min = 2, + [1] = 2, + [2] = 3, + [3] = 3, + [4] = 4, + [5] = 4, + [6] = 5, + [7] = 5, + [8] = 5, + [9] = 6, + [10] = 6 + }, + + { + type = "attack", + name = "range", + [1] = 13, + [2] = 13, + [3] = 14, + [4] = 14, + [5] = 15, + [6] = 15, + [7] = 16, + [8] = 16, + [9] = 17, + [10] = 17 + }, + + { + type = "attack", + name = "radius", + [1] = 1.2, + [2] = 1.3, + [3] = 1.4, + [4] = 1.5, + [5] = 1.6, + [6] = 1.7, + [7] = 1.8, + [8] = 1.9, + [9] = 2.0, + [10] = 2.5 + }, + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 + } + }, + + unitSpawner = { + + { + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + }, + + { + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + }, + + { + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0.08, + [2] = 0.16, + [3] = 0.24, + [4] = 0.35, + [5] = 0.40, + [6] = 0.45, + [7] = 0.55, + [8] = 0.65, + [9] = 0.75, + [10] = 0.9 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + }, + + { + type = "attribute", + name = "unitsToSpawn", + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 60, + [2] = 60, + [3] = 62, + [4] = 62, + [5] = 63, + [6] = 63, + [7] = 64, + [8] = 64, + [9] = 65, + [10] = 65 + } + }, + + { + type = "resistance", + name = "laser", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } } }, - { - type = "resistance", - name = "laser", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, } }, - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, + function (attributes) + attributes.laserName = makeLaser(attributes) + return createRangedAttack(attributes, + createAttackBall(attributes), + spitterattackanimation(attributes.scale, + attributes.tint)) + end, + + { + unit = LASER_UNIT_VARIATIONS, + unitSpawner = LASER_NEST_VARIATIONS + }, + + { + unit = LASER_UNIT_TIERS, + unitSpawner = LASER_NEST_TIERS } - }, + ) - createMeleeAttack, + -- laser worms + buildWorm( + { + name = "laser-worm", - { - unit = LASER_UNIT_VARIATIONS, - unitSpawner = LASER_NEST_VARIATIONS - }, - - { - unit = LASER_UNIT_TIERS, - unitSpawner = LASER_NEST_TIERS - } -) - --- laser spitters -buildUnitSpawner( - { - unit = { - name = "laser-spitter", - - loot = biterLoot, - attributes = { - damageType = "laser", - explosion = "blood-explosion-small" - }, + loot = wormLoot, + attributes = {}, attack = { type = "projectile", bubble = laserBubble, softSmokeName = softSmoke, damageType = "laser", - directionOnly = true, pointEffects = function(attributes) return { @@ -614,7 +1245,7 @@ buildUnitSpawner( starting_speed = attributes.startingSpeed, starting_speed_deviation = 0.3 }, - repeat_count = 2 + repeat_count = 3 } } } @@ -623,7 +1254,6 @@ buildUnitSpawner( }, resistances = {}, - type = "spitter", scales = { [1] = 0.5, [2] = 0.6, @@ -636,113 +1266,75 @@ buildUnitSpawner( [9] = 1.3, [10] = 1.4 }, - attackName = "laser-spitter", + attackName = "laser-worm", tint = {r=0, g=0, b=0.42, a=0.65}, pTint = {r=0, g=0, b=1, a=0.5}, - sTint = {r=0, g=0, b=1, a=0.5} + sTint = {r=0, g=0, b=1, a=0.5}, + lTint = {r=0, g=0, b=1, a=0.5} }, - unitSpawner = { - name = "laser-spitter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=0, g=0, b=0.42, a=0.65} - } - }, - - { - unit = { - { + { + { type = "attribute", name = "health", - [1] = 10, - [2] = 50, - [3] = 200, - [4] = 350, - [5] = 750, + [1] = 200, + [2] = 350, + [3] = 500, + [4] = 750, + [5] = 900, [6] = 1000, [7] = 1500, - [8] = 2500, - [9] = 4500, - [10] = 7000 + [8] = 2250, + [9] = 3000, + [10] = 5000 }, - { + { type = "attack", name = "cooldown", - [1] = 100, - [2] = 100, - [3] = 97, - [4] = 97, - [5] = 95, - [6] = 95, - [7] = 93, - [8] = 93, - [9] = 90, - [10] = 90 + [1] = 50, + [2] = 50, + [3] = 45, + [4] = 45, + [5] = 40, + [6] = 40, + [7] = 35, + [8] = 35, + [9] = 30, + [10] = 30 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 }, - { - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1200, - [4] = 1750, - [5] = 2500, - [6] = 5000, - [7] = 10000, - [8] = 12500, - [9] = 15000, - [10] = 20000 - }, - - { + { type = "attack", name = "damage", - [1] = 4, - [2] = 9, - [3] = 14, - [4] = 23, - [5] = 30, - [6] = 37, - [7] = 45, - [8] = 57, + [1] = 12, + [2] = 20, + [3] = 25, + [4] = 30, + [5] = 35, + [6] = 40, + [7] = 50, + [8] = 60, [9] = 70, [10] = 80 }, - { + { type = "attribute", name = "healing", [1] = 0.01, @@ -757,39 +1349,83 @@ buildUnitSpawner( [10] = 0.16 }, - - { + { type = "attribute", - name = "movement", - [1] = 0.185, - [2] = 0.18, - [3] = 0.18, - [4] = 0.17, - [5] = 0.17, - [6] = 0.16, - [7] = 0.16, - [8] = 0.15, - [9] = 0.15, - [10] = 0.14 + name = "prepareRange", + [1] = 30, + [2] = 30, + [3] = 31, + [4] = 31, + [5] = 32, + [6] = 32, + [7] = 33, + [8] = 33, + [9] = 34, + [10] = 34 }, - { + + { type = "attribute", - name = "distancePerFrame", - [1] = 0.04, - [2] = 0.045, - [3] = 0.050, - [4] = 0.055, - [5] = 0.060, - [6] = 0.065, - [7] = 0.070, - [8] = 0.075, - [9] = 0.08, - [10] = 0.084 + name = "foldingSpeed", + [1] = 0.15, + [2] = 0.15, + [3] = 0.16, + [4] = 0.16, + [5] = 0.16, + [6] = 0.17, + [7] = 0.17, + [8] = 0.18, + [9] = 0.18, + [10] = 0.19 + }, + + { + type = "attribute", + name = "preparingSpeed", + [1] = 0.025, + [2] = 0.025, + [3] = 0.026, + [4] = 0.026, + [5] = 0.027, + [6] = 0.027, + [7] = 0.028, + [8] = 0.028, + [9] = 0.029, + [10] = 0.029 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + } }, { type = "resistance", name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, percent = { [1] = 0, [2] = 0, @@ -804,6 +1440,35 @@ buildUnitSpawner( } }, + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 70, + [2] = 70, + [3] = 72, + [4] = 72, + [5] = 73, + [6] = 73, + [7] = 74, + [8] = 74, + [9] = 75, + [10] = 75 + } + }, + { type = "resistance", name = "laser", @@ -832,6 +1497,36 @@ buildUnitSpawner( [10] = 90 } }, + + { + type = "attack", + name = "range", + [1] = 21, + [2] = 22, + [3] = 23, + [4] = 23, + [5] = 24, + [6] = 26, + [7] = 26, + [8] = 28, + [9] = 30, + [10] = 32 + }, + + { + type = "attack", + name = "radius", + [1] = 1.5, + [2] = 1.6, + [3] = 1.7, + [4] = 1.8, + [5] = 1.9, + [6] = 2.0, + [7] = 2.2, + [8] = 2.3, + [9] = 2.5, + [10] = 3.0 + }, { type = "attack", @@ -867,48 +1562,18 @@ buildUnitSpawner( type = "attack", name = "clusters", min = 2, - [1] = 2, - [2] = 3, - [3] = 3, - [4] = 4, - [5] = 4, - [6] = 5, - [7] = 5, - [8] = 5, - [9] = 6, - [10] = 6 + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 }, - { - type = "attack", - name = "range", - [1] = 13, - [2] = 13, - [3] = 14, - [4] = 14, - [5] = 15, - [6] = 15, - [7] = 16, - [8] = 16, - [9] = 17, - [10] = 17 - }, - - { - type = "attack", - name = "radius", - [1] = 1.2, - [2] = 1.3, - [3] = 1.4, - [4] = 1.5, - [5] = 1.6, - [6] = 1.7, - [7] = 1.8, - [8] = 1.9, - [9] = 2.0, - [10] = 2.5 - }, - { type = "attack", name = "particleVerticalAcceleration", @@ -924,7 +1589,7 @@ buildUnitSpawner( [10] = 0.05 }, - { + { type = "attack", name = "particleHoizontalSpeed", [1] = 0.6, @@ -939,7 +1604,7 @@ buildUnitSpawner( [10] = 1 }, - { + { type = "attack", name = "particleHoizontalSpeedDeviation", [1] = 0.0025, @@ -954,675 +1619,16 @@ buildUnitSpawner( [10] = 0.0021 } }, - - unitSpawner = { - { - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - }, + function (attributes) + attributes.laserName = makeLaser(attributes) + return createRangedAttack(attributes, + createAttackBall(attributes)) + end, - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - }, + LASER_WORM_VARIATIONS, + LASER_WORM_TIERS + ) +end - { - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - }, - - { - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0.08, - [2] = 0.16, - [3] = 0.24, - [4] = 0.35, - [5] = 0.40, - [6] = 0.45, - [7] = 0.55, - [8] = 0.65, - [9] = 0.75, - [10] = 0.9 - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - }, - - { - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, - [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - { - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 60, - [2] = 60, - [3] = 62, - [4] = 62, - [5] = 63, - [6] = 63, - [7] = 64, - [8] = 64, - [9] = 65, - [10] = 65 - } - }, - - { - type = "resistance", - name = "laser", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - function (attributes) - attributes.laserName = makeLaser(attributes) - return createRangedAttack(attributes, - createAttackBall(attributes), - spitterattackanimation(attributes.scale, - attributes.tint)) - end, - - { - unit = LASER_UNIT_VARIATIONS, - unitSpawner = LASER_NEST_VARIATIONS - }, - - { - unit = LASER_UNIT_TIERS, - unitSpawner = LASER_NEST_TIERS - } -) - --- laser worms -buildWorm( - { - name = "laser-worm", - - loot = wormLoot, - attributes = {}, - attack = { - type = "projectile", - bubble = laserBubble, - softSmokeName = softSmoke, - damageType = "laser", - pointEffects = function(attributes) - return - { - { - type="nested-result", - action = { - { - type = "cluster", - cluster_count = attributes.clusters, - distance = attributes.clusterDistance, - distance_deviation = 3, - action_delivery = - { - type = "projectile", - projectile = attributes.laserName, - duration = 20, - direction_deviation = 0.6, - starting_speed = attributes.startingSpeed, - starting_speed_deviation = 0.3 - }, - repeat_count = 3 - } - } - } - } - end - }, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "laser-worm", - tint = {r=0, g=0, b=0.42, a=0.65}, - pTint = {r=0, g=0, b=1, a=0.5}, - sTint = {r=0, g=0, b=1, a=0.5}, - lTint = {r=0, g=0, b=1, a=0.5} - }, - - { - { - type = "attribute", - name = "health", - [1] = 200, - [2] = 350, - [3] = 500, - [4] = 750, - [5] = 900, - [6] = 1000, - [7] = 1500, - [8] = 2250, - [9] = 3000, - [10] = 5000 - }, - - { - type = "attack", - name = "cooldown", - [1] = 50, - [2] = 50, - [3] = 45, - [4] = 45, - [5] = 40, - [6] = 40, - [7] = 35, - [8] = 35, - [9] = 30, - [10] = 30 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attack", - name = "damage", - [1] = 12, - [2] = 20, - [3] = 25, - [4] = 30, - [5] = 35, - [6] = 40, - [7] = 50, - [8] = 60, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "prepareRange", - [1] = 30, - [2] = 30, - [3] = 31, - [4] = 31, - [5] = 32, - [6] = 32, - [7] = 33, - [8] = 33, - [9] = 34, - [10] = 34 - }, - - { - type = "attribute", - name = "foldingSpeed", - [1] = 0.15, - [2] = 0.15, - [3] = 0.16, - [4] = 0.16, - [5] = 0.16, - [6] = 0.17, - [7] = 0.17, - [8] = 0.18, - [9] = 0.18, - [10] = 0.19 - }, - - { - type = "attribute", - name = "preparingSpeed", - [1] = 0.025, - [2] = 0.025, - [3] = 0.026, - [4] = 0.026, - [5] = 0.027, - [6] = 0.027, - [7] = 0.028, - [8] = 0.028, - [9] = 0.029, - [10] = 0.029 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 70, - [2] = 70, - [3] = 72, - [4] = 72, - [5] = 73, - [6] = 73, - [7] = 74, - [8] = 74, - [9] = 75, - [10] = 75 - } - }, - - { - type = "resistance", - name = "laser", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - }, - - { - type = "attack", - name = "range", - [1] = 21, - [2] = 22, - [3] = 23, - [4] = 23, - [5] = 24, - [6] = 26, - [7] = 26, - [8] = 28, - [9] = 30, - [10] = 32 - }, - - { - type = "attack", - name = "radius", - [1] = 1.5, - [2] = 1.6, - [3] = 1.7, - [4] = 1.8, - [5] = 1.9, - [6] = 2.0, - [7] = 2.2, - [8] = 2.3, - [9] = 2.5, - [10] = 3.0 - }, - - { - type = "attack", - name = "startingSpeed", - [1] = 0.25, - [2] = 0.25, - [3] = 0.27, - [4] = 0.27, - [5] = 0.29, - [6] = 0.29, - [7] = 0.31, - [8] = 0.31, - [9] = 0.33, - [10] = 0.33 - }, - - { - type = "attack", - name = "clusterDistance", - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 5, - [6] = 5, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - - { - type = "attack", - name = "clusters", - min = 2, - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - } - }, - - function (attributes) - attributes.laserName = makeLaser(attributes) - return createRangedAttack(attributes, - createAttackBall(attributes)) - end, - - LASER_WORM_VARIATIONS, - LASER_WORM_TIERS -) +return laser diff --git a/prototypes/Neutral.lua b/prototypes/Neutral.lua index d340772..7d1d1d2 100755 --- a/prototypes/Neutral.lua +++ b/prototypes/Neutral.lua @@ -8,6 +8,8 @@ local constants = require("Constants") -- constants +local neutral = {} + local NEUTRAL_UNIT_TIERS = constants.NEUTRAL_UNIT_TIERS local NEUTRAL_UNIT_VARIATIONS = constants.NEUTRAL_UNIT_VARIATIONS @@ -33,24 +35,996 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable -local biterLoot = makeUnitAlienLootTable(nil) -local spawnerLoot = makeSpawnerAlienLootTable(nil) -local wormLoot = makeWormAlienLootTable(nil) +function neutral.addFaction() --- neutral biters -buildUnitSpawner( - { - unit = { - name = "neutral-biter", + local biterLoot = makeUnitAlienLootTable(nil) + local spawnerLoot = makeSpawnerAlienLootTable(nil) + local wormLoot = makeWormAlienLootTable(nil) - loot = biterLoot, - attributes = { - explosion = "blood-explosion-small" + -- neutral biters + buildUnitSpawner( + { + unit = { + name = "neutral-biter", + + loot = biterLoot, + attributes = { + explosion = "blood-explosion-small" + }, + attack = {}, + resistances = {}, + + type = "biter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint1 = {r=0.56, g=0.46, b=0.42, a=0.65}, + tint2 = {r=1, g=0.63, b=0, a=0.4} + }, + + unitSpawner = { + name = "neutral-biter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0.56, g=0.46, b=0.42, a=0.65} + } + }, + + { + unit = { + { + + type = "attribute", + name = "health", + [1] = 15, + [2] = 75, + [3] = 150, + [4] = 250, + [5] = 400, + [6] = 750, + [7] = 1500, + [8] = 3000, + [9] = 5000, + [10] = 10000 + + }, + + { + type = "attack", + name = "cooldown", + [1] = 35, + [2] = 35, + [3] = 35, + [4] = 35, + [5] = 35, + [6] = 35, + [7] = 50, + [8] = 50, + [9] = 55, + [10] = 57 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1750, + [4] = 3500, + [5] = 5000, + [6] = 10000, + [7] = 20000, + [8] = 25000, + [9] = 30000, + [10] = 40000 + }, + + { + type = "attack", + name = "damage", + [1] = 7, + [2] = 15, + [3] = 22.5, + [4] = 35, + [5] = 45, + [6] = 60, + [7] = 75, + [8] = 90, + [9] = 150, + [10] = 200 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + { + type = "attribute", + name = "movement", + [1] = 0.2, + [2] = 0.19, + [3] = 0.185, + [4] = 0.18, + [5] = 0.175, + [6] = 0.17, + [7] = 0.17, + [8] = 0.17, + [9] = 0.17, + [10] = 0.17 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.1, + [2] = 0.125, + [3] = 0.15, + [4] = 0.19, + [5] = 0.195, + [6] = 0.2, + [7] = 0.2, + [8] = 0.2, + [9] = 0.2, + [10] = 0.2 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 4, + [4] = 5, + [5] = 6, + [6] = 8, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 0, + [5] = 0, + [6] = 0, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "attack", + name = "range", + [1] = 0.5, + [2] = 0.5, + [3] = 0.75, + [4] = 0.75, + [5] = 1.0, + [6] = 1.0, + [7] = 1.25, + [8] = 1.50, + [9] = 1.75, + [10] = 2.0 + + } + }, + + unitSpawner = { + + { + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + }, + + { + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + }, + + { + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.12, + [3] = 0.22, + [4] = 0.32, + [5] = 0.42, + [6] = 0.52, + [7] = 0.62, + [8] = 0.72, + [9] = 0.82, + [10] = 0.92 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + + }, + { + type = "attribute", + name = "unitsToSpawn", + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 60, + [2] = 60, + [3] = 62, + [4] = 62, + [5] = 63, + [6] = 63, + [7] = 64, + [8] = 64, + [9] = 65, + [10] = 65 + } + } + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + createMeleeAttack, + + { + unit = NEUTRAL_UNIT_VARIATIONS, + unitSpawner = NEUTRAL_NEST_VARIATIONS + }, + + { + unit = NEUTRAL_UNIT_TIERS, + unitSpawner = NEUTRAL_NEST_TIERS + } + ) + + -- neutral spitters + buildUnitSpawner( + { + unit = { + name = "neutral-spitter", + + loot = biterLoot, + attributes = { + explosion = "blood-explosion-small" + }, + attack = { + type = "projectile", + directionOnly = true, + softSmokeName = softSmoke + }, + resistances = {}, + + type = "spitter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + attackName = "neutral-spitter", + tint = {r=0.56, g=0.46, b=0.42, a=1}, + pTint = {r=0, g=1, b=1, a=0.5}, + sTint = {r=0, g=1, b=1, a=0.5} + }, + + unitSpawner = { + name = "neutral-spitter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0.99, g=0.09, b=0.09, a=1} + } + }, + + { + unit = { + { + type = "attribute", + name = "health", + [1] = 10, + [2] = 50, + [3] = 200, + [4] = 350, + [5] = 750, + [6] = 1000, + [7] = 1500, + [8] = 2500, + [9] = 4500, + [10] = 7000 + }, + + { + type = "attack", + name = "cooldown", + [1] = 100, + [2] = 100, + [3] = 97, + [4] = 97, + [5] = 95, + [6] = 95, + [7] = 93, + [8] = 93, + [9] = 90, + [10] = 90 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1200, + [4] = 1750, + [5] = 2500, + [6] = 5000, + [7] = 10000, + [8] = 12500, + [9] = 15000, + [10] = 20000 + }, + + { + type = "attack", + name = "damage", + [1] = 4, + [2] = 9, + [3] = 14, + [4] = 23, + [5] = 30, + [6] = 37, + [7] = 45, + [8] = 57, + [9] = 70, + [10] = 80 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + + { + type = "attribute", + name = "movement", + [1] = 0.185, + [2] = 0.18, + [3] = 0.18, + [4] = 0.17, + [5] = 0.17, + [6] = 0.16, + [7] = 0.16, + [8] = 0.15, + [9] = 0.15, + [10] = 0.14 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.04, + [2] = 0.045, + [3] = 0.050, + [4] = 0.055, + [5] = 0.060, + [6] = 0.065, + [7] = 0.070, + [8] = 0.075, + [9] = 0.08, + [10] = 0.084 + }, + + { + type = "resistance", + name = "explosion", + percent = { + [1] = 0, + [2] = 0, + [3] = 10, + [4] = 10, + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 + } + }, + + { + type = "attack", + name = "range", + [1] = 13, + [2] = 13, + [3] = 14, + [4] = 14, + [5] = 15, + [6] = 15, + [7] = 16, + [8] = 16, + [9] = 17, + [10] = 17 + }, + + { + type = "attack", + name = "radius", + [1] = 1.2, + [2] = 1.3, + [3] = 1.4, + [4] = 1.5, + [5] = 1.6, + [6] = 1.7, + [7] = 1.8, + [8] = 1.9, + [9] = 2.0, + [10] = 2.5 + }, + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 + } + }, + + unitSpawner = { + + { + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + }, + + { + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + }, + + { + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0.08, + [2] = 0.16, + [3] = 0.24, + [4] = 0.35, + [5] = 0.40, + [6] = 0.45, + [7] = 0.55, + [8] = 0.65, + [9] = 0.75, + [10] = 0.9 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + }, + + { + type = "attribute", + name = "unitsToSpawn", + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 60, + [2] = 60, + [3] = 62, + [4] = 62, + [5] = 63, + [6] = 63, + [7] = 64, + [8] = 64, + [9] = 65, + [10] = 65 + } + } + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + function (attributes) + return createRangedAttack(attributes, + createAttackBall(attributes), + spitterattackanimation(attributes.scale, + attributes.tint)) + end, + + { + unit = NEUTRAL_UNIT_VARIATIONS, + unitSpawner = NEUTRAL_NEST_VARIATIONS + }, + + { + unit = NEUTRAL_UNIT_TIERS, + unitSpawner = NEUTRAL_NEST_TIERS + } + ) + + -- neutral worms + buildWorm( + { + name = "neutral-worm", + + loot = wormLoot, + attributes = {}, + attack = { + type = "projectile", + softSmokeName = softSmoke }, - attack = {}, resistances = {}, - type = "biter", scales = { [1] = 0.5, [2] = 0.6, @@ -63,112 +1037,74 @@ buildUnitSpawner( [9] = 1.3, [10] = 1.4 }, - tint1 = {r=0.56, g=0.46, b=0.42, a=0.65}, - tint2 = {r=1, g=0.63, b=0, a=0.4} + attackName = "neutral-worm", + tint = {r=0.56, g=0.46, b=0.42, a=0.65}, + pTint = {r=0, g=1, b=1, a=0.5}, + sTint = {r=0, g=1, b=1, a=0.5} }, - unitSpawner = { - name = "neutral-biter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=0.56, g=0.46, b=0.42, a=0.65} - } - }, - - { - unit = { + { { - type = "attribute", name = "health", - [1] = 15, - [2] = 75, - [3] = 150, - [4] = 250, - [5] = 400, - [6] = 750, + [1] = 200, + [2] = 350, + [3] = 500, + [4] = 750, + [5] = 900, + [6] = 1000, [7] = 1500, [8] = 3000, [9] = 5000, - [10] = 10000 - + [10] = 9000 }, - { + { type = "attack", name = "cooldown", - [1] = 35, - [2] = 35, - [3] = 35, - [4] = 35, - [5] = 35, - [6] = 35, - [7] = 50, - [8] = 50, - [9] = 55, - [10] = 57 + [1] = 50, + [2] = 50, + [3] = 45, + [4] = 45, + [5] = 40, + [6] = 40, + [7] = 35, + [8] = 35, + [9] = 30, + [10] = 30 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 }, - { - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1750, - [4] = 3500, - [5] = 5000, - [6] = 10000, - [7] = 20000, - [8] = 25000, - [9] = 30000, - [10] = 40000 - }, - - { + { type = "attack", name = "damage", - [1] = 7, - [2] = 15, - [3] = 22.5, - [4] = 35, - [5] = 45, - [6] = 60, - [7] = 75, - [8] = 90, - [9] = 150, - [10] = 200 + [1] = 12, + [2] = 20, + [3] = 25, + [4] = 30, + [5] = 35, + [6] = 40, + [7] = 50, + [8] = 60, + [9] = 70, + [10] = 80 }, - { + { type = "attribute", name = "healing", [1] = 0.01, @@ -183,33 +1119,49 @@ buildUnitSpawner( [10] = 0.16 }, - { + { type = "attribute", - name = "movement", - [1] = 0.2, - [2] = 0.19, - [3] = 0.185, - [4] = 0.18, - [5] = 0.175, + name = "prepareRange", + [1] = 30, + [2] = 30, + [3] = 31, + [4] = 31, + [5] = 32, + [6] = 32, + [7] = 33, + [8] = 33, + [9] = 34, + [10] = 34 + }, + + { + type = "attribute", + name = "foldingSpeed", + [1] = 0.15, + [2] = 0.15, + [3] = 0.16, + [4] = 0.16, + [5] = 0.16, [6] = 0.17, [7] = 0.17, - [8] = 0.17, - [9] = 0.17, - [10] = 0.17 + [8] = 0.18, + [9] = 0.18, + [10] = 0.19 }, - { + + { type = "attribute", - name = "distancePerFrame", - [1] = 0.1, - [2] = 0.125, - [3] = 0.15, - [4] = 0.19, - [5] = 0.195, - [6] = 0.2, - [7] = 0.2, - [8] = 0.2, - [9] = 0.2, - [10] = 0.2 + name = "preparingSpeed", + [1] = 0.025, + [2] = 0.025, + [3] = 0.026, + [4] = 0.026, + [5] = 0.027, + [6] = 0.027, + [7] = 0.028, + [8] = 0.028, + [9] = 0.029, + [10] = 0.029 }, { @@ -218,208 +1170,14 @@ buildUnitSpawner( decrease = { [1] = 0, [2] = 0, - [3] = 4, + [3] = 5, [4] = 5, - [5] = 6, + [5] = 8, [6] = 8, [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 0, - [5] = 0, - [6] = 0, - [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - - { - type = "attack", - name = "range", - [1] = 0.5, - [2] = 0.5, - [3] = 0.75, - [4] = 0.75, - [5] = 1.0, - [6] = 1.0, - [7] = 1.25, - [8] = 1.50, - [9] = 1.75, - [10] = 2.0 - - } - }, - - unitSpawner = { - - { - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - }, - - { - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - }, - - { - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.12, - [3] = 0.22, - [4] = 0.32, - [5] = 0.42, - [6] = 0.52, - [7] = 0.62, - [8] = 0.72, - [9] = 0.82, - [10] = 0.92 - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - - }, - { - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, + [8] = 10, [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + [10] = 12 } }, @@ -427,28 +1185,28 @@ buildUnitSpawner( type = "resistance", name = "explosion", decrease = { - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 }, percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + [1] = 0, + [2] = 0, + [3] = 10, + [4] = 10, + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 } }, @@ -468,273 +1226,47 @@ buildUnitSpawner( [10] = 7 }, percent = { - [1] = 60, - [2] = 60, - [3] = 62, - [4] = 62, - [5] = 63, - [6] = 63, - [7] = 64, - [8] = 64, - [9] = 65, - [10] = 65 - } - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - createMeleeAttack, - - { - unit = NEUTRAL_UNIT_VARIATIONS, - unitSpawner = NEUTRAL_NEST_VARIATIONS - }, - - { - unit = NEUTRAL_UNIT_TIERS, - unitSpawner = NEUTRAL_NEST_TIERS - } -) - --- neutral spitters -buildUnitSpawner( - { - unit = { - name = "neutral-spitter", - - loot = biterLoot, - attributes = { - explosion = "blood-explosion-small" - }, - attack = { - type = "projectile", - directionOnly = true, - softSmokeName = softSmoke - }, - resistances = {}, - - type = "spitter", - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "neutral-spitter", - tint = {r=0.56, g=0.46, b=0.42, a=1}, - pTint = {r=0, g=1, b=1, a=0.5}, - sTint = {r=0, g=1, b=1, a=0.5} - }, - - unitSpawner = { - name = "neutral-spitter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=0.99, g=0.09, b=0.09, a=1} - } - }, - - { - unit = { - { - type = "attribute", - name = "health", - [1] = 10, - [2] = 50, - [3] = 200, - [4] = 350, - [5] = 750, - [6] = 1000, - [7] = 1500, - [8] = 2500, - [9] = 4500, - [10] = 7000 - }, - - { - type = "attack", - name = "cooldown", - [1] = 100, - [2] = 100, - [3] = 97, - [4] = 97, - [5] = 95, - [6] = 95, - [7] = 93, - [8] = 93, - [9] = 90, - [10] = 90 - }, - - { - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1200, - [4] = 1750, - [5] = 2500, - [6] = 5000, - [7] = 10000, - [8] = 12500, - [9] = 15000, - [10] = 20000 - }, - - { - type = "attack", - name = "damage", - [1] = 4, - [2] = 9, - [3] = 14, - [4] = 23, - [5] = 30, - [6] = 37, - [7] = 45, - [8] = 57, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - - { - type = "attribute", - name = "movement", - [1] = 0.185, - [2] = 0.18, - [3] = 0.18, - [4] = 0.17, - [5] = 0.17, - [6] = 0.16, - [7] = 0.16, - [8] = 0.15, - [9] = 0.15, - [10] = 0.14 - }, - { - type = "attribute", - name = "distancePerFrame", - [1] = 0.04, - [2] = 0.045, - [3] = 0.050, - [4] = 0.055, - [5] = 0.060, - [6] = 0.065, - [7] = 0.070, - [8] = 0.075, - [9] = 0.08, - [10] = 0.084 - }, - - { - type = "resistance", - name = "explosion", - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 + [1] = 70, + [2] = 70, + [3] = 72, + [4] = 72, + [5] = 73, + [6] = 73, + [7] = 74, + [8] = 74, + [9] = 75, + [10] = 75 } }, { type = "attack", name = "range", - [1] = 13, - [2] = 13, - [3] = 14, - [4] = 14, - [5] = 15, - [6] = 15, - [7] = 16, - [8] = 16, - [9] = 17, - [10] = 17 + [1] = 21, + [2] = 22, + [3] = 23, + [4] = 23, + [5] = 24, + [6] = 26, + [7] = 26, + [8] = 28, + [9] = 30, + [10] = 32 }, { type = "attack", name = "radius", - [1] = 1.2, - [2] = 1.3, - [3] = 1.4, - [4] = 1.5, - [5] = 1.6, - [6] = 1.7, - [7] = 1.8, - [8] = 1.9, - [9] = 2.0, - [10] = 2.5 + [1] = 1.5, + [2] = 1.6, + [3] = 1.7, + [4] = 1.8, + [5] = 1.9, + [6] = 2.0, + [7] = 2.2, + [8] = 2.3, + [9] = 2.5, + [10] = 3.0 }, { @@ -752,7 +1284,7 @@ buildUnitSpawner( [10] = 0.05 }, - { + { type = "attack", name = "particleHoizontalSpeed", [1] = 0.6, @@ -767,7 +1299,7 @@ buildUnitSpawner( [10] = 1 }, - { + { type = "attack", name = "particleHoizontalSpeedDeviation", [1] = 0.0025, @@ -782,540 +1314,16 @@ buildUnitSpawner( [10] = 0.0021 } }, - - unitSpawner = { - { - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - }, + function (attributes) + return createRangedAttack(attributes, + createAttackBall(attributes)) + end, - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - }, + NEUTRAL_WORM_VARIATIONS, + NEUTRAL_WORM_TIERS + ) +end - { - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - }, - { - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0.08, - [2] = 0.16, - [3] = 0.24, - [4] = 0.35, - [5] = 0.40, - [6] = 0.45, - [7] = 0.55, - [8] = 0.65, - [9] = 0.75, - [10] = 0.9 - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - }, - - { - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, - [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - { - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 60, - [2] = 60, - [3] = 62, - [4] = 62, - [5] = 63, - [6] = 63, - [7] = 64, - [8] = 64, - [9] = 65, - [10] = 65 - } - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - function (attributes) - return createRangedAttack(attributes, - createAttackBall(attributes), - spitterattackanimation(attributes.scale, - attributes.tint)) - end, - - { - unit = NEUTRAL_UNIT_VARIATIONS, - unitSpawner = NEUTRAL_NEST_VARIATIONS - }, - - { - unit = NEUTRAL_UNIT_TIERS, - unitSpawner = NEUTRAL_NEST_TIERS - } -) - --- neutral worms -buildWorm( - { - name = "neutral-worm", - - loot = wormLoot, - attributes = {}, - attack = { - type = "projectile", - softSmokeName = softSmoke - }, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "neutral-worm", - tint = {r=0.56, g=0.46, b=0.42, a=0.65}, - pTint = {r=0, g=1, b=1, a=0.5}, - sTint = {r=0, g=1, b=1, a=0.5} - }, - - { - { - type = "attribute", - name = "health", - [1] = 200, - [2] = 350, - [3] = 500, - [4] = 750, - [5] = 900, - [6] = 1000, - [7] = 1500, - [8] = 3000, - [9] = 5000, - [10] = 9000 - }, - - { - type = "attack", - name = "cooldown", - [1] = 50, - [2] = 50, - [3] = 45, - [4] = 45, - [5] = 40, - [6] = 40, - [7] = 35, - [8] = 35, - [9] = 30, - [10] = 30 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attack", - name = "damage", - [1] = 12, - [2] = 20, - [3] = 25, - [4] = 30, - [5] = 35, - [6] = 40, - [7] = 50, - [8] = 60, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "prepareRange", - [1] = 30, - [2] = 30, - [3] = 31, - [4] = 31, - [5] = 32, - [6] = 32, - [7] = 33, - [8] = 33, - [9] = 34, - [10] = 34 - }, - - { - type = "attribute", - name = "foldingSpeed", - [1] = 0.15, - [2] = 0.15, - [3] = 0.16, - [4] = 0.16, - [5] = 0.16, - [6] = 0.17, - [7] = 0.17, - [8] = 0.18, - [9] = 0.18, - [10] = 0.19 - }, - - { - type = "attribute", - name = "preparingSpeed", - [1] = 0.025, - [2] = 0.025, - [3] = 0.026, - [4] = 0.026, - [5] = 0.027, - [6] = 0.027, - [7] = 0.028, - [8] = 0.028, - [9] = 0.029, - [10] = 0.029 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 70, - [2] = 70, - [3] = 72, - [4] = 72, - [5] = 73, - [6] = 73, - [7] = 74, - [8] = 74, - [9] = 75, - [10] = 75 - } - }, - - { - type = "attack", - name = "range", - [1] = 21, - [2] = 22, - [3] = 23, - [4] = 23, - [5] = 24, - [6] = 26, - [7] = 26, - [8] = 28, - [9] = 30, - [10] = 32 - }, - - { - type = "attack", - name = "radius", - [1] = 1.5, - [2] = 1.6, - [3] = 1.7, - [4] = 1.8, - [5] = 1.9, - [6] = 2.0, - [7] = 2.2, - [8] = 2.3, - [9] = 2.5, - [10] = 3.0 - }, - - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - } - }, - - function (attributes) - return createRangedAttack(attributes, - createAttackBall(attributes)) - end, - - NEUTRAL_WORM_VARIATIONS, - NEUTRAL_WORM_TIERS -) +return neutral diff --git a/prototypes/Nuclear.lua b/prototypes/Nuclear.lua index 51b47ad..597c889 100755 --- a/prototypes/Nuclear.lua +++ b/prototypes/Nuclear.lua @@ -10,6 +10,8 @@ local constants = require("Constants") -- constants +local nuclear = {} + local NUCLEAR_UNIT_TIERS = constants.NUCLEAR_UNIT_TIERS local NUCLEAR_UNIT_VARIATIONS = constants.NUCLEAR_UNIT_VARIATIONS @@ -35,28 +37,576 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable -local biterLoot = makeUnitAlienLootTable("yellow") -local spawnerLoot = makeSpawnerAlienLootTable("yellow") -local wormLoot = makeWormAlienLootTable("yellow") +function nuclear.addFaction() --- nuclear biters -buildUnitSpawner( - { - unit = { - name = "nuclear-biter", - loot = biterLoot, - attributes = { - explosion = "blood-explosion-small" + local biterLoot = makeUnitAlienLootTable("yellow") + local spawnerLoot = makeSpawnerAlienLootTable("yellow") + local wormLoot = makeWormAlienLootTable("yellow") + + -- nuclear biters + buildUnitSpawner( + { + unit = { + name = "nuclear-biter", + + loot = biterLoot, + attributes = { + explosion = "blood-explosion-small" + }, + attack = { + nuclear = true, + scorchmark = "small-scorchmark" + }, + resistances = {}, + + attackName = "nuclear-biter", + type = "biter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint1 = {r=0.76, g=0.76, b=0, a=0.65}, + tint2 = {r=0.76, g=0.76, b=0, a=0.65} }, + + unitSpawner = { + name = "nuclear-biter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0.76, g=0.76, b=0, a=0.65} + } + }, + + { + unit = { + { + + type = "attribute", + name = "health", + [1] = 7, + [2] = 42, + [3] = 75, + [4] = 125, + [5] = 200, + [6] = 350, + [7] = 750, + [8] = 1500, + [9] = 3000, + [10] = 5000 + + }, + + { + type = "attack", + name = "cooldown", + [1] = 35, + [2] = 35, + [3] = 35, + [4] = 35, + [5] = 35, + [6] = 35, + [7] = 50, + [8] = 50, + [9] = 55, + [10] = 57 + + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 5, + [7] = 6, + [8] = 6, + [9] = 8, + [10] = 8 + + }, + + { + + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1750, + [4] = 3500, + [5] = 5000, + [6] = 10000, + [7] = 20000, + [8] = 25000, + [9] = 30000, + [10] = 40000 + + }, + + { + type = "attack", + mapping = "explosion", + [1] = "explosion", + [2] = "explosion", + [3] = "big-explosion", + [4] = "big-explosion", + [5] = "big-explosion", + [6] = "big-explosion", + [7] = "massive-explosion", + [8] = "massive-explosion", + [9] = "massive-explosion", + [10] = "massive-explosion" + }, + + { + type = "attack", + name = "radius", + [1] = 5, + [2] = 10, + [3] = 10, + [4] = 12, + [5] = 14, + [6] = 16, + [7] = 16, + [8] = 18, + [9] = 18, + [10] = 20 + }, + + { + type = "attack", + name = "repeatCount", + [1] = 150, + [2] = 175, + [3] = 250, + [4] = 300, + [5] = 350, + [6] = 400, + [7] = 450, + [8] = 500, + [9] = 550, + [10] = 600 + }, + + { + type = "attack", + name = "damage", + [1] = 50, + [2] = 60, + [3] = 80, + [4] = 100, + [5] = 120, + [6] = 130, + [7] = 140, + [8] = 150, + [9] = 180, + [10] = 200 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + + }, + + { + type = "attribute", + name = "movement", + [1] = 0.23, + [2] = 0.23, + [3] = 0.22, + [4] = 0.22, + [5] = 0.21, + [6] = 0.21, + [7] = 0.2, + [8] = 0.2, + [9] = 0.19, + [10] = 0.19 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.12, + [2] = 0.145, + [3] = 0.17, + [4] = 0.21, + [5] = 0.21, + [6] = 0.22, + [7] = 0.22, + [8] = 0.23, + [9] = 0.23, + [10] = 0.24 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 4, + [4] = 5, + [5] = 6, + [6] = 8, + [7] = 9, + [8] = 9, + [9] = 10, + [10] = 10 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = -7, + [2] = -7, + [3] = -10, + [4] = -10, + [5] = -13, + [6] = -13, + [7] = -16, + [8] = -16, + [9] = -19, + [10] = -23 + }, + percent = { + [1] = -65, + [2] = -65, + [3] = -70, + [4] = -75, + [5] = -75, + [6] = -80, + [7] = -85, + [8] = -85, + [9] = -90, + [10] = -90 + } + }, + + { + type = "attack", + name = "range", + [1] = 0.5, + [2] = 0.5, + [3] = 0.75, + [4] = 0.75, + [5] = 1.0, + [6] = 1.0, + [7] = 1.25, + [8] = 1.50, + [9] = 1.75, + [10] = 2.0 + } + }, + + unitSpawner = { + + { + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + }, + + { + + type = "attribute", + name = "spawingCooldownStart", + [1] = 330, + [2] = 330, + [3] = 325, + [4] = 325, + [5] = 320, + [6] = 320, + [7] = 315, + [8] = 315, + [9] = 310, + [10] = 310 + }, + + { + + type = "attribute", + name = "spawingCooldownEnd", + [1] = 120, + [2] = 120, + [3] = 115, + [4] = 115, + [5] = 110, + [6] = 110, + [7] = 105, + [8] = 105, + [9] = 100, + [10] = 100 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 1, + [2] = 2, + [3] = 3, + [4] = 4, + [5] = 4, + [6] = 5, + [7] = 5, + [8] = 6, + [9] = 6, + [10] = 6 + }, + + { + type = "attribute", + name = "unitsToSpawn", + [1] = 1, + [2] = 2, + [3] = 3, + [4] = 3, + [5] = 4, + [6] = 4, + [7] = 5, + [8] = 5, + [9] = 5, + [10] = 5 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 1, + [2] = 1, + [3] = 2, + [4] = 2, + [5] = 3, + [6] = 3, + [7] = 4, + [8] = 4, + [9] = 5, + [10] = 5 + }, + percent = { + [1] = 40, + [2] = 40, + [3] = 42, + [4] = 42, + [5] = 43, + [6] = 43, + [7] = 44, + [8] = 44, + [9] = 45, + [10] = 45 + } + } + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + function (attributes) + return createSuicideAttack(attributes, + makeAtomicBlast(attributes)) + end, + + { + unit = NUCLEAR_UNIT_VARIATIONS, + unitSpawner = NUCLEAR_NEST_VARIATIONS + }, + + { + unit = NUCLEAR_UNIT_TIERS, + unitSpawner = NUCLEAR_NEST_TIERS + } + ) + + -- nuclear worms + buildWorm( + { + name = "nuclear-worm", + + loot = wormLoot, + attributes = {}, attack = { - nuclear = true, - scorchmark = "small-scorchmark" + type = "projectile", + stickerAnimation = { + filename = "__base__/graphics/entity/slowdown-sticker/slowdown-sticker.png", + priority = "extra-high", + width = 11, + height = 11, + frame_count = 13, + animation_speed = 0.4 + }, + areaEffects = function (attributes) + return { + { + type = "damage", + damage = { amount = attributes.damage, type = "acid" } + }, + { + type = "create-sticker", + sticker = attributes.name .. "-sticker-rampant" + } + } + end, + softSmokeName = softSmoke }, resistances = {}, - attackName = "nuclear-biter", - type = "biter", scales = { [1] = 0.5, [2] = 0.6, @@ -69,161 +619,104 @@ buildUnitSpawner( [9] = 1.3, [10] = 1.4 }, - tint1 = {r=0.76, g=0.76, b=0, a=0.65}, - tint2 = {r=0.76, g=0.76, b=0, a=0.65} + attackName = "nuclear-worm", + tint = {r=0.76, g=0.76, b=0, a=0.65}, + pTint = {r=0, g=1, b=1, a=0.5}, + sTint = {r=0, g=1, b=1, a=0.5} }, - unitSpawner = { - name = "nuclear-biter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=0.76, g=0.76, b=0, a=0.65} - } - }, - - { - unit = { - { - + { + { type = "attribute", name = "health", - [1] = 7, - [2] = 42, - [3] = 75, - [4] = 125, - [5] = 200, - [6] = 350, - [7] = 750, - [8] = 1500, - [9] = 3000, - [10] = 5000 - + [1] = 200, + [2] = 350, + [3] = 500, + [4] = 750, + [5] = 900, + [6] = 1000, + [7] = 1500, + [8] = 3000, + [9] = 5000, + [10] = 9000 }, - { + { type = "attack", name = "cooldown", - [1] = 35, - [2] = 35, - [3] = 35, - [4] = 35, - [5] = 35, - [6] = 35, - [7] = 50, - [8] = 50, - [9] = 55, - [10] = 57 - + [1] = 50, + [2] = 50, + [3] = 45, + [4] = 45, + [5] = 40, + [6] = 40, + [7] = 35, + [8] = 35, + [9] = 30, + [10] = 30 + }, + + { + type = "attack", + name = "stickerMovementModifier", + [1] = 1.2, + [2] = 1.2, + [3] = 1.3, + [4] = 1.3, + [5] = 1.4, + [6] = 1.4, + [7] = 1.5, + [8] = 1.5, + [9] = 1.6, + [10] = 1.6 }, - { + { + type = "attack", + name = "stickerDuration", + [1] = 1800, + [2] = 1800, + [3] = 1900, + [4] = 1900, + [5] = 2000, + [6] = 2000, + [7] = 2100, + [8] = 2100, + [9] = 2200, + [10] = 2200 + }, + + { type = "attribute", - name = "spawningTimeModifer", + name = "evolutionRequirement", [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 5, - [7] = 6, - [8] = 6, - [9] = 8, - [10] = 8 - - }, - - { - - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1750, - [4] = 3500, - [5] = 5000, - [6] = 10000, - [7] = 20000, - [8] = 25000, - [9] = 30000, - [10] = 40000 - - }, - - { - type = "attack", - mapping = "explosion", - [1] = "explosion", - [2] = "explosion", - [3] = "big-explosion", - [4] = "big-explosion", - [5] = "big-explosion", - [6] = "big-explosion", - [7] = "massive-explosion", - [8] = "massive-explosion", - [9] = "massive-explosion", - [10] = "massive-explosion" - }, - - { - type = "attack", - name = "radius", - [1] = 5, - [2] = 10, - [3] = 10, - [4] = 12, - [5] = 14, - [6] = 16, - [7] = 16, - [8] = 18, - [9] = 18, - [10] = 20 - }, - - { - type = "attack", - name = "repeatCount", - [1] = 150, - [2] = 175, - [3] = 250, - [4] = 300, - [5] = 350, - [6] = 400, - [7] = 450, - [8] = 500, - [9] = 550, - [10] = 600 + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 }, - { + { type = "attack", name = "damage", - [1] = 50, - [2] = 60, - [3] = 80, - [4] = 100, - [5] = 120, - [6] = 130, - [7] = 140, - [8] = 150, - [9] = 180, - [10] = 200 + [1] = 12, + [2] = 20, + [3] = 25, + [4] = 30, + [5] = 35, + [6] = 40, + [7] = 50, + [8] = 60, + [9] = 70, + [10] = 80 }, - { + { type = "attribute", name = "healing", [1] = 0.01, @@ -236,247 +729,67 @@ buildUnitSpawner( [8] = 0.12, [9] = 0.14, [10] = 0.16 - }, - { + { type = "attribute", - name = "movement", - [1] = 0.23, - [2] = 0.23, - [3] = 0.22, - [4] = 0.22, - [5] = 0.21, - [6] = 0.21, - [7] = 0.2, - [8] = 0.2, - [9] = 0.19, - [10] = 0.19 - }, - { - type = "attribute", - name = "distancePerFrame", - [1] = 0.12, - [2] = 0.145, - [3] = 0.17, - [4] = 0.21, - [5] = 0.21, - [6] = 0.22, - [7] = 0.22, - [8] = 0.23, - [9] = 0.23, - [10] = 0.24 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 4, - [4] = 5, - [5] = 6, - [6] = 8, - [7] = 9, - [8] = 9, - [9] = 10, - [10] = 10 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = -7, - [2] = -7, - [3] = -10, - [4] = -10, - [5] = -13, - [6] = -13, - [7] = -16, - [8] = -16, - [9] = -19, - [10] = -23 - }, - percent = { - [1] = -65, - [2] = -65, - [3] = -70, - [4] = -75, - [5] = -75, - [6] = -80, - [7] = -85, - [8] = -85, - [9] = -90, - [10] = -90 - } - }, - - { - type = "attack", - name = "range", - [1] = 0.5, - [2] = 0.5, - [3] = 0.75, - [4] = 0.75, - [5] = 1.0, - [6] = 1.0, - [7] = 1.25, - [8] = 1.50, - [9] = 1.75, - [10] = 2.0 - } - }, - - unitSpawner = { - - { - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - }, - - { - - type = "attribute", - name = "spawingCooldownStart", - [1] = 330, - [2] = 330, - [3] = 325, - [4] = 325, - [5] = 320, - [6] = 320, - [7] = 315, - [8] = 315, - [9] = 310, - [10] = 310 - }, - - { - - type = "attribute", - name = "spawingCooldownEnd", - [1] = 120, - [2] = 120, - [3] = 115, - [4] = 115, - [5] = 110, - [6] = 110, - [7] = 105, - [8] = 105, - [9] = 100, - [10] = 100 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 1, - [2] = 2, - [3] = 3, - [4] = 4, - [5] = 4, - [6] = 5, - [7] = 5, - [8] = 6, - [9] = 6, - [10] = 6 - }, - - { - type = "attribute", - name = "unitsToSpawn", - [1] = 1, - [2] = 2, - [3] = 3, - [4] = 3, - [5] = 4, - [6] = 4, - [7] = 5, - [8] = 5, - [9] = 5, - [10] = 5 + name = "prepareRange", + [1] = 30, + [2] = 30, + [3] = 31, + [4] = 31, + [5] = 32, + [6] = 32, + [7] = 33, + [8] = 33, + [9] = 34, + [10] = 34 }, + { + type = "attribute", + name = "foldingSpeed", + [1] = 0.15, + [2] = 0.15, + [3] = 0.16, + [4] = 0.16, + [5] = 0.16, + [6] = 0.17, + [7] = 0.17, + [8] = 0.18, + [9] = 0.18, + [10] = 0.19 + }, + + { + type = "attribute", + name = "preparingSpeed", + [1] = 0.025, + [2] = 0.025, + [3] = 0.026, + [4] = 0.026, + [5] = 0.027, + [6] = 0.027, + [7] = 0.028, + [8] = 0.028, + [9] = 0.029, + [10] = 0.029 + }, + { type = "resistance", name = "physical", decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, [7] = 10, - [8] = 12, + [8] = 10, [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + [10] = 12 } }, @@ -536,398 +849,93 @@ buildUnitSpawner( [9] = 45, [10] = 45 } - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - function (attributes) - return createSuicideAttack(attributes, - makeAtomicBlast(attributes)) - end, - - { - unit = NUCLEAR_UNIT_VARIATIONS, - unitSpawner = NUCLEAR_NEST_VARIATIONS - }, - - { - unit = NUCLEAR_UNIT_TIERS, - unitSpawner = NUCLEAR_NEST_TIERS - } -) - --- nuclear worms -buildWorm( - { - name = "nuclear-worm", - - loot = wormLoot, - attributes = {}, - attack = { - type = "projectile", - stickerAnimation = { - filename = "__base__/graphics/entity/slowdown-sticker/slowdown-sticker.png", - priority = "extra-high", - width = 11, - height = 11, - frame_count = 13, - animation_speed = 0.4 }, - areaEffects = function (attributes) - return { - { - type = "damage", - damage = { amount = attributes.damage, type = "acid" } - }, - { - type = "create-sticker", - sticker = attributes.name .. "-sticker-rampant" - } - } - end, - softSmokeName = softSmoke - }, - resistances = {}, - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "nuclear-worm", - tint = {r=0.76, g=0.76, b=0, a=0.65}, - pTint = {r=0, g=1, b=1, a=0.5}, - sTint = {r=0, g=1, b=1, a=0.5} - }, - - { - { - type = "attribute", - name = "health", - [1] = 200, - [2] = 350, - [3] = 500, - [4] = 750, - [5] = 900, - [6] = 1000, - [7] = 1500, - [8] = 3000, - [9] = 5000, - [10] = 9000 - }, - - { - type = "attack", - name = "cooldown", - [1] = 50, - [2] = 50, - [3] = 45, - [4] = 45, - [5] = 40, - [6] = 40, - [7] = 35, - [8] = 35, - [9] = 30, - [10] = 30 - }, - - { - type = "attack", - name = "stickerMovementModifier", - [1] = 1.2, - [2] = 1.2, - [3] = 1.3, - [4] = 1.3, - [5] = 1.4, - [6] = 1.4, - [7] = 1.5, - [8] = 1.5, - [9] = 1.6, - [10] = 1.6 - }, - - { - type = "attack", - name = "stickerDuration", - [1] = 1800, - [2] = 1800, - [3] = 1900, - [4] = 1900, - [5] = 2000, - [6] = 2000, - [7] = 2100, - [8] = 2100, - [9] = 2200, - [10] = 2200 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attack", - name = "damage", - [1] = 12, - [2] = 20, - [3] = 25, - [4] = 30, - [5] = 35, - [6] = 40, - [7] = 50, - [8] = 60, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "prepareRange", - [1] = 30, - [2] = 30, - [3] = 31, - [4] = 31, - [5] = 32, - [6] = 32, - [7] = 33, - [8] = 33, - [9] = 34, - [10] = 34 - }, - - { - type = "attribute", - name = "foldingSpeed", - [1] = 0.15, - [2] = 0.15, - [3] = 0.16, - [4] = 0.16, - [5] = 0.16, - [6] = 0.17, - [7] = 0.17, - [8] = 0.18, - [9] = 0.18, - [10] = 0.19 - }, - - { - type = "attribute", - name = "preparingSpeed", - [1] = 0.025, - [2] = 0.025, - [3] = 0.026, - [4] = 0.026, - [5] = 0.027, - [6] = 0.027, - [7] = 0.028, - [8] = 0.028, - [9] = 0.029, - [10] = 0.029 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 + { + type = "attack", + name = "range", + [1] = 21, + [2] = 22, + [3] = 23, + [4] = 23, + [5] = 24, + [6] = 26, + [7] = 26, + [8] = 28, + [9] = 30, + [10] = 32 }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - }, - { - type = "resistance", - name = "fire", - decrease = { - [1] = 1, - [2] = 1, - [3] = 2, - [4] = 2, - [5] = 3, - [6] = 3, - [7] = 4, - [8] = 4, - [9] = 5, - [10] = 5 + { + type = "attack", + name = "radius", + [1] = 1.5, + [2] = 1.6, + [3] = 1.7, + [4] = 1.8, + [5] = 1.9, + [6] = 2.0, + [7] = 2.2, + [8] = 2.3, + [9] = 2.5, + [10] = 3.0 }, - percent = { - [1] = 40, - [2] = 40, - [3] = 42, - [4] = 42, - [5] = 43, - [6] = 43, - [7] = 44, - [8] = 44, - [9] = 45, - [10] = 45 + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 } }, - { - type = "attack", - name = "range", - [1] = 21, - [2] = 22, - [3] = 23, - [4] = 23, - [5] = 24, - [6] = 26, - [7] = 26, - [8] = 28, - [9] = 30, - [10] = 32 - }, + function (attributes) + makeSticker(attributes) + return createRangedAttack(attributes, + createAttackBall(attributes)) + end, - { - type = "attack", - name = "radius", - [1] = 1.5, - [2] = 1.6, - [3] = 1.7, - [4] = 1.8, - [5] = 1.9, - [6] = 2.0, - [7] = 2.2, - [8] = 2.3, - [9] = 2.5, - [10] = 3.0 - }, + NUCLEAR_WORM_VARIATIONS, + NUCLEAR_WORM_TIERS + ) +end - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - } - }, - - function (attributes) - makeSticker(attributes) - return createRangedAttack(attributes, - createAttackBall(attributes)) - end, - - NUCLEAR_WORM_VARIATIONS, - NUCLEAR_WORM_TIERS -) +return nuclear diff --git a/prototypes/Physical.lua b/prototypes/Physical.lua index 6a72e77..6b7267a 100755 --- a/prototypes/Physical.lua +++ b/prototypes/Physical.lua @@ -8,6 +8,8 @@ local constants = require("Constants") -- constants +local physical = {} + local PHYSICAL_UNIT_TIERS = constants.PHYSICAL_UNIT_TIERS local PHYSICAL_UNIT_VARIATIONS = constants.PHYSICAL_UNIT_VARIATIONS @@ -31,28 +33,514 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable -local biterLoot = makeUnitAlienLootTable("red") -local spawnerLoot = makeSpawnerAlienLootTable("red") -local wormLoot = makeWormAlienLootTable("red") +function physical.addFaction() + + local biterLoot = makeUnitAlienLootTable("red") + local spawnerLoot = makeSpawnerAlienLootTable("red") + local wormLoot = makeWormAlienLootTable("red") --- physical biters -buildUnitSpawner( - { - unit = { - name = "physical-biter", + -- physical biters + buildUnitSpawner( + { + unit = { + name = "physical-biter", - loot = biterLoot, + loot = biterLoot, + attributes = { + explosion = "blood-explosion-small" + }, + attack = { + + }, + resistances = {}, + + type = "biter", + scales = { + [1] = 0.7, + [2] = 0.8, + [3] = 0.9, + [4] = 1, + [5] = 1.1, + [6] = 1.2, + [7] = 1.3, + [8] = 1.4, + [9] = 1.5, + [10] = 1.6 + }, + tint1 = {r=0.1, g=0.1, b=0.1, a=1}, + tint2 = {r=0.1, g=0.1, b=0.1, a=1} + }, + + unitSpawner = { + name = "physical-biter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + scales = { + [1] = 0.7, + [2] = 0.8, + [3] = 0.9, + [4] = 1.0, + [5] = 1.1, + [6] = 1.2, + [7] = 1.3, + [8] = 1.4, + [9] = 1.5, + [10] = 1.6 + }, + tint = {r=0.1, g=0.1, b=0.1, a=1} + } + }, + + { + unit = { + + { + type = "attribute", + name = "health", + [1] = 30, + [2] = 150, + [3] = 300, + [4] = 500, + [5] = 800, + [6] = 1500, + [7] = 3000, + [8] = 6000, + [9] = 10000, + [10] = 20000 + }, + + { + type = "attack", + name = "cooldown", + [1] = 35, + [2] = 35, + [3] = 35, + [4] = 35, + [5] = 35, + [6] = 35, + [7] = 50, + [8] = 50, + [9] = 55, + [10] = 57 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1750, + [4] = 3500, + [5] = 5000, + [6] = 10000, + [7] = 20000, + [8] = 25000, + [9] = 30000, + [10] = 40000 + }, + + { + type = "attack", + name = "damage", + [1] = 7, + [2] = 15, + [3] = 22.5, + [4] = 35, + [5] = 45, + [6] = 60, + [7] = 75, + [8] = 90, + [9] = 150, + [10] = 200 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + { + type = "attribute", + name = "movement", + [1] = 0.17, + [2] = 0.17, + [3] = 0.1675, + [4] = 0.1675, + [5] = 0.165, + [6] = 0.165, + [7] = 0.16, + [8] = 0.16, + [9] = 0.1575, + [10] = 0.1575 + }, + + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.075, + [2] = 0.075, + [3] = 0.08, + [4] = 0.08, + [5] = 0.085, + [6] = 0.085, + [7] = 0.09, + [8] = 0.09, + [9] = 0.1, + [10] = 0.1 + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 0, + [5] = 0, + [6] = 0, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 5, + [2] = 5, + [3] = 7, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + }, + + { + type = "attack", + name = "range", + [1] = 0.5, + [2] = 0.5, + [3] = 0.75, + [4] = 0.75, + [5] = 1.0, + [6] = 1.0, + [7] = 1.25, + [8] = 1.50, + [9] = 1.75, + [10] = 2.0 + } + }, + + unitSpawner = { + { + type = "attribute", + name = "health", + [1] = 700, + [2] = 1000, + [3] = 1500, + [4] = 3000, + [5] = 5000, + [6] = 7000, + [7] = 10000, + [8] = 14000, + [9] = 20000, + [10] = 30000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + }, + + { + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + }, + + { + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + }, + + { + type = "attribute", + name = "unitsToSpawn", + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 60, + [2] = 60, + [3] = 62, + [4] = 62, + [5] = 63, + [6] = 63, + [7] = 64, + [8] = 64, + [9] = 65, + [10] = 65 + } + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + } + + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + createMeleeAttack, + + { + unit = PHYSICAL_UNIT_VARIATIONS, + unitSpawner = PHYSICAL_NEST_VARIATIONS + }, + + { + unit = PHYSICAL_UNIT_TIERS, + unitSpawner = PHYSICAL_NEST_TIERS + } + ) + + -- physical worms + buildWorm( + { + name = "physical-worm", + + loot = wormLoot, attributes = { - explosion = "blood-explosion-small" }, attack = { - + type = "projectile", + damageType = "physical", + pointEffects = function (attributes) + return { + { + type= "create-entity", + entity_name = "small-scorchmark" + }, + { + type= "create-entity", + entity_name = "explosion" + } + } + end, + softSmokeName = softSmoke }, resistances = {}, - type = "biter", scales = { [1] = 0.7, [2] = 0.8, @@ -65,110 +553,76 @@ buildUnitSpawner( [9] = 1.5, [10] = 1.6 }, - tint1 = {r=0.1, g=0.1, b=0.1, a=1}, - tint2 = {r=0.1, g=0.1, b=0.1, a=1} + attackName = "physical-worm", + tint = {r=0.85, g=0.85, b=0.83, a=0.65}, + pTint = {r=0, g=0, b=0, a=1}, + sTint = {r=0, g=0, b=0, a=1} }, - unitSpawner = { - name = "physical-biter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - scales = { - [1] = 0.7, - [2] = 0.8, - [3] = 0.9, - [4] = 1.0, - [5] = 1.1, - [6] = 1.2, - [7] = 1.3, - [8] = 1.4, - [9] = 1.5, - [10] = 1.6 - }, - tint = {r=0.1, g=0.1, b=0.1, a=1} - } - }, - - { - unit = { + { { type = "attribute", name = "health", - [1] = 30, - [2] = 150, - [3] = 300, - [4] = 500, - [5] = 800, - [6] = 1500, - [7] = 3000, - [8] = 6000, - [9] = 10000, - [10] = 20000 + [1] = 400, + [2] = 700, + [3] = 1200, + [4] = 1700, + [5] = 2000, + [6] = 3000, + [7] = 4000, + [8] = 5000, + [9] = 7500, + [10] = 12000 }, + { type = "attack", name = "cooldown", - [1] = 35, - [2] = 35, - [3] = 35, - [4] = 35, - [5] = 35, - [6] = 35, - [7] = 50, - [8] = 50, - [9] = 55, - [10] = 57 + [1] = 50, + [2] = 50, + [3] = 45, + [4] = 45, + [5] = 40, + [6] = 40, + [7] = 35, + [8] = 35, + [9] = 30, + [10] = 30 }, + { type = "attribute", - name = "spawningTimeModifer", + name = "evolutionRequirement", [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1750, - [4] = 3500, - [5] = 5000, - [6] = 10000, - [7] = 20000, - [8] = 25000, - [9] = 30000, - [10] = 40000 - }, - + { type = "attack", name = "damage", - [1] = 7, - [2] = 15, - [3] = 22.5, - [4] = 35, - [5] = 45, - [6] = 60, - [7] = 75, - [8] = 90, - [9] = 150, - [10] = 200 + [1] = 12, + [2] = 20, + [3] = 25, + [4] = 30, + [5] = 35, + [6] = 40, + [7] = 50, + [8] = 60, + [9] = 70, + [10] = 80 }, - + { type = "attribute", name = "healing", @@ -186,269 +640,76 @@ buildUnitSpawner( { type = "attribute", - name = "movement", - [1] = 0.17, - [2] = 0.17, - [3] = 0.1675, - [4] = 0.1675, - [5] = 0.165, - [6] = 0.165, - [7] = 0.16, - [8] = 0.16, - [9] = 0.1575, - [10] = 0.1575 + name = "prepareRange", + [1] = 30, + [2] = 30, + [3] = 31, + [4] = 31, + [5] = 32, + [6] = 32, + [7] = 33, + [8] = 33, + [9] = 34, + [10] = 34 }, - + { type = "attribute", - name = "distancePerFrame", - [1] = 0.075, - [2] = 0.075, - [3] = 0.08, - [4] = 0.08, - [5] = 0.085, - [6] = 0.085, - [7] = 0.09, - [8] = 0.09, - [9] = 0.1, - [10] = 0.1 + name = "foldingSpeed", + [1] = 0.15, + [2] = 0.15, + [3] = 0.16, + [4] = 0.16, + [5] = 0.16, + [6] = 0.17, + [7] = 0.17, + [8] = 0.18, + [9] = 0.18, + [10] = 0.19 + }, + + { + type = "attribute", + name = "preparingSpeed", + [1] = 0.025, + [2] = 0.025, + [3] = 0.026, + [4] = 0.026, + [5] = 0.027, + [6] = 0.027, + [7] = 0.028, + [8] = 0.028, + [9] = 0.029, + [10] = 0.029 }, + { type = "resistance", name = "explosion", decrease = { [1] = 0, [2] = 0, - [3] = 0, - [4] = 0, - [5] = 0, - [6] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 + [8] = 10, + [9] = 12, + [10] = 12 }, percent = { [1] = 0, [2] = 0, - [3] = 0, + [3] = 10, [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 5, - [2] = 5, - [3] = 7, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - }, - - { - type = "attack", - name = "range", - [1] = 0.5, - [2] = 0.5, - [3] = 0.75, - [4] = 0.75, - [5] = 1.0, - [6] = 1.0, - [7] = 1.25, - [8] = 1.50, - [9] = 1.75, - [10] = 2.0 - } - }, - - unitSpawner = { - { - type = "attribute", - name = "health", - [1] = 700, - [2] = 1000, - [3] = 1500, - [4] = 3000, - [5] = 5000, - [6] = 7000, - [7] = 10000, - [8] = 14000, - [9] = 20000, - [10] = 30000 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - }, - - { - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - }, - - { - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - }, - - { - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 60, - [2] = 60, - [3] = 62, - [4] = 62, - [5] = 63, - [6] = 63, - [7] = 64, - [8] = 64, - [9] = 65, - [10] = 65 + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 } }, @@ -479,385 +740,131 @@ buildUnitSpawner( [9] = 90, [10] = 90 } - } + }, - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - createMeleeAttack, - - { - unit = PHYSICAL_UNIT_VARIATIONS, - unitSpawner = PHYSICAL_NEST_VARIATIONS - }, - - { - unit = PHYSICAL_UNIT_TIERS, - unitSpawner = PHYSICAL_NEST_TIERS - } -) - --- physical worms -buildWorm( - { - name = "physical-worm", - - loot = wormLoot, - attributes = { - }, - attack = { - type = "projectile", - damageType = "physical", - pointEffects = function (attributes) - return { - { - type= "create-entity", - entity_name = "small-scorchmark" - }, - { - type= "create-entity", - entity_name = "explosion" - } + { + + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 70, + [2] = 70, + [3] = 72, + [4] = 72, + [5] = 73, + [6] = 73, + [7] = 74, + [8] = 74, + [9] = 75, + [10] = 75 } - end, - softSmokeName = softSmoke - }, - resistances = {}, - - scales = { - [1] = 0.7, - [2] = 0.8, - [3] = 0.9, - [4] = 1, - [5] = 1.1, - [6] = 1.2, - [7] = 1.3, - [8] = 1.4, - [9] = 1.5, - [10] = 1.6 - }, - attackName = "physical-worm", - tint = {r=0.85, g=0.85, b=0.83, a=0.65}, - pTint = {r=0, g=0, b=0, a=1}, - sTint = {r=0, g=0, b=0, a=1} - }, - - { - - { - type = "attribute", - name = "health", - [1] = 400, - [2] = 700, - [3] = 1200, - [4] = 1700, - [5] = 2000, - [6] = 3000, - [7] = 4000, - [8] = 5000, - [9] = 7500, - [10] = 12000 - }, - - - { - type = "attack", - name = "cooldown", - [1] = 50, - [2] = 50, - [3] = 45, - [4] = 45, - [5] = 40, - [6] = 40, - [7] = 35, - [8] = 35, - [9] = 30, - [10] = 30 - }, - - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attack", - name = "damage", - [1] = 12, - [2] = 20, - [3] = 25, - [4] = 30, - [5] = 35, - [6] = 40, - [7] = 50, - [8] = 60, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "prepareRange", - [1] = 30, - [2] = 30, - [3] = 31, - [4] = 31, - [5] = 32, - [6] = 32, - [7] = 33, - [8] = 33, - [9] = 34, - [10] = 34 - }, - - { - type = "attribute", - name = "foldingSpeed", - [1] = 0.15, - [2] = 0.15, - [3] = 0.16, - [4] = 0.16, - [5] = 0.16, - [6] = 0.17, - [7] = 0.17, - [8] = 0.18, - [9] = 0.18, - [10] = 0.19 - }, - - { - type = "attribute", - name = "preparingSpeed", - [1] = 0.025, - [2] = 0.025, - [3] = 0.026, - [4] = 0.026, - [5] = 0.027, - [6] = 0.027, - [7] = 0.028, - [8] = 0.028, - [9] = 0.029, - [10] = 0.029 - }, - - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 }, - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 + + { + type = "attack", + name = "range", + [1] = 21, + [2] = 22, + [3] = 23, + [4] = 23, + [5] = 24, + [6] = 26, + [7] = 26, + [8] = 28, + [9] = 30, + [10] = 32 + + }, + + { + type = "attack", + name = "radius", + [1] = 1.5, + [2] = 1.6, + [3] = 1.7, + [4] = 1.8, + [5] = 1.9, + [6] = 2.0, + [7] = 2.2, + [8] = 2.3, + [9] = 2.5, + [10] = 3.0 + + + }, + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + + + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + + + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 + + } }, - { - type = "resistance", - name = "physical", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 - }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - }, - - { - - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - percent = { - [1] = 70, - [2] = 70, - [3] = 72, - [4] = 72, - [5] = 73, - [6] = 73, - [7] = 74, - [8] = 74, - [9] = 75, - [10] = 75 - } - }, + function (attributes) + return createRangedAttack(attributes, + createAttackBall(attributes)) + end, - { - type = "attack", - name = "range", - [1] = 21, - [2] = 22, - [3] = 23, - [4] = 23, - [5] = 24, - [6] = 26, - [7] = 26, - [8] = 28, - [9] = 30, - [10] = 32 + PHYSICAL_WORM_VARIATIONS, + PHYSICAL_WORM_TIERS + ) +end - }, - - { - type = "attack", - name = "radius", - [1] = 1.5, - [2] = 1.6, - [3] = 1.7, - [4] = 1.8, - [5] = 1.9, - [6] = 2.0, - [7] = 2.2, - [8] = 2.3, - [9] = 2.5, - [10] = 3.0 - - - }, - - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - - - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - - - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - - - } - }, - - function (attributes) - return createRangedAttack(attributes, - createAttackBall(attributes)) - end, - - PHYSICAL_WORM_VARIATIONS, - PHYSICAL_WORM_TIERS -) +return physical diff --git a/prototypes/Spawner.lua b/prototypes/Spawner.lua index 811c5dc..37dda8c 100755 --- a/prototypes/Spawner.lua +++ b/prototypes/Spawner.lua @@ -9,6 +9,8 @@ local constants = require("Constants") -- constants +local spawner = {} + local SPAWNER_UNIT_TIERS = constants.SPAWNER_UNIT_TIERS local SPAWNER_UNIT_VARIATIONS = constants.SPAWNER_UNIT_VARIATIONS @@ -37,1033 +39,197 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable -local biterLoot = makeUnitAlienLootTable("green") -local spawnerLoot = makeSpawnerAlienLootTable("green") -local wormLoot = makeWormAlienLootTable("green") +function spawner.addFaction() --- spawner -buildUnits( - { - name = "spawner-drone", - - attributes = { - followsPlayer = false - }, - attack = { - checkBuildability = true, - softSmokeName = softSmoke - }, - death = function (attack, attributes) - return { - { - type = "cluster", - cluster_count = attack.clusters, - distance = attack.clusterDistance, - distance_deviation = 3, - action_delivery = - { - type = "projectile", - projectile = createCapsuleProjectile("spawner-drone-sub" .. attributes.tier, - attack, - "spawner-biter" .. attributes.tier .. "-rampant"), - direction_deviation = 0.6, - starting_speed = 0.25, - max_range = attack.range, - starting_speed_deviation = 0.3 - } - } - } - end, - scales = { - [1] = 0.5, - [2] = 0.5, - [3] = 0.6, - [4] = 0.6, - [5] = 0.7, - [6] = 0.7, - [7] = 0.8, - [8] = 0.8, - [9] = 0.9, - [10] = 0.9 - }, - resistances = {}, - - type = "drone", - attackName = "spawner-drone", - tint = {r=1, g=0, b=1, a=1}, - pTint = {r=1, g=0, b=1, a=1}, - sTint = {r=1, g=0, b=1, a=1}, - dTint = {r=1, g=0, b=1, a=1} - }, - function (attack) - return { - type = "projectile", - ammo_category = "bullet", - cooldown = attack.cooldown or 20, - projectile_center = {0, 1}, - projectile_creation_distance = 0.6, - range = attack.range or 15, - sound = biterAttackSounds(), - ammo_type = - { - category = "bullet", - action = - { - type = "direct", - action_delivery = - { - type = "instant", - damage = { damage = 0, damageType = "acid" } - } - } - } - } - end, - { - { - type = "attribute", - name = "health", - [1] = 100, - [2] = 100, - [3] = 110, - [4] = 110, - [5] = 120, - [6] = 120, - [7] = 130, - [8] = 130, - [9] = 140, - [10] = 140 - }, + local biterLoot = makeUnitAlienLootTable("green") + local spawnerLoot = makeSpawnerAlienLootTable("green") + local wormLoot = makeWormAlienLootTable("green") + -- spawner + buildUnits( { - type = "attack", - name = "startingSpeed", - [1] = 0.25, - [2] = 0.25, - [3] = 0.27, - [4] = 0.27, - [5] = 0.29, - [6] = 0.29, - [7] = 0.31, - [8] = 0.31, - [9] = 0.33, - [10] = 0.33 - }, - - { - type = "attack", - name = "clusterDistance", - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 5, - [6] = 5, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - - { - type = "attack", - name = "clusters", - min = 2, - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "attack", - name = "cooldown", - [1] = 100, - [2] = 100, - [3] = 97, - [4] = 97, - [5] = 95, - [6] = 95, - [7] = 93, - [8] = 93, - [9] = 90, - [10] = 90 - }, + name = "spawner-drone", - { - type = "attribute", - name = "ttl", - [1] = 400, - [2] = 400, - [3] = 450, - [4] = 450, - [5] = 500, - [6] = 500, - [7] = 550, - [8] = 550, - [9] = 600, - [10] = 600 - }, - - { - type = "attack", - name = "damage", - [1] = 2, - [2] = 4, - [3] = 7, - [4] = 13, - [5] = 15, - [6] = 18, - [7] = 22, - [8] = 28, - [9] = 35, - [10] = 40 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - - { - type = "attribute", - name = "movement", - [1] = 0.00, - [2] = 0.00, - [3] = 0.00, - [4] = 0.00, - [5] = 0.00, - [6] = 0.00, - [7] = 0.00, - [8] = 0.00, - [9] = 0.00, - [10] = 0.00 - }, - { - type = "attribute", - name = "distancePerFrame", - [1] = 0.013, - [2] = 0.013, - [3] = 0.014, - [4] = 0.014, - [5] = 0.015, - [6] = 0.015, - [7] = 0.016, - [8] = 0.016, - [9] = 0.017, - [10] = 0.017 - }, - - { - type = "attack", - name = "rangeFromPlayer", - [1] = 10, - [2] = 10, - [3] = 11, - [4] = 11, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 14 - }, - - { - type = "attack", - name = "range", - [1] = 10, - [2] = 10, - [3] = 11, - [4] = 11, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 14 - }, - - { - type = "attack", - name = "radius", - [1] = 1.2, - [2] = 1.3, - [3] = 1.4, - [4] = 1.5, - [5] = 1.6, - [6] = 1.7, - [7] = 1.8, - [8] = 1.9, - [9] = 2.0, - [10] = 2.5 - }, - - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - } - }, - SPAWNER_UNIT_VARIATIONS, - SPAWNER_UNIT_TIERS -) - -buildUnits( - { - name = "spawner-worm-drone", - - attributes = { - followsPlayer = false - }, - attack = { - checkBuildability = true, - softSmokeName = softSmoke - }, - death = function (attack, attributes) - return { - { - type = "cluster", - cluster_count = attack.clusters, - distance = attack.clusterDistance, - distance_deviation = 3, - action_delivery = - { - type = "projectile", - projectile = createCapsuleProjectile("spawner-drone-sub" .. attributes.tier, - attack, - "spawner-biter" .. attributes.tier .. "-rampant"), - direction_deviation = 0.6, - starting_speed = 0.25, - max_range = attack.range, - starting_speed_deviation = 0.3 - } - } - } - end, - scales = { - [1] = 0.5, - [2] = 0.5, - [3] = 0.6, - [4] = 0.6, - [5] = 0.7, - [6] = 0.7, - [7] = 0.8, - [8] = 0.8, - [9] = 0.9, - [10] = 0.9 - }, - resistances = {}, - - type = "drone", - attackName = "spawner-drone", - tint = {r=1, g=0, b=1, a=1}, - pTint = {r=1, g=0, b=1, a=1}, - sTint = {r=1, g=0, b=1, a=1}, - dTint = {r=1, g=0, b=1, a=1} - }, - function (attack) - return { - type = "projectile", - ammo_category = "bullet", - cooldown = attack.cooldown or 20, - projectile_center = {0, 1}, - projectile_creation_distance = 0.6, - range = attack.range or 15, - sound = biterAttackSounds(), - ammo_type = - { - category = "bullet", - action = - { - type = "direct", - action_delivery = - { - type = "instant", - damage = { damage = 0, damageType = "acid" } - } - } - } - } - end, - { - { - type = "attribute", - name = "health", - [1] = 100, - [2] = 100, - [3] = 110, - [4] = 110, - [5] = 120, - [6] = 120, - [7] = 130, - [8] = 130, - [9] = 140, - [10] = 140 - }, - - { - type = "attack", - name = "startingSpeed", - [1] = 0.25, - [2] = 0.25, - [3] = 0.27, - [4] = 0.27, - [5] = 0.29, - [6] = 0.29, - [7] = 0.31, - [8] = 0.31, - [9] = 0.33, - [10] = 0.33 - }, - - { - type = "attack", - name = "clusterDistance", - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 5, - [6] = 5, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 - }, - - { - type = "attack", - name = "clusters", - min = 2, - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "attack", - name = "cooldown", - [1] = 100, - [2] = 100, - [3] = 97, - [4] = 97, - [5] = 95, - [6] = 95, - [7] = 93, - [8] = 93, - [9] = 90, - [10] = 90 - }, - - { - type = "attribute", - name = "ttl", - [1] = 400, - [2] = 400, - [3] = 450, - [4] = 450, - [5] = 500, - [6] = 500, - [7] = 550, - [8] = 550, - [9] = 600, - [10] = 600 - }, - - { - type = "attack", - name = "damage", - [1] = 2, - [2] = 4, - [3] = 7, - [4] = 13, - [5] = 15, - [6] = 18, - [7] = 22, - [8] = 28, - [9] = 35, - [10] = 40 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - - { - type = "attribute", - name = "movement", - [1] = 0.0, - [2] = 0.0, - [3] = 0.0, - [4] = 0.0, - [5] = 0.0, - [6] = 0.0, - [7] = 0.0, - [8] = 0.0, - [9] = 0.0, - [10] = 0.0 - }, - { - type = "attribute", - name = "distancePerFrame", - [1] = 0.013, - [2] = 0.013, - [3] = 0.014, - [4] = 0.014, - [5] = 0.015, - [6] = 0.015, - [7] = 0.016, - [8] = 0.016, - [9] = 0.017, - [10] = 0.017 - }, - - { - type = "attack", - name = "rangeFromPlayer", - [1] = 10, - [2] = 10, - [3] = 11, - [4] = 11, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 14 - }, - - { - type = "attack", - name = "range", - [1] = 10, - [2] = 10, - [3] = 11, - [4] = 11, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 14 - }, - - { - type = "attack", - name = "radius", - [1] = 1.2, - [2] = 1.3, - [3] = 1.4, - [4] = 1.5, - [5] = 1.6, - [6] = 1.7, - [7] = 1.8, - [8] = 1.9, - [9] = 2.0, - [10] = 2.5 - }, - - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - } - }, - SPAWNER_UNIT_VARIATIONS, - SPAWNER_UNIT_TIERS -) - --- spawner units -buildUnits( - { - name = "spawner-biter", - - attributes = { - explosion = "blood-explosion-small" - }, - attack = { - }, - scales = { - [1] = 0.3, - [2] = 0.3, - [3] = 0.4, - [4] = 0.4, - [5] = 0.5, - [6] = 0.5, - [7] = 0.6, - [8] = 0.6, - [9] = 0.7, - [10] = 0.7 - }, - resistances = {}, - - type = "biter", - tint1 = {r=1, g=0, b=1, a=1}, - tint2 = {r=1, g=0.63, b=0, a=0.4} - }, - createMeleeAttack, - { - { - - type = "attribute", - name = "health", - [1] = 15, - [2] = 30, - [3] = 45, - [4] = 60, - [5] = 75, - [6] = 90, - [7] = 110, - [8] = 145, - [9] = 165, - [10] = 180 - - }, - - { - type = "attack", - name = "cooldown", - [1] = 35, - [2] = 35, - [3] = 35, - [4] = 35, - [5] = 35, - [6] = 35, - [7] = 50, - [8] = 50, - [9] = 55, - [10] = 57 - }, - - { - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1750, - [4] = 3500, - [5] = 5000, - [6] = 10000, - [7] = 20000, - [8] = 25000, - [9] = 30000, - [10] = 40000 - }, - - { - type = "attack", - name = "damage", - [1] = 7, - [2] = 15, - [3] = 22.5, - [4] = 35, - [5] = 45, - [6] = 60, - [7] = 75, - [8] = 90, - [9] = 150, - [10] = 200 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "movement", - [1] = 0.2, - [2] = 0.19, - [3] = 0.185, - [4] = 0.18, - [5] = 0.175, - [6] = 0.17, - [7] = 0.17, - [8] = 0.17, - [9] = 0.17, - [10] = 0.17 - }, - { - type = "attribute", - name = "distancePerFrame", - [1] = 0.1, - [2] = 0.125, - [3] = 0.15, - [4] = 0.19, - [5] = 0.195, - [6] = 0.2, - [7] = 0.2, - [8] = 0.2, - [9] = 0.2, - [10] = 0.2 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 4, - [4] = 5, - [5] = 6, - [6] = 8, - [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 0, - [5] = 0, - [6] = 0, - [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - - { - type = "attack", - name = "range", - [1] = 0.5, - [2] = 0.5, - [3] = 0.75, - [4] = 0.75, - [5] = 1.0, - [6] = 1.0, - [7] = 1.25, - [8] = 1.50, - [9] = 1.75, - [10] = 2.0 - - } - }, - SPAWNER_UNIT_VARIATIONS, - SPAWNER_UNIT_TIERS -) - - --- spawner spitters -buildUnitSpawner( - { - unit = { - name = "spawner-spitter", - - loot = biterLoot, attributes = { - explosion = "blood-explosion-small" + followsPlayer = false }, attack = { - type = "projectile", - softSmokeName = softSmoke, - triggerCreated = true, - directionOnly = true, - sourceEffect = function (attributes) - return - { + checkBuildability = true, + softSmokeName = softSmoke + }, + death = function (attack, attributes) + return { + { + type = "cluster", + cluster_count = attack.clusters, + distance = attack.clusterDistance, + distance_deviation = 3, + action_delivery = { - type = "damage", - affects_target = true, - damage = {amount = attributes.healthDamage or 5, type = attributes.damageType or "physical"} + type = "projectile", + projectile = createCapsuleProjectile("spawner-drone-sub" .. attributes.tier, + attack, + "spawner-biter" .. attributes.tier .. "-rampant"), + direction_deviation = 0.6, + starting_speed = 0.25, + max_range = attack.range, + starting_speed_deviation = 0.3 } - } - end + } + } + end, + scales = { + [1] = 0.5, + [2] = 0.5, + [3] = 0.6, + [4] = 0.6, + [5] = 0.7, + [6] = 0.7, + [7] = 0.8, + [8] = 0.8, + [9] = 0.9, + [10] = 0.9 }, resistances = {}, - type = "spitter", - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, + type = "drone", attackName = "spawner-drone", tint = {r=1, g=0, b=1, a=1}, pTint = {r=1, g=0, b=1, a=1}, - sTint = {r=1, g=0, b=1, a=1} + sTint = {r=1, g=0, b=1, a=1}, + dTint = {r=1, g=0, b=1, a=1} }, - - unitSpawner = { - name = "spawner-spitter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=1, g=0, b=1, a=1} - } - }, - - { - unit = { + function (attack) + return { + type = "projectile", + ammo_category = "bullet", + cooldown = attack.cooldown or 20, + projectile_center = {0, 1}, + projectile_creation_distance = 0.6, + range = attack.range or 15, + sound = biterAttackSounds(), + ammo_type = + { + category = "bullet", + action = + { + type = "direct", + action_delivery = + { + type = "instant", + damage = { damage = 0, damageType = "acid" } + } + } + } + } + end, + { { type = "attribute", name = "health", - [1] = 10, - [2] = 50, - [3] = 200, - [4] = 350, - [5] = 750, - [6] = 1000, - [7] = 1500, - [8] = 2500, - [9] = 4500, - [10] = 7000 + [1] = 100, + [2] = 100, + [3] = 110, + [4] = 110, + [5] = 120, + [6] = 120, + [7] = 130, + [8] = 130, + [9] = 140, + [10] = 140 }, + { + type = "attack", + name = "startingSpeed", + [1] = 0.25, + [2] = 0.25, + [3] = 0.27, + [4] = 0.27, + [5] = 0.29, + [6] = 0.29, + [7] = 0.31, + [8] = 0.31, + [9] = 0.33, + [10] = 0.33 + }, + + { + type = "attack", + name = "clusterDistance", + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 5, + [6] = 5, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + + { + type = "attack", + name = "clusters", + min = 2, + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + { type = "attack", name = "cooldown", - [1] = 180, - [2] = 180, - [3] = 177, - [4] = 177, - [5] = 175, - [6] = 175, - [7] = 173, - [8] = 173, - [9] = 170, - [10] = 170 + [1] = 100, + [2] = 100, + [3] = 97, + [4] = 97, + [5] = 95, + [6] = 95, + [7] = 93, + [8] = 93, + [9] = 90, + [10] = 90 }, { type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 + name = "ttl", + [1] = 400, + [2] = 400, + [3] = 450, + [4] = 450, + [5] = 500, + [6] = 500, + [7] = 550, + [8] = 550, + [9] = 600, + [10] = 600 }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1200, - [4] = 1750, - [5] = 2500, - [6] = 5000, - [7] = 10000, - [8] = 12500, - [9] = 15000, - [10] = 20000 - }, - + { type = "attack", name = "damage", - [1] = 4, - [2] = 9, - [3] = 14, - [4] = 23, - [5] = 30, - [6] = 37, - [7] = 45, - [8] = 57, - [9] = 70, - [10] = 80 + [1] = 2, + [2] = 4, + [3] = 7, + [4] = 13, + [5] = 15, + [6] = 18, + [7] = 22, + [8] = 28, + [9] = 35, + [10] = 40 }, - + { type = "attribute", name = "healing", @@ -1079,66 +245,64 @@ buildUnitSpawner( [10] = 0.16 }, - + { type = "attribute", name = "movement", - [1] = 0.185, - [2] = 0.18, - [3] = 0.18, - [4] = 0.17, - [5] = 0.17, - [6] = 0.16, - [7] = 0.16, - [8] = 0.15, - [9] = 0.15, - [10] = 0.14 + [1] = 0.00, + [2] = 0.00, + [3] = 0.00, + [4] = 0.00, + [5] = 0.00, + [6] = 0.00, + [7] = 0.00, + [8] = 0.00, + [9] = 0.00, + [10] = 0.00 }, { type = "attribute", name = "distancePerFrame", - [1] = 0.04, - [2] = 0.045, - [3] = 0.050, - [4] = 0.055, - [5] = 0.060, - [6] = 0.065, - [7] = 0.070, - [8] = 0.075, - [9] = 0.08, - [10] = 0.084 - }, - - { - type = "resistance", - name = "explosion", - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 - } + [1] = 0.013, + [2] = 0.013, + [3] = 0.014, + [4] = 0.014, + [5] = 0.015, + [6] = 0.015, + [7] = 0.016, + [8] = 0.016, + [9] = 0.017, + [10] = 0.017 }, + { + type = "attack", + name = "rangeFromPlayer", + [1] = 10, + [2] = 10, + [3] = 11, + [4] = 11, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 14 + }, + { type = "attack", name = "range", - [1] = 13, - [2] = 13, - [3] = 14, - [4] = 14, - [5] = 15, - [6] = 15, - [7] = 16, - [8] = 16, - [9] = 17, - [10] = 17 + [1] = 10, + [2] = 10, + [3] = 11, + [4] = 11, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 14 }, { @@ -1201,102 +365,137 @@ buildUnitSpawner( [10] = 0.0021 } }, + SPAWNER_UNIT_VARIATIONS, + SPAWNER_UNIT_TIERS + ) - unitSpawner = { + buildUnits( + { + name = "spawner-worm-drone", + attributes = { + followsPlayer = false + }, + attack = { + checkBuildability = true, + softSmokeName = softSmoke + }, + death = function (attack, attributes) + return { + { + type = "cluster", + cluster_count = attack.clusters, + distance = attack.clusterDistance, + distance_deviation = 3, + action_delivery = + { + type = "projectile", + projectile = createCapsuleProjectile("spawner-drone-sub" .. attributes.tier, + attack, + "spawner-biter" .. attributes.tier .. "-rampant"), + direction_deviation = 0.6, + starting_speed = 0.25, + max_range = attack.range, + starting_speed_deviation = 0.3 + } + } + } + end, + scales = { + [1] = 0.5, + [2] = 0.5, + [3] = 0.6, + [4] = 0.6, + [5] = 0.7, + [6] = 0.7, + [7] = 0.8, + [8] = 0.8, + [9] = 0.9, + [10] = 0.9 + }, + resistances = {}, + + type = "drone", + attackName = "spawner-drone", + tint = {r=1, g=0, b=1, a=1}, + pTint = {r=1, g=0, b=1, a=1}, + sTint = {r=1, g=0, b=1, a=1}, + dTint = {r=1, g=0, b=1, a=1} + }, + function (attack) + return { + type = "projectile", + ammo_category = "bullet", + cooldown = attack.cooldown or 20, + projectile_center = {0, 1}, + projectile_creation_distance = 0.6, + range = attack.range or 15, + sound = biterAttackSounds(), + ammo_type = + { + category = "bullet", + action = + { + type = "direct", + action_delivery = + { + type = "instant", + damage = { damage = 0, damageType = "acid" } + } + } + } + } + end, + { { type = "attribute", name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - }, - - { - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - }, - - { - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0.08, - [2] = 0.16, - [3] = 0.24, - [4] = 0.35, - [5] = 0.40, - [6] = 0.45, - [7] = 0.55, - [8] = 0.65, - [9] = 0.75, - [10] = 0.9 + [1] = 100, + [2] = 100, + [3] = 110, + [4] = 110, + [5] = 120, + [6] = 120, + [7] = 130, + [8] = 130, + [9] = 140, + [10] = 140 }, { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 + type = "attack", + name = "startingSpeed", + [1] = 0.25, + [2] = 0.25, + [3] = 0.27, + [4] = 0.27, + [5] = 0.29, + [6] = 0.29, + [7] = 0.31, + [8] = 0.31, + [9] = 0.33, + [10] = 0.33 }, - - { - type = "attribute", - name = "unitsToSpawn", + + { + type = "attack", + name = "clusterDistance", + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 5, + [6] = 5, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + + { + type = "attack", + name = "clusters", + min = 2, [1] = 5, [2] = 5, [3] = 6, @@ -1308,39 +507,800 @@ buildUnitSpawner( [9] = 9, [10] = 9 }, + + { + type = "attack", + name = "cooldown", + [1] = 100, + [2] = 100, + [3] = 97, + [4] = 97, + [5] = 95, + [6] = 95, + [7] = 93, + [8] = 93, + [9] = 90, + [10] = 90 + }, + + { + type = "attribute", + name = "ttl", + [1] = 400, + [2] = 400, + [3] = 450, + [4] = 450, + [5] = 500, + [6] = 500, + [7] = 550, + [8] = 550, + [9] = 600, + [10] = 600 + }, + + { + type = "attack", + name = "damage", + [1] = 2, + [2] = 4, + [3] = 7, + [4] = 13, + [5] = 15, + [6] = 18, + [7] = 22, + [8] = 28, + [9] = 35, + [10] = 40 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + + { + type = "attribute", + name = "movement", + [1] = 0.0, + [2] = 0.0, + [3] = 0.0, + [4] = 0.0, + [5] = 0.0, + [6] = 0.0, + [7] = 0.0, + [8] = 0.0, + [9] = 0.0, + [10] = 0.0 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.013, + [2] = 0.013, + [3] = 0.014, + [4] = 0.014, + [5] = 0.015, + [6] = 0.015, + [7] = 0.016, + [8] = 0.016, + [9] = 0.017, + [10] = 0.017 + }, + + { + type = "attack", + name = "rangeFromPlayer", + [1] = 10, + [2] = 10, + [3] = 11, + [4] = 11, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 14 + }, + + { + type = "attack", + name = "range", + [1] = 10, + [2] = 10, + [3] = 11, + [4] = 11, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 14 + }, + + { + type = "attack", + name = "radius", + [1] = 1.2, + [2] = 1.3, + [3] = 1.4, + [4] = 1.5, + [5] = 1.6, + [6] = 1.7, + [7] = 1.8, + [8] = 1.9, + [9] = 2.0, + [10] = 2.5 + }, + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 + } + }, + SPAWNER_UNIT_VARIATIONS, + SPAWNER_UNIT_TIERS + ) + + -- spawner units + buildUnits( + { + name = "spawner-biter", + + attributes = { + explosion = "blood-explosion-small" + }, + attack = { + }, + scales = { + [1] = 0.3, + [2] = 0.3, + [3] = 0.4, + [4] = 0.4, + [5] = 0.5, + [6] = 0.5, + [7] = 0.6, + [8] = 0.6, + [9] = 0.7, + [10] = 0.7 + }, + resistances = {}, + + type = "biter", + tint1 = {r=1, g=0, b=1, a=1}, + tint2 = {r=1, g=0.63, b=0, a=0.4} + }, + createMeleeAttack, + { + { + + type = "attribute", + name = "health", + [1] = 15, + [2] = 30, + [3] = 45, + [4] = 60, + [5] = 75, + [6] = 90, + [7] = 110, + [8] = 145, + [9] = 165, + [10] = 180 + + }, + + { + type = "attack", + name = "cooldown", + [1] = 35, + [2] = 35, + [3] = 35, + [4] = 35, + [5] = 35, + [6] = 35, + [7] = 50, + [8] = 50, + [9] = 55, + [10] = 57 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1750, + [4] = 3500, + [5] = 5000, + [6] = 10000, + [7] = 20000, + [8] = 25000, + [9] = 30000, + [10] = 40000 + }, + + { + type = "attack", + name = "damage", + [1] = 7, + [2] = 15, + [3] = 22.5, + [4] = 35, + [5] = 45, + [6] = 60, + [7] = 75, + [8] = 90, + [9] = 150, + [10] = 200 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + { + type = "attribute", + name = "movement", + [1] = 0.2, + [2] = 0.19, + [3] = 0.185, + [4] = 0.18, + [5] = 0.175, + [6] = 0.17, + [7] = 0.17, + [8] = 0.17, + [9] = 0.17, + [10] = 0.17 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.1, + [2] = 0.125, + [3] = 0.15, + [4] = 0.19, + [5] = 0.195, + [6] = 0.2, + [7] = 0.2, + [8] = 0.2, + [9] = 0.2, + [10] = 0.2 + }, { type = "resistance", name = "physical", decrease = { - [1] = 2, - [2] = 2, + [1] = 0, + [2] = 0, [3] = 4, - [4] = 4, + [4] = 5, [5] = 6, - [6] = 6, + [6] = 8, [7] = 10, [8] = 12, - [9] = 12, - [10] = 14 + [9] = 14, + [10] = 15 }, percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 } }, { type = "resistance", name = "explosion", decrease = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 0, + [5] = 0, + [6] = 0, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "attack", + name = "range", + [1] = 0.5, + [2] = 0.5, + [3] = 0.75, + [4] = 0.75, + [5] = 1.0, + [6] = 1.0, + [7] = 1.25, + [8] = 1.50, + [9] = 1.75, + [10] = 2.0 + + } + }, + SPAWNER_UNIT_VARIATIONS, + SPAWNER_UNIT_TIERS + ) + + + -- spawner spitters + buildUnitSpawner( + { + unit = { + name = "spawner-spitter", + + loot = biterLoot, + attributes = { + explosion = "blood-explosion-small" + }, + attack = { + type = "projectile", + softSmokeName = softSmoke, + triggerCreated = true, + directionOnly = true, + sourceEffect = function (attributes) + return + { + { + type = "damage", + affects_target = true, + damage = {amount = attributes.healthDamage or 5, type = attributes.damageType or "physical"} + } + } + end + }, + resistances = {}, + + type = "spitter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + attackName = "spawner-drone", + tint = {r=1, g=0, b=1, a=1}, + pTint = {r=1, g=0, b=1, a=1}, + sTint = {r=1, g=0, b=1, a=1} + }, + + unitSpawner = { + name = "spawner-spitter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=1, g=0, b=1, a=1} + } + }, + + { + unit = { + { + type = "attribute", + name = "health", + [1] = 10, + [2] = 50, + [3] = 200, + [4] = 350, + [5] = 750, + [6] = 1000, + [7] = 1500, + [8] = 2500, + [9] = 4500, + [10] = 7000 + }, + + { + type = "attack", + name = "cooldown", + [1] = 180, + [2] = 180, + [3] = 177, + [4] = 177, + [5] = 175, + [6] = 175, + [7] = 173, + [8] = 173, + [9] = 170, + [10] = 170 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1200, + [4] = 1750, + [5] = 2500, + [6] = 5000, + [7] = 10000, + [8] = 12500, + [9] = 15000, + [10] = 20000 + }, + + { + type = "attack", + name = "damage", + [1] = 4, + [2] = 9, + [3] = 14, + [4] = 23, + [5] = 30, + [6] = 37, + [7] = 45, + [8] = 57, + [9] = 70, + [10] = 80 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + + { + type = "attribute", + name = "movement", + [1] = 0.185, + [2] = 0.18, + [3] = 0.18, + [4] = 0.17, + [5] = 0.17, + [6] = 0.16, + [7] = 0.16, + [8] = 0.15, + [9] = 0.15, + [10] = 0.14 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.04, + [2] = 0.045, + [3] = 0.050, + [4] = 0.055, + [5] = 0.060, + [6] = 0.065, + [7] = 0.070, + [8] = 0.075, + [9] = 0.08, + [10] = 0.084 + }, + + { + type = "resistance", + name = "explosion", + percent = { + [1] = 0, + [2] = 0, + [3] = 10, + [4] = 10, + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 + } + }, + + { + type = "attack", + name = "range", + [1] = 13, + [2] = 13, + [3] = 14, + [4] = 14, + [5] = 15, + [6] = 15, + [7] = 16, + [8] = 16, + [9] = 17, + [10] = 17 + }, + + { + type = "attack", + name = "radius", + [1] = 1.2, + [2] = 1.3, + [3] = 1.4, + [4] = 1.5, + [5] = 1.6, + [6] = 1.7, + [7] = 1.8, + [8] = 1.9, + [9] = 2.0, + [10] = 2.5 + }, + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 + } + }, + + unitSpawner = { + + { + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + }, + + { + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + }, + + { + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0.08, + [2] = 0.16, + [3] = 0.24, + [4] = 0.35, + [5] = 0.40, + [6] = 0.45, + [7] = 0.55, + [8] = 0.65, + [9] = 0.75, + [10] = 0.9 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + }, + + { + type = "attribute", + name = "unitsToSpawn", [1] = 5, [2] = 5, [3] = 6, @@ -1352,19 +1312,333 @@ buildUnitSpawner( [9] = 9, [10] = 9 }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + { + type = "resistance", + name = "fire", + decrease = { + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 6, + [8] = 6, + [9] = 7, + [10] = 7 + }, + percent = { + [1] = 60, + [2] = 60, + [3] = 62, + [4] = 62, + [5] = 63, + [6] = 63, + [7] = 64, + [8] = 64, + [9] = 65, + [10] = 65 + } + } + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + function (attack, attributes) + local divider + if attributes.health < 100 then + divider = 2 + else + divider = 2.5 + end + attack.healthDamage = attributes.health / divider + return createProjectileAttack(attack, + createCapsuleProjectile(attack.name, + attack, + attack.name .. "-drone-rampant"), + spitterattackanimation(attack.scale, attack.tint)) + end, + + { + unit = SPAWNER_UNIT_VARIATIONS, + unitSpawner = SPAWNER_NEST_VARIATIONS + }, + + { + unit = SPAWNER_UNIT_TIERS, + unitSpawner = SPAWNER_NEST_TIERS + } + ) + + -- spawner worms + buildWorm( + { + name = "spawner-worm", + + loot = wormLoot, + attributes = { + }, + attack = { + type = "projectile", + triggerCreated = true, + softSmokeName = softSmoke + }, + resistances = {}, + + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + attackName = "spawner-worm-drone", + tint = {r=1, g=0, b=1, a=1}, + pTint = {r=1, g=0, b=1, a=1}, + sTint = {r=1, g=0, b=1, a=1} + }, + + { + { + type = "attribute", + name = "health", + [1] = 200, + [2] = 350, + [3] = 500, + [4] = 750, + [5] = 900, + [6] = 1000, + [7] = 1500, + [8] = 3000, + [9] = 5000, + [10] = 9000 + }, + + { + type = "attack", + name = "cooldown", + [1] = 50, + [2] = 50, + [3] = 45, + [4] = 45, + [5] = 40, + [6] = 40, + [7] = 35, + [8] = 35, + [9] = 30, + [10] = 30 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 + }, + + { + type = "attack", + name = "damage", + [1] = 12, + [2] = 20, + [3] = 25, + [4] = 30, + [5] = 35, + [6] = 40, + [7] = 50, + [8] = 60, + [9] = 70, + [10] = 80 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + }, + + { + type = "attribute", + name = "prepareRange", + [1] = 30, + [2] = 30, + [3] = 31, + [4] = 31, + [5] = 32, + [6] = 32, + [7] = 33, + [8] = 33, + [9] = 34, + [10] = 34 + }, + + { + type = "attribute", + name = "foldingSpeed", + [1] = 0.15, + [2] = 0.15, + [3] = 0.16, + [4] = 0.16, + [5] = 0.16, + [6] = 0.17, + [7] = 0.17, + [8] = 0.18, + [9] = 0.18, + [10] = 0.19 + }, + + { + type = "attribute", + name = "preparingSpeed", + [1] = 0.025, + [2] = 0.025, + [3] = 0.026, + [4] = 0.026, + [5] = 0.027, + [6] = 0.027, + [7] = 0.028, + [8] = 0.028, + [9] = 0.029, + [10] = 0.029 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 } }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 10, + [4] = 10, + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 + } + }, + { type = "resistance", name = "fire", @@ -1381,372 +1655,105 @@ buildUnitSpawner( [10] = 7 }, percent = { - [1] = 60, - [2] = 60, - [3] = 62, - [4] = 62, - [5] = 63, - [6] = 63, - [7] = 64, - [8] = 64, - [9] = 65, - [10] = 65 + [1] = 70, + [2] = 70, + [3] = 72, + [4] = 72, + [5] = 73, + [6] = 73, + [7] = 74, + [8] = 74, + [9] = 75, + [10] = 75 } - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - function (attack, attributes) - local divider - if attributes.health < 100 then - divider = 2 - else - divider = 2.5 - end - attack.healthDamage = attributes.health / divider - return createProjectileAttack(attack, - createCapsuleProjectile(attack.name, - attack, - attack.name .. "-drone-rampant"), - spitterattackanimation(attack.scale, attack.tint)) - end, - - { - unit = SPAWNER_UNIT_VARIATIONS, - unitSpawner = SPAWNER_NEST_VARIATIONS - }, - - { - unit = SPAWNER_UNIT_TIERS, - unitSpawner = SPAWNER_NEST_TIERS - } -) - --- spawner worms -buildWorm( - { - name = "spawner-worm", - - loot = wormLoot, - attributes = { - }, - attack = { - type = "projectile", - triggerCreated = true, - softSmokeName = softSmoke - }, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "spawner-worm-drone", - tint = {r=1, g=0, b=1, a=1}, - pTint = {r=1, g=0, b=1, a=1}, - sTint = {r=1, g=0, b=1, a=1} - }, - - { - { - type = "attribute", - name = "health", - [1] = 200, - [2] = 350, - [3] = 500, - [4] = 750, - [5] = 900, - [6] = 1000, - [7] = 1500, - [8] = 3000, - [9] = 5000, - [10] = 9000 - }, - - { - type = "attack", - name = "cooldown", - [1] = 50, - [2] = 50, - [3] = 45, - [4] = 45, - [5] = 40, - [6] = 40, - [7] = 35, - [8] = 35, - [9] = 30, - [10] = 30 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attack", - name = "damage", - [1] = 12, - [2] = 20, - [3] = 25, - [4] = 30, - [5] = 35, - [6] = 40, - [7] = 50, - [8] = 60, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "prepareRange", - [1] = 30, - [2] = 30, - [3] = 31, - [4] = 31, - [5] = 32, - [6] = 32, - [7] = 33, - [8] = 33, - [9] = 34, - [10] = 34 - }, - - { - type = "attribute", - name = "foldingSpeed", - [1] = 0.15, - [2] = 0.15, - [3] = 0.16, - [4] = 0.16, - [5] = 0.16, - [6] = 0.17, - [7] = 0.17, - [8] = 0.18, - [9] = 0.18, - [10] = 0.19 - }, - - { - type = "attribute", - name = "preparingSpeed", - [1] = 0.025, - [2] = 0.025, - [3] = 0.026, - [4] = 0.026, - [5] = 0.027, - [6] = 0.027, - [7] = 0.028, - [8] = 0.028, - [9] = 0.029, - [10] = 0.029 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 }, - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 - } - }, - { - type = "resistance", - name = "fire", - decrease = { - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 6, - [8] = 6, - [9] = 7, - [10] = 7 + { + type = "attack", + name = "range", + [1] = 21, + [2] = 22, + [3] = 23, + [4] = 23, + [5] = 24, + [6] = 26, + [7] = 26, + [8] = 28, + [9] = 30, + [10] = 32 }, - percent = { - [1] = 70, - [2] = 70, - [3] = 72, - [4] = 72, - [5] = 73, - [6] = 73, - [7] = 74, - [8] = 74, - [9] = 75, - [10] = 75 + + { + type = "attack", + name = "radius", + [1] = 1.5, + [2] = 1.6, + [3] = 1.7, + [4] = 1.8, + [5] = 1.9, + [6] = 2.0, + [7] = 2.2, + [8] = 2.3, + [9] = 2.5, + [10] = 3.0 + }, + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 } }, - { - type = "attack", - name = "range", - [1] = 21, - [2] = 22, - [3] = 23, - [4] = 23, - [5] = 24, - [6] = 26, - [7] = 26, - [8] = 28, - [9] = 30, - [10] = 32 - }, + function (attributes) + return createProjectileAttack(attributes, + createCapsuleProjectile(attributes.name, + attributes, + attributes.name .. "-drone-rampant")) + end, - { - type = "attack", - name = "radius", - [1] = 1.5, - [2] = 1.6, - [3] = 1.7, - [4] = 1.8, - [5] = 1.9, - [6] = 2.0, - [7] = 2.2, - [8] = 2.3, - [9] = 2.5, - [10] = 3.0 - }, + SPAWNER_WORM_VARIATIONS, + SPAWNER_WORM_TIERS + ) +end - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - } - }, - - function (attributes) - return createProjectileAttack(attributes, - createCapsuleProjectile(attributes.name, - attributes, - attributes.name .. "-drone-rampant")) - end, - - SPAWNER_WORM_VARIATIONS, - SPAWNER_WORM_TIERS -) +return spawner diff --git a/prototypes/Suicide.lua b/prototypes/Suicide.lua index b2fb894..8300e16 100755 --- a/prototypes/Suicide.lua +++ b/prototypes/Suicide.lua @@ -9,6 +9,8 @@ local constants = require("Constants") -- constants +local suicide = {} + local SUICIDE_UNIT_TIERS = constants.SUICIDE_UNIT_TIERS local SUICIDE_UNIT_VARIATIONS = constants.SUICIDE_UNIT_VARIATIONS @@ -34,28 +36,599 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable -local biterLoot = makeUnitAlienLootTable("yellow") -local spawnerLoot = makeSpawnerAlienLootTable("yellow") -local wormLoot = makeWormAlienLootTable("yellow") +function suicide.addFaction() + + local biterLoot = makeUnitAlienLootTable("yellow") + local spawnerLoot = makeSpawnerAlienLootTable("yellow") + local wormLoot = makeWormAlienLootTable("yellow") --- suicide biters -buildUnitSpawner( - { - unit = { - name = "suicide-biter", + -- suicide biters + buildUnitSpawner( + { + unit = { + name = "suicide-biter", - loot = biterLoot, - attributes = { - explosion = "blood-explosion-small" + loot = biterLoot, + attributes = { + explosion = "blood-explosion-small" + }, + attack = { + scorchmark = "small-scorchmark" + }, + resistances = {}, + + type = "biter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint1 = {r=0.56, g=0.46, b=0, a=0.65}, + tint2 = {r=0.56, g=0.46, b=0, a=0.65} }, + + unitSpawner = { + name = "suicide-biter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0.56, g=0.46, b=0, a=0.65} + } + }, + + { + unit = { + { + + type = "attribute", + name = "health", + [1] = 7, + [2] = 42, + [3] = 75, + [4] = 125, + [5] = 200, + [6] = 350, + [7] = 750, + [8] = 1500, + [9] = 3000, + [10] = 5000 + + }, + + { + type = "attack", + name = "cooldown", + [1] = 35, + [2] = 35, + [3] = 35, + [4] = 35, + [5] = 35, + [6] = 35, + [7] = 50, + [8] = 50, + [9] = 55, + [10] = 57 + + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 5, + [7] = 6, + [8] = 6, + [9] = 8, + [10] = 8 + + }, + + { + + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1750, + [4] = 3500, + [5] = 5000, + [6] = 10000, + [7] = 20000, + [8] = 25000, + [9] = 30000, + [10] = 40000 + + }, + + { + + type = "attack", + mapping = "explosion", + [1] = "explosion", + [2] = "explosion", + [3] = "big-explosion", + [4] = "big-explosion", + [5] = "big-explosion", + [6] = "big-explosion", + [7] = "massive-explosion", + [8] = "massive-explosion", + [9] = "massive-explosion", + [10] = "massive-explosion" + }, + + { + + type = "attack", + name = "radius", + [1] = 3.5, + [2] = 3.5, + [3] = 4, + [4] = 5, + [5] = 6, + [6] = 6, + [7] = 7, + [8] = 7, + [9] = 7.5, + [10] = 8 + + }, + + { + + type = "attack", + name = "explosionDistance", + [1] = 2, + [2] = 2, + [3] = 2, + [4] = 2, + [5] = 2, + [6] = 2.5, + [7] = 2.5, + [8] = 2.5, + [9] = 3, + [10] = 3 + + }, + + { + + type = "attack", + name = "explosionCount", + min = 2, + [1] = 2, + [2] = 3, + [3] = 4, + [4] = 5, + [5] = 6, + [6] = 8, + [7] = 10, + [8] = 12, + [9] = 13, + [10] = 14 + + }, + + { + + type = "attack", + name = "damage", + [1] = 20, + [2] = 25, + [3] = 30, + [4] = 35, + [5] = 45, + [6] = 60, + [7] = 75, + [8] = 80, + [9] = 100, + [10] = 150 + + }, + + { + + type = "attribute", + name = "healing", + [1] = 0.01, + [2] = 0.01, + [3] = 0.015, + [4] = 0.02, + [5] = 0.05, + [6] = 0.075, + [7] = 0.1, + [8] = 0.12, + [9] = 0.14, + [10] = 0.16 + + }, + + { + + type = "attribute", + name = "movement", + [1] = 0.23, + [2] = 0.23, + [3] = 0.22, + [4] = 0.22, + [5] = 0.21, + [6] = 0.21, + [7] = 0.2, + [8] = 0.2, + [9] = 0.19, + [10] = 0.19 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.12, + [2] = 0.145, + [3] = 0.17, + [4] = 0.21, + [5] = 0.21, + [6] = 0.22, + [7] = 0.22, + [8] = 0.23, + [9] = 0.23, + [10] = 0.24 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 4, + [4] = 5, + [5] = 6, + [6] = 8, + [7] = 9, + [8] = 9, + [9] = 10, + [10] = 10 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = -7, + [2] = -7, + [3] = -10, + [4] = -10, + [5] = -13, + [6] = -13, + [7] = -16, + [8] = -16, + [9] = -19, + [10] = -23 + }, + percent = { + [1] = -65, + [2] = -65, + [3] = -70, + [4] = -75, + [5] = -75, + [6] = -80, + [7] = -85, + [8] = -85, + [9] = -90, + [10] = -90 + } + }, + + { + type = "attack", + name = "range", + [1] = 0.5, + [2] = 0.5, + [3] = 0.75, + [4] = 0.75, + [5] = 1.0, + [6] = 1.0, + [7] = 1.25, + [8] = 1.50, + [9] = 1.75, + [10] = 2.0 + } + }, + + unitSpawner = { + + { + type = "attribute", + name = "health", + [1] = 350, + [2] = 500, + [3] = 750, + [4] = 1500, + [5] = 2500, + [6] = 3500, + [7] = 5000, + [8] = 7000, + [9] = 10000, + [10] = 15000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.02, + [3] = 0.022, + [4] = 0.024, + [5] = 0.026, + [6] = 0.028, + [7] = 0.03, + [8] = 0.032, + [9] = 0.034, + [10] = 0.036 + }, + + { + + type = "attribute", + name = "spawingCooldownStart", + [1] = 330, + [2] = 330, + [3] = 325, + [4] = 325, + [5] = 320, + [6] = 320, + [7] = 315, + [8] = 315, + [9] = 310, + [10] = 310 + }, + + { + + type = "attribute", + name = "spawingCooldownEnd", + [1] = 120, + [2] = 120, + [3] = 115, + [4] = 115, + [5] = 110, + [6] = 110, + [7] = 105, + [8] = 105, + [9] = 100, + [10] = 100 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 6, + [2] = 6, + [3] = 7, + [4] = 7, + [5] = 8, + [6] = 8, + [7] = 9, + [8] = 9, + [9] = 10, + [10] = 10 + }, + + { + type = "attribute", + name = "unitsToSpawn", + [1] = 3, + [2] = 3, + [3] = 4, + [4] = 5, + [5] = 5, + [6] = 6, + [7] = 6, + [8] = 7, + [9] = 7, + [10] = 8 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 7, + [2] = 7, + [3] = 10, + [4] = 10, + [5] = 13, + [6] = 13, + [7] = 16, + [8] = 16, + [9] = 19, + [10] = 23 + }, + percent = { + [1] = 65, + [2] = 65, + [3] = 70, + [4] = 75, + [5] = 75, + [6] = 80, + [7] = 85, + [8] = 85, + [9] = 90, + [10] = 90 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = 1, + [2] = 1, + [3] = 2, + [4] = 2, + [5] = 3, + [6] = 3, + [7] = 4, + [8] = 4, + [9] = 5, + [10] = 5 + }, + percent = { + [1] = 40, + [2] = 40, + [3] = 42, + [4] = 42, + [5] = 43, + [6] = 43, + [7] = 44, + [8] = 44, + [9] = 45, + [10] = 45 + } + } + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + createSuicideAttack, + + { + unit = SUICIDE_UNIT_VARIATIONS, + unitSpawner = SUICIDE_NEST_VARIATIONS + }, + + { + unit = SUICIDE_UNIT_TIERS, + unitSpawner = SUICIDE_NEST_TIERS + } + ) + + -- suicide worms + buildWorm( + { + name = "suicide-worm", + + loot = wormLoot, + attributes = {}, attack = { - scorchmark = "small-scorchmark" + type = "projectile", + stickerAnimation = { + filename = "__base__/graphics/entity/slowdown-sticker/slowdown-sticker.png", + priority = "extra-high", + width = 11, + height = 11, + frame_count = 13, + animation_speed = 0.4 + }, + areaEffects = function (attributes) + return { + { + type = "damage", + damage = { amount = attributes.damage, type = "acid" } + }, + { + type = "create-sticker", + sticker = attributes.name .. "-sticker-rampant" + } + } + end, + softSmokeName = softSmoke }, resistances = {}, - type = "biter", scales = { [1] = 0.5, [2] = 0.6, @@ -68,187 +641,104 @@ buildUnitSpawner( [9] = 1.3, [10] = 1.4 }, - tint1 = {r=0.56, g=0.46, b=0, a=0.65}, - tint2 = {r=0.56, g=0.46, b=0, a=0.65} + attackName = "suicide-worm", + tint = {r=0.56, g=0.46, b=0, a=0.65}, + pTint = {r=0, g=1, b=1, a=0.5}, + sTint = {r=0, g=1, b=1, a=0.5} }, - unitSpawner = { - name = "suicide-biter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=0.56, g=0.46, b=0, a=0.65} - } - }, - - { - unit = { - { - + { + { type = "attribute", name = "health", - [1] = 7, - [2] = 42, - [3] = 75, - [4] = 125, - [5] = 200, - [6] = 350, - [7] = 750, - [8] = 1500, - [9] = 3000, - [10] = 5000 - + [1] = 200, + [2] = 350, + [3] = 500, + [4] = 750, + [5] = 900, + [6] = 1000, + [7] = 1500, + [8] = 3000, + [9] = 5000, + [10] = 9000 }, - { + { type = "attack", name = "cooldown", - [1] = 35, - [2] = 35, - [3] = 35, - [4] = 35, - [5] = 35, - [6] = 35, - [7] = 50, - [8] = 50, - [9] = 55, - [10] = 57 - + [1] = 50, + [2] = 50, + [3] = 45, + [4] = 45, + [5] = 40, + [6] = 40, + [7] = 35, + [8] = 35, + [9] = 30, + [10] = 30 + }, + + { + type = "attack", + name = "stickerMovementModifier", + [1] = 1.2, + [2] = 1.2, + [3] = 1.3, + [4] = 1.3, + [5] = 1.4, + [6] = 1.4, + [7] = 1.5, + [8] = 1.5, + [9] = 1.6, + [10] = 1.6 }, - { + { + type = "attack", + name = "stickerDuration", + [1] = 1800, + [2] = 1800, + [3] = 1900, + [4] = 1900, + [5] = 2000, + [6] = 2000, + [7] = 2100, + [8] = 2100, + [9] = 2200, + [10] = 2200 + }, + + { type = "attribute", - name = "spawningTimeModifer", + name = "evolutionRequirement", [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 5, - [7] = 6, - [8] = 6, - [9] = 8, - [10] = 8 - - }, - - { - - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1750, - [4] = 3500, - [5] = 5000, - [6] = 10000, - [7] = 20000, - [8] = 25000, - [9] = 30000, - [10] = 40000 - - }, - - { - - type = "attack", - mapping = "explosion", - [1] = "explosion", - [2] = "explosion", - [3] = "big-explosion", - [4] = "big-explosion", - [5] = "big-explosion", - [6] = "big-explosion", - [7] = "massive-explosion", - [8] = "massive-explosion", - [9] = "massive-explosion", - [10] = "massive-explosion" - }, - - { - - type = "attack", - name = "radius", - [1] = 3.5, - [2] = 3.5, - [3] = 4, - [4] = 5, - [5] = 6, - [6] = 6, - [7] = 7, - [8] = 7, - [9] = 7.5, - [10] = 8 - + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 0.9 }, - { - - type = "attack", - name = "explosionDistance", - [1] = 2, - [2] = 2, - [3] = 2, - [4] = 2, - [5] = 2, - [6] = 2.5, - [7] = 2.5, - [8] = 2.5, - [9] = 3, - [10] = 3 - - }, - - { - - type = "attack", - name = "explosionCount", - min = 2, - [1] = 2, - [2] = 3, - [3] = 4, - [4] = 5, - [5] = 6, - [6] = 8, - [7] = 10, - [8] = 12, - [9] = 13, - [10] = 14 - - }, - - { - + { type = "attack", name = "damage", - [1] = 20, - [2] = 25, - [3] = 30, - [4] = 35, - [5] = 45, - [6] = 60, - [7] = 75, - [8] = 80, - [9] = 100, - [10] = 150 - + [1] = 12, + [2] = 20, + [3] = 25, + [4] = 30, + [5] = 35, + [6] = 40, + [7] = 50, + [8] = 60, + [9] = 70, + [10] = 80 }, - { - + { type = "attribute", name = "healing", [1] = 0.01, @@ -261,248 +751,67 @@ buildUnitSpawner( [8] = 0.12, [9] = 0.14, [10] = 0.16 - }, - { - + { type = "attribute", - name = "movement", - [1] = 0.23, - [2] = 0.23, - [3] = 0.22, - [4] = 0.22, - [5] = 0.21, - [6] = 0.21, - [7] = 0.2, - [8] = 0.2, - [9] = 0.19, - [10] = 0.19 - }, - { - type = "attribute", - name = "distancePerFrame", - [1] = 0.12, - [2] = 0.145, - [3] = 0.17, - [4] = 0.21, - [5] = 0.21, - [6] = 0.22, - [7] = 0.22, - [8] = 0.23, - [9] = 0.23, - [10] = 0.24 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 4, - [4] = 5, - [5] = 6, - [6] = 8, - [7] = 9, - [8] = 9, - [9] = 10, - [10] = 10 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = -7, - [2] = -7, - [3] = -10, - [4] = -10, - [5] = -13, - [6] = -13, - [7] = -16, - [8] = -16, - [9] = -19, - [10] = -23 - }, - percent = { - [1] = -65, - [2] = -65, - [3] = -70, - [4] = -75, - [5] = -75, - [6] = -80, - [7] = -85, - [8] = -85, - [9] = -90, - [10] = -90 - } - }, - - { - type = "attack", - name = "range", - [1] = 0.5, - [2] = 0.5, - [3] = 0.75, - [4] = 0.75, - [5] = 1.0, - [6] = 1.0, - [7] = 1.25, - [8] = 1.50, - [9] = 1.75, - [10] = 2.0 - } - }, - - unitSpawner = { - - { - type = "attribute", - name = "health", - [1] = 350, - [2] = 500, - [3] = 750, - [4] = 1500, - [5] = 2500, - [6] = 3500, - [7] = 5000, - [8] = 7000, - [9] = 10000, - [10] = 15000 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.02, - [3] = 0.022, - [4] = 0.024, - [5] = 0.026, - [6] = 0.028, - [7] = 0.03, - [8] = 0.032, - [9] = 0.034, - [10] = 0.036 - }, - - { - - type = "attribute", - name = "spawingCooldownStart", - [1] = 330, - [2] = 330, - [3] = 325, - [4] = 325, - [5] = 320, - [6] = 320, - [7] = 315, - [8] = 315, - [9] = 310, - [10] = 310 - }, - - { - - type = "attribute", - name = "spawingCooldownEnd", - [1] = 120, - [2] = 120, - [3] = 115, - [4] = 115, - [5] = 110, - [6] = 110, - [7] = 105, - [8] = 105, - [9] = 100, - [10] = 100 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 6, - [2] = 6, - [3] = 7, - [4] = 7, - [5] = 8, - [6] = 8, - [7] = 9, - [8] = 9, - [9] = 10, - [10] = 10 - }, - - { - type = "attribute", - name = "unitsToSpawn", - [1] = 3, - [2] = 3, - [3] = 4, - [4] = 5, - [5] = 5, - [6] = 6, - [7] = 6, - [8] = 7, - [9] = 7, - [10] = 8 + name = "prepareRange", + [1] = 30, + [2] = 30, + [3] = 31, + [4] = 31, + [5] = 32, + [6] = 32, + [7] = 33, + [8] = 33, + [9] = 34, + [10] = 34 }, + { + type = "attribute", + name = "foldingSpeed", + [1] = 0.15, + [2] = 0.15, + [3] = 0.16, + [4] = 0.16, + [5] = 0.16, + [6] = 0.17, + [7] = 0.17, + [8] = 0.18, + [9] = 0.18, + [10] = 0.19 + }, + + { + type = "attribute", + name = "preparingSpeed", + [1] = 0.025, + [2] = 0.025, + [3] = 0.026, + [4] = 0.026, + [5] = 0.027, + [6] = 0.027, + [7] = 0.028, + [8] = 0.028, + [9] = 0.029, + [10] = 0.029 + }, + { type = "resistance", name = "physical", decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, [7] = 10, - [8] = 12, + [8] = 10, [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + [10] = 12 } }, @@ -562,394 +871,92 @@ buildUnitSpawner( [9] = 45, [10] = 45 } - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - createSuicideAttack, - - { - unit = SUICIDE_UNIT_VARIATIONS, - unitSpawner = SUICIDE_NEST_VARIATIONS - }, - - { - unit = SUICIDE_UNIT_TIERS, - unitSpawner = SUICIDE_NEST_TIERS - } -) - --- suicide worms -buildWorm( - { - name = "suicide-worm", - - loot = wormLoot, - attributes = {}, - attack = { - type = "projectile", - stickerAnimation = { - filename = "__base__/graphics/entity/slowdown-sticker/slowdown-sticker.png", - priority = "extra-high", - width = 11, - height = 11, - frame_count = 13, - animation_speed = 0.4 }, - areaEffects = function (attributes) - return { - { - type = "damage", - damage = { amount = attributes.damage, type = "acid" } - }, - { - type = "create-sticker", - sticker = attributes.name .. "-sticker-rampant" - } - } - end, - softSmokeName = softSmoke - }, - resistances = {}, - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "suicide-worm", - tint = {r=0.56, g=0.46, b=0, a=0.65}, - pTint = {r=0, g=1, b=1, a=0.5}, - sTint = {r=0, g=1, b=1, a=0.5} - }, - - { - { - type = "attribute", - name = "health", - [1] = 200, - [2] = 350, - [3] = 500, - [4] = 750, - [5] = 900, - [6] = 1000, - [7] = 1500, - [8] = 3000, - [9] = 5000, - [10] = 9000 - }, - - { - type = "attack", - name = "cooldown", - [1] = 50, - [2] = 50, - [3] = 45, - [4] = 45, - [5] = 40, - [6] = 40, - [7] = 35, - [8] = 35, - [9] = 30, - [10] = 30 - }, - - { - type = "attack", - name = "stickerMovementModifier", - [1] = 1.2, - [2] = 1.2, - [3] = 1.3, - [4] = 1.3, - [5] = 1.4, - [6] = 1.4, - [7] = 1.5, - [8] = 1.5, - [9] = 1.6, - [10] = 1.6 - }, - - { - type = "attack", - name = "stickerDuration", - [1] = 1800, - [2] = 1800, - [3] = 1900, - [4] = 1900, - [5] = 2000, - [6] = 2000, - [7] = 2100, - [8] = 2100, - [9] = 2200, - [10] = 2200 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attack", - name = "damage", - [1] = 12, - [2] = 20, - [3] = 25, - [4] = 30, - [5] = 35, - [6] = 40, - [7] = 50, - [8] = 60, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.01, - [2] = 0.01, - [3] = 0.015, - [4] = 0.02, - [5] = 0.05, - [6] = 0.075, - [7] = 0.1, - [8] = 0.12, - [9] = 0.14, - [10] = 0.16 - }, - - { - type = "attribute", - name = "prepareRange", - [1] = 30, - [2] = 30, - [3] = 31, - [4] = 31, - [5] = 32, - [6] = 32, - [7] = 33, - [8] = 33, - [9] = 34, - [10] = 34 - }, - - { - type = "attribute", - name = "foldingSpeed", - [1] = 0.15, - [2] = 0.15, - [3] = 0.16, - [4] = 0.16, - [5] = 0.16, - [6] = 0.17, - [7] = 0.17, - [8] = 0.18, - [9] = 0.18, - [10] = 0.19 - }, - - { - type = "attribute", - name = "preparingSpeed", - [1] = 0.025, - [2] = 0.025, - [3] = 0.026, - [4] = 0.026, - [5] = 0.027, - [6] = 0.027, - [7] = 0.028, - [8] = 0.028, - [9] = 0.029, - [10] = 0.029 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 7, - [2] = 7, - [3] = 10, - [4] = 10, - [5] = 13, - [6] = 13, - [7] = 16, - [8] = 16, - [9] = 19, - [10] = 23 + { + type = "attack", + name = "range", + [1] = 21, + [2] = 22, + [3] = 23, + [4] = 23, + [5] = 24, + [6] = 26, + [7] = 26, + [8] = 28, + [9] = 30, + [10] = 32 }, - percent = { - [1] = 65, - [2] = 65, - [3] = 70, - [4] = 75, - [5] = 75, - [6] = 80, - [7] = 85, - [8] = 85, - [9] = 90, - [10] = 90 - } - }, - { - type = "resistance", - name = "fire", - decrease = { - [1] = 1, - [2] = 1, - [3] = 2, - [4] = 2, - [5] = 3, - [6] = 3, - [7] = 4, - [8] = 4, - [9] = 5, - [10] = 5 + { + type = "attack", + name = "radius", + [1] = 1.5, + [2] = 1.6, + [3] = 1.7, + [4] = 1.8, + [5] = 1.9, + [6] = 2.0, + [7] = 2.2, + [8] = 2.3, + [9] = 2.5, + [10] = 3.0 }, - percent = { - [1] = 40, - [2] = 40, - [3] = 42, - [4] = 42, - [5] = 43, - [6] = 43, - [7] = 44, - [8] = 44, - [9] = 45, - [10] = 45 + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 } }, - { - type = "attack", - name = "range", - [1] = 21, - [2] = 22, - [3] = 23, - [4] = 23, - [5] = 24, - [6] = 26, - [7] = 26, - [8] = 28, - [9] = 30, - [10] = 32 - }, + function (attributes) + makeSticker(attributes) + return createRangedAttack(attributes, createAttackBall(attributes)) + end, - { - type = "attack", - name = "radius", - [1] = 1.5, - [2] = 1.6, - [3] = 1.7, - [4] = 1.8, - [5] = 1.9, - [6] = 2.0, - [7] = 2.2, - [8] = 2.3, - [9] = 2.5, - [10] = 3.0 - }, + SUICIDE_WORM_VARIATIONS, + SUICIDE_WORM_TIERS + ) +end - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - } - }, - - function (attributes) - makeSticker(attributes) - return createRangedAttack(attributes, createAttackBall(attributes)) - end, - - SUICIDE_WORM_VARIATIONS, - SUICIDE_WORM_TIERS -) +return suicide diff --git a/prototypes/Troll.lua b/prototypes/Troll.lua index c6d0dff..c78ad49 100755 --- a/prototypes/Troll.lua +++ b/prototypes/Troll.lua @@ -8,6 +8,8 @@ local constants = require("Constants") -- constants +local troll = {} + local TROLL_UNIT_TIERS = constants.TROLL_UNIT_TIERS local TROLL_UNIT_VARIATIONS = constants.TROLL_UNIT_VARIATIONS @@ -32,430 +34,386 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable -local biterLoot = makeUnitAlienLootTable("green") -local spawnerLoot = makeSpawnerAlienLootTable("green") -local wormLoot = makeWormAlienLootTable("green") +function troll.addFaction() --- troll biters -buildUnitSpawner( - { - unit = { - name = "troll-biter", + local biterLoot = makeUnitAlienLootTable("green") + local spawnerLoot = makeSpawnerAlienLootTable("green") + local wormLoot = makeWormAlienLootTable("green") - loot = biterLoot, - attributes = { - explosion = "blood-explosion-small" - }, - attack = {}, - resistances = {}, + -- troll biters + buildUnitSpawner( + { + unit = { + name = "troll-biter", - type = "biter", - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint1 = {r=0.56, g=0.46, b=0.42, a=0.65}, - tint2 = {r=1, g=0.63, b=0, a=0.4} - }, - - unitSpawner = { - name = "troll-biter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=1.0, g=1.0, b=1.0, a=1.0} - } - }, - - { - unit = { - { - - type = "attribute", - name = "health", - [1] = 30, - [2] = 150, - [3] = 300, - [4] = 500, - [5] = 800, - [6] = 1500, - [7] = 3000, - [8] = 6000, - [9] = 10000, - [10] = 20000 - - }, - - { - type = "attack", - name = "cooldown", - [1] = 35, - [2] = 35, - [3] = 35, - [4] = 35, - [5] = 35, - [6] = 35, - [7] = 50, - [8] = 50, - [9] = 55, - [10] = 57 - }, - - { - type = "attribute", - name = "spawningTimeModifer", - [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1750, - [4] = 3500, - [5] = 5000, - [6] = 10000, - [7] = 20000, - [8] = 25000, - [9] = 30000, - [10] = 40000 - }, - - { - type = "attack", - name = "damage", - [1] = 7, - [2] = 15, - [3] = 22.5, - [4] = 35, - [5] = 45, - [6] = 60, - [7] = 75, - [8] = 90, - [9] = 150, - [10] = 200 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.04, - [2] = 0.04, - [3] = 0.06, - [4] = 0.08, - [5] = 0.2, - [6] = 0.3, - [7] = 0.4, - [8] = 0.6, - [9] = 0.8, - [10] = 1 - }, - - { - type = "attribute", - name = "movement", - [1] = 0.16, - [2] = 0.16, - [3] = 0.155, - [4] = 0.15, - [5] = 0.155, - [6] = 0.15, - [7] = 0.15, - [8] = 0.15, - [9] = 0.15, - [10] = 0.15 - }, - { - type = "attribute", - name = "distancePerFrame", - [1] = 0.075, - [2] = 0.095, - [3] = 0.12, - [4] = 0.16, - [5] = 0.165, - [6] = 0.17, - [7] = 0.17, - [8] = 0.17, - [9] = 0.17, - [10] = 0.17 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 4, - [4] = 5, - [5] = 6, - [6] = 8, - [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 + loot = biterLoot, + attributes = { + explosion = "blood-explosion-small" }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 0, - [5] = 0, - [6] = 0, - [7] = 10, - [8] = 12, - [9] = 14, - [10] = 15 + attack = {}, + resistances = {}, + + type = "biter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 }, - percent = { - [1] = 0, - [2] = 0, - [3] = 0, - [4] = 10, - [5] = 12, - [6] = 12, - [7] = 13, - [8] = 13, - [9] = 14, - [10] = 15 - } + tint1 = {r=0.56, g=0.46, b=0.42, a=0.65}, + tint2 = {r=1, g=0.63, b=0, a=0.4} }, - { - type = "resistance", - name = "fire", - decrease = { - [1] = -15, - [2] = -15, - [3] = -20, - [4] = -20, - [5] = -25, - [6] = -25, - [7] = -30, - [8] = -30, - [9] = -35, - [10] = -45 - }, - percent = { - [1] = -100, - [2] = -100, - [3] = -100, - [4] = -120, - [5] = -120, - [6] = -160, - [7] = -160, - [8] = -200, - [9] = -200, - [10] = -240 - } - }, + unitSpawner = { + name = "troll-biter-nest", - { - type = "attack", - name = "range", - [1] = 0.5, - [2] = 0.5, - [3] = 0.75, - [4] = 0.75, - [5] = 1.0, - [6] = 1.0, - [7] = 1.25, - [8] = 1.50, - [9] = 1.75, - [10] = 2.0 - + loot = spawnerLoot, + attributes = {}, + resistances = {}, + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=1.0, g=1.0, b=1.0, a=1.0} } }, - - unitSpawner = { - { - type = "attribute", - name = "health", - [1] = 700, - [2] = 1000, - [3] = 1500, - [4] = 3000, - [5] = 5000, - [6] = 7000, - [7] = 10000, - [8] = 14000, - [9] = 20000, - [10] = 30000 - }, + { + unit = { + { - { - type = "attribute", - name = "healing", - [1] = 0.08, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.8, - [8] = 1, - [9] = 1.2, - [10] = 1.5 - }, + type = "attribute", + name = "health", + [1] = 30, + [2] = 150, + [3] = 300, + [4] = 500, + [5] = 800, + [6] = 1500, + [7] = 3000, + [8] = 6000, + [9] = 10000, + [10] = 20000 - { - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - }, - - { - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.12, - [3] = 0.22, - [4] = 0.32, - [5] = 0.42, - [6] = 0.52, - [7] = 0.62, - [8] = 0.72, - [9] = 0.82, - [10] = 0.92 - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - - }, - { - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, - [9] = 12, - [10] = 14 }, - percent = { - [1] = 15, + + { + type = "attack", + name = "cooldown", + [1] = 35, + [2] = 35, + [3] = 35, + [4] = 35, + [5] = 35, + [6] = 35, + [7] = 50, + [8] = 50, + [9] = 55, + [10] = 57 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1750, + [4] = 3500, + [5] = 5000, + [6] = 10000, + [7] = 20000, + [8] = 25000, + [9] = 30000, + [10] = 40000 + }, + + { + type = "attack", + name = "damage", + [1] = 7, [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + [3] = 22.5, + [4] = 35, + [5] = 45, + [6] = 60, + [7] = 75, + [8] = 90, + [9] = 150, + [10] = 200 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.04, + [2] = 0.04, + [3] = 0.06, + [4] = 0.08, + [5] = 0.2, + [6] = 0.3, + [7] = 0.4, + [8] = 0.6, + [9] = 0.8, + [10] = 1 + }, + + { + type = "attribute", + name = "movement", + [1] = 0.16, + [2] = 0.16, + [3] = 0.155, + [4] = 0.15, + [5] = 0.155, + [6] = 0.15, + [7] = 0.15, + [8] = 0.15, + [9] = 0.15, + [10] = 0.15 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.075, + [2] = 0.095, + [3] = 0.12, + [4] = 0.16, + [5] = 0.165, + [6] = 0.17, + [7] = 0.17, + [8] = 0.17, + [9] = 0.17, + [10] = 0.17 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 4, + [4] = 5, + [5] = 6, + [6] = 8, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 0, + [5] = 0, + [6] = 0, + [7] = 10, + [8] = 12, + [9] = 14, + [10] = 15 + }, + percent = { + [1] = 0, + [2] = 0, + [3] = 0, + [4] = 10, + [5] = 12, + [6] = 12, + [7] = 13, + [8] = 13, + [9] = 14, + [10] = 15 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = -15, + [2] = -15, + [3] = -20, + [4] = -20, + [5] = -25, + [6] = -25, + [7] = -30, + [8] = -30, + [9] = -35, + [10] = -45 + }, + percent = { + [1] = -100, + [2] = -100, + [3] = -100, + [4] = -120, + [5] = -120, + [6] = -160, + [7] = -160, + [8] = -200, + [9] = -200, + [10] = -240 + } + }, + + { + type = "attack", + name = "range", + [1] = 0.5, + [2] = 0.5, + [3] = 0.75, + [4] = 0.75, + [5] = 1.0, + [6] = 1.0, + [7] = 1.25, + [8] = 1.50, + [9] = 1.75, + [10] = 2.0 + } }, + + unitSpawner = { - { - type = "resistance", - name = "explosion", - decrease = { + { + type = "attribute", + name = "health", + [1] = 700, + [2] = 1000, + [3] = 1500, + [4] = 3000, + [5] = 5000, + [6] = 7000, + [7] = 10000, + [8] = 14000, + [9] = 20000, + [10] = 30000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.08, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.8, + [8] = 1, + [9] = 1.2, + [10] = 1.5 + }, + + { + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + }, + + { + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0, + [2] = 0.12, + [3] = 0.22, + [4] = 0.32, + [5] = 0.42, + [6] = 0.52, + [7] = 0.62, + [8] = 0.72, + [9] = 0.82, + [10] = 0.92 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + + }, + { + type = "attribute", + name = "unitsToSpawn", [1] = 5, [2] = 5, [3] = 6, @@ -467,94 +425,666 @@ buildUnitSpawner( [9] = 9, [10] = 9 }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 + + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = -15, + [2] = -15, + [3] = -20, + [4] = -20, + [5] = -25, + [6] = -25, + [7] = -30, + [8] = -30, + [9] = -35, + [10] = -45 + }, + percent = { + [1] = -100, + [2] = -100, + [3] = -100, + [4] = -120, + [5] = -120, + [6] = -160, + [7] = -160, + [8] = -200, + [9] = -200, + [10] = -240 + } } }, - { - type = "resistance", - name = "fire", - decrease = { - [1] = -15, - [2] = -15, - [3] = -20, - [4] = -20, - [5] = -25, - [6] = -25, - [7] = -30, - [8] = -30, - [9] = -35, - [10] = -45 - }, - percent = { - [1] = -100, - [2] = -100, - [3] = -100, - [4] = -120, - [5] = -120, - [6] = -160, - [7] = -160, - [8] = -200, - [9] = -200, - [10] = -240 - } + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, } }, - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, + createMeleeAttack, + + { + unit = TROLL_UNIT_VARIATIONS, + unitSpawner = TROLL_NEST_VARIATIONS + }, + + { + unit = TROLL_UNIT_TIERS, + unitSpawner = TROLL_NEST_TIERS } - }, + ) - createMeleeAttack, + -- troll spitters + buildUnitSpawner( + { + unit = { + name = "troll-spitter", - { - unit = TROLL_UNIT_VARIATIONS, - unitSpawner = TROLL_NEST_VARIATIONS - }, + loot = biterLoot, + attributes = { + explosion = "blood-explosion-small" + }, + attack = { + type = "projectile", + softSmokeName = softSmoke + }, + resistances = {}, - { - unit = TROLL_UNIT_TIERS, - unitSpawner = TROLL_NEST_TIERS - } -) - --- troll spitters -buildUnitSpawner( - { - unit = { - name = "troll-spitter", - - loot = biterLoot, - attributes = { - explosion = "blood-explosion-small" + type = "spitter", + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + attackName = "troll-spitter", + tint = {r=0.56, g=0.46, b=0.42, a=0.65}, + pTint = {r=0, g=1, b=1, a=0.5}, + sTint = {r=0, g=1, b=1, a=0.5} }, + + unitSpawner = { + name = "troll-spitter-nest", + + loot = spawnerLoot, + attributes = {}, + resistances = {}, + + scales = { + [1] = 0.5, + [2] = 0.6, + [3] = 0.7, + [4] = 0.8, + [5] = 0.9, + [6] = 1.0, + [7] = 1.1, + [8] = 1.2, + [9] = 1.3, + [10] = 1.4 + }, + tint = {r=0.99, g=0.09, b=0.09, a=1} + } + }, + + { + unit = { + { + type = "attribute", + name = "health", + [1] = 20, + [2] = 100, + [3] = 400, + [4] = 700, + [5] = 1500, + [6] = 2000, + [7] = 3000, + [8] = 6000, + [9] = 5000, + [10] = 9000 + }, + + { + type = "attack", + name = "cooldown", + [1] = 100, + [2] = 100, + [3] = 97, + [4] = 97, + [5] = 95, + [6] = 95, + [7] = 93, + [8] = 93, + [9] = 90, + [10] = 90 + }, + + { + type = "attribute", + name = "spawningTimeModifer", + [1] = 0, + [2] = 0, + [3] = 1, + [4] = 2, + [5] = 3, + [6] = 7, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, + + { + type = "attribute", + name = "pollutionToAttack", + [1] = 200, + [2] = 750, + [3] = 1200, + [4] = 1750, + [5] = 2500, + [6] = 5000, + [7] = 10000, + [8] = 12500, + [9] = 15000, + [10] = 20000 + }, + + { + type = "attack", + name = "damage", + [1] = 4, + [2] = 9, + [3] = 14, + [4] = 23, + [5] = 30, + [6] = 37, + [7] = 45, + [8] = 57, + [9] = 70, + [10] = 80 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.08, + [3] = 0.1, + [4] = 0.2, + [5] = 0.3, + [6] = 0.5, + [7] = 0.6, + [8] = 0.7, + [9] = 0.8, + [10] = 1 + }, + + + { + type = "attribute", + name = "movement", + [1] = 0.165, + [2] = 0.16, + [3] = 0.16, + [4] = 0.15, + [5] = 0.15, + [6] = 0.14, + [7] = 0.14, + [8] = 0.13, + [9] = 0.13, + [10] = 0.12 + }, + { + type = "attribute", + name = "distancePerFrame", + [1] = 0.04, + [2] = 0.045, + [3] = 0.050, + [4] = 0.055, + [5] = 0.060, + [6] = 0.065, + [7] = 0.070, + [8] = 0.075, + [9] = 0.08, + [10] = 0.084 + }, + + { + type = "resistance", + name = "explosion", + percent = { + [1] = 0, + [2] = 0, + [3] = 10, + [4] = 10, + [5] = 20, + [6] = 20, + [7] = 30, + [8] = 30, + [9] = 40, + [10] = 40 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = -15, + [2] = -15, + [3] = -20, + [4] = -20, + [5] = -25, + [6] = -25, + [7] = -30, + [8] = -30, + [9] = -35, + [10] = -45 + }, + percent = { + [1] = -100, + [2] = -100, + [3] = -100, + [4] = -120, + [5] = -120, + [6] = -160, + [7] = -160, + [8] = -200, + [9] = -200, + [10] = -240 + } + }, + + { + type = "attack", + name = "range", + [1] = 13, + [2] = 13, + [3] = 14, + [4] = 14, + [5] = 15, + [6] = 15, + [7] = 16, + [8] = 16, + [9] = 17, + [10] = 17 + }, + + { + type = "attack", + name = "radius", + [1] = 1.2, + [2] = 1.3, + [3] = 1.4, + [4] = 1.5, + [5] = 1.6, + [6] = 1.7, + [7] = 1.8, + [8] = 1.9, + [9] = 2.0, + [10] = 2.5 + }, + + { + type = "attack", + name = "particleVerticalAcceleration", + [1] = 0.01, + [2] = 0.01, + [3] = 0.02, + [4] = 0.02, + [5] = 0.03, + [6] = 0.03, + [7] = 0.04, + [8] = 0.04, + [9] = 0.05, + [10] = 0.05 + }, + + { + type = "attack", + name = "particleHoizontalSpeed", + [1] = 0.6, + [2] = 0.6, + [3] = 0.7, + [4] = 0.7, + [5] = 0.8, + [6] = 0.8, + [7] = 0.9, + [8] = 0.9, + [9] = 1, + [10] = 1 + }, + + { + type = "attack", + name = "particleHoizontalSpeedDeviation", + [1] = 0.0025, + [2] = 0.0025, + [3] = 0.0024, + [4] = 0.0024, + [5] = 0.0023, + [6] = 0.0023, + [7] = 0.0022, + [8] = 0.0022, + [9] = 0.0021, + [10] = 0.0021 + } + }, + + unitSpawner = { + + { + type = "attribute", + name = "health", + [1] = 700, + [2] = 1000, + [3] = 1500, + [4] = 3000, + [5] = 5000, + [6] = 7000, + [7] = 10000, + [8] = 14000, + [9] = 20000, + [10] = 30000 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.02, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, + [6] = 0.5, + [7] = 0.8, + [8] = 1, + [9] = 1.2, + [10] = 1.4 + }, + + { + type = "attribute", + name = "spawingCooldownStart", + [1] = 360, + [2] = 360, + [3] = 355, + [4] = 355, + [5] = 350, + [6] = 350, + [7] = 345, + [8] = 345, + [9] = 340, + [10] = 340 + }, + + { + type = "attribute", + name = "spawingCooldownEnd", + [1] = 150, + [2] = 150, + [3] = 145, + [4] = 145, + [5] = 140, + [6] = 140, + [7] = 135, + [8] = 135, + [9] = 130, + [10] = 130 + }, + + { + type = "attribute", + name = "evolutionRequirement", + [1] = 0.08, + [2] = 0.16, + [3] = 0.24, + [4] = 0.35, + [5] = 0.40, + [6] = 0.45, + [7] = 0.55, + [8] = 0.65, + [9] = 0.75, + [10] = 0.9 + }, + + { + type = "attribute", + name = "unitsOwned", + [1] = 7, + [2] = 7, + [3] = 8, + [4] = 8, + [5] = 9, + [6] = 9, + [7] = 10, + [8] = 10, + [9] = 11, + [10] = 11 + }, + + { + type = "attribute", + name = "unitsToSpawn", + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 2, + [2] = 2, + [3] = 4, + [4] = 4, + [5] = 6, + [6] = 6, + [7] = 10, + [8] = 12, + [9] = 12, + [10] = 14 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "explosion", + decrease = { + [1] = 5, + [2] = 5, + [3] = 6, + [4] = 6, + [5] = 7, + [6] = 7, + [7] = 8, + [8] = 8, + [9] = 9, + [10] = 9 + }, + percent = { + [1] = 15, + [2] = 15, + [3] = 17, + [4] = 17, + [5] = 18, + [6] = 18, + [7] = 19, + [8] = 19, + [9] = 20, + [10] = 20 + } + }, + + { + type = "resistance", + name = "fire", + decrease = { + [1] = -15, + [2] = -15, + [3] = -20, + [4] = -20, + [5] = -25, + [6] = -25, + [7] = -30, + [8] = -30, + [9] = -35, + [10] = -45 + }, + percent = { + [1] = -100, + [2] = -100, + [3] = -100, + [4] = -120, + [5] = -120, + [6] = -160, + [7] = -160, + [8] = -200, + [9] = -200, + [10] = -240 + } + } + }, + + probabilityTable = { + [1] = 1, + [2] = 1, + [3] = 1, + [4] = 1, + [5] = 1, + [6] = 1, + [7] = 1, + [8] = 1, + [9] = 1, + [10] = 1, + } + }, + + function (attributes) + + return createRangedAttack(attributes, + createAttackBall(attributes), + spitterattackanimation(attributes.scale, + attributes.tint)) + end, + + { + unit = TROLL_UNIT_VARIATIONS, + unitSpawner = TROLL_NEST_VARIATIONS + }, + + { + unit = TROLL_UNIT_TIERS, + unitSpawner = TROLL_NEST_TIERS + } + ) + + -- troll worms + buildWorm( + { + name = "troll-worm", + + loot = wormLoot, + attributes = {}, attack = { type = "projectile", softSmokeName = softSmoke }, resistances = {}, - type = "spitter", scales = { [1] = 0.5, [2] = 0.6, @@ -567,160 +1097,165 @@ buildUnitSpawner( [9] = 1.3, [10] = 1.4 }, - attackName = "troll-spitter", + attackName = "troll-worm", tint = {r=0.56, g=0.46, b=0.42, a=0.65}, pTint = {r=0, g=1, b=1, a=0.5}, sTint = {r=0, g=1, b=1, a=0.5} }, - unitSpawner = { - name = "troll-spitter-nest", - - loot = spawnerLoot, - attributes = {}, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1.0, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - tint = {r=0.99, g=0.09, b=0.09, a=1} - } - }, - - { - unit = { - { + { + { type = "attribute", name = "health", - [1] = 20, - [2] = 100, - [3] = 400, - [4] = 700, - [5] = 1500, + [1] = 400, + [2] = 700, + [3] = 1000, + [4] = 1500, + [5] = 1800, [6] = 2000, [7] = 3000, - [8] = 6000, - [9] = 5000, - [10] = 9000 + [8] = 5000, + [9] = 7500, + [10] = 10500 }, - { + { type = "attack", name = "cooldown", - [1] = 100, - [2] = 100, - [3] = 97, - [4] = 97, - [5] = 95, - [6] = 95, - [7] = 93, - [8] = 93, - [9] = 90, - [10] = 90 + [1] = 50, + [2] = 50, + [3] = 45, + [4] = 45, + [5] = 40, + [6] = 40, + [7] = 35, + [8] = 35, + [9] = 30, + [10] = 30 }, - - { + + { type = "attribute", - name = "spawningTimeModifer", + name = "evolutionRequirement", [1] = 0, - [2] = 0, - [3] = 1, - [4] = 2, - [5] = 3, - [6] = 7, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - - { - type = "attribute", - name = "pollutionToAttack", - [1] = 200, - [2] = 750, - [3] = 1200, - [4] = 1750, - [5] = 2500, - [6] = 5000, - [7] = 10000, - [8] = 12500, - [9] = 15000, - [10] = 20000 - }, - - { - type = "attack", - name = "damage", - [1] = 4, - [2] = 9, - [3] = 14, - [4] = 23, - [5] = 30, - [6] = 37, - [7] = 45, - [8] = 57, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.08, - [3] = 0.1, - [4] = 0.2, - [5] = 0.3, + [2] = 0.1, + [3] = 0.2, + [4] = 0.3, + [5] = 0.4, [6] = 0.5, [7] = 0.6, [8] = 0.7, [9] = 0.8, + [10] = 0.9 + }, + + { + type = "attack", + name = "damage", + [1] = 12, + [2] = 20, + [3] = 25, + [4] = 30, + [5] = 35, + [6] = 40, + [7] = 50, + [8] = 60, + [9] = 70, + [10] = 80 + }, + + { + type = "attribute", + name = "healing", + [1] = 0.08, + [2] = 0.08, + [3] = 0.085, + [4] = 0.1, + [5] = 0.2, + [6] = 0.3, + [7] = 0.4, + [8] = 0.5, + [9] = 0.8, [10] = 1 }, - - { + { type = "attribute", - name = "movement", - [1] = 0.165, - [2] = 0.16, - [3] = 0.16, - [4] = 0.15, - [5] = 0.15, - [6] = 0.14, - [7] = 0.14, - [8] = 0.13, - [9] = 0.13, - [10] = 0.12 + name = "prepareRange", + [1] = 30, + [2] = 30, + [3] = 31, + [4] = 31, + [5] = 32, + [6] = 32, + [7] = 33, + [8] = 33, + [9] = 34, + [10] = 34 }, - { + + { type = "attribute", - name = "distancePerFrame", - [1] = 0.04, - [2] = 0.045, - [3] = 0.050, - [4] = 0.055, - [5] = 0.060, - [6] = 0.065, - [7] = 0.070, - [8] = 0.075, - [9] = 0.08, - [10] = 0.084 + name = "foldingSpeed", + [1] = 0.15, + [2] = 0.15, + [3] = 0.16, + [4] = 0.16, + [5] = 0.16, + [6] = 0.17, + [7] = 0.17, + [8] = 0.18, + [9] = 0.18, + [10] = 0.19 + }, + + { + type = "attribute", + name = "preparingSpeed", + [1] = 0.025, + [2] = 0.025, + [3] = 0.026, + [4] = 0.026, + [5] = 0.027, + [6] = 0.027, + [7] = 0.028, + [8] = 0.028, + [9] = 0.029, + [10] = 0.029 + }, + + { + type = "resistance", + name = "physical", + decrease = { + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + } }, { type = "resistance", name = "explosion", + decrease = { + [1] = 0, + [2] = 0, + [3] = 5, + [4] = 5, + [5] = 8, + [6] = 8, + [7] = 10, + [8] = 10, + [9] = 12, + [10] = 12 + }, percent = { [1] = 0, [2] = 0, @@ -735,7 +1270,7 @@ buildUnitSpawner( } }, -{ + { type = "resistance", name = "fire", decrease = { @@ -763,35 +1298,35 @@ buildUnitSpawner( [10] = -240 } }, - + { type = "attack", name = "range", - [1] = 13, - [2] = 13, - [3] = 14, - [4] = 14, - [5] = 15, - [6] = 15, - [7] = 16, - [8] = 16, - [9] = 17, - [10] = 17 + [1] = 21, + [2] = 22, + [3] = 23, + [4] = 23, + [5] = 24, + [6] = 26, + [7] = 26, + [8] = 28, + [9] = 30, + [10] = 32 }, { type = "attack", name = "radius", - [1] = 1.2, - [2] = 1.3, - [3] = 1.4, - [4] = 1.5, - [5] = 1.6, - [6] = 1.7, - [7] = 1.8, - [8] = 1.9, - [9] = 2.0, - [10] = 2.5 + [1] = 1.5, + [2] = 1.6, + [3] = 1.7, + [4] = 1.8, + [5] = 1.9, + [6] = 2.0, + [7] = 2.2, + [8] = 2.3, + [9] = 2.5, + [10] = 3.0 }, { @@ -809,7 +1344,7 @@ buildUnitSpawner( [10] = 0.05 }, - { + { type = "attack", name = "particleHoizontalSpeed", [1] = 0.6, @@ -824,7 +1359,7 @@ buildUnitSpawner( [10] = 1 }, - { + { type = "attack", name = "particleHoizontalSpeedDeviation", [1] = 0.0025, @@ -839,542 +1374,14 @@ buildUnitSpawner( [10] = 0.0021 } }, - - unitSpawner = { - { - type = "attribute", - name = "health", - [1] = 700, - [2] = 1000, - [3] = 1500, - [4] = 3000, - [5] = 5000, - [6] = 7000, - [7] = 10000, - [8] = 14000, - [9] = 20000, - [10] = 30000 - }, + function (attributes) + return createRangedAttack(attributes, createAttackBall(attributes)) + end, - { - type = "attribute", - name = "healing", - [1] = 0.02, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.8, - [8] = 1, - [9] = 1.2, - [10] = 1.4 - }, + TROLL_WORM_VARIATIONS, + TROLL_WORM_TIERS + ) +end - { - type = "attribute", - name = "spawingCooldownStart", - [1] = 360, - [2] = 360, - [3] = 355, - [4] = 355, - [5] = 350, - [6] = 350, - [7] = 345, - [8] = 345, - [9] = 340, - [10] = 340 - }, - - { - type = "attribute", - name = "spawingCooldownEnd", - [1] = 150, - [2] = 150, - [3] = 145, - [4] = 145, - [5] = 140, - [6] = 140, - [7] = 135, - [8] = 135, - [9] = 130, - [10] = 130 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0.08, - [2] = 0.16, - [3] = 0.24, - [4] = 0.35, - [5] = 0.40, - [6] = 0.45, - [7] = 0.55, - [8] = 0.65, - [9] = 0.75, - [10] = 0.9 - }, - - { - type = "attribute", - name = "unitsOwned", - [1] = 7, - [2] = 7, - [3] = 8, - [4] = 8, - [5] = 9, - [6] = 9, - [7] = 10, - [8] = 10, - [9] = 11, - [10] = 11 - }, - - { - type = "attribute", - name = "unitsToSpawn", - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 2, - [2] = 2, - [3] = 4, - [4] = 4, - [5] = 6, - [6] = 6, - [7] = 10, - [8] = 12, - [9] = 12, - [10] = 14 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 5, - [2] = 5, - [3] = 6, - [4] = 6, - [5] = 7, - [6] = 7, - [7] = 8, - [8] = 8, - [9] = 9, - [10] = 9 - }, - percent = { - [1] = 15, - [2] = 15, - [3] = 17, - [4] = 17, - [5] = 18, - [6] = 18, - [7] = 19, - [8] = 19, - [9] = 20, - [10] = 20 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = -15, - [2] = -15, - [3] = -20, - [4] = -20, - [5] = -25, - [6] = -25, - [7] = -30, - [8] = -30, - [9] = -35, - [10] = -45 - }, - percent = { - [1] = -100, - [2] = -100, - [3] = -100, - [4] = -120, - [5] = -120, - [6] = -160, - [7] = -160, - [8] = -200, - [9] = -200, - [10] = -240 - } - } - }, - - probabilityTable = { - [1] = 1, - [2] = 1, - [3] = 1, - [4] = 1, - [5] = 1, - [6] = 1, - [7] = 1, - [8] = 1, - [9] = 1, - [10] = 1, - } - }, - - function (attributes) - - return createRangedAttack(attributes, - createAttackBall(attributes), - spitterattackanimation(attributes.scale, - attributes.tint)) - end, - - { - unit = TROLL_UNIT_VARIATIONS, - unitSpawner = TROLL_NEST_VARIATIONS - }, - - { - unit = TROLL_UNIT_TIERS, - unitSpawner = TROLL_NEST_TIERS - } -) - --- troll worms -buildWorm( - { - name = "troll-worm", - - loot = wormLoot, - attributes = {}, - attack = { - type = "projectile", - softSmokeName = softSmoke - }, - resistances = {}, - - scales = { - [1] = 0.5, - [2] = 0.6, - [3] = 0.7, - [4] = 0.8, - [5] = 0.9, - [6] = 1, - [7] = 1.1, - [8] = 1.2, - [9] = 1.3, - [10] = 1.4 - }, - attackName = "troll-worm", - tint = {r=0.56, g=0.46, b=0.42, a=0.65}, - pTint = {r=0, g=1, b=1, a=0.5}, - sTint = {r=0, g=1, b=1, a=0.5} - }, - - { - { - type = "attribute", - name = "health", - [1] = 400, - [2] = 700, - [3] = 1000, - [4] = 1500, - [5] = 1800, - [6] = 2000, - [7] = 3000, - [8] = 5000, - [9] = 7500, - [10] = 10500 - }, - - { - type = "attack", - name = "cooldown", - [1] = 50, - [2] = 50, - [3] = 45, - [4] = 45, - [5] = 40, - [6] = 40, - [7] = 35, - [8] = 35, - [9] = 30, - [10] = 30 - }, - - { - type = "attribute", - name = "evolutionRequirement", - [1] = 0, - [2] = 0.1, - [3] = 0.2, - [4] = 0.3, - [5] = 0.4, - [6] = 0.5, - [7] = 0.6, - [8] = 0.7, - [9] = 0.8, - [10] = 0.9 - }, - - { - type = "attack", - name = "damage", - [1] = 12, - [2] = 20, - [3] = 25, - [4] = 30, - [5] = 35, - [6] = 40, - [7] = 50, - [8] = 60, - [9] = 70, - [10] = 80 - }, - - { - type = "attribute", - name = "healing", - [1] = 0.08, - [2] = 0.08, - [3] = 0.085, - [4] = 0.1, - [5] = 0.2, - [6] = 0.3, - [7] = 0.4, - [8] = 0.5, - [9] = 0.8, - [10] = 1 - }, - - { - type = "attribute", - name = "prepareRange", - [1] = 30, - [2] = 30, - [3] = 31, - [4] = 31, - [5] = 32, - [6] = 32, - [7] = 33, - [8] = 33, - [9] = 34, - [10] = 34 - }, - - { - type = "attribute", - name = "foldingSpeed", - [1] = 0.15, - [2] = 0.15, - [3] = 0.16, - [4] = 0.16, - [5] = 0.16, - [6] = 0.17, - [7] = 0.17, - [8] = 0.18, - [9] = 0.18, - [10] = 0.19 - }, - - { - type = "attribute", - name = "preparingSpeed", - [1] = 0.025, - [2] = 0.025, - [3] = 0.026, - [4] = 0.026, - [5] = 0.027, - [6] = 0.027, - [7] = 0.028, - [8] = 0.028, - [9] = 0.029, - [10] = 0.029 - }, - - { - type = "resistance", - name = "physical", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - } - }, - - { - type = "resistance", - name = "explosion", - decrease = { - [1] = 0, - [2] = 0, - [3] = 5, - [4] = 5, - [5] = 8, - [6] = 8, - [7] = 10, - [8] = 10, - [9] = 12, - [10] = 12 - }, - percent = { - [1] = 0, - [2] = 0, - [3] = 10, - [4] = 10, - [5] = 20, - [6] = 20, - [7] = 30, - [8] = 30, - [9] = 40, - [10] = 40 - } - }, - - { - type = "resistance", - name = "fire", - decrease = { - [1] = -15, - [2] = -15, - [3] = -20, - [4] = -20, - [5] = -25, - [6] = -25, - [7] = -30, - [8] = -30, - [9] = -35, - [10] = -45 - }, - percent = { - [1] = -100, - [2] = -100, - [3] = -100, - [4] = -120, - [5] = -120, - [6] = -160, - [7] = -160, - [8] = -200, - [9] = -200, - [10] = -240 - } - }, - - { - type = "attack", - name = "range", - [1] = 21, - [2] = 22, - [3] = 23, - [4] = 23, - [5] = 24, - [6] = 26, - [7] = 26, - [8] = 28, - [9] = 30, - [10] = 32 - }, - - { - type = "attack", - name = "radius", - [1] = 1.5, - [2] = 1.6, - [3] = 1.7, - [4] = 1.8, - [5] = 1.9, - [6] = 2.0, - [7] = 2.2, - [8] = 2.3, - [9] = 2.5, - [10] = 3.0 - }, - - { - type = "attack", - name = "particleVerticalAcceleration", - [1] = 0.01, - [2] = 0.01, - [3] = 0.02, - [4] = 0.02, - [5] = 0.03, - [6] = 0.03, - [7] = 0.04, - [8] = 0.04, - [9] = 0.05, - [10] = 0.05 - }, - - { - type = "attack", - name = "particleHoizontalSpeed", - [1] = 0.6, - [2] = 0.6, - [3] = 0.7, - [4] = 0.7, - [5] = 0.8, - [6] = 0.8, - [7] = 0.9, - [8] = 0.9, - [9] = 1, - [10] = 1 - }, - - { - type = "attack", - name = "particleHoizontalSpeedDeviation", - [1] = 0.0025, - [2] = 0.0025, - [3] = 0.0024, - [4] = 0.0024, - [5] = 0.0023, - [6] = 0.0023, - [7] = 0.0022, - [8] = 0.0022, - [9] = 0.0021, - [10] = 0.0021 - } - }, - - function (attributes) - return createRangedAttack(attributes, createAttackBall(attributes)) - end, - - TROLL_WORM_VARIATIONS, - TROLL_WORM_TIERS -) +return troll diff --git a/prototypes/Wasp.lua b/prototypes/Wasp.lua index 7ad2adb..087433b 100755 --- a/prototypes/Wasp.lua +++ b/prototypes/Wasp.lua @@ -9,6 +9,8 @@ local constants = require("Constants") -- constants +local wasp = {} + local WASP_UNIT_TIERS = constants.WASP_UNIT_TIERS local WASP_UNIT_VARIATIONS = constants.WASP_UNIT_VARIATIONS @@ -36,6 +38,8 @@ local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable +function wasp.addFaction() + local biterLoot = makeUnitAlienLootTable("purple") local spawnerLoot = makeSpawnerAlienLootTable("purple") local wormLoot = makeWormAlienLootTable("purple") @@ -1399,3 +1403,6 @@ buildWorm( WASP_WORM_VARIATIONS, WASP_WORM_TIERS ) +end + +return wasp diff --git a/prototypes/utils/AttackBobs.lua b/prototypes/utils/AttackBobs.lua index 555ccba..6e8b680 100755 --- a/prototypes/utils/AttackBobs.lua +++ b/prototypes/utils/AttackBobs.lua @@ -1,5 +1,7 @@ -- bobs replacement attacks +local attacks = {} + -- import local fireUtils = require("FireUtils") @@ -27,55 +29,16 @@ local smokeGlow = "the-glow-smoke-rampant" local smokeWithoutGlow = "the-without-glow-smoke-rampant" local smokeFuel = "the-adding-fuel-rampant" +function attacks.addAttacks() -local multipler = (FORCE_OLD_PROJECTILES and 1) or 2.7 + local multipler = (FORCE_OLD_PROJECTILES and 1) or 2.7 -createAttackBall( - { - name = "bob-explosive-ball", - pTint = {r=1, g=0.97, b=0.34, a=0.5}, - sTint = {r=1, g=0.97, b=0.34, a=0.5}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return { - { - type = "create-entity", - entity_name = "small-scorchmark", - check_buildability = true - }, - { - type = "create-entity", - entity_name = "big-explosion", - check_buildability = true - }, - { - type = "create-entity", - entity_name = "small-fire-cloud" - } - } - end, - radius = 3, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 25 * multipler, type = "explosion" } - } - } - end - } -) - -if not FORCE_OLD_PROJECTILES then createAttackBall( { - name = "bob-explosive-ball-direction", + name = "bob-explosive-ball", pTint = {r=1, g=0.97, b=0.34, a=0.5}, sTint = {r=1, g=0.97, b=0.34, a=0.5}, softSmokeName = softSmoke, - directionOnly = true, type = "projectile", pointEffects = function (attributes) return { @@ -101,674 +64,715 @@ if not FORCE_OLD_PROJECTILES then { { type = "damage", - damage = { amount = 25 * multipler, type = "explosion" } + damage = { amount = 25 * multipler, type = "explosion" } } } end } ) -end --- - -local name = "bob-fire-ball" -local spawnEntityName = makeSpreadEffect({ - name = name, - smokeWithoutGlowName = smokeWithoutGlow -}) -local fireName = makeFire({ - name = name, - fireTint = {r=0, g=0.9, b=0, a=0.5}, - smokeWithGlowName = smokeGlow, - smokeAddingFuelName = smokeFuel, - spawnEntityName = spawnEntityName -}) -local stickerName = makeSticker({ - name = name, - spawnEntityName = spawnEntityName -}) -createAttackBall( - { - name = name, - pTint = {r=1, g=0.17, b=0.17, a=0.5}, - sTint = {r=1, g=0.43, b=0.17, a=0.5}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return { - { - type = "create-fire", - entity_name = fireName - } - } - end, - radius = 2, - areaEffects = function (attributes) - return - { - { - type = "create-sticker", - sticker = stickerName, - }, - { - type = "damage", - damage = { amount = 20 * multipler, type = "fire" } - } - } - end - } -) - -if not FORCE_OLD_PROJECTILES then - name = "bob-fire-ball-direction" - createAttackBall( - { - name = name, - pTint = {r=1, g=0.17, b=0.17, a=0.5}, - sTint = {r=1, g=0.43, b=0.17, a=0.5}, - softSmokeName = softSmoke, - directionOnly = true, - type = "projectile", - pointEffects = function (attributes) - return { - { - type = "create-fire", - entity_name = fireName - } - } - end, - radius = 2, - areaEffects = function (attributes) - return - { - { - type = "create-sticker", - sticker = stickerName, - }, - { - type = "damage", - damage = { amount = 20 * multipler, type = "fire" } - } - } - end - } -) -end - --- - -createAttackBall( - { - name = "bob-poison-ball", - pTint = {r=0.1, g=0.5, b=1, a=0.5}, - sTint = {r=0, g=0, b=1, a=0.5}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return { - { - type = "create-entity", - entity_name = "small-poison-cloud" - } - } - end, - radius = 2, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 20 * multipler, type = "poison" } - } - } - end - } -) - -if not FORCE_OLD_PROJECTILES then -createAttackBall( - { - name = "bob-poison-ball-direction", - pTint = {r=0.1, g=0.5, b=1, a=0.5}, - sTint = {r=0, g=0, b=1, a=0.5}, - softSmokeName = softSmoke, - directionOnly = true, - type = "projectile", - pointEffects = function (attributes) - return { - { - type = "create-entity", - entity_name = "small-poison-cloud" - } - } - end, - radius = 2, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 20 * multipler, type = "poison" } - } - } - end - } -) -end - --- piercing - -data:extend({ - { - type = "projectile", - name = "piercing-spike-rampant", - flags = {"not-on-map"}, - collision_box = {{-0.05, -0.25}, {0.05, 0.25}}, - acceleration = 0.005, - action = - { - type = "direct", - force = (DISALLOW_FRIENDLY_FIRE and "enemy") or nil, - action_delivery = + if not FORCE_OLD_PROJECTILES then + createAttackBall( + { + name = "bob-explosive-ball-direction", + pTint = {r=1, g=0.97, b=0.34, a=0.5}, + sTint = {r=1, g=0.97, b=0.34, a=0.5}, + softSmokeName = softSmoke, + directionOnly = true, + type = "projectile", + pointEffects = function (attributes) + return { { - type = "instant", - target_effects = - { - type = "damage", - damage = {amount = 8 * multipler, type = "bob-pierce"} - } + type = "create-entity", + entity_name = "small-scorchmark", + check_buildability = true + }, + { + type = "create-entity", + entity_name = "big-explosion", + check_buildability = true + }, + { + type = "create-entity", + entity_name = "small-fire-cloud" } - }, - animation = - { - filename = "__base__/graphics/entity/piercing-bullet/piercing-bullet.png", - frame_count = 1, - width = 3, - height = 50, - priority = "high" - }, - } -}) + } + end, + radius = 3, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 25 * multipler, type = "explosion" } + } + } + end + } + ) + end -createAttackBall( - { - name = "bob-piercing-ball", - pTint = {r=0.1, g=0.1, b=0.1, a=0.8}, - sTint = {r=0.1, g=0.1, b=0.1, a=0.8}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return - { - type = "nested-result", - action = { - type = "cluster", - cluster_count = 10, - distance = 4, - distance_deviation = 3, + -- + + local name = "bob-fire-ball" + local spawnEntityName = makeSpreadEffect({ + name = name, + smokeWithoutGlowName = smokeWithoutGlow + }) + local fireName = makeFire({ + name = name, + fireTint = {r=0, g=0.9, b=0, a=0.5}, + smokeWithGlowName = smokeGlow, + smokeAddingFuelName = smokeFuel, + spawnEntityName = spawnEntityName + }) + local stickerName = makeSticker({ + name = name, + spawnEntityName = spawnEntityName + }) + createAttackBall( + { + name = name, + pTint = {r=1, g=0.17, b=0.17, a=0.5}, + sTint = {r=1, g=0.43, b=0.17, a=0.5}, + softSmokeName = softSmoke, + type = "projectile", + pointEffects = function (attributes) + return { + { + type = "create-fire", + entity_name = fireName + } + } + end, + radius = 2, + areaEffects = function (attributes) + return + { + { + type = "create-sticker", + sticker = stickerName, + }, + { + type = "damage", + damage = { amount = 20 * multipler, type = "fire" } + } + } + end + } + ) + + if not FORCE_OLD_PROJECTILES then + name = "bob-fire-ball-direction" + createAttackBall( + { + name = name, + pTint = {r=1, g=0.17, b=0.17, a=0.5}, + sTint = {r=1, g=0.43, b=0.17, a=0.5}, + softSmokeName = softSmoke, + directionOnly = true, + type = "projectile", + pointEffects = function (attributes) + return { + { + type = "create-fire", + entity_name = fireName + } + } + end, + radius = 2, + areaEffects = function (attributes) + return + { + { + type = "create-sticker", + sticker = stickerName, + }, + { + type = "damage", + damage = { amount = 20 * multipler, type = "fire" } + } + } + end + } + ) + end + + -- + + createAttackBall( + { + name = "bob-poison-ball", + pTint = {r=0.1, g=0.5, b=1, a=0.5}, + sTint = {r=0, g=0, b=1, a=0.5}, + softSmokeName = softSmoke, + type = "projectile", + pointEffects = function (attributes) + return { + { + type = "create-entity", + entity_name = "small-poison-cloud" + } + } + end, + radius = 2, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 20 * multipler, type = "poison" } + } + } + end + } + ) + + if not FORCE_OLD_PROJECTILES then + createAttackBall( + { + name = "bob-poison-ball-direction", + pTint = {r=0.1, g=0.5, b=1, a=0.5}, + sTint = {r=0, g=0, b=1, a=0.5}, + softSmokeName = softSmoke, + directionOnly = true, + type = "projectile", + pointEffects = function (attributes) + return { + { + type = "create-entity", + entity_name = "small-poison-cloud" + } + } + end, + radius = 2, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 20 * multipler, type = "poison" } + } + } + end + } + ) + end + + -- piercing + + data:extend({ + { + type = "projectile", + name = "piercing-spike-rampant", + flags = {"not-on-map"}, + collision_box = {{-0.05, -0.25}, {0.05, 0.25}}, + acceleration = 0.005, + action = + { + type = "direct", + force = (DISALLOW_FRIENDLY_FIRE and "enemy") or nil, action_delivery = { - type = "projectile", - projectile = "piercing-spike-rampant", - direction_deviation = 0.6, - starting_speed = 1, - starting_speed_deviation = 0.0 - } - } - } - end, - radius = 3, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 30 * multipler, type = "bob-pierce" } - } - } - end - } -) - --- - -data:extend({ - { - type = "projectile", - name = "electric-spike-rampant", - flags = {"not-on-map"}, - collision_box = {{-0.03, -0.20}, {0.03, 0.20}}, - acceleration = 0.005, - action = - { - type = "direct", - force = (DISALLOW_FRIENDLY_FIRE and "enemy") or nil, - action_delivery = - { - type = "instant", - target_effects = - { - { - type = "create-entity", - entity_name = "laser-bubble" - }, + type = "instant", + target_effects = { type = "damage", - damage = { amount = 8 * multipler, type = "electric"} + damage = {amount = 8 * multipler, type = "bob-pierce"} } + } + }, + animation = + { + filename = "__base__/graphics/entity/piercing-bullet/piercing-bullet.png", + frame_count = 1, + width = 3, + height = 50, + priority = "high" + }, + } + }) + + createAttackBall( + { + name = "bob-piercing-ball", + pTint = {r=0.1, g=0.1, b=0.1, a=0.8}, + sTint = {r=0.1, g=0.1, b=0.1, a=0.8}, + softSmokeName = softSmoke, + type = "projectile", + pointEffects = function (attributes) + return + { + type = "nested-result", + action = { + type = "cluster", + cluster_count = 10, + distance = 4, + distance_deviation = 3, + action_delivery = + { + type = "projectile", + projectile = "piercing-spike-rampant", + direction_deviation = 0.6, + starting_speed = 1, + starting_speed_deviation = 0.0 } } - }, - light = {intensity = 0.5, size = 10}, - animation = - { - filename = "__base__/graphics/entity/laser/laser-to-tint-medium.png", - tint = {r=0.0, g=0.0, b=1.0}, - frame_count = 1, - width = 12, - height = 33, - priority = "high", - blend_mode = "additive" - }, - speed = 0.15 + } + end, + radius = 3, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 30 * multipler, type = "bob-pierce" } + } + } + end } -}) + ) -createAttackBall( - { - name = "bob-electric-ball", - pTint = {r=0, g=0.1, b=1, a=1}, - sTint = {r=0, g=0.1, b=1, a=1}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return - { - type = "nested-result", - action = { - type = "cluster", - cluster_count = 5, - distance = 2, - distance_deviation = 2, + -- + + data:extend({ + { + type = "projectile", + name = "electric-spike-rampant", + flags = {"not-on-map"}, + collision_box = {{-0.03, -0.20}, {0.03, 0.20}}, + acceleration = 0.005, + action = + { + type = "direct", + force = (DISALLOW_FRIENDLY_FIRE and "enemy") or nil, action_delivery = { - type = "projectile", - projectile = "electric-spike-rampant", - direction_deviation = 0.6, - starting_speed = 0.65, - starting_speed_deviation = 0.0 - } - } - } - end, - radius = 3, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 25 * multipler, type = "electric" } - } - } - end - } -) - -if not FORCE_OLD_PROJECTILES then - createAttackBall( - { - name = "bob-electric-ball-direction", - pTint = {r=0, g=0.1, b=1, a=1}, - sTint = {r=0, g=0.1, b=1, a=1}, - softSmokeName = softSmoke, - directionOnly = true, - type = "projectile", - pointEffects = function (attributes) - return - { - type = "nested-result", - action = { - type = "cluster", - cluster_count = 5, - distance = 2, - distance_deviation = 2, - action_delivery = - { - type = "projectile", - projectile = "electric-spike-rampant", - direction_deviation = 0.6, - starting_speed = 0.65, - starting_speed_deviation = 0.0 - } - } - } - end, - radius = 3, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 25 * multipler, type = "electric" } - } - } - end - } -) -end - --- - -createAttackBall( - { - name = "bob-titan-ball", - pTint = {r=0, g=0.1, b=1, a=1}, - sTint = {r=0, g=0.1, b=1, a=1}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return - { - { - type = "create-entity", - entity_name = "small-fire-cloud" - }, - { - type = "create-entity", - entity_name = "big-explosion" - } - } - end, - radius = 3, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 10 * multipler, type = "electric" } - }, - { - type = "damage", - damage = { amount = 10 * multipler, type = "explosion" } - }, - { - type = "damage", - damage = { amount = 10 * multipler, type = "fire" } - } - } - end - } -) - -if not FORCE_OLD_PROJECTILES then - createAttackBall( - { - name = "bob-titan-ball-direction", - pTint = {r=0, g=0.1, b=1, a=1}, - sTint = {r=0, g=0.1, b=1, a=1}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return - { - { - type = "create-entity", - entity_name = "small-fire-cloud" - }, - { - type = "create-entity", - entity_name = "big-explosion" - } - } - end, - radius = 3, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 10 * multipler, type = "electric" } - }, - { - type = "damage", - damage = { amount = 10 * multipler, type = "explosion" } - }, - { - type = "damage", - damage = { amount = 10 * multipler, type = "fire" } - } - } - end - } -) -end - --- - -createAttackBall( - { - name = "bob-behemoth-ball", - pTint = {r=0, g=0.1, b=1, a=1}, - sTint = {r=0, g=0.1, b=1, a=1}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return - { - { - type = "create-entity", - entity_name = "small-poison-cloud" - }, - { - type = "create-entity", - entity_name = "big-explosion" - } - } - end, - radius = 3, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 15 * multipler, type = "electric" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "explosion" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "fire" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "poison" } - } - } - end - } -) - -if not FORCE_OLD_PROJECTILES then - createAttackBall( - { - name = "bob-behemoth-ball-direction", - pTint = {r=0, g=0.1, b=1, a=1}, - sTint = {r=0, g=0.1, b=1, a=1}, - softSmokeName = softSmoke, - directionOnly = true, - type = "projectile", - pointEffects = function (attributes) - return - { - { - type = "create-entity", - entity_name = "small-poison-cloud" - }, - { - type = "create-entity", - entity_name = "big-explosion" - } - } - end, - radius = 3, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 15 * multipler, type = "electric" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "explosion" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "fire" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "poison" } - } - } - end - } -) -end - --- - -createAttackBall( - { - name = "bob-leviathan-ball", - pTint = {r=0, g=0.1, b=1, a=1}, - sTint = {r=0, g=0.1, b=1, a=1}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return - { - type = "nested-result", - action = - { - type = "cluster", - cluster_count = 4, - distance = 3, - distance_deviation = 1, - action_delivery ={ type = "instant", - target_effects = { + target_effects = { - type = "create-entity", - entity_name = "big-explosion", + { + type = "create-entity", + entity_name = "laser-bubble" + }, + { + type = "damage", + damage = { amount = 8 * multipler, type = "electric"} + } + } + } + }, + light = {intensity = 0.5, size = 10}, + animation = + { + filename = "__base__/graphics/entity/laser/laser-to-tint-medium.png", + tint = {r=0.0, g=0.0, b=1.0}, + frame_count = 1, + width = 12, + height = 33, + priority = "high", + blend_mode = "additive" + }, + speed = 0.15 + } + }) + + createAttackBall( + { + name = "bob-electric-ball", + pTint = {r=0, g=0.1, b=1, a=1}, + sTint = {r=0, g=0.1, b=1, a=1}, + softSmokeName = softSmoke, + type = "projectile", + pointEffects = function (attributes) + return + { + type = "nested-result", + action = { + type = "cluster", + cluster_count = 5, + distance = 2, + distance_deviation = 2, + action_delivery = + { + type = "projectile", + projectile = "electric-spike-rampant", + direction_deviation = 0.6, + starting_speed = 0.65, + starting_speed_deviation = 0.0 + } + } + } + end, + radius = 3, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 25 * multipler, type = "electric" } + } + } + end + } + ) + + if not FORCE_OLD_PROJECTILES then + createAttackBall( + { + name = "bob-electric-ball-direction", + pTint = {r=0, g=0.1, b=1, a=1}, + sTint = {r=0, g=0.1, b=1, a=1}, + softSmokeName = softSmoke, + directionOnly = true, + type = "projectile", + pointEffects = function (attributes) + return + { + type = "nested-result", + action = { + type = "cluster", + cluster_count = 5, + distance = 2, + distance_deviation = 2, + action_delivery = + { + type = "projectile", + projectile = "electric-spike-rampant", direction_deviation = 0.6, - starting_speed = 1, + starting_speed = 0.65, starting_speed_deviation = 0.0 } + } + } + end, + radius = 3, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 25 * multipler, type = "electric" } + } + } + end + } + ) + end + + -- + + createAttackBall( + { + name = "bob-titan-ball", + pTint = {r=0, g=0.1, b=1, a=1}, + sTint = {r=0, g=0.1, b=1, a=1}, + softSmokeName = softSmoke, + type = "projectile", + pointEffects = function (attributes) + return + { + { + type = "create-entity", + entity_name = "small-fire-cloud" + }, + { + type = "create-entity", + entity_name = "big-explosion" + } + } + end, + radius = 3, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 10 * multipler, type = "electric" } + }, + { + type = "damage", + damage = { amount = 10 * multipler, type = "explosion" } + }, + { + type = "damage", + damage = { amount = 10 * multipler, type = "fire" } + } + } + end + } + ) + + if not FORCE_OLD_PROJECTILES then + createAttackBall( + { + name = "bob-titan-ball-direction", + pTint = {r=0, g=0.1, b=1, a=1}, + sTint = {r=0, g=0.1, b=1, a=1}, + softSmokeName = softSmoke, + type = "projectile", + pointEffects = function (attributes) + return + { + { + type = "create-entity", + entity_name = "small-fire-cloud" + }, + { + type = "create-entity", + entity_name = "big-explosion" + } + } + end, + radius = 3, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 10 * multipler, type = "electric" } + }, + { + type = "damage", + damage = { amount = 10 * multipler, type = "explosion" } + }, + { + type = "damage", + damage = { amount = 10 * multipler, type = "fire" } + } + } + end + } + ) + end + + -- + + createAttackBall( + { + name = "bob-behemoth-ball", + pTint = {r=0, g=0.1, b=1, a=1}, + sTint = {r=0, g=0.1, b=1, a=1}, + softSmokeName = softSmoke, + type = "projectile", + pointEffects = function (attributes) + return + { + { + type = "create-entity", + entity_name = "small-poison-cloud" + }, + { + type = "create-entity", + entity_name = "big-explosion" + } + } + end, + radius = 3, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 15 * multipler, type = "electric" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "explosion" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "fire" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "poison" } + } + } + end + } + ) + + if not FORCE_OLD_PROJECTILES then + createAttackBall( + { + name = "bob-behemoth-ball-direction", + pTint = {r=0, g=0.1, b=1, a=1}, + sTint = {r=0, g=0.1, b=1, a=1}, + softSmokeName = softSmoke, + directionOnly = true, + type = "projectile", + pointEffects = function (attributes) + return + { + { + type = "create-entity", + entity_name = "small-poison-cloud" + }, + { + type = "create-entity", + entity_name = "big-explosion" + } + } + end, + radius = 3, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 15 * multipler, type = "electric" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "explosion" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "fire" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "poison" } + } + } + end + } + ) + end + + -- + + createAttackBall( + { + name = "bob-leviathan-ball", + pTint = {r=0, g=0.1, b=1, a=1}, + sTint = {r=0, g=0.1, b=1, a=1}, + softSmokeName = softSmoke, + type = "projectile", + pointEffects = function (attributes) + return + { + type = "nested-result", + action = + { + type = "cluster", + cluster_count = 4, + distance = 3, + distance_deviation = 1, + action_delivery ={ + type = "instant", + target_effects = { + { + type = "create-entity", + entity_name = "big-explosion", + direction_deviation = 0.6, + starting_speed = 1, + starting_speed_deviation = 0.0 + } + } } } - } - } - end, - radius = 3, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 15 * multipler, type = "electric" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "explosion" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "fire" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "poison" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "bob-pierce" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "acid" } } - } - end - } -) - -if not FORCE_OLD_PROJECTILES then - createAttackBall( - { - name = "bob-leviathan-ball-direction", - pTint = {r=0, g=0.1, b=1, a=1}, - sTint = {r=0, g=0.1, b=1, a=1}, - softSmokeName = softSmoke, - directionOnly = true, - type = "projectile", - pointEffects = function (attributes) - return - { - type = "nested-result", - action = + end, + radius = 3, + areaEffects = function (attributes) + return + { { - type = "cluster", - cluster_count = 4, - distance = 3, - distance_deviation = 1, - action_delivery ={ - type = "instant", - target_effects = { - { - type = "create-entity", - entity_name = "big-explosion", - direction_deviation = 0.6, - starting_speed = 1, - starting_speed_deviation = 0.0 + type = "damage", + damage = { amount = 15 * multipler, type = "electric" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "explosion" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "fire" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "poison" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "bob-pierce" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "acid" } + } + } + end + } + ) + + if not FORCE_OLD_PROJECTILES then + createAttackBall( + { + name = "bob-leviathan-ball-direction", + pTint = {r=0, g=0.1, b=1, a=1}, + sTint = {r=0, g=0.1, b=1, a=1}, + softSmokeName = softSmoke, + directionOnly = true, + type = "projectile", + pointEffects = function (attributes) + return + { + type = "nested-result", + action = + { + type = "cluster", + cluster_count = 4, + distance = 3, + distance_deviation = 1, + action_delivery ={ + type = "instant", + target_effects = { + { + type = "create-entity", + entity_name = "big-explosion", + direction_deviation = 0.6, + starting_speed = 1, + starting_speed_deviation = 0.0 + } + } } } + } + end, + radius = 3, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 15 * multipler, type = "electric" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "explosion" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "fire" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "poison" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "bob-pierce" } + }, + { + type = "damage", + damage = { amount = 15 * multipler, type = "acid" } } } - } - end, - radius = 3, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 15 * multipler, type = "electric" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "explosion" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "fire" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "poison" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "bob-pierce" } - }, - { - type = "damage", - damage = { amount = 15 * multipler, type = "acid" } - } - } - end - } -) + end + } + ) + end end diff --git a/prototypes/utils/AttackNE.lua b/prototypes/utils/AttackNE.lua index 83c7471..8dddf5b 100755 --- a/prototypes/utils/AttackNE.lua +++ b/prototypes/utils/AttackNE.lua @@ -1,5 +1,7 @@ -- import +local attacks = {} + local attackBall = require("AttackBall") local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].value @@ -9,230 +11,233 @@ local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].va local softSmoke = "the-soft-smoke-rampant" local createAttackBall = attackBall.createAttackBall -local multipler = (FORCE_OLD_PROJECTILES and 1) or 2.7 +function attacks.addAttacks() -createAttackBall( - { - name = "ne-infected-unit-ball", - pTint = {r=0, g=0.97, b=0.34, a=0.5}, - sTint = {r=0, g=0.1, b=1, a=1}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return { - { - type = "create-entity", - entity_name = "unit-cluster", - trigger_created_entity = "true" - }, - { - type = "create-sticker", - sticker = "slowdown-sticker", - }, - { - type = "create-entity", - entity_name = "Infected-Poison-Cloud" - }, - { - type = "damage", - damage = {amount = 10 * multipler, type = "explosion"} - }, - { - type = "damage", - damage = {amount = 24 * multipler, type = "poison"} - } - } - end, - radius = 1, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 0, type = "explosion" } - } - } - end - } -) + local multipler = (FORCE_OLD_PROJECTILES and 1) or 2.7 --- - -createAttackBall( - { - name = "ne-mutated-unit-ball", - pTint = {r=0.5, g=0.7, b=0.34, a=0.5}, - sTint = {r=0.5, g=0.97, b=0.34, a=0.5}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return { - { - type = "create-entity", - entity_name = "unit-cluster", - trigger_created_entity = "true" - }, - { - type = "create-sticker", - sticker = "slowdown-sticker", - }, - { - type = "create-entity", - entity_name = "acid-splash-purple" - } - } - end, - radius = 2, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 8 * multipler, type = "explosion" } - }, - { - type = "damage", - damage = { amount = 18 * multipler, type = "acid" } - } - } - end - } -) - --- - -createAttackBall( - { - name = "ne-infected-ball", - pTint = {r=0.5, g=0.7, b=0.34, a=0.5}, - sTint = {r=0.5, g=0.97, b=0.34, a=0.5}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return { - { - type = "create-entity", - entity_name = "Infected-Poison-Cloud" - } - } - end, - radius = 1.5, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 5 * multipler, type = "explosion" } - }, - { - type = "damage", - damage = { amount = 12 * multipler, type = "poison" } - } - } - end - } -) - -if not FORCE_OLD_PROJECTILES then createAttackBall( - { - name = "ne-infected-ball-direction", - pTint = {r=0.5, g=0.7, b=0.34, a=0.5}, - sTint = {r=0.5, g=0.97, b=0.34, a=0.5}, - softSmokeName = softSmoke, - directionOnly = true, - type = "projectile", - pointEffects = function (attributes) - return { - { - type = "create-entity", - entity_name = "Infected-Poison-Cloud" - } - } - end, - radius = 1.5, - areaEffects = function (attributes) - return - { + { + name = "ne-infected-unit-ball", + pTint = {r=0, g=0.97, b=0.34, a=0.5}, + sTint = {r=0, g=0.1, b=1, a=1}, + softSmokeName = softSmoke, + type = "projectile", + pointEffects = function (attributes) + return { { - type = "damage", - damage = { amount = 5 * multipler, type = "explosion" } + type = "create-entity", + entity_name = "unit-cluster", + trigger_created_entity = "true" + }, + { + type = "create-sticker", + sticker = "slowdown-sticker", + }, + { + type = "create-entity", + entity_name = "Infected-Poison-Cloud" }, { type = "damage", - damage = { amount = 12 * multipler, type = "poison" } - } - } - end - } -) -end - --- - -createAttackBall( - { - name = "ne-mutated-ball", - pTint = {r=0.5, g=0.7, b=0.34, a=0.5}, - sTint = {r=0.5, g=0.97, b=0.34, a=0.5}, - softSmokeName = softSmoke, - type = "projectile", - pointEffects = function (attributes) - return { - { - type = "create-entity", - entity_name = "acid-splash-purple" - } - } - end, - radius = 1.5, - areaEffects = function (attributes) - return - { - { - type = "damage", - damage = { amount = 5 * multipler, type = "explosion" } + damage = {amount = 10 * multipler, type = "explosion"} }, { type = "damage", - damage = { amount = 12 * multipler, type = "acid" } + damage = {amount = 24 * multipler, type = "poison"} } } - end - } -) + end, + radius = 1, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 0, type = "explosion" } + } + } + end + } + ) + + -- -if not FORCE_OLD_PROJECTILES then createAttackBall( - { - name = "ne-mutated-ball-direction", - pTint = {r=0.5, g=0.7, b=0.34, a=0.5}, - sTint = {r=0.5, g=0.97, b=0.34, a=0.5}, - softSmokeName = softSmoke, - directionOnly = true, - type = "projectile", - pointEffects = function (attributes) - return { - { - type = "create-entity", - entity_name = "acid-splash-purple" - } - } - end, - radius = 1.5, - areaEffects = function (attributes) - return - { + { + name = "ne-mutated-unit-ball", + pTint = {r=0.5, g=0.7, b=0.34, a=0.5}, + sTint = {r=0.5, g=0.97, b=0.34, a=0.5}, + softSmokeName = softSmoke, + type = "projectile", + pointEffects = function (attributes) + return { { - type = "damage", - damage = { amount = 5 * multipler, type = "explosion" } + type = "create-entity", + entity_name = "unit-cluster", + trigger_created_entity = "true" }, { - type = "damage", - damage = { amount = 12 * multipler, type = "acid" } + type = "create-sticker", + sticker = "slowdown-sticker", + }, + { + type = "create-entity", + entity_name = "acid-splash-purple" } } - end - } -) + end, + radius = 2, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 8 * multipler, type = "explosion" } + }, + { + type = "damage", + damage = { amount = 18 * multipler, type = "acid" } + } + } + end + } + ) + + -- + + createAttackBall( + { + name = "ne-infected-ball", + pTint = {r=0.5, g=0.7, b=0.34, a=0.5}, + sTint = {r=0.5, g=0.97, b=0.34, a=0.5}, + softSmokeName = softSmoke, + type = "projectile", + pointEffects = function (attributes) + return { + { + type = "create-entity", + entity_name = "Infected-Poison-Cloud" + } + } + end, + radius = 1.5, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 5 * multipler, type = "explosion" } + }, + { + type = "damage", + damage = { amount = 12 * multipler, type = "poison" } + } + } + end + } + ) + + if not FORCE_OLD_PROJECTILES then + createAttackBall( + { + name = "ne-infected-ball-direction", + pTint = {r=0.5, g=0.7, b=0.34, a=0.5}, + sTint = {r=0.5, g=0.97, b=0.34, a=0.5}, + softSmokeName = softSmoke, + directionOnly = true, + type = "projectile", + pointEffects = function (attributes) + return { + { + type = "create-entity", + entity_name = "Infected-Poison-Cloud" + } + } + end, + radius = 1.5, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 5 * multipler, type = "explosion" } + }, + { + type = "damage", + damage = { amount = 12 * multipler, type = "poison" } + } + } + end + } + ) + end + + -- + + createAttackBall( + { + name = "ne-mutated-ball", + pTint = {r=0.5, g=0.7, b=0.34, a=0.5}, + sTint = {r=0.5, g=0.97, b=0.34, a=0.5}, + softSmokeName = softSmoke, + type = "projectile", + pointEffects = function (attributes) + return { + { + type = "create-entity", + entity_name = "acid-splash-purple" + } + } + end, + radius = 1.5, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 5 * multipler, type = "explosion" } + }, + { + type = "damage", + damage = { amount = 12 * multipler, type = "acid" } + } + } + end + } + ) + + if not FORCE_OLD_PROJECTILES then + createAttackBall( + { + name = "ne-mutated-ball-direction", + pTint = {r=0.5, g=0.7, b=0.34, a=0.5}, + sTint = {r=0.5, g=0.97, b=0.34, a=0.5}, + softSmokeName = softSmoke, + directionOnly = true, + type = "projectile", + pointEffects = function (attributes) + return { + { + type = "create-entity", + entity_name = "acid-splash-purple" + } + } + end, + radius = 1.5, + areaEffects = function (attributes) + return + { + { + type = "damage", + damage = { amount = 5 * multipler, type = "explosion" } + }, + { + type = "damage", + damage = { amount = 12 * multipler, type = "acid" } + } + } + end + } + ) + end end