mirror of
https://github.com/veden/Rampant.git
synced 2025-01-14 02:23:01 +02:00
see changelog
This commit is contained in:
parent
4c50e7c5bf
commit
5fecfcecd2
@ -1,3 +1,33 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.17.9
|
||||
Date: 3. 16. 2019
|
||||
Improvements:
|
||||
- Updated spit graphics to 0.17 version
|
||||
- Updated spit effects and damages to 0.17 vanilla
|
||||
- Allow mod settings toggle between blockable and unblockable projectiles for vanilla
|
||||
- Switched wasp drones to blockable projectiles
|
||||
- Added AOE to melee attacks based on size
|
||||
- Switch new enemies over to acid splash from vanilla
|
||||
- Updated stickers to work on vehicles
|
||||
- Added lead targeting to inferno biters
|
||||
- Added acid puddle slowdown from vanilla as default spitter attack effect
|
||||
- Added damaging acid puddle slowdown from vanilla as default worm attack effect
|
||||
- Added damaging acid puddle slowdown from vanilla on acid faction
|
||||
Tweaks:
|
||||
- Removed bob blockable projectile logic
|
||||
- Removed force old projectiles setting option
|
||||
- Changed color of spawner egg and wasp drone
|
||||
- Added better explosion effect to troll and physical worms
|
||||
- Increased on wasp range from spitter by 6
|
||||
Bugfixes:
|
||||
- Fixed troll spitters having a homing projectile
|
||||
- Fixed spitters changing color when attacking
|
||||
- Fixed biter attacks getting bonuses from player research
|
||||
- Fixed suicide biter level 9 and 10 wouldn't die when they attacked
|
||||
- Fixed physical and troll worm turrets having incorrect health values
|
||||
- Fixed physical and troll nests having incorrect health values
|
||||
- Fixed more damage then expected on enemy projectiles
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.17.8
|
||||
Date: 3. 14. 2019
|
||||
|
@ -1,10 +1,7 @@
|
||||
local vanillaUpdates = require("prototypes/utils/UpdatesVanilla")
|
||||
local bobsUpdates = require("prototypes/utils/UpdatesBobs")
|
||||
local attackBall = require("prototypes/utils/AttackBall")
|
||||
local constants = require("libs/Constants")
|
||||
|
||||
local attackBobs = require("prototypes/utils/AttackBobs")
|
||||
|
||||
|
||||
if settings.startup["rampant-removeBloodParticles"].value then
|
||||
local explosions = data.raw["explosion"]
|
||||
|
||||
@ -13,14 +10,9 @@ if settings.startup["rampant-removeBloodParticles"].value then
|
||||
explosions["blood-explosion-huge"]["created_effect"] = nil
|
||||
end
|
||||
|
||||
if settings.startup["rampant-useDumbProjectiles"].value then
|
||||
if settings.startup["rampant-useDumbProjectiles"].value or settings.startup["rampant-newEnemies"].value then
|
||||
attackBall.generateVanilla()
|
||||
vanillaUpdates.useDumbProjectiles()
|
||||
|
||||
local option = settings.startup["bobmods-enemies-enableartifacts"]
|
||||
if option then
|
||||
attackBobs.addAttacks()
|
||||
bobsUpdates.useDumbProjectiles()
|
||||
end
|
||||
end
|
||||
|
||||
for _, robot in pairs(data.raw["logistic-robot"]) do
|
||||
|
113
data.lua
113
data.lua
@ -1,8 +1,7 @@
|
||||
-- import
|
||||
|
||||
local acidBall = require("prototypes/utils/AttackBall")
|
||||
local colorUtils = require("prototypes/utils/ColorUtils")
|
||||
local smokeUtils = require("SmokeUtils")
|
||||
local smokeUtils = require("prototypes/utils/SmokeUtils")
|
||||
|
||||
-- imported functions
|
||||
|
||||
@ -20,12 +19,10 @@ makeSmokeWithGlow({name="the", smokeWithGlowTint=makeColor(0.3, 0.75, 0.3, 0.1)}
|
||||
makeSmokeWithoutGlow({name="the", smokeWithoutGlowTint=makeColor(0.3, 0.75, 0.3, 0.1)})
|
||||
makeSmokeAddingFuel({name="the"})
|
||||
|
||||
if settings.startup["rampant-useDumbProjectiles"].value then
|
||||
acidBall.generateLegacy()
|
||||
end
|
||||
|
||||
require("prototypes/buildings/ChunkScanner")
|
||||
|
||||
local attributes = {}
|
||||
|
||||
if not data.raw["corpse"]["acid-splash-purple"] then
|
||||
data:extend({
|
||||
{
|
||||
@ -37,36 +34,92 @@ if not data.raw["corpse"]["acid-splash-purple"] then
|
||||
splash =
|
||||
{
|
||||
{
|
||||
filename = "__Rampant__/graphics/acid-splash-purple/splash-1.png",
|
||||
line_length = 5,
|
||||
width = 199,
|
||||
height = 159,
|
||||
frame_count = 20,
|
||||
shift = {0.484375, -0.171875}
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-1.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 106,
|
||||
height = 116,
|
||||
frame_count = 26,
|
||||
shift = util.mul_shift(util.by_pixel(-12, -10), attributes.scale or 1),
|
||||
tint = attributes.tint,
|
||||
scale = (attributes.scale or 1),
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-1.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 210,
|
||||
height = 224,
|
||||
frame_count = 26,
|
||||
shift = util.mul_shift(util.by_pixel(-12, -8), attributes.scale or 1),
|
||||
tint = attributes.tint,
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
}
|
||||
},
|
||||
{
|
||||
filename = "__Rampant__/graphics/acid-splash-purple/splash-2.png",
|
||||
line_length = 5,
|
||||
width = 238,
|
||||
height = 157,
|
||||
frame_count = 20,
|
||||
shift = {0.8125, -0.15625}
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-2.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 88,
|
||||
height = 76,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(-10, -18), attributes.scale or 1),
|
||||
tint = attributes.tint,
|
||||
scale = (attributes.scale or 1),
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-2.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 174,
|
||||
height = 150,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(-9, -17), attributes.scale or 1),
|
||||
tint = attributes.tint,
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
}
|
||||
},
|
||||
{
|
||||
filename = "__Rampant__/graphics/acid-splash-purple/splash-3.png",
|
||||
line_length = 5,
|
||||
width = 240,
|
||||
height = 162,
|
||||
frame_count = 20,
|
||||
shift = {0.71875, -0.09375}
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-3.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 118,
|
||||
height = 104,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(22, -16), attributes.scale or 1),
|
||||
tint = attributes.tint,
|
||||
scale = (attributes.scale or 1),
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-3.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 236,
|
||||
height = 208,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(22, -16), attributes.scale or 1),
|
||||
tint = attributes.tint,
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
}
|
||||
},
|
||||
{
|
||||
filename = "__Rampant__/graphics/acid-splash-purple/splash-4.png",
|
||||
line_length = 5,
|
||||
width = 241,
|
||||
height = 146,
|
||||
frame_count = 20,
|
||||
shift = {0.703125, -0.375}
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-4.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 128,
|
||||
height = 80,
|
||||
frame_count = 24,
|
||||
shift = util.mul_shift(util.by_pixel(16, -20), attributes.scale or 1),
|
||||
tint = attributes.tint,
|
||||
scale = (attributes.scale or 1),
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-4.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 252,
|
||||
height = 154,
|
||||
frame_count = 24,
|
||||
shift = util.mul_shift(util.by_pixel(17, -19), attributes.scale or 1),
|
||||
tint = attributes.tint,
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
}
|
||||
}
|
||||
},
|
||||
splash_speed = 0.03
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name" : "Rampant",
|
||||
"factorio_version" : "0.17",
|
||||
"version" : "0.17.8",
|
||||
"version" : "0.17.9",
|
||||
"title" : "Rampant",
|
||||
"author" : "Veden",
|
||||
"homepage" : "https://forums.factorio.com/viewtopic.php?f=94&t=31445",
|
||||
"description" : "Improves the enemies tactics by using potential fields/pheromones allowing probing of defenses, retreats, reinforcements, counterattacking, breaching, raids, rallying death cry, and player hunting. Uses nonhoming blockable biter projectiles. Adds new Enemies (disabled by default). Can completely replace the vanilla AI. Difficulty setting in mod options menu.",
|
||||
"dependencies" : ["base >= 0.17.0", "? bobenemies", "? Natural_Evolution_Enemies >= 0.17.0", "? Clockwork", "? Orbital Ion Cannon", "? RampantArsenal"]
|
||||
"description" : "Improves the enemies tactics by using potential fields/pheromones allowing probing of defenses, retreats, reinforcements, counterattacking, breaching, raids, rallying death cry, and player hunting. Uses blockable biter projectiles. Adds new Enemies (disabled by default). Can completely replace the vanilla AI. Difficulty setting in mod options menu.",
|
||||
"dependencies" : ["base >= 0.17.12", "? bobenemies", "? Natural_Evolution_Enemies >= 0.17.0", "? Clockwork", "? Orbital Ion Cannon", "? RampantArsenal"]
|
||||
}
|
||||
|
@ -12417,9 +12417,7 @@ poison-worm-v20-t10-rampant=Poison worm: Juggernaut class
|
||||
|
||||
[mod-setting-name]
|
||||
rampant-unitSpawnerBreath=World: Unit Spawners breath air
|
||||
rampant-useDumbProjectiles=Projectiles: Use non-homing attack
|
||||
rampant-useNEUnitLaunchers=Projectiles: Use NE Unit Launchers (Needs NE)
|
||||
# rampant-attackWaveGenerationUsePollution=Attack Wave: Use Pollution as attack trigger
|
||||
rampant-useDumbProjectiles=Projectiles: Use blockable projectiles
|
||||
rampant-attackWaveGenerationUsePlayerProximity=Attack Wave: Use Player Proximity as attack trigger
|
||||
rampant-attackWaveGenerationThresholdMax=Attack Wave: Starting chunk attack threshold
|
||||
rampant-attackWaveGenerationThresholdMin=Attack Wave: Ending chunk attack threshold
|
||||
@ -12435,10 +12433,8 @@ rampant-attackPlayerThreshold=Attack Wave: Player score contribution threshold
|
||||
rampant-permanentNocturnal=Attack Wave: Nocturnal Mode
|
||||
rampant-aiPointsScaler=Attack Wave: Difficulty Scaling
|
||||
rampant-addWallResistanceAcid=Safety; Increase wall resistance to spitters
|
||||
rampant-useCustomAI=Use Custom AI (Alpha)
|
||||
rampant-safeBuildings-lamps=Safety: Make lamps safe from biters
|
||||
rampant-removeBloodParticles=Optimization: Remove blood particles (Reduces lag spikes)
|
||||
# rampant-enableBuildings=Enable buildings and Technology
|
||||
rampant-attack-warning=Notification: Enable attack wave warnings
|
||||
rampant-enableSwarm=Attack Wave: Enable the swarm
|
||||
rampant-newEnemies=World: Enable new enemies
|
||||
@ -12455,7 +12451,6 @@ rampant-enableNEUnits=World: Enable NE as a faction
|
||||
rampant-disallowFriendlyFire=Safety: Disallow Friendly Fire Splash Damage
|
||||
rampant-tierStart=World: Beginning enemy level
|
||||
rampant-tierEnd=World: Ending enemy level
|
||||
rampant-forceOldProjectiles=Projectiles: Force non-blockable projectiles
|
||||
rampant-disableVanillaAI=AI: Disable Vanilla AI
|
||||
rampant-enableMigration=AI: Enable Migration
|
||||
|
||||
@ -12500,9 +12495,7 @@ rampant-poisonEnemy=World: Poison Biter Faction
|
||||
|
||||
[mod-setting-description]
|
||||
rampant-unitSpawnerBreath=Now unit spawners breath air so they are affected by things like poison capsules
|
||||
rampant-useDumbProjectiles=Turns off homing projectiles for worms and spitters
|
||||
rampant-useNEUnitLaunchers=ONLY FOR USE WITH NATURAL EVOLUTION ENEMIES use the NE unit launchers with medium and big worms. if set to false this will still allow the dumb projectiles but without the unit spawning. A side effect of the dumb projectiles cause the units to be spawned as if two shots were fired
|
||||
# rampant-attackWaveGenerationUsePollution=Include pollution amount for threshold on chunks with biter nests that will generate a Rampant attack wave. DOES NOT affect vanilla biters waves
|
||||
rampant-useDumbProjectiles=Use the projectile attacks that are blockable. This should be checked if you are using the new enemies.
|
||||
rampant-attackWaveGenerationUsePlayerProximity=Include player pheromones amount for threshold on chunks with biter nests that will generate a Rampant attack wave. DOES NOT affect vanilla biters waves
|
||||
rampant-attackWaveGenerationThresholdMax=The total score that a chunk must reach in order for an attack wave to spawn. DOES NOT affect vanilla biters waves. Scaling linearly with evolution factor (starting threshold @ 0.0 evolution)
|
||||
rampant-attackWaveGenerationThresholdMin=The total score that a chunk must reach in order for an attack wave to spawn. DOES NOT affect vanilla biters waves. Scaling linearly with evolution factor (ending threshold @ 100.0 evolution)
|
||||
@ -12519,9 +12512,7 @@ rampant-attackPlayerThreshold=The score that a chunk must reach for it to contri
|
||||
rampant-permanentNocturnal=Toggling this will cause Rampant attack waves to spawn at night. DOES NOT turn off vanilla attack groups yet. Works better with Day/Night extender mod.
|
||||
rampant-aiPointsScaler=Between 0.0 and 5.0. This scales how many action points the ai gets per logic cycle to perform actions like making attack waves. 0.3 - very easy, 0.75 - easy, 1.0 - medium, 1.25+ - hard
|
||||
rampant-addWallResistanceAcid=Toggling this will cause a %60 acid resistance to be added to all wall entities to reduce the damage done by spitters to walls back to vanilla levels.
|
||||
rampant-useCustomAI=Having this enabled will completely remove the vanilla ai and change how biters build, produce units, and attack.
|
||||
rampant-removeBloodParticles=The blood particles that are created when biters are being killed can cause UPS spikes, this removes them.
|
||||
# rampant-enableBuildings=Enable buildings and technologies rampant offers
|
||||
rampant-enableSwarm=This reduces the size of the unit collision_mask causing them to reduce pathing collisions and smooth out the attacks
|
||||
rampant-attack-warning=Shows a message warning players that an attack wave is incoming
|
||||
rampant-newEnemies=Adds news enemies that will be dispersed over the world. This increases the RAM requirements. With 1 variation for each biter, worm, and nest and 5 tiers expect upto a 2GB RAM increase. With 20 variations and 10 tiers set expect up to 9GB RAM increase. Variations add randominess to each tier of biter, worms, or nests. Tiers are the power level of the biters.
|
||||
@ -12538,7 +12529,6 @@ rampant-enableNEUnits=Adds NE spawners, units, and worms to the base upgrade and
|
||||
rampant-disallowFriendlyFire=Prevents enemy spitters and worms from damaging units or buildings from the same force through splash damage
|
||||
rampant-tierStart=This is the starting level of the enemy that will be used when generating the set of enemies for the specified number of tiers and increases linearly to the end tier for as many tiers selected. Roughly healthwise each tier is a follows (1-15,2-75,3-150,4-250,5-1000,6-2000,7-3500,8-7500,9-15000,10-30000). min 1, max 10
|
||||
rampant-tierEnd=This is the ending tier level that is reached after increasing linearly from the start tier for as many tiers selected. Roughly healthwise each tier is a follows (1-15,2-75,3-150,4-250,5-1000,6-2000,7-3500,8-7500,9-15000,10-30000). min 1, max 10
|
||||
rampant-forceOldProjectiles=This causes projectiles to no longer impact into other entities
|
||||
rampant-disableVanillaAI=This will turn off the vanilla attack waves and the vanilla biter expansion.
|
||||
rampant-enableMigration=This will allow the ai to expand its worms and nests. Respects the map settings for biter expansion.
|
||||
|
||||
|
@ -27,8 +27,6 @@ local createAttackBall = acidBall.createAttackBall
|
||||
local createRangedAttack = biterUtils.createRangedAttack
|
||||
local createMeleeAttack = biterUtils.createMeleeAttack
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
|
||||
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
|
||||
@ -55,8 +53,7 @@ function acid.addFaction()
|
||||
|
||||
type = "biter",
|
||||
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}
|
||||
tint = {r=0, g=0.85, b=0.13, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -70,8 +67,8 @@ function acid.addFaction()
|
||||
},
|
||||
|
||||
{
|
||||
unit = {
|
||||
|
||||
unit = {
|
||||
|
||||
{
|
||||
type = "resistance",
|
||||
name = "acid",
|
||||
@ -233,16 +230,13 @@ function acid.addFaction()
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
directionOnly = true,
|
||||
softSmokeName = softSmoke
|
||||
directionOnly = true
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
type = "spitter",
|
||||
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}
|
||||
tint = {r=0, g=0.85, b=0.1, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -259,6 +253,22 @@ function acid.addFaction()
|
||||
{
|
||||
unit = {
|
||||
|
||||
|
||||
{
|
||||
type = "attack",
|
||||
name = "damagePerTick",
|
||||
[1] = 0.1,
|
||||
[2] = 0.2,
|
||||
[3] = 0.6,
|
||||
[4] = 1.2,
|
||||
[5] = 1.2,
|
||||
[6] = 1.3,
|
||||
[7] = 1.3,
|
||||
[8] = 1.3,
|
||||
[9] = 1.4,
|
||||
[10] = 1.4
|
||||
},
|
||||
|
||||
{
|
||||
type = "resistance",
|
||||
name = "acid",
|
||||
@ -404,7 +414,8 @@ function acid.addFaction()
|
||||
return createRangedAttack(attributes,
|
||||
createAttackBall(attributes),
|
||||
spitterattackanimation(attributes.scale,
|
||||
attributes.tint))
|
||||
attributes.tint,
|
||||
attributes.tint))
|
||||
end,
|
||||
|
||||
{
|
||||
@ -426,19 +437,16 @@ function acid.addFaction()
|
||||
loot = wormLoot,
|
||||
attributes = {},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
softSmokeName = softSmoke
|
||||
type = "projectile"
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
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}
|
||||
tint = {r=0, g=0.85, b=0.1, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
|
||||
{
|
||||
type = "resistance",
|
||||
name = "acid",
|
||||
|
@ -42,12 +42,9 @@ function electric.addFaction()
|
||||
|
||||
local electricBubble = makeBubble({
|
||||
name = "electric-worm",
|
||||
lTint = {r=0, g=0.1, b=1, a=1}
|
||||
tint = {r=0, g=0.1, b=1, a=1}
|
||||
})
|
||||
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
-- electric biters
|
||||
buildUnitSpawner(
|
||||
{
|
||||
@ -65,8 +62,7 @@ function electric.addFaction()
|
||||
|
||||
type = "biter",
|
||||
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}
|
||||
tint = {r=0, g=0.25, b=0.83, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -310,7 +306,7 @@ function electric.addFaction()
|
||||
function (attributes)
|
||||
return createElectricAttack(attributes,
|
||||
makeBeam(attributes),
|
||||
biterattackanimation(attributes.scale, attributes.tint1, attributes.tint2))
|
||||
biterattackanimation(attributes.scale, attributes.tint, attributes.tint))
|
||||
end,
|
||||
|
||||
{
|
||||
@ -335,7 +331,6 @@ function electric.addFaction()
|
||||
type = "projectile",
|
||||
bubble = electricBubble,
|
||||
damageType = "electric",
|
||||
softSmokeName = softSmoke,
|
||||
pointEffects = function(attributes)
|
||||
return
|
||||
{
|
||||
@ -365,10 +360,7 @@ function electric.addFaction()
|
||||
resistances = {},
|
||||
|
||||
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}
|
||||
tint = {r=0, g=0.25, b=0.83, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -45,11 +45,9 @@ function energyThief.addFaction()
|
||||
|
||||
local electricBubble = makeBubble({
|
||||
name = "energy-thief-worm",
|
||||
lTint = {r=0, g=0, b=1, a=1}
|
||||
tint = {r=0, g=0, b=1, a=1}
|
||||
})
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
-- energy-thief biters
|
||||
buildUnitSpawner(
|
||||
{
|
||||
@ -86,8 +84,7 @@ function energyThief.addFaction()
|
||||
|
||||
type = "biter",
|
||||
attackName = "biter-energy-thief",
|
||||
tint1 = {r=0, g=0, b=0.83, a=0.65},
|
||||
tint2 = {r=0, g=0, b=0.63, a=0.65}
|
||||
tint = {r=0, g=0, b=0.83, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -331,7 +328,7 @@ function energyThief.addFaction()
|
||||
function (attributes)
|
||||
return createElectricAttack(attributes,
|
||||
makeBeam(attributes),
|
||||
biterattackanimation(attributes.scale, attributes.tint1, attributes.tint2))
|
||||
biterattackanimation(attributes.scale, attributes.tint, attributes.tint))
|
||||
end,
|
||||
|
||||
{
|
||||
@ -356,7 +353,6 @@ function energyThief.addFaction()
|
||||
type = "projectile",
|
||||
bubble = electricBubble,
|
||||
damageType = "electric",
|
||||
softSmokeName = softSmoke,
|
||||
pointEffects = function(attributes)
|
||||
return
|
||||
{
|
||||
@ -385,10 +381,7 @@ function energyThief.addFaction()
|
||||
},
|
||||
resistances = {},
|
||||
attackName = "worm-energy-thief",
|
||||
tint = {r=0, g=0, b=0.83, a=0.65},
|
||||
pTint = {r=0, g=0, b=0.8, a=1},
|
||||
sTint = {r=0, g=0, b=0.8, a=1},
|
||||
lTint = {r=0, g=0, b=0.8, a=1}
|
||||
tint = {r=0, g=0, b=0.83, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -26,8 +26,6 @@ local createAttackBall = acidBall.createAttackBall
|
||||
local createRangedAttack = biterUtils.createRangedAttack
|
||||
local createMeleeAttack = biterUtils.createMeleeAttack
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
|
||||
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
|
||||
@ -52,8 +50,7 @@ function fast.addFaction()
|
||||
|
||||
loot = biterLoot,
|
||||
type = "biter",
|
||||
tint1 = {r=0.26, g=0.76, b=0.72, a=0.65},
|
||||
tint2 = {r=1, g=0.63, b=0, a=0.4}
|
||||
tint = {r=0.26, g=0.76, b=0.72, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -248,16 +245,13 @@ function fast.addFaction()
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
directionOnly = true,
|
||||
softSmokeName = softSmoke
|
||||
directionOnly = true
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
type = "spitter",
|
||||
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}
|
||||
tint = {r=0.26, g=0.76, b=0.72, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -434,7 +428,8 @@ function fast.addFaction()
|
||||
return createRangedAttack(attributes,
|
||||
createAttackBall(attributes),
|
||||
spitterattackanimation(attributes.scale,
|
||||
attributes.tint))
|
||||
attributes.tint,
|
||||
attributes.tint))
|
||||
end,
|
||||
|
||||
{
|
||||
@ -456,15 +451,12 @@ function fast.addFaction()
|
||||
loot = wormLoot,
|
||||
attributes = {},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
softSmokeName = softSmoke
|
||||
type = "projectile"
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
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}
|
||||
tint = {r=0.56, g=0.46, b=0.42, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -26,8 +26,6 @@ local createAttackBall = acidBall.createAttackBall
|
||||
local createRangedAttack = biterUtils.createRangedAttack
|
||||
local createMeleeAttack = biterUtils.createMeleeAttack
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
|
||||
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
|
||||
@ -54,8 +52,7 @@ function fire.addFaction()
|
||||
resistances = {},
|
||||
|
||||
type = "biter",
|
||||
tint1 = {r=0.65, g=0, b=0, a=0.65},
|
||||
tint2 = {r=1, g=1, b=1, a=0.4}
|
||||
tint = {r=0.65, g=0, b=0, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -235,16 +232,13 @@ function fire.addFaction()
|
||||
attack = {
|
||||
type = "projectile",
|
||||
damageType = "acid",
|
||||
directionOnly = true,
|
||||
softSmokeName = softSmoke
|
||||
directionOnly = true
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
type = "spitter",
|
||||
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}
|
||||
tint = {r=0.65, g=0, b=0, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -388,7 +382,8 @@ function fire.addFaction()
|
||||
return createRangedAttack(attributes,
|
||||
createAttackBall(attributes),
|
||||
spitterattackanimation(attributes.scale,
|
||||
attributes.tint))
|
||||
attributes.tint,
|
||||
attributes.tint))
|
||||
end,
|
||||
|
||||
{
|
||||
@ -411,15 +406,12 @@ function fire.addFaction()
|
||||
loot = wormLoot,
|
||||
attack = {
|
||||
type = "projectile",
|
||||
damageType = "acid",
|
||||
softSmokeName = softSmoke
|
||||
damageType = "acid"
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
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}
|
||||
tint = {r=0.65, g=0, b=0, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -25,12 +25,7 @@ local INFERNO_WORM_VARIATIONS = constants.INFERNO_WORM_VARIATIONS
|
||||
local buildUnitSpawner = swarmUtils.buildUnitSpawner
|
||||
local buildWorm = swarmUtils.buildWorm
|
||||
local createAttackFlame = attackFlame.createAttackFlame
|
||||
local createRangedAttack = biterUtils.createRangedAttack
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
local smokeGlow = "the-glow-smoke-rampant"
|
||||
local smokeWithoutGlow = "the-without-glow-smoke-rampant"
|
||||
local smokeFuel = "the-adding-fuel-rampant"
|
||||
local createStreamAttack = biterUtils.createStreamAttack
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
|
||||
@ -54,36 +49,15 @@ function inferno.addFaction()
|
||||
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",
|
||||
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}
|
||||
tint = {r=0.65, g=0, b=0, a=1}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -416,10 +390,11 @@ function inferno.addFaction()
|
||||
},
|
||||
|
||||
function (attributes)
|
||||
return createRangedAttack(attributes,
|
||||
return createStreamAttack(attributes,
|
||||
createAttackFlame(attributes),
|
||||
spitterattackanimation(attributes.scale,
|
||||
attributes.tint))
|
||||
attributes.tint,
|
||||
attributes.tint))
|
||||
end,
|
||||
|
||||
{
|
||||
@ -441,35 +416,14 @@ function inferno.addFaction()
|
||||
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 = {},
|
||||
|
||||
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}
|
||||
tint = {r=0.65, g=0, b=0, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
@ -698,7 +652,7 @@ function inferno.addFaction()
|
||||
},
|
||||
|
||||
function (attributes)
|
||||
return createRangedAttack(attributes,
|
||||
return createStreamAttack(attributes,
|
||||
createAttackFlame(attributes))
|
||||
end,
|
||||
|
||||
|
@ -30,8 +30,6 @@ local makeBubble = beamUtils.makeBubble
|
||||
|
||||
local createMeleeAttack = biterUtils.createMeleeAttack
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
|
||||
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
|
||||
@ -44,7 +42,7 @@ function laser.addFaction()
|
||||
|
||||
local laserBubble = makeBubble({
|
||||
name = "laser-worm",
|
||||
lTint = {r=0, g=0, b=0.42, a=0.65}
|
||||
tint = {r=0, g=0, b=0.42, a=0.65}
|
||||
})
|
||||
|
||||
|
||||
@ -63,8 +61,7 @@ function laser.addFaction()
|
||||
|
||||
loot = biterLoot,
|
||||
type = "biter",
|
||||
tint1 = {r=0, g=0, b=0.42, a=0.65},
|
||||
tint2 = {r=0, g=0, b=0.42, a=0.4}
|
||||
tint = {r=0, g=0, b=0.42, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -243,9 +240,8 @@ function laser.addFaction()
|
||||
attack = {
|
||||
type = "projectile",
|
||||
bubble = laserBubble,
|
||||
softSmokeName = softSmoke,
|
||||
damageType = "laser",
|
||||
directionOnly = true,
|
||||
directionOnly = true,
|
||||
pointEffects = function(attributes)
|
||||
return
|
||||
{
|
||||
@ -277,9 +273,7 @@ function laser.addFaction()
|
||||
|
||||
type = "spitter",
|
||||
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}
|
||||
tint = {r=0, g=0, b=0.42, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -440,7 +434,8 @@ function laser.addFaction()
|
||||
return createRangedAttack(attributes,
|
||||
createAttackBall(attributes),
|
||||
spitterattackanimation(attributes.scale,
|
||||
attributes.tint))
|
||||
attributes.tint,
|
||||
attributes.tint))
|
||||
end,
|
||||
|
||||
{
|
||||
@ -464,7 +459,6 @@ function laser.addFaction()
|
||||
attack = {
|
||||
type = "projectile",
|
||||
bubble = laserBubble,
|
||||
softSmokeName = softSmoke,
|
||||
damageType = "laser",
|
||||
pointEffects = function(attributes)
|
||||
return
|
||||
@ -496,10 +490,7 @@ function laser.addFaction()
|
||||
resistances = {},
|
||||
|
||||
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}
|
||||
tint = {r=0, g=0, b=0.42, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -28,8 +28,6 @@ local createRangedAttack = biterUtils.createRangedAttack
|
||||
|
||||
local createMeleeAttack = biterUtils.createMeleeAttack
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
|
||||
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
|
||||
@ -54,8 +52,7 @@ function neutral.addFaction()
|
||||
resistances = {},
|
||||
|
||||
type = "biter",
|
||||
tint1 = {r=0.56, g=0.46, b=0.42, a=0.65},
|
||||
tint2 = {r=1, g=0.63, b=0, a=0.4}
|
||||
tint = {r=0.56, g=0.46, b=0.42, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -103,16 +100,13 @@ function neutral.addFaction()
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
directionOnly = true,
|
||||
softSmokeName = softSmoke
|
||||
directionOnly = true
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
type = "spitter",
|
||||
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}
|
||||
tint = {r=0.56, g=0.46, b=0.42, a=1}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -140,7 +134,8 @@ function neutral.addFaction()
|
||||
return createRangedAttack(attributes,
|
||||
createAttackBall(attributes),
|
||||
spitterattackanimation(attributes.scale,
|
||||
attributes.tint))
|
||||
attributes.tint,
|
||||
attributes.tint))
|
||||
end,
|
||||
|
||||
{
|
||||
@ -162,15 +157,12 @@ function neutral.addFaction()
|
||||
loot = wormLoot,
|
||||
attributes = {},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
softSmokeName = softSmoke
|
||||
type = "projectile"
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
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}
|
||||
tint = {r=0.56, g=0.46, b=0.42, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -30,8 +30,6 @@ local createAttackBall = acidBall.createAttackBall
|
||||
local createRangedAttack = biterUtils.createRangedAttack
|
||||
local createSuicideAttack = biterUtils.createSuicideAttack
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
|
||||
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
|
||||
@ -61,8 +59,7 @@ function nuclear.addFaction()
|
||||
|
||||
attackName = "nuclear-biter",
|
||||
type = "biter",
|
||||
tint1 = {r=0.76, g=0.76, b=0, a=0.65},
|
||||
tint2 = {r=0.76, g=0.76, b=0, a=0.65}
|
||||
tint = {r=0.76, g=0.76, b=0, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -412,15 +409,12 @@ function nuclear.addFaction()
|
||||
sticker = attributes.name .. "-sticker-rampant"
|
||||
}
|
||||
}
|
||||
end,
|
||||
softSmokeName = softSmoke
|
||||
end
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
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}
|
||||
tint = {r=0.76, g=0.76, b=0, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -26,8 +26,6 @@ local createAttackBall = physicalBall.createAttackBall
|
||||
local createRangedAttack = biterUtils.createRangedAttack
|
||||
local createMeleeAttack = biterUtils.createMeleeAttack
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
|
||||
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
|
||||
@ -68,8 +66,7 @@ function physical.addFaction()
|
||||
[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}
|
||||
tint = {r=0.1, g=0.1, b=0.1, a=1}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -268,13 +265,13 @@ function physical.addFaction()
|
||||
[2] = 1000,
|
||||
[3] = 1500,
|
||||
[4] = 3000,
|
||||
[5] = 5000,
|
||||
[6] = 7000,
|
||||
[7] = 10000,
|
||||
[8] = 14000,
|
||||
[9] = 20000,
|
||||
[10] = 30000
|
||||
},
|
||||
[5] = 7000,
|
||||
[6] = 15000,
|
||||
[7] = 22000,
|
||||
[8] = 40000,
|
||||
[9] = 60000,
|
||||
[10] = 70000
|
||||
},
|
||||
|
||||
{
|
||||
type = "attribute",
|
||||
@ -442,11 +439,10 @@ function physical.addFaction()
|
||||
},
|
||||
{
|
||||
type= "create-entity",
|
||||
entity_name = "explosion"
|
||||
entity_name = attributes.explosion
|
||||
}
|
||||
}
|
||||
end,
|
||||
softSmokeName = softSmoke
|
||||
end
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
@ -463,27 +459,40 @@ function physical.addFaction()
|
||||
[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}
|
||||
tint = {r=0.85, g=0.85, b=0.83, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
{
|
||||
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 = "attribute",
|
||||
name = "health",
|
||||
[1] = 400,
|
||||
[2] = 700,
|
||||
[3] = 1200,
|
||||
[4] = 1700,
|
||||
[5] = 2000,
|
||||
[6] = 3000,
|
||||
[7] = 4000,
|
||||
[8] = 5000,
|
||||
[9] = 7500,
|
||||
[10] = 12000
|
||||
},
|
||||
type = "attribute",
|
||||
name = "health",
|
||||
[1] = 400,
|
||||
[2] = 700,
|
||||
[3] = 1000,
|
||||
[4] = 1500,
|
||||
[5] = 4000,
|
||||
[6] = 7000,
|
||||
[7] = 15000,
|
||||
[8] = 24000,
|
||||
[9] = 40000,
|
||||
[10] = 50000
|
||||
},
|
||||
|
||||
{
|
||||
type = "resistance",
|
||||
|
@ -27,8 +27,6 @@ local createAttackBall = physicalBall.createAttackBall
|
||||
local createRangedAttack = biterUtils.createRangedAttack
|
||||
local createMeleeAttack = biterUtils.createMeleeAttack
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
local makeCloud = smokeUtils.makeCloud
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
@ -119,8 +117,7 @@ function poison.addFaction()
|
||||
resistances = {},
|
||||
|
||||
type = "biter",
|
||||
tint1 = {r=0.1, g=0.8, b=0.1, a=1},
|
||||
tint2 = {r=0.1, g=0.8, b=0.1, a=1}
|
||||
tint = {r=0.1, g=0.8, b=0.1, a=1}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -472,7 +469,6 @@ function poison.addFaction()
|
||||
attack = {
|
||||
type = "projectile",
|
||||
damageType = "poison",
|
||||
softSmokeName = softSmoke,
|
||||
pointEffects = function(attributes)
|
||||
return
|
||||
{
|
||||
@ -486,9 +482,7 @@ function poison.addFaction()
|
||||
resistances = {},
|
||||
|
||||
attackName = "poison-worm",
|
||||
tint = {r=0.15, g=0.85, b=0.15, a=0.65},
|
||||
pTint = {r=0, g=0.85, b=0, a=1},
|
||||
sTint = {r=0, g=0, b=0, a=1}
|
||||
tint = {r=0.15, g=0.85, b=0.15, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -29,8 +29,6 @@ local createProjectileAttack = biterUtils.createProjectileAttack
|
||||
|
||||
local biterAttackSounds = biterUtils.biterAttackSounds
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
local createCapsuleProjectile = droneUtils.createCapsuleProjectile
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
@ -52,8 +50,7 @@ function spawner.addFaction()
|
||||
followsPlayer = false
|
||||
},
|
||||
attack = {
|
||||
checkBuildability = true,
|
||||
softSmokeName = softSmoke
|
||||
checkBuildability = true
|
||||
},
|
||||
death = function (attack, attributes)
|
||||
return {
|
||||
@ -92,10 +89,7 @@ function spawner.addFaction()
|
||||
|
||||
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}
|
||||
tint = {r=1, g=0, b=1, a=1}
|
||||
},
|
||||
function (attack)
|
||||
return {
|
||||
@ -300,8 +294,7 @@ function spawner.addFaction()
|
||||
followsPlayer = false
|
||||
},
|
||||
attack = {
|
||||
checkBuildability = true,
|
||||
softSmokeName = softSmoke
|
||||
checkBuildability = true
|
||||
},
|
||||
death = function (attack, attributes)
|
||||
return {
|
||||
@ -340,10 +333,7 @@ function spawner.addFaction()
|
||||
|
||||
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}
|
||||
tint = {r=1, g=0, b=1, a=1}
|
||||
},
|
||||
function (attack)
|
||||
return {
|
||||
@ -565,8 +555,7 @@ function spawner.addFaction()
|
||||
resistances = {},
|
||||
|
||||
type = "biter",
|
||||
tint1 = {r=1, g=0, b=1, a=1},
|
||||
tint2 = {r=1, g=0.63, b=0, a=0.4}
|
||||
tint = {r=1, g=0, b=1, a=1}
|
||||
},
|
||||
createMeleeAttack,
|
||||
{
|
||||
@ -603,9 +592,8 @@ function spawner.addFaction()
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
softSmokeName = softSmoke,
|
||||
triggerCreated = false,
|
||||
directionOnly = true,
|
||||
directionOnly = true,
|
||||
sourceEffect = function (attributes)
|
||||
return
|
||||
{
|
||||
@ -621,9 +609,7 @@ function spawner.addFaction()
|
||||
|
||||
type = "spitter",
|
||||
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}
|
||||
tint = {r=1, g=0, b=1, a=1}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -688,7 +674,7 @@ function spawner.addFaction()
|
||||
createCapsuleProjectile(attack.name,
|
||||
attack,
|
||||
attack.name .. "-drone-rampant"),
|
||||
spitterattackanimation(attack.scale, attack.tint))
|
||||
spitterattackanimation(attack.scale, attack.tint, attack.tint))
|
||||
end,
|
||||
|
||||
{
|
||||
@ -712,15 +698,12 @@ function spawner.addFaction()
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
triggerCreated = false,
|
||||
softSmokeName = softSmoke
|
||||
triggerCreated = false
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
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}
|
||||
tint = {r=1, g=0, b=1, a=1}
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -28,9 +28,6 @@ local createAttackBall = acidBall.createAttackBall
|
||||
local createRangedAttack = biterUtils.createRangedAttack
|
||||
local createSuicideAttack = biterUtils.createSuicideAttack
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
|
||||
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
|
||||
@ -59,8 +56,7 @@ function suicide.addFaction()
|
||||
resistances = {},
|
||||
|
||||
type = "biter",
|
||||
tint1 = {r=0.56, g=0.46, b=0, a=0.65},
|
||||
tint2 = {r=0.56, g=0.46, b=0, a=0.65}
|
||||
tint = {r=0.56, g=0.46, b=0, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -178,8 +174,8 @@ function suicide.addFaction()
|
||||
[6] = 60,
|
||||
[7] = 75,
|
||||
[8] = 80,
|
||||
[9] = 100,
|
||||
[10] = 150
|
||||
[9] = 200,
|
||||
[10] = 350
|
||||
},
|
||||
|
||||
{
|
||||
@ -478,15 +474,12 @@ function suicide.addFaction()
|
||||
sticker = attributes.name .. "-sticker-rampant"
|
||||
}
|
||||
}
|
||||
end,
|
||||
softSmokeName = softSmoke
|
||||
end
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
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}
|
||||
tint = {r=0.56, g=0.46, b=0, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -358,6 +358,22 @@ local function addUnitDefaults(template, upgrades)
|
||||
[10] = 12
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
type = "attack",
|
||||
name = "radius",
|
||||
[1] = 0.5,
|
||||
[2] = 0.65,
|
||||
[3] = 0.75,
|
||||
[4] = 0.85,
|
||||
[5] = 0.95,
|
||||
[6] = 1.1,
|
||||
[7] = 1.2,
|
||||
[8] = 1.3,
|
||||
[9] = 1.4,
|
||||
[10] = 1.5
|
||||
})
|
||||
|
||||
elseif (template.type == "spitter") then
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
@ -393,6 +409,54 @@ local function addUnitDefaults(template, upgrades)
|
||||
}
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
type = "attack",
|
||||
name = "stickerDuration",
|
||||
[1] = 600,
|
||||
[2] = 650,
|
||||
[3] = 700,
|
||||
[4] = 750,
|
||||
[5] = 800,
|
||||
[6] = 850,
|
||||
[7] = 900,
|
||||
[8] = 950,
|
||||
[9] = 1000,
|
||||
[10] = 1050
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
type = "attack",
|
||||
name = "stickerMovementModifier",
|
||||
[1] = 0.8,
|
||||
[2] = 0.7,
|
||||
[3] = 0.6,
|
||||
[4] = 0.55,
|
||||
[5] = 0.50,
|
||||
[6] = 0.45,
|
||||
[7] = 0.40,
|
||||
[8] = 0.35,
|
||||
[9] = 0.30,
|
||||
[10] = 0.25
|
||||
})
|
||||
|
||||
-- pushUpgrade(upgrades,
|
||||
-- {
|
||||
-- type = "attack",
|
||||
-- name = "damagePerTick",
|
||||
-- [1] = 0.1,
|
||||
-- [2] = 0.2,
|
||||
-- [3] = 0.6,
|
||||
-- [4] = 1.2,
|
||||
-- [5] = 1.2,
|
||||
-- [6] = 1.3,
|
||||
-- [7] = 1.3,
|
||||
-- [8] = 1.3,
|
||||
-- [9] = 1.4,
|
||||
-- [10] = 1.4
|
||||
-- })
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
type = "resistance",
|
||||
@ -492,16 +556,16 @@ local function addUnitDefaults(template, upgrades)
|
||||
{
|
||||
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] = 16,
|
||||
[2] = 30,
|
||||
[3] = 45,
|
||||
[4] = 60,
|
||||
[5] = 90,
|
||||
[6] = 110,
|
||||
[7] = 130,
|
||||
[8] = 150,
|
||||
[9] = 170,
|
||||
[10] = 190
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
@ -553,6 +617,54 @@ local function addUnitDefaults(template, upgrades)
|
||||
[10] = 140
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
type = "attack",
|
||||
name = "stickerDuration",
|
||||
[1] = 600,
|
||||
[2] = 650,
|
||||
[3] = 700,
|
||||
[4] = 750,
|
||||
[5] = 800,
|
||||
[6] = 850,
|
||||
[7] = 900,
|
||||
[8] = 950,
|
||||
[9] = 1000,
|
||||
[10] = 1050
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
type = "attack",
|
||||
name = "stickerMovementModifier",
|
||||
[1] = 0.8,
|
||||
[2] = 0.7,
|
||||
[3] = 0.6,
|
||||
[4] = 0.55,
|
||||
[5] = 0.50,
|
||||
[6] = 0.45,
|
||||
[7] = 0.40,
|
||||
[8] = 0.35,
|
||||
[9] = 0.30,
|
||||
[10] = 0.25
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
type = "attack",
|
||||
name = "damagePerTick",
|
||||
[1] = 0.1,
|
||||
[2] = 0.2,
|
||||
[3] = 0.6,
|
||||
[4] = 1.2,
|
||||
[5] = 1.2,
|
||||
[6] = 1.3,
|
||||
[7] = 1.3,
|
||||
[8] = 1.3,
|
||||
[9] = 1.4,
|
||||
[10] = 1.4
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
type = "attack",
|
||||
@ -816,6 +928,54 @@ local function addWormDefaults(template, upgrades)
|
||||
[10] = 0.029
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
type = "attack",
|
||||
name = "stickerDuration",
|
||||
[1] = 1200,
|
||||
[2] = 1250,
|
||||
[3] = 1300,
|
||||
[4] = 1350,
|
||||
[5] = 1400,
|
||||
[6] = 1450,
|
||||
[7] = 1500,
|
||||
[8] = 1550,
|
||||
[9] = 1600,
|
||||
[10] = 1650
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
type = "attack",
|
||||
name = "stickerMovementModifier",
|
||||
[1] = 0.8,
|
||||
[2] = 0.7,
|
||||
[3] = 0.6,
|
||||
[4] = 0.55,
|
||||
[5] = 0.50,
|
||||
[6] = 0.45,
|
||||
[7] = 0.40,
|
||||
[8] = 0.35,
|
||||
[9] = 0.30,
|
||||
[10] = 0.25
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
type = "attack",
|
||||
name = "damagePerTick",
|
||||
[1] = 0.1,
|
||||
[2] = 0.2,
|
||||
[3] = 0.6,
|
||||
[4] = 1.2,
|
||||
[5] = 1.2,
|
||||
[6] = 1.3,
|
||||
[7] = 1.3,
|
||||
[8] = 1.3,
|
||||
[9] = 1.4,
|
||||
[10] = 1.4
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
{
|
||||
type = "attribute",
|
||||
@ -930,16 +1090,16 @@ local function addWormDefaults(template, upgrades)
|
||||
{
|
||||
type = "attack",
|
||||
name = "damage",
|
||||
[1] = 12,
|
||||
[2] = 20,
|
||||
[3] = 25,
|
||||
[4] = 30,
|
||||
[5] = 35,
|
||||
[6] = 40,
|
||||
[7] = 50,
|
||||
[8] = 60,
|
||||
[9] = 70,
|
||||
[10] = 80
|
||||
[1] = 36,
|
||||
[2] = 45,
|
||||
[3] = 85,
|
||||
[4] = 135,
|
||||
[5] = 155,
|
||||
[6] = 175,
|
||||
[7] = 195,
|
||||
[8] = 215,
|
||||
[9] = 235,
|
||||
[10] = 255
|
||||
})
|
||||
|
||||
pushUpgrade(upgrades,
|
||||
@ -1185,6 +1345,9 @@ local function scaleAttributes (upgrade, entity)
|
||||
if (upgrade.name == "stickerDamagePerTick") then
|
||||
entity.attack[upgrade.name] = entity.attack[upgrade.name] * settings.startup["rampant-unitSpitterDamageScaler"].value
|
||||
end
|
||||
if (upgrade.name == "damagePerTick") then
|
||||
entity.attack[upgrade.name] = entity.attack[upgrade.name] * settings.startup["rampant-unitSpitterDamageScaler"].value
|
||||
end
|
||||
if (upgrade.name == "range") then
|
||||
entity.attack[upgrade.name] = entity.attack[upgrade.name] * settings.startup["rampant-unitSpitterRangeScaler"].value
|
||||
end
|
||||
@ -1192,6 +1355,9 @@ local function scaleAttributes (upgrade, entity)
|
||||
if (upgrade.name == "damage") then
|
||||
entity.attack[upgrade.name] = entity.attack[upgrade.name] * settings.startup["rampant-unitDroneDamageScaler"].value
|
||||
end
|
||||
if (upgrade.name == "damagePerTick") then
|
||||
entity.attack[upgrade.name] = entity.attack[upgrade.name] * settings.startup["rampant-unitDroneDamageScaler"].value
|
||||
end
|
||||
if (upgrade.name == "range") then
|
||||
entity.attack[upgrade.name] = entity.attack[upgrade.name] * settings.startup["rampant-unitDroneRangeScaler"].value
|
||||
end
|
||||
@ -1199,6 +1365,9 @@ local function scaleAttributes (upgrade, entity)
|
||||
if (upgrade.name == "damage") then
|
||||
entity.attack[upgrade.name] = entity.attack[upgrade.name] * settings.startup["rampant-unitWormDamageScaler"].value
|
||||
end
|
||||
if (upgrade.name == "damagePerTick") then
|
||||
entity.attack[upgrade.name] = entity.attack[upgrade.name] * settings.startup["rampant-unitWormDamageScaler"].value
|
||||
end
|
||||
if (upgrade.name == "range") then
|
||||
entity.attack[upgrade.name] = entity.attack[upgrade.name] * settings.startup["rampant-unitWormRangeScaler"].value
|
||||
end
|
||||
@ -1311,35 +1480,6 @@ local function generateApperance(unit, tier)
|
||||
unit.attack.tint = tint
|
||||
end
|
||||
end
|
||||
if unit.tint1 and unit.tint2 then
|
||||
local tint1 = calculateRGBa(unit.tint1, tier)
|
||||
local tint2 = calculateRGBa(unit.tint2, tier)
|
||||
|
||||
unit.attributes.tint1 = tint1
|
||||
unit.attributes.tint2 = tint2
|
||||
|
||||
if unit.attack then
|
||||
if scale then
|
||||
unit.attack.scale = scale
|
||||
end
|
||||
unit.attack.tint1 = tint1
|
||||
unit.attack.tint2 = tint2
|
||||
end
|
||||
end
|
||||
if unit.attack then
|
||||
if unit.pTint then
|
||||
unit.attack.pTint = calculateRGBa(unit.pTint, tier)
|
||||
end
|
||||
if unit.lTint then
|
||||
unit.attack.lTint = calculateRGBa(unit.lTint, tier)
|
||||
end
|
||||
if unit.sTint then
|
||||
unit.attack.sTint = calculateRGBa(unit.sTint, tier)
|
||||
end
|
||||
if unit.smTint then
|
||||
unit.attack.smTint = calculateRGBa(unit.smTint, tier)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function swarmUtils.buildUnits(template, attackGenerator, upgradeTable, variations, tiers)
|
||||
@ -1380,11 +1520,11 @@ function swarmUtils.buildUnits(template, attackGenerator, upgradeTable, variatio
|
||||
unit.attributes,
|
||||
attackGenerator(unit.attack, unit.attributes, t),
|
||||
unit.resistances)
|
||||
elseif (unit.type == "drone") then
|
||||
elseif (unit.type == "drone") then
|
||||
entity = makeDrone(unit.name,
|
||||
unit.attributes,
|
||||
unit.resistances,
|
||||
attackGenerator(unit.attack),
|
||||
attackGenerator(unit.attack, unit.attributes, t),
|
||||
unit.death(unit.attack, unit.attributes, t))
|
||||
end
|
||||
|
||||
|
@ -26,9 +26,6 @@ local createAttackBall = acidBall.createAttackBall
|
||||
local createRangedAttack = biterUtils.createRangedAttack
|
||||
local createMeleeAttack = biterUtils.createMeleeAttack
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
local makeSpawnerAlienLootTable = biterUtils.makeSpawnerAlienLootTable
|
||||
local makeWormAlienLootTable = biterUtils.makeWormAlienLootTable
|
||||
@ -65,8 +62,7 @@ function troll.addFaction()
|
||||
[9] = 1.5,
|
||||
[10] = 1.6
|
||||
},
|
||||
tint1 = {r=0.56, g=0.46, b=0.42, a=0.65},
|
||||
tint2 = {r=1, g=0.63, b=0, a=0.4}
|
||||
tint = {r=0.56, g=0.46, b=0.42, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -235,13 +231,13 @@ function troll.addFaction()
|
||||
[2] = 1000,
|
||||
[3] = 1500,
|
||||
[4] = 3000,
|
||||
[5] = 5000,
|
||||
[6] = 7000,
|
||||
[7] = 10000,
|
||||
[8] = 14000,
|
||||
[9] = 20000,
|
||||
[10] = 30000
|
||||
},
|
||||
[5] = 7000,
|
||||
[6] = 15000,
|
||||
[7] = 22000,
|
||||
[8] = 40000,
|
||||
[9] = 60000,
|
||||
[10] = 70000
|
||||
},
|
||||
|
||||
{
|
||||
type = "resistance",
|
||||
@ -387,7 +383,7 @@ function troll.addFaction()
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
softSmokeName = softSmoke
|
||||
directionOnly = true
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
@ -405,9 +401,7 @@ function troll.addFaction()
|
||||
[10] = 1.6
|
||||
},
|
||||
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}
|
||||
tint = {r=0.56, g=0.46, b=0.42, a=0.65}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -438,17 +432,17 @@ function troll.addFaction()
|
||||
{
|
||||
type = "attribute",
|
||||
name = "health",
|
||||
[1] = 20,
|
||||
[2] = 100,
|
||||
[3] = 400,
|
||||
[4] = 700,
|
||||
[5] = 1500,
|
||||
[6] = 2000,
|
||||
[7] = 3000,
|
||||
[8] = 6000,
|
||||
[9] = 5000,
|
||||
[10] = 9000
|
||||
},
|
||||
[1] = 700,
|
||||
[2] = 1000,
|
||||
[3] = 1500,
|
||||
[4] = 3000,
|
||||
[5] = 7000,
|
||||
[6] = 15000,
|
||||
[7] = 22000,
|
||||
[8] = 40000,
|
||||
[9] = 60000,
|
||||
[10] = 70000
|
||||
},
|
||||
|
||||
{
|
||||
type = "resistance",
|
||||
@ -695,7 +689,8 @@ function troll.addFaction()
|
||||
return createRangedAttack(attributes,
|
||||
createAttackBall(attributes),
|
||||
spitterattackanimation(attributes.scale,
|
||||
attributes.tint))
|
||||
attributes.tint,
|
||||
attributes.tint))
|
||||
end,
|
||||
|
||||
{
|
||||
@ -718,7 +713,19 @@ function troll.addFaction()
|
||||
attributes = {},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
softSmokeName = softSmoke
|
||||
damageType = "physical",
|
||||
pointEffects = function (attributes)
|
||||
return {
|
||||
{
|
||||
type= "create-entity",
|
||||
entity_name = "small-scorchmark"
|
||||
},
|
||||
{
|
||||
type= "create-entity",
|
||||
entity_name = attributes.explosion
|
||||
}
|
||||
}
|
||||
end
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
@ -735,26 +742,40 @@ function troll.addFaction()
|
||||
[10] = 1.6
|
||||
},
|
||||
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}
|
||||
tint = {r=0.56, g=0.46, b=0.42, a=0.65}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
{
|
||||
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 = "attribute",
|
||||
name = "health",
|
||||
[1] = 400,
|
||||
[2] = 700,
|
||||
[3] = 1000,
|
||||
[4] = 1500,
|
||||
[5] = 1800,
|
||||
[6] = 2000,
|
||||
[7] = 3000,
|
||||
[8] = 6000,
|
||||
[9] = 9500,
|
||||
[10] = 12500
|
||||
},
|
||||
type = "attribute",
|
||||
name = "health",
|
||||
[1] = 400,
|
||||
[2] = 700,
|
||||
[3] = 1000,
|
||||
[4] = 1500,
|
||||
[5] = 4000,
|
||||
[6] = 7000,
|
||||
[7] = 15000,
|
||||
[8] = 24000,
|
||||
[9] = 40000,
|
||||
[10] = 50000
|
||||
},
|
||||
|
||||
{
|
||||
type = "attribute",
|
||||
|
@ -1,6 +1,7 @@
|
||||
-- imports
|
||||
|
||||
local acidBall = require("utils/AttackBall")
|
||||
local attackBall = require("utils/AttackBall")
|
||||
local streamUtils = require("utils/StreamUtils")
|
||||
local droneUtils = require("utils/DroneUtils")
|
||||
local biterUtils = require("utils/BiterUtils")
|
||||
local swarmUtils = require("SwarmUtils")
|
||||
@ -24,13 +25,12 @@ local WASP_WORM_VARIATIONS = constants.WASP_WORM_VARIATIONS
|
||||
local buildUnitSpawner = swarmUtils.buildUnitSpawner
|
||||
local buildWorm = swarmUtils.buildWorm
|
||||
local buildUnits = swarmUtils.buildUnits
|
||||
local createAttackBall = acidBall.createAttackBall
|
||||
local createAttackBall = attackBall.createAttackBall
|
||||
local makeAcidStream = streamUtils.makeAcidStream
|
||||
local createProjectileAttack = biterUtils.createProjectileAttack
|
||||
|
||||
local biterAttackSounds = biterUtils.biterAttackSounds
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
|
||||
local createCapsuleProjectile = droneUtils.createCapsuleProjectile
|
||||
|
||||
local makeUnitAlienLootTable = biterUtils.makeUnitAlienLootTable
|
||||
@ -52,8 +52,7 @@ function wasp.addFaction()
|
||||
followsPlayer = true
|
||||
},
|
||||
attack = {
|
||||
type = "stream",
|
||||
softSmokeName = softSmoke
|
||||
|
||||
},
|
||||
death = function (attributes)
|
||||
return {
|
||||
@ -85,35 +84,11 @@ function wasp.addFaction()
|
||||
|
||||
type = "drone",
|
||||
attackName = "wasp-drone",
|
||||
tint = {r=1, g=1, b=0, a=1},
|
||||
pTint = {r=0, g=1, b=1, a=0.5},
|
||||
sTint = {r=0, g=1, b=1, a=0.5},
|
||||
dTint = {r=0, g=0, b=1, a=1}
|
||||
tint = {r=1, g=1, b=0, a=1}
|
||||
},
|
||||
function (attack)
|
||||
return {
|
||||
type = "projectile",
|
||||
ammo_category = "biological",
|
||||
cooldown = attack.cooldown or 20,
|
||||
projectile_center = {0, 1},
|
||||
projectile_creation_distance = 0.6,
|
||||
range = attack.range or 15,
|
||||
sound = biterAttackSounds(),
|
||||
ammo_type =
|
||||
{
|
||||
category = "biological",
|
||||
action =
|
||||
{
|
||||
type = "direct",
|
||||
action_delivery =
|
||||
{
|
||||
type = "stream",
|
||||
stream = createAttackBall(attack),
|
||||
duration = 160
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function (attack, attributes, tier)
|
||||
return createProjectileAttack(attack,
|
||||
createAttackBall(attack))
|
||||
end,
|
||||
{
|
||||
{
|
||||
@ -208,16 +183,16 @@ function wasp.addFaction()
|
||||
{
|
||||
type = "attack",
|
||||
name = "rangeFromPlayer",
|
||||
[1] = 18,
|
||||
[2] = 18,
|
||||
[3] = 19,
|
||||
[4] = 19,
|
||||
[5] = 20,
|
||||
[6] = 20,
|
||||
[7] = 21,
|
||||
[8] = 21,
|
||||
[9] = 22,
|
||||
[10] = 22
|
||||
[1] = 24,
|
||||
[2] = 24,
|
||||
[3] = 25,
|
||||
[4] = 25,
|
||||
[5] = 26,
|
||||
[6] = 26,
|
||||
[7] = 27,
|
||||
[8] = 27,
|
||||
[9] = 28,
|
||||
[10] = 28
|
||||
},
|
||||
|
||||
{
|
||||
@ -262,8 +237,7 @@ function wasp.addFaction()
|
||||
attributes = {
|
||||
},
|
||||
attack = {
|
||||
type = "stream",
|
||||
softSmokeName = softSmoke
|
||||
|
||||
},
|
||||
death = function (attributes)
|
||||
return {
|
||||
@ -295,10 +269,7 @@ function wasp.addFaction()
|
||||
|
||||
type = "drone",
|
||||
attackName = "wasp-worm-drone",
|
||||
tint = {r=1, g=1, b=0, a=1},
|
||||
pTint = {r=0, g=1, b=1, a=0.5},
|
||||
sTint = {r=0, g=1, b=1, a=0.5},
|
||||
dTint = {r=0, g=0, b=1, a=1}
|
||||
tint = {r=1, g=1, b=0, a=1}
|
||||
},
|
||||
function (attack)
|
||||
return {
|
||||
@ -318,7 +289,7 @@ function wasp.addFaction()
|
||||
action_delivery =
|
||||
{
|
||||
type = "stream",
|
||||
stream = createAttackBall(attack),
|
||||
stream = makeAcidStream(attack),
|
||||
duration = 160
|
||||
}
|
||||
}
|
||||
@ -479,16 +450,13 @@ function wasp.addFaction()
|
||||
attack = {
|
||||
type = "projectile",
|
||||
directionOnly = true,
|
||||
collisionBox = {{0,0}, {0,0}},
|
||||
softSmokeName = softSmoke
|
||||
collisionBox = {{0,0}, {0,0}}
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
type = "spitter",
|
||||
attackName = "wasp-drone",
|
||||
tint = {r=1, g=1, b=0, a=1},
|
||||
pTint = {r=0, g=1, b=1, a=0.5},
|
||||
sTint = {r=0, g=1, b=1, a=0.5}
|
||||
tint = {r=1, g=1, b=0, a=1}
|
||||
},
|
||||
|
||||
unitSpawner = {
|
||||
@ -530,7 +498,7 @@ function wasp.addFaction()
|
||||
createCapsuleProjectile(attributes.name,
|
||||
attributes,
|
||||
attributes.name .. "-drone-rampant"),
|
||||
spitterattackanimation(attributes.scale, attributes.tint))
|
||||
spitterattackanimation(attributes.scale, attributes.tint, attributes.tint))
|
||||
end,
|
||||
|
||||
{
|
||||
@ -554,15 +522,12 @@ function wasp.addFaction()
|
||||
},
|
||||
attack = {
|
||||
type = "projectile",
|
||||
collisionBox = {{0,0}, {0,0}},
|
||||
softSmokeName = softSmoke
|
||||
collisionBox = {{0,0}, {0,0}}
|
||||
},
|
||||
resistances = {},
|
||||
|
||||
attackName = "wasp-worm-drone",
|
||||
tint = {r=1, g=1, b=0, a=1},
|
||||
pTint = {r=0, g=1, b=1, a=0.5},
|
||||
sTint = {r=0, g=1, b=1, a=0.5}
|
||||
tint = {r=1, g=1, b=0, a=1}
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -1,41 +1,32 @@
|
||||
-- import
|
||||
|
||||
local fireUtils = require("FireUtils")
|
||||
local stickerUtils = require("StickerUtils")
|
||||
local streamUtils = require("StreamUtils")
|
||||
local projectileUtils = require("ProjectileUtils")
|
||||
|
||||
-- constants
|
||||
|
||||
local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].value
|
||||
local DISALLOW_FRIENDLY_FIRE = settings.startup["rampant-disallowFriendlyFire"].value
|
||||
|
||||
-- imported functions
|
||||
|
||||
local makeStream = streamUtils.makeStream
|
||||
local makeSticker = stickerUtils.makeSticker
|
||||
local makeProjectile = projectileUtils.makeProjectile
|
||||
local makeAcidSplashFire = fireUtils.makeAcidSplashFire
|
||||
|
||||
-- dumb acid projectiles
|
||||
local AttackBall = {}
|
||||
|
||||
stickerUtils.makeSticker({
|
||||
name = "the-sticker"
|
||||
|
||||
})
|
||||
|
||||
function AttackBall.createAttackBall(attributes)
|
||||
|
||||
if (attributes.type == "stream") or FORCE_OLD_PROJECTILES then
|
||||
|
||||
elseif attributes.damage and (attributes.type == "projectile") then
|
||||
attributes.damage = attributes.damage * 2.7
|
||||
end
|
||||
|
||||
|
||||
local templateDamage = { amount = attributes.damage, type = attributes.damageType or "acid" }
|
||||
local templateArea = {
|
||||
type = "area",
|
||||
radius = attributes.radius,
|
||||
force = (DISALLOW_FRIENDLY_FIRE and "enemy") or attributes.force or nil,
|
||||
ignore_collision_condition = true,
|
||||
action_delivery = (attributes.areaActionDelivery and attributes.areaActionDelivery(attributes)) or
|
||||
{
|
||||
{
|
||||
@ -58,15 +49,34 @@ function AttackBall.createAttackBall(attributes)
|
||||
action_delivery = {
|
||||
type = "instant",
|
||||
target_effects = (attributes.pointEffects and attributes.pointEffects(attributes)) or
|
||||
{
|
||||
{
|
||||
type= "create-entity",
|
||||
entity_name = attributes.crater or "acid-splash-purple"
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = templateDamage
|
||||
}
|
||||
{
|
||||
{
|
||||
type="create-fire",
|
||||
entity_name = makeAcidSplashFire(attributes, attributes.stickerName or makeSticker(attributes)),
|
||||
initial_ground_flame_count = 1
|
||||
},
|
||||
{
|
||||
type = "play-sound",
|
||||
sound =
|
||||
{
|
||||
{
|
||||
filename = "__base__/sound/creatures/projectile-acid-burn-1.ogg",
|
||||
volume = 0.8
|
||||
},
|
||||
{
|
||||
filename = "__base__/sound/creatures/projectile-acid-burn-2.ogg",
|
||||
volume = 0.8
|
||||
},
|
||||
{
|
||||
filename = "__base__/sound/creatures/projectile-acid-burn-long-1.ogg",
|
||||
volume = 0.8
|
||||
},
|
||||
{
|
||||
filename = "__base__/sound/creatures/projectile-acid-burn-long-2.ogg",
|
||||
volume = 0.8
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -74,19 +84,18 @@ function AttackBall.createAttackBall(attributes)
|
||||
|
||||
local name
|
||||
local template
|
||||
if (attributes.type == "stream") or FORCE_OLD_PROJECTILES then
|
||||
if (attributes.type == "stream") then
|
||||
template = {
|
||||
name = attributes.name,
|
||||
particleTint = attributes.pTint,
|
||||
spineAnimationTint = attributes.sTint,
|
||||
softSmokeName = attributes.softSmokeName,
|
||||
tint = attributes.tint,
|
||||
particleVertialAcceleration = attributes.particleVertialAcceleration,
|
||||
particleHoizontalSpeed = attributes.particleHoizontalSpeed,
|
||||
particleHoizontalSpeedDeviation = attributes.particleHoizontalSpeedDeviation,
|
||||
actions = templateActions
|
||||
actions = templateActions,
|
||||
scale = attributes.scale
|
||||
}
|
||||
name = makeStream(template)
|
||||
elseif (attributes.type == "projectile") then
|
||||
else
|
||||
name = makeProjectile(attributes.name,
|
||||
attributes,
|
||||
templateActions)
|
||||
@ -95,25 +104,17 @@ function AttackBall.createAttackBall(attributes)
|
||||
return name
|
||||
end
|
||||
|
||||
function AttackBall.generateLegacy()
|
||||
AttackBall.createAttackBall({name="acid-ball", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=4, radius=1.2})
|
||||
AttackBall.createAttackBall({name="acid-ball-1", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=9, radius=1.3})
|
||||
AttackBall.createAttackBall({name="acid-ball-2", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=14, radius=1.4})
|
||||
AttackBall.createAttackBall({name="acid-ball-3", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=23, radius=1.5})
|
||||
AttackBall.createAttackBall({name="wide-acid-ball", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=18, radius=3})
|
||||
AttackBall.createAttackBall({name="acid-ball-4", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=25, radius=1.75})
|
||||
AttackBall.createAttackBall({name="acid-ball-5", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=50, radius=2})
|
||||
AttackBall.createAttackBall({name="acid-ball-6", type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=70, radius=2.5})
|
||||
if not FORCE_OLD_PROJECTILES then
|
||||
AttackBall.createAttackBall({name="acid-ball-direction", directionOnly=true, type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=4, radius=1.2})
|
||||
AttackBall.createAttackBall({name="acid-ball-1-direction", directionOnly=true, type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=9, radius=1.3})
|
||||
AttackBall.createAttackBall({name="acid-ball-2-direction", directionOnly=true, type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=14, radius=1.4})
|
||||
AttackBall.createAttackBall({name="acid-ball-3-direction", directionOnly=true, type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=23, radius=1.5})
|
||||
AttackBall.createAttackBall({name="wide-acid-ball-direction", directionOnly=true, type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=18, radius=3})
|
||||
AttackBall.createAttackBall({name="acid-ball-4-direction", directionOnly=true, type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=25, radius=1.75})
|
||||
AttackBall.createAttackBall({name="acid-ball-5-direction", directionOnly=true, type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=50, radius=2})
|
||||
AttackBall.createAttackBall({name="acid-ball-6-direction", directionOnly=true, type="projectile", pTint={r=0, g=1, b=1, a=0.5}, sTint={r=0, g=1, b=1, a=0.5}, softSmokeName="the-soft-smoke-rampant", damage=70, radius=2.5})
|
||||
end
|
||||
function AttackBall.generateVanilla()
|
||||
AttackBall.createAttackBall({name="acid-ball", scale=0.5, directionOnly=true, type="projectile", tint={r=0, g=1, b=0.3, a=0.5}, damage=16, damagePerTick=0.1, stickerName="acid-sticker-small", radius=1.2})
|
||||
AttackBall.createAttackBall({name="acid-ball-1", scale=0.65, directionOnly=true, type="projectile", tint={r=0, g=1, b=0.3, a=0.5}, damage=32, damagePerTick=0.2, stickerName="acid-sticker-medium", radius=1.3})
|
||||
|
||||
AttackBall.createAttackBall({name="acid-ball-2-direction", scale=0.85, directionOnly=true, type="projectile", tint={r=0, g=1, b=0.3, a=0.5}, damage=60, damagePerTick=0.6, stickerName="acid-sticker-big", radius=1.4})
|
||||
AttackBall.createAttackBall({name="acid-ball-3-direction", scale=1.0, directionOnly=true, type="projectile", tint={r=0, g=1, b=0.3, a=0.5}, damage=90, damagePerTick=1.2, stickerName="acid-sticker-behemoth", radius=1.5})
|
||||
|
||||
AttackBall.createAttackBall({name="acid-ball-2", scale=0.85, type="projectile", tint={r=0, g=1, b=0.3, a=0.5}, damage=36, damagePerTick=0.2, stickerName="acid-sticker-small", radius=1.4})
|
||||
AttackBall.createAttackBall({name="acid-ball-3", scale=1.0, type="projectile", tint={r=0, g=1, b=0.3, a=0.5}, damage=45, damagePerTick=0.6, stickerName="acid-sticker-medium", radius=1.5})
|
||||
AttackBall.createAttackBall({name="acid-ball-4", scale=1.2, type="projectile", tint={r=0, g=1, b=0.3, a=0.5}, damage=85, damagePerTick=1.2, stickerName="acid-sticker-big", radius=1.75})
|
||||
AttackBall.createAttackBall({name="acid-ball-5", scale=1.3, type="projectile", tint={r=0, g=1, b=0.3, a=0.5}, damage=135, damagePerTick=1.5, stickerName="acid-sticker-behemoth", radius=2})
|
||||
end
|
||||
|
||||
return AttackBall
|
||||
|
@ -1,780 +0,0 @@
|
||||
-- bobs replacement attacks
|
||||
|
||||
local attacks = {}
|
||||
|
||||
-- import
|
||||
|
||||
local fireUtils = require("FireUtils")
|
||||
local stickerUtils = require("StickerUtils")
|
||||
local attackBall = require("AttackBall")
|
||||
|
||||
-- constants
|
||||
|
||||
local DISALLOW_FRIENDLY_FIRE = settings.startup["rampant-disallowFriendlyFire"].value
|
||||
|
||||
local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].value
|
||||
|
||||
-- imported functions
|
||||
|
||||
local makeSpreadEffect = fireUtils.makeSpreadEffect
|
||||
local makeFire = fireUtils.makeFire
|
||||
local makeSticker = stickerUtils.makeSticker
|
||||
|
||||
local createAttackBall = attackBall.createAttackBall
|
||||
|
||||
-- module code
|
||||
|
||||
local softSmoke = "the-soft-smoke-rampant"
|
||||
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
|
||||
|
||||
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",
|
||||
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 = "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
|
||||
}
|
||||
)
|
||||
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 =
|
||||
{
|
||||
type = "instant",
|
||||
target_effects =
|
||||
{
|
||||
type = "damage",
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
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 = "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 = 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 =
|
||||
{
|
||||
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
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
return attacks
|
@ -25,15 +25,12 @@ function attackFlame.createAttackFlame(attributes)
|
||||
|
||||
local spawnEntityName = makeSpreadEffect({
|
||||
name = attributes.name,
|
||||
smokeWithoutGlowName = attributes.smokeWithoutGlowName,
|
||||
fireDamagePerTick = attributes.fireDamagePerTick,
|
||||
fireDamagePerTickType = attributes.fireDamagePerTickType,
|
||||
})
|
||||
local fireName = makeFire({
|
||||
name = attributes.name,
|
||||
fireTint = attributes.fTint or {r=0, g=0.9, b=0, a=0.5},
|
||||
smokeWithGlowName = attributes.smokeWithGlowName,
|
||||
smokeAddingFuelName = attributes.smokeAddingFuelName,
|
||||
fireTint = attributes.tint or {r=0, g=0.9, b=0, a=0.5},
|
||||
spawnEntityName = spawnEntityName,
|
||||
fireDamagePerTick = attributes.fireDamagePerTick,
|
||||
fireDamagePerTickType = attributes.fireDamagePerTickType,
|
||||
@ -44,23 +41,18 @@ function attackFlame.createAttackFlame(attributes)
|
||||
local stickerName = makeSticker({
|
||||
name = attributes.name,
|
||||
spawnEntityName = spawnEntityName,
|
||||
stickerAnimation = attributes.stickerAnimation,
|
||||
stickerDuration = attributes.stickerDuration,
|
||||
stickerDamagePerTick = attributes.stickerDamagePerTick,
|
||||
stickerDamagePerTick2 = attributes.stickerDamagePerTick2,
|
||||
stickerDamagePerTickType = attributes.stickerDamagePerTickType,
|
||||
stickerDamagePerTickType2 = attributes.stickerDamagePerTickType2,
|
||||
stickerMovementModifier = attributes.stickerMovementModifier,
|
||||
fireSpreadRadius = attributes.fireSpreadRadius
|
||||
})
|
||||
|
||||
return makeStream({
|
||||
name = attributes.name,
|
||||
particleTint = attributes.pTint or {r=0, g=1, b=1, a=0.5},
|
||||
spineAnimationTint = attributes.sTint or {r=0, g=1, b=1, a=0.5},
|
||||
softSmokeTint = attributes.smTint or makeColor(0.3, 0.75, 0.3, 0.1),
|
||||
softSmokeName = attributes.softSmokeName,
|
||||
tint = attributes.tint or {r=0, g=1, b=1, a=0.5},
|
||||
particleTimeout = attributes.particleTimeout,
|
||||
scale = attributes.scale,
|
||||
actions = {
|
||||
{
|
||||
type = "area",
|
||||
|
@ -17,7 +17,7 @@ function beamUtils.makeBubble(attributes)
|
||||
frame_count = 5
|
||||
}
|
||||
},
|
||||
light = {intensity = 1, size = 10, color = attributes.lTint or {r = 1.0, g = 1.0, b = 1.0}},
|
||||
light = {intensity = 1, size = 10, color = attributes.tint or {r = 1.0, g = 1.0, b = 1.0}},
|
||||
smoke = "smoke-fast",
|
||||
smoke_count = 2,
|
||||
smoke_slow_down_factor = 1
|
||||
@ -56,7 +56,7 @@ function beamUtils.makeLaser(attributes)
|
||||
animation =
|
||||
{
|
||||
filename = "__base__/graphics/entity/laser/laser-to-tint-medium.png",
|
||||
tint = attributes.lTint or {r=1.0, g=0.0, b=0.0},
|
||||
tint = attributes.tint or {r=1.0, g=0.0, b=0.0},
|
||||
frame_count = 1,
|
||||
width = 12,
|
||||
height = 33,
|
||||
|
@ -3,7 +3,7 @@ local biterFunctions = {}
|
||||
local unitSpawnerUtils = require("UnitSpawnerUtils")
|
||||
local unitUtils = require("UnitUtils")
|
||||
|
||||
local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].value
|
||||
-- local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].value
|
||||
|
||||
local spitter_alternative_attacking_animation_sequence = unitUtils.spitter_alternative_attacking_animation_sequence
|
||||
local spawner_integration = unitSpawnerUtils.spawner_integration
|
||||
@ -26,7 +26,7 @@ function biterFunctions.makeSpitterCorpse(attributes)
|
||||
flags = {"placeable-neutral", "placeable-off-grid", "building-direction-8-way", "not-on-map"},
|
||||
}
|
||||
|
||||
corpse.animation = spitterdyinganimation(attributes.scale, attributes.tint1, attributes.tint2)
|
||||
corpse.animation = spitterdyinganimation(attributes.scale, attributes.tint, attributes.tint)
|
||||
corpse.dying_speed = 0.04
|
||||
corpse.time_before_removed = 15 * 60 * 60
|
||||
corpse.direction_shuffle = { { 1, 2, 3, 16 }, { 4, 5, 6, 7 }, { 8, 9, 10, 11 }, { 12, 13, 14, 15 } }
|
||||
@ -93,7 +93,7 @@ function biterFunctions.makeBiterCorpse(attributes)
|
||||
flags = {"placeable-neutral", "placeable-off-grid", "building-direction-8-way", "not-repairable", "not-on-map"}
|
||||
}
|
||||
|
||||
corpse.animation = biterdieanimation(attributes.scale, attributes.tint1, attributes.tint2)
|
||||
corpse.animation = biterdieanimation(attributes.scale, attributes.tint, attributes.tint)
|
||||
corpse.dying_speed = 0.04
|
||||
corpse.time_before_removed = 15 * 60 * 60
|
||||
corpse.direction_shuffle = { { 1, 2, 3, 16 }, { 4, 5, 6, 7 }, { 8, 9, 10, 11 }, { 12, 13, 14, 15 } }
|
||||
@ -233,9 +233,9 @@ function biterFunctions.makeBiter(name, biterAttributes, biterAttack, biterResis
|
||||
distraction_cooldown = biterAttributes.distractionCooldown or 300,
|
||||
corpse = biterAttributes.corpse,
|
||||
dying_explosion = biterAttributes.explosion,
|
||||
dying_sound = make_biter_dying_sounds(1.0),
|
||||
working_sound = make_biter_calls(0.7),
|
||||
run_animation = biterrunanimation(biterAttributes.scale, biterAttributes.tint1, biterAttributes.tint2),
|
||||
dying_sound = make_biter_dying_sounds(biterAttributes.scale),
|
||||
working_sound = make_biter_calls(biterAttributes.scale),
|
||||
run_animation = biterrunanimation(biterAttributes.scale, biterAttributes.tint, biterAttributes.tint),
|
||||
biter_ai_settings = { destroy_when_commands_fail = true, allow_try_return_to_spawner = true }
|
||||
}
|
||||
if biterAttributes.collisionMask then
|
||||
@ -281,7 +281,7 @@ function biterFunctions.makeSpitter(name, biterAttributes, biterAttack, biterRes
|
||||
dying_explosion = biterAttributes.explosion,
|
||||
dying_sound = make_spitter_dying_sounds(0.8),
|
||||
working_sound = make_biter_calls(0.7),
|
||||
run_animation = spitterrunanimation(biterAttributes.scale, biterAttributes.tint),
|
||||
run_animation = spitterrunanimation(biterAttributes.scale, biterAttributes.tint, biterAttributes.tint),
|
||||
biter_ai_settings = { destroy_when_commands_fail = true, allow_try_return_to_spawner = true }
|
||||
}
|
||||
if biterAttributes.collisionMask then
|
||||
@ -383,7 +383,7 @@ function biterFunctions.makeWorm(name, attributes, attack, wormResistances)
|
||||
subgroup="enemies",
|
||||
max_health = attributes.health,
|
||||
loot = attributes.loot,
|
||||
shooting_cursor_size = 3.5 * attributes.scale,
|
||||
shooting_cursor_size = 3.5 * attributes.scale,
|
||||
resistances = resistances,
|
||||
healing_per_tick = attributes.healing or 0.01,
|
||||
collision_box = {{-1.1 * attributes.scale, -1.0 * attributes.scale}, {1.1 * attributes.scale, 1.0 * attributes.scale}},
|
||||
@ -447,7 +447,7 @@ function biterFunctions.createSuicideAttack(attributes, blastWave)
|
||||
category = "biological"
|
||||
},
|
||||
sound = make_biter_roars(0.5),
|
||||
animation = biterattackanimation(attributes.scale, attributes.tint1, attributes.tint2)
|
||||
animation = biterattackanimation(attributes.scale, attributes.tint, attributes.tint)
|
||||
}
|
||||
|
||||
if attributes.nuclear then
|
||||
@ -727,16 +727,29 @@ function biterFunctions.makeUnitAlienLootTable(name)
|
||||
return biterLoot
|
||||
end
|
||||
|
||||
function biterFunctions.findRunScale(entity)
|
||||
return entity.run_animation.layers[1].scale
|
||||
end
|
||||
|
||||
function biterFunctions.findRange(entity)
|
||||
return entity.attack_parameters.range
|
||||
end
|
||||
|
||||
local function findKey(key, obj)
|
||||
for k,v in pairs(obj) do
|
||||
if (k == key) and v then
|
||||
return v
|
||||
elseif (type(v) == "table") then
|
||||
local val = findKey(key, v)
|
||||
if val then
|
||||
return val
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function biterFunctions.findRunScale(entity)
|
||||
return findKey("scale", entity.run_animation.layers)
|
||||
end
|
||||
|
||||
function biterFunctions.findTint(entity)
|
||||
return entity.run_animation.layers[2].tint
|
||||
return findKey("tint", entity.run_animation.layers)
|
||||
end
|
||||
|
||||
function biterFunctions.acidSplashSounds()
|
||||
@ -768,13 +781,13 @@ function biterFunctions.createElectricAttack(attributes, electricBeam, animation
|
||||
return
|
||||
{
|
||||
type = "beam",
|
||||
ammo_category = "combat-robot-beam",
|
||||
ammo_category = "biological",
|
||||
cooldown = attributes.cooldown or 20,
|
||||
min_attack_distance = (attributes.range and (attributes.range - 2)) or 15,
|
||||
range = (attributes.range and (attributes.range + 2)) or 15,
|
||||
ammo_type =
|
||||
{
|
||||
category = "combat-robot-beam",
|
||||
category = "biological",
|
||||
action =
|
||||
{
|
||||
type = "line",
|
||||
@ -795,13 +808,13 @@ end
|
||||
function biterFunctions.createProjectileAttack(attributes, projectile, animation)
|
||||
return {
|
||||
type = "projectile",
|
||||
ammo_category = "rocket",
|
||||
ammo_category = "biological",
|
||||
cooldown = attributes.cooldown or 15,
|
||||
projectile_creation_distance = 0.6,
|
||||
range = attributes.range or 20,
|
||||
ammo_type =
|
||||
{
|
||||
category = "rocket",
|
||||
category = "biological",
|
||||
clamp_position = true,
|
||||
target_type = "position",
|
||||
action =
|
||||
@ -831,7 +844,10 @@ function biterFunctions.createMeleeAttack(attributes)
|
||||
target_type = "entity",
|
||||
action =
|
||||
{
|
||||
type = "direct",
|
||||
type = "area",
|
||||
radius = attributes.radius,
|
||||
force = "enemy",
|
||||
ignore_collision_condition = true,
|
||||
action_delivery =
|
||||
{
|
||||
type = "instant",
|
||||
@ -843,8 +859,8 @@ function biterFunctions.createMeleeAttack(attributes)
|
||||
}
|
||||
}
|
||||
},
|
||||
sound = make_biter_roars(0.4),
|
||||
animation = biterattackanimation(attributes.scale, attributes.tint1, attributes.tint2)
|
||||
sound = make_biter_roars(0.7),
|
||||
animation = biterattackanimation(attributes.scale, attributes.tint, attributes.tint)
|
||||
}
|
||||
end
|
||||
|
||||
@ -894,7 +910,8 @@ function biterFunctions.biterAttackSounds()
|
||||
end
|
||||
|
||||
function biterFunctions.createRangedAttack(attributes, attack, animation)
|
||||
if (attributes.type == "stream") or FORCE_OLD_PROJECTILES then
|
||||
if (attributes.type == "stream") -- or FORCE_OLD_PROJECTILES
|
||||
then
|
||||
return biterFunctions.createStreamAttack(attributes, attack, animation)
|
||||
elseif (attributes.type == "projectile") then
|
||||
return biterFunctions.createProjectileAttack(attributes, attack, animation)
|
||||
@ -904,7 +921,7 @@ end
|
||||
function biterFunctions.createStreamAttack(attributes, fireAttack, animation)
|
||||
local attack = {
|
||||
type = "stream",
|
||||
ammo_category = "flamethrower",
|
||||
ammo_category = "biological",
|
||||
cooldown = attributes.cooldown,
|
||||
range = attributes.range,
|
||||
min_range = attributes.minRange,
|
||||
@ -916,6 +933,12 @@ function biterFunctions.createStreamAttack(attributes, fireAttack, animation)
|
||||
|
||||
damage_modifier = attributes.damageModifier or 1.0,
|
||||
|
||||
lead_target_for_projectile_speed = attributes.particleHoizontalSpeed or 0.6,
|
||||
|
||||
projectile_creation_parameters = spitter_shoot_shiftings(attributes.scale, attributes.scale * 20),
|
||||
|
||||
use_shooter_direction = true,
|
||||
|
||||
gun_barrel_length = 2 * attributes.scale,
|
||||
gun_center_shift = {
|
||||
north = {0, -0.65 * attributes.scale},
|
||||
@ -925,7 +948,7 @@ function biterFunctions.createStreamAttack(attributes, fireAttack, animation)
|
||||
},
|
||||
ammo_type =
|
||||
{
|
||||
category = "flamethrower",
|
||||
category = "biological",
|
||||
action =
|
||||
{
|
||||
type = "direct",
|
||||
|
@ -41,7 +41,7 @@ function droneUtils.makeDrone(name, attributes, biterResistances, biterAttack, b
|
||||
priority = "high",
|
||||
line_length = 16,
|
||||
width = 32,
|
||||
tint = attributes.dTint or {r=1.0, g=0.0, b=0.0},
|
||||
tint = attributes.tint or {r=1.0, g=0.0, b=0.0},
|
||||
height = 33,
|
||||
frame_count = 1,
|
||||
direction_count = 16,
|
||||
@ -52,7 +52,7 @@ function droneUtils.makeDrone(name, attributes, biterResistances, biterAttack, b
|
||||
line_length = 16,
|
||||
width = 56,
|
||||
height = 59,
|
||||
tint = attributes.dTint or {r=1.0, g=0.0, b=0.0},
|
||||
tint = attributes.tint or {r=1.0, g=0.0, b=0.0},
|
||||
frame_count = 1,
|
||||
direction_count = 16,
|
||||
shift = util.by_pixel(0, 0.25),
|
||||
@ -65,7 +65,7 @@ function droneUtils.makeDrone(name, attributes, biterResistances, biterAttack, b
|
||||
line_length = 16,
|
||||
width = 18,
|
||||
height = 16,
|
||||
tint = attributes.dTint or {r=1.0, g=0.0, b=0.0},
|
||||
tint = attributes.tint or {r=1.0, g=0.0, b=0.0},
|
||||
frame_count = 1,
|
||||
direction_count = 16,
|
||||
shift = {0, -0.125},
|
||||
@ -76,7 +76,7 @@ function droneUtils.makeDrone(name, attributes, biterResistances, biterAttack, b
|
||||
line_length = 16,
|
||||
width = 28,
|
||||
height = 21,
|
||||
tint = attributes.dTint or {r=1.0, g=0.0, b=0.0},
|
||||
tint = attributes.tint or {r=1.0, g=0.0, b=0.0},
|
||||
frame_count = 1,
|
||||
direction_count = 16,
|
||||
shift = util.by_pixel(0, -4.75),
|
||||
@ -94,6 +94,7 @@ function droneUtils.makeDrone(name, attributes, biterResistances, biterAttack, b
|
||||
width = 43,
|
||||
height = 23,
|
||||
frame_count = 1,
|
||||
tint = attributes.tint,
|
||||
direction_count = 16,
|
||||
shift = {0.859375, 0.609375},
|
||||
hr_version = {
|
||||
@ -103,6 +104,7 @@ function droneUtils.makeDrone(name, attributes, biterResistances, biterAttack, b
|
||||
width = 88,
|
||||
height = 50,
|
||||
frame_count = 1,
|
||||
tint = attributes.tint,
|
||||
direction_count = 16,
|
||||
shift = util.by_pixel(25.5, 19),
|
||||
scale = 0.5
|
||||
@ -117,9 +119,10 @@ function droneUtils.makeDrone(name, attributes, biterResistances, biterAttack, b
|
||||
priority = "high",
|
||||
line_length = 16,
|
||||
width = 32,
|
||||
tint = attributes.dTint or {r=1.0, g=0.0, b=0.0},
|
||||
tint = attributes.tint or {r=1.0, g=0.0, b=0.0},
|
||||
height = 33,
|
||||
frame_count = 1,
|
||||
tint = attributes.tint,
|
||||
direction_count = 16,
|
||||
shift = {0, 0.015625},
|
||||
y = 33,
|
||||
@ -128,9 +131,10 @@ function droneUtils.makeDrone(name, attributes, biterResistances, biterAttack, b
|
||||
priority = "high",
|
||||
line_length = 16,
|
||||
width = 56,
|
||||
tint = attributes.dTint or {r=1.0, g=0.0, b=0.0},
|
||||
tint = attributes.tint or {r=1.0, g=0.0, b=0.0},
|
||||
height = 59,
|
||||
frame_count = 1,
|
||||
tint = attributes.tint,
|
||||
direction_count = 16,
|
||||
shift = util.by_pixel(0, 0.25),
|
||||
y = 59,
|
||||
@ -145,6 +149,7 @@ function droneUtils.makeDrone(name, attributes, biterResistances, biterAttack, b
|
||||
height = 16,
|
||||
frame_count = 1,
|
||||
direction_count = 16,
|
||||
tint = attributes.tint,
|
||||
shift = {0, -0.125},
|
||||
apply_runtime_tint = true,
|
||||
y = 16,
|
||||
@ -156,6 +161,7 @@ function droneUtils.makeDrone(name, attributes, biterResistances, biterAttack, b
|
||||
height = 21,
|
||||
frame_count = 1,
|
||||
direction_count = 16,
|
||||
tint = attributes.tint,
|
||||
shift = util.by_pixel(0, -4.75),
|
||||
apply_runtime_tint = true,
|
||||
y = 21,
|
||||
@ -172,6 +178,7 @@ function droneUtils.makeDrone(name, attributes, biterResistances, biterAttack, b
|
||||
width = 43,
|
||||
height = 23,
|
||||
frame_count = 1,
|
||||
tint = attributes.tint,
|
||||
direction_count = 16,
|
||||
shift = {0.859375, 0.609375},
|
||||
hr_version = {
|
||||
@ -180,6 +187,7 @@ function droneUtils.makeDrone(name, attributes, biterResistances, biterAttack, b
|
||||
line_length = 16,
|
||||
width = 88,
|
||||
height = 50,
|
||||
tint = attributes.tint,
|
||||
frame_count = 1,
|
||||
direction_count = 16,
|
||||
shift = util.by_pixel(25.5, 19),
|
||||
@ -228,7 +236,7 @@ function droneUtils.createCapsuleProjectile(name, attributes, entityName)
|
||||
name = n,
|
||||
flags = {"not-on-map"},
|
||||
collision_box = attributes.collisionBox or {{-0.01, -0.01}, {0.01, 0.01}},
|
||||
collision_mask = attributes.collisionMask or { "layer-11" },
|
||||
collision_mask = attributes.collisionMask,
|
||||
direction_only = attributes.directionOnly,
|
||||
piercing_damage = attributes.piercingDamage or 0,
|
||||
acceleration = attributes.acceleration or 0.01,
|
||||
@ -267,7 +275,7 @@ function droneUtils.createCapsuleProjectile(name, attributes, entityName)
|
||||
},
|
||||
smoke = {
|
||||
{
|
||||
name = attributes.softSmokeName,
|
||||
name = "the-soft-smoke-rampant",
|
||||
deviation = {0.15, 0.15},
|
||||
frequency = 1,
|
||||
position = {0, 0},
|
||||
|
@ -4,7 +4,6 @@ local fireUtils = {}
|
||||
|
||||
local colorUtils = require("ColorUtils")
|
||||
local imageUtils = require("ImageUtils")
|
||||
local smokeUtils = require("SmokeUtils")
|
||||
|
||||
-- imported functions
|
||||
|
||||
@ -12,17 +11,13 @@ local create_burnt_patch_pictures = imageUtils.create_burnt_patch_pictures
|
||||
local create_fire_pictures = imageUtils.create_fire_pictures
|
||||
local create_small_tree_flame_animations = imageUtils.create_small_tree_flame_animations
|
||||
|
||||
local makeSmokeWithGlow = smokeUtils.makeSmokeWithGlow
|
||||
local makeSmokeWithoutGlow = smokeUtils.makeSmokeWithoutGlow
|
||||
local makeSmokeAddingFuel = smokeUtils.makeSmokeAddingFuel
|
||||
|
||||
local makeColor = colorUtils.makeColor
|
||||
|
||||
-- module code
|
||||
|
||||
function fireUtils.makeSpreadEffect(attributes)
|
||||
local name = attributes.name .. "-spread-rampant"
|
||||
local smokeName = attributes.smokeWithoutGlowName --or makeSmokeWithoutGlow(attributes)
|
||||
local smokeName = "the-glow-smoke-rampant"
|
||||
data:extend({
|
||||
{
|
||||
type = "fire",
|
||||
@ -110,8 +105,8 @@ end
|
||||
function fireUtils.makeFire(attributes)
|
||||
local name = attributes.name .. "-fire-rampant"
|
||||
local spawnEntityName = attributes.spawnEntityName
|
||||
local smokeAddingFuelName = attributes.smokeAddingFuelName --or makeSmokeAddingFuel(attributes)
|
||||
local smokeName = attributes.smokeWithGlowName --or makeSmokeWithGlow(attributes)
|
||||
local smokeAddingFuelName = "the-adding-fuel-rampant"
|
||||
local smokeName = "the-glow-smoke-rampant"
|
||||
data:extend({{
|
||||
type = "fire",
|
||||
name = name,
|
||||
@ -238,4 +233,486 @@ function fireUtils.makeFire(attributes)
|
||||
return name
|
||||
end
|
||||
|
||||
function fireUtils.makeAcidSplashFire(attributes, stickerName)
|
||||
|
||||
local name = attributes.name .. "-acid-fire-rampant"
|
||||
|
||||
local acidFire = {
|
||||
type = "fire",
|
||||
name = name,
|
||||
flags = {"placeable-off-grid", "not-on-map"},
|
||||
damage_per_tick = {amount = attributes.damagePerTick or 0, type = "acid"},
|
||||
maximum_damage_multiplier = 3,
|
||||
damage_multiplier_increase_per_added_fuel = 1,
|
||||
damage_multiplier_decrease_per_tick = 0.005,
|
||||
|
||||
--spawn_entity = "fire-flame-on-tree",
|
||||
uses_alternative_behavior = true,
|
||||
limit_overlapping_particles = true,
|
||||
initial_render_layer = "object",
|
||||
render_layer = "lower-object-above-shadow",
|
||||
secondary_render_layer = "higher-object-above",
|
||||
secondary_picture_fade_out_start = 30,
|
||||
secondary_picture_fade_out_duration = 60,
|
||||
|
||||
spread_delay = 300,
|
||||
spread_delay_deviation = 180,
|
||||
maximum_spread_count = 100,
|
||||
|
||||
particle_alpha = 0.6,
|
||||
particle_alpha_blend_duration = 60*5,
|
||||
--flame_alpha = 0.35,
|
||||
--flame_alpha_deviation = 0.05,
|
||||
|
||||
emissions_per_second = 0,
|
||||
|
||||
add_fuel_cooldown = 10,
|
||||
fade_in_duration = 1,
|
||||
fade_out_duration = 30,
|
||||
|
||||
initial_lifetime = 60*7,--120,
|
||||
lifetime_increase_by = 160,
|
||||
lifetime_increase_cooldown = 4,
|
||||
maximum_lifetime = 1800,
|
||||
delay_between_initial_flames = 10,
|
||||
initial_flame_count = 1,
|
||||
burnt_patch_lifetime = 0,
|
||||
|
||||
working_sound =
|
||||
{
|
||||
sound = { filename = "__base__/sound/furnace.ogg" },
|
||||
max_sounds_per_type = 3
|
||||
},
|
||||
|
||||
on_damage_tick_effect =
|
||||
{
|
||||
type = "direct",
|
||||
radius = attributes.radius or 2.5,
|
||||
force = "enemy",
|
||||
|
||||
filter_enabled = true,
|
||||
action_delivery =
|
||||
{
|
||||
type = "instant",
|
||||
target_effects =
|
||||
{
|
||||
{
|
||||
type = "create-sticker",
|
||||
sticker = stickerName
|
||||
},
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = attributes.damagePerTick or 0, type = "acid" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
pictures =
|
||||
{
|
||||
{
|
||||
layers =
|
||||
{
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-1.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 106,
|
||||
height = 116,
|
||||
frame_count = 26,
|
||||
shift = util.mul_shift(util.by_pixel(-12, -10), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = attributes.scale,
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-1.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 210,
|
||||
height = 224,
|
||||
frame_count = 26,
|
||||
shift = util.mul_shift(util.by_pixel(-12, -8), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = 0.5 * attributes.scale,
|
||||
}
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-1-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 134,
|
||||
height = 98,
|
||||
frame_count = 26,
|
||||
shift = util.mul_shift(util.by_pixel(2, 0), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = attributes.scale,
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-1-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 266,
|
||||
height = 188,
|
||||
frame_count = 26,
|
||||
shift = util.mul_shift(util.by_pixel(2, 2), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = 0.5 * attributes.scale,
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
layers =
|
||||
{
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-2.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 88,
|
||||
height = 76,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(-10, -18), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = attributes.scale,
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-2.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 174,
|
||||
height = 150,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(-9, -17), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = 0.5 * attributes.scale,
|
||||
}
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-2-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 120,
|
||||
height = 136,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(6, 28), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = attributes.scale,
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-2-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 238,
|
||||
height = 266,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(6, 29), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = 0.5 * attributes.scale,
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
layers =
|
||||
{
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-3.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 118,
|
||||
height = 104,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(22, -16), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = attributes.scale,
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-3.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 236,
|
||||
height = 208,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(22, -16), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = 0.5 * attributes.scale,
|
||||
}
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-3-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 110,
|
||||
height = 70,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(16, 2), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = attributes.scale,
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-3-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 214,
|
||||
height = 140,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(17, 2), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = 0.5 * attributes.scale,
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
layers =
|
||||
{
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-4.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 128,
|
||||
height = 80,
|
||||
frame_count = 24,
|
||||
shift = util.mul_shift(util.by_pixel(16, -20), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = attributes.scale,
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-4.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 252,
|
||||
height = 154,
|
||||
frame_count = 24,
|
||||
shift = util.mul_shift(util.by_pixel(17, -19), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = 0.5 * attributes.scale,
|
||||
}
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-4-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 124,
|
||||
height = 80,
|
||||
frame_count = 24,
|
||||
shift = util.mul_shift(util.by_pixel(18, -16), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = attributes.scale,
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-4-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 248,
|
||||
height = 160,
|
||||
frame_count = 24,
|
||||
shift = util.mul_shift(util.by_pixel(18, -16), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = 0.5 * attributes.scale,
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
secondary_pictures =
|
||||
{
|
||||
{
|
||||
layers =
|
||||
{
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-1.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 106,
|
||||
height = 116,
|
||||
frame_count = 26,
|
||||
shift = util.mul_shift(util.by_pixel(-12, -10), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = attributes.ground_patch_scale ,
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-1.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 210,
|
||||
height = 224,
|
||||
frame_count = 26,
|
||||
shift = util.mul_shift(util.by_pixel(-12, -8), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
}
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-1-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 134,
|
||||
height = 98,
|
||||
frame_count = 26,
|
||||
shift = util.mul_shift(util.by_pixel(2, 0), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = (attributes.scale or 1),
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-1-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 266,
|
||||
height = 188,
|
||||
frame_count = 26,
|
||||
shift = util.mul_shift(util.by_pixel(2, 2), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
layers =
|
||||
{
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-2.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 88,
|
||||
height = 76,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(-10, -18), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = (attributes.scale or 1),
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-2.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 174,
|
||||
height = 150,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(-9, -17), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
}
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-2-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 120,
|
||||
height = 136,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(6, 28), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = (attributes.scale or 1),
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-2-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 238,
|
||||
height = 266,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(6, 29), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
layers =
|
||||
{
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-3.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 118,
|
||||
height = 104,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(22, -16), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = (attributes.scale or 1),
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-3.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 236,
|
||||
height = 208,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(22, -16), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
}
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-3-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 110,
|
||||
height = 70,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(16, 2), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = (attributes.scale or 1),
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-3-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 214,
|
||||
height = 140,
|
||||
frame_count = 29,
|
||||
shift = util.mul_shift(util.by_pixel(17, 2), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
layers =
|
||||
{
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-4.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 128,
|
||||
height = 80,
|
||||
frame_count = 24,
|
||||
shift = util.mul_shift(util.by_pixel(16, -20), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = (attributes.scale or 1),
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-4.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 252,
|
||||
height = 154,
|
||||
frame_count = 24,
|
||||
shift = util.mul_shift(util.by_pixel(17, -19), (attributes.scale or 1)),
|
||||
tint = attributes.tint,
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
}
|
||||
},
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-splash/acid-splash-4-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 124,
|
||||
height = 80,
|
||||
frame_count = 24,
|
||||
shift = util.mul_shift(util.by_pixel(18, -16), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = (attributes.scale or 1),
|
||||
hr_version = {
|
||||
filename = "__base__/graphics/entity/acid-splash/hr-acid-splash-4-shadow.png",
|
||||
line_length = 8,
|
||||
direction_count = 1,
|
||||
width = 248,
|
||||
height = 160,
|
||||
frame_count = 24,
|
||||
shift = util.mul_shift(util.by_pixel(18, -16), (attributes.scale or 1)),
|
||||
draw_as_shadow = true,
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data:extend ({
|
||||
acidFire
|
||||
})
|
||||
return name
|
||||
end
|
||||
|
||||
return fireUtils
|
||||
|
@ -8,34 +8,69 @@ function projectileUtils.makeProjectile(name, attributes, attack)
|
||||
name = n,
|
||||
flags = {"not-on-map"},
|
||||
collision_box = attributes.collisionBox or {{-0.01, -0.01}, {0.01, 0.01}},
|
||||
collision_mask = attributes.collisionMask or { "layer-11" },
|
||||
collision_mask = attributes.collisionMask or {"layer-11"},
|
||||
direction_only = attributes.directionOnly,
|
||||
piercing_damage = attributes.piercingDamage or 0,
|
||||
acceleration = attributes.acceleration or 0.01,
|
||||
action = attack,
|
||||
animation =
|
||||
{
|
||||
filename = "__Rampant__/graphics/acid-projectile-purple/acid-projectile-purple.png",
|
||||
line_length = 5,
|
||||
tint = attributes.pTint,
|
||||
width = 16,
|
||||
height = 18,
|
||||
frame_count = 33,
|
||||
priority = "high"
|
||||
},
|
||||
filename = "__base__/graphics/entity/acid-projectile/acid-projectile-head.png",
|
||||
line_length = 5,
|
||||
width = 22,
|
||||
height = 84,
|
||||
frame_count = 15,
|
||||
shift = util.mul_shift(util.by_pixel(-2, 30), attributes.scale or 1),
|
||||
tint = attributes.tint,
|
||||
priority = "high",
|
||||
scale = (attributes.scale or 1),
|
||||
animation_speed = 1,
|
||||
hr_version =
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-projectile/hr-acid-projectile-head.png",
|
||||
line_length = 5,
|
||||
width = 42,
|
||||
height = 164,
|
||||
frame_count = 15,
|
||||
shift = util.mul_shift(util.by_pixel(-2, 31), attributes.scale or 1),
|
||||
tint = attributes.tint,
|
||||
priority = "high",
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
animation_speed = 1,
|
||||
}
|
||||
},
|
||||
shadow =
|
||||
{
|
||||
filename = "__Rampant__/graphics/acid-projectile-purple/acid-projectile-purple-shadow.png",
|
||||
line_length = 5,
|
||||
tint = attributes.pTint,
|
||||
width = 28,
|
||||
height = 16,
|
||||
frame_count = 33,
|
||||
priority = "high",
|
||||
shift = {-0.09, 0.395}
|
||||
},
|
||||
rotatable = false
|
||||
filename = "__base__/graphics/entity/acid-projectile/acid-projectile-shadow.png",
|
||||
line_length = 15,
|
||||
width = 22,
|
||||
height = 84,
|
||||
frame_count = 15,
|
||||
priority = "high",
|
||||
shift = util.mul_shift(util.by_pixel(-2, 30), attributes.scale or 1),
|
||||
draw_as_shadow = true,
|
||||
scale = (attributes.scale or 1),
|
||||
animation_speed = 1,
|
||||
hr_version =
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-projectile/hr-acid-projectile-shadow.png",
|
||||
line_length = 15,
|
||||
width = 42,
|
||||
height = 164,
|
||||
frame_count = 15,
|
||||
shift = util.mul_shift(util.by_pixel(-2, 31), attributes.scale or 1),
|
||||
draw_as_shadow = true,
|
||||
priority = "high",
|
||||
scale = 0.5 * (attributes.scale or 1),
|
||||
animation_speed = 1,
|
||||
}
|
||||
},
|
||||
-- rotatable = false,
|
||||
oriented_particle = true,
|
||||
shadow_scale_enabled = true,
|
||||
|
||||
}})
|
||||
|
||||
return n
|
||||
end
|
||||
|
||||
|
@ -8,38 +8,43 @@ local math3d = require("math3d")
|
||||
|
||||
function stickerUtils.makeSticker(attributes)
|
||||
local name = attributes.name .. "-sticker-rampant"
|
||||
|
||||
local o = {
|
||||
type = "sticker",
|
||||
name = name,
|
||||
flags = {"not-on-map"},
|
||||
|
||||
animation = attributes.stickerAnimation or
|
||||
{
|
||||
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 = attributes.stickerTint, --{ r = 1, g = 1, b = 1, a = 0.35 },
|
||||
shift = math3d.vector2.mul({-0.078125, -1.8125}, 0.1),
|
||||
}
|
||||
,
|
||||
|
||||
duration_in_ticks = attributes.stickerDuration or (30 * 60)
|
||||
,
|
||||
target_movement_modifier = attributes.stickerMovementModifier or 0.8
|
||||
,
|
||||
damage_per_tick = { amount = attributes.stickerDamagePerTick or 100 / 60, type = attributes.stickerDamagePerTickType or "fire" },
|
||||
spread_fire_entity = attributes.spawnEntityName,
|
||||
fire_spread_cooldown = attributes.fireSpreadCooldown -- or 30
|
||||
,
|
||||
fire_spread_radius = attributes.fireSpreadRadius -- or 0.75
|
||||
type = "sticker",
|
||||
name = name,
|
||||
flags = {"not-on-map"},
|
||||
|
||||
animation = attributes.stickerAnimation or
|
||||
{
|
||||
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 = 2,
|
||||
scale = 0.4,
|
||||
tint = attributes.tint or { r = 1, g = 1, b = 1, a = 0.35 },
|
||||
shift = math3d.vector2.mul({-0.078125, -1.8125}, 0.1),
|
||||
},
|
||||
|
||||
duration_in_ticks = attributes.stickerDuration or (30 * 60),
|
||||
target_movement_modifier_from = attributes.stickerMovementModifier,
|
||||
target_movement_modifier_to = 1,
|
||||
vehicle_speed_modifier_from = attributes.stickerMovementModifier,
|
||||
vehicle_speed_modifier_to = 1,
|
||||
vehicle_friction_modifier_from = 1.5,
|
||||
vehicle_friction_modifier_to = 1,
|
||||
|
||||
damage_per_tick = attributes.stickerDamagePerTick and { amount = attributes.stickerDamagePerTick or 100 / 60,
|
||||
type = attributes.stickerDamagePerTickType or "fire" },
|
||||
spread_fire_entity = attributes.spawnEntityName,
|
||||
fire_spread_cooldown = attributes.fireSpreadCooldown,
|
||||
fire_spread_radius = attributes.fireSpreadRadius
|
||||
}
|
||||
|
||||
data:extend({o})
|
||||
return name
|
||||
end
|
||||
|
@ -1,18 +1,9 @@
|
||||
local streamUtils = {}
|
||||
|
||||
-- imported
|
||||
|
||||
local smokeUtils = require("SmokeUtils")
|
||||
|
||||
-- imported functions
|
||||
|
||||
local makeSmokeSoft = smokeUtils.makeSmokeSoft
|
||||
|
||||
-- module code
|
||||
|
||||
function streamUtils.makeStream(info)
|
||||
local attributes = util.table.deepcopy(info)
|
||||
local softSmokeName = attributes.softSmokeName --or makeSmokeSoft(attributes)
|
||||
function streamUtils.makeStream(attributes)
|
||||
local softSmokeName = "the-soft-smoke-rampant"
|
||||
local name = attributes.name .. "-stream-rampant"
|
||||
data:extend(
|
||||
{
|
||||
@ -34,7 +25,7 @@ function streamUtils.makeStream(info)
|
||||
},
|
||||
particle_buffer_size = 90,
|
||||
particle_spawn_interval = 1,
|
||||
particle_spawn_timeout = attributes.particleTimeout or 1,
|
||||
particle_spawn_timeout = attributes.particleTimeout or 6,
|
||||
particle_vertical_acceleration = attributes.particleVerticalAcceleration or 0.01,
|
||||
particle_horizontal_speed = attributes.particleHoizontalSpeed or 0.6,
|
||||
particle_horizontal_speed_deviation = attributes.particleHoizontalSpeedDeviation or 0.0025,
|
||||
@ -44,13 +35,13 @@ function streamUtils.makeStream(info)
|
||||
particle_loop_frame_count = 3,
|
||||
particle_fade_out_threshold = 0.9,
|
||||
particle_loop_exit_threshold = 0.25,
|
||||
action = attributes.actions,
|
||||
action = attributes.actions,
|
||||
|
||||
spine_animation =
|
||||
{
|
||||
filename = "__base__/graphics/entity/flamethrower-fire-stream/flamethrower-fire-stream-spine.png",
|
||||
blend_mode = "additive",
|
||||
tint = attributes.spineAnimationTint,
|
||||
tint = attributes.tint,
|
||||
line_length = 4,
|
||||
width = 32,
|
||||
height = 18,
|
||||
@ -77,15 +68,134 @@ function streamUtils.makeStream(info)
|
||||
filename = "__base__/graphics/entity/flamethrower-fire-stream/flamethrower-explosion.png",
|
||||
priority = "extra-high",
|
||||
width = 64,
|
||||
tint = attributes.particleTint,
|
||||
tint = attributes.tint,
|
||||
height = 64,
|
||||
frame_count = 32,
|
||||
line_length = 8
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
oriented_particle = true,
|
||||
shadow_scale_enabled = true
|
||||
}
|
||||
}
|
||||
)
|
||||
return name
|
||||
end
|
||||
|
||||
function streamUtils.makeAcidStream(info)
|
||||
local attributes = util.table.deepcopy(info)
|
||||
local name = attributes.name .. "-acid-stream-rampant"
|
||||
|
||||
local acidStream = {
|
||||
type = "stream",
|
||||
name = name,
|
||||
flags = {"not-on-map"},
|
||||
--stream_light = {intensity = 1, size = 4},
|
||||
--ground_light = {intensity = 0.8, size = 4},
|
||||
|
||||
particle_buffer_size = 90,
|
||||
particle_spawn_timeout = attributes.particleTimeout or 6,
|
||||
particle_vertical_acceleration = attributes.particleVerticalAcceleration or 0.01,
|
||||
particle_horizontal_speed = attributes.particleHoizontalSpeed or 0.6,
|
||||
particle_horizontal_speed_deviation = attributes.particleHoizontalSpeedDeviation or 0.0025,
|
||||
particle_spawn_interval = 1,
|
||||
-- particle_spawn_timeout = attributes.particle_spawn_timeout,
|
||||
-- particle_vertical_acceleration = 0.005 * 0.60 *1.5, --x
|
||||
-- particle_horizontal_speed = 0.2* 0.75 * 1.5 * 1.5, --x
|
||||
-- particle_horizontal_speed_deviation = 0.005 * 0.70,
|
||||
particle_start_alpha = 0.5,
|
||||
particle_end_alpha = 1,
|
||||
particle_alpha_per_part = 0.8,
|
||||
particle_scale_per_part = 0.8,
|
||||
particle_loop_frame_count = 15,
|
||||
--particle_fade_out_threshold = 0.95,
|
||||
particle_fade_out_duration = 2,
|
||||
particle_loop_exit_threshold = 0.25,
|
||||
special_neutral_target_damage = {amount = 1, type = "acid"},
|
||||
initial_action = attributes.actions,
|
||||
particle = {
|
||||
filename = "__base__/graphics/entity/acid-projectile/acid-projectile-head.png",
|
||||
line_length = 5,
|
||||
width = 22,
|
||||
height = 84,
|
||||
frame_count = 15,
|
||||
shift = util.mul_shift(util.by_pixel(-2, 30), attributes.scale),
|
||||
tint = attributes.tint,
|
||||
priority = "high",
|
||||
scale = attributes.scale,
|
||||
animation_speed = 1,
|
||||
hr_version =
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-projectile/hr-acid-projectile-head.png",
|
||||
line_length = 5,
|
||||
width = 42,
|
||||
height = 164,
|
||||
frame_count = 15,
|
||||
shift = util.mul_shift(util.by_pixel(-2, 31), attributes.scale),
|
||||
tint = attributes.tint,
|
||||
priority = "high",
|
||||
scale = 0.5 * attributes.scale,
|
||||
animation_speed = 1,
|
||||
}
|
||||
},
|
||||
spine_animation = {
|
||||
filename = "__base__/graphics/entity/acid-projectile/acid-projectile-tail.png",
|
||||
line_length = 5,
|
||||
width = 66,
|
||||
height = 12,
|
||||
frame_count = 15,
|
||||
shift = util.mul_shift(util.by_pixel(0, -2), attributes.scale),
|
||||
tint = attributes.tint,
|
||||
priority = "high",
|
||||
scale = attributes.scale,
|
||||
animation_speed = 1,
|
||||
hr_version =
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-projectile/hr-acid-projectile-tail.png",
|
||||
line_length = 5,
|
||||
width = 132,
|
||||
height = 20,
|
||||
frame_count = 15,
|
||||
shift = util.mul_shift(util.by_pixel(0, -1), attributes.scale),
|
||||
tint = attributes.tint,
|
||||
priority = "high",
|
||||
scale = 0.5 * attributes.scale,
|
||||
animation_speed = 1,
|
||||
}
|
||||
},
|
||||
shadow = {
|
||||
filename = "__base__/graphics/entity/acid-projectile/acid-projectile-shadow.png",
|
||||
line_length = 15,
|
||||
width = 22,
|
||||
height = 84,
|
||||
frame_count = 15,
|
||||
priority = "high",
|
||||
shift = util.mul_shift(util.by_pixel(-2, 30), attributes.scale),
|
||||
draw_as_shadow = true,
|
||||
scale = attributes.scale,
|
||||
animation_speed = 1,
|
||||
hr_version =
|
||||
{
|
||||
filename = "__base__/graphics/entity/acid-projectile/hr-acid-projectile-shadow.png",
|
||||
line_length = 15,
|
||||
width = 42,
|
||||
height = 164,
|
||||
frame_count = 15,
|
||||
shift = util.mul_shift(util.by_pixel(-2, 31), attributes.scale),
|
||||
draw_as_shadow = true,
|
||||
priority = "high",
|
||||
scale = 0.5 * attributes.scale,
|
||||
animation_speed = 1,
|
||||
}
|
||||
},
|
||||
|
||||
oriented_particle = true,
|
||||
shadow_scale_enabled = true,
|
||||
}
|
||||
|
||||
data:extend({
|
||||
acidStream
|
||||
})
|
||||
return name
|
||||
end
|
||||
|
||||
return streamUtils
|
||||
|
@ -1,235 +0,0 @@
|
||||
local bobsUpdates = {}
|
||||
|
||||
local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].value
|
||||
|
||||
local biterUtils = require("BiterUtils")
|
||||
|
||||
function bobsUpdates.useDumbProjectiles()
|
||||
local turrets = data.raw["turret"];
|
||||
|
||||
local attackType = (FORCE_OLD_PROJECTILES and "stream") or "projectile"
|
||||
local unitPrefix = (FORCE_OLD_PROJECTILES and "") or "direction-"
|
||||
|
||||
turrets["bob-big-explosive-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 60,
|
||||
range = 26,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-explosive-ball-" .. attackType .. "-rampant")
|
||||
|
||||
turrets["bob-big-fire-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 60,
|
||||
range = 26,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-fire-ball-" .. attackType .. "-rampant")
|
||||
|
||||
turrets["bob-big-poison-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 60,
|
||||
range = 26,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-poison-ball-" .. attackType .. "-rampant")
|
||||
|
||||
turrets["bob-big-piercing-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 60,
|
||||
range = 26,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-piercing-ball-" .. attackType .. "-rampant")
|
||||
|
||||
turrets["bob-big-electric-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 60,
|
||||
range = 26,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
scale = 1.2
|
||||
},
|
||||
"bob-electric-ball-" .. attackType .. "-rampant")
|
||||
|
||||
turrets["bob-giant-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 60,
|
||||
range = 28,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
fire_penalty = 0,
|
||||
type = "projectile",
|
||||
scale = 1.6
|
||||
},
|
||||
"acid-ball-5-" .. attackType .. "-rampant")
|
||||
|
||||
local units = data.raw["unit"]
|
||||
|
||||
local unit = units["behemoth-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
type = "projectile",
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-3-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
unit = units["bob-big-electric-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 15,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
damageModifier = 0.6,
|
||||
type = "projectile",
|
||||
warmup = 30,
|
||||
fire_penalty = 0,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-electric-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
unit = units["bob-huge-explosive-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
min_range = 3,
|
||||
type = "projectile",
|
||||
warmup = 30,
|
||||
turn_range = 1,
|
||||
damageModifier = 0.8,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-explosive-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
unit = units["bob-huge-acid-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
min_range = 3,
|
||||
type = "projectile",
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"wide-acid-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
unit = units["bob-giant-fire-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
type = "projectile",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-fire-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
unit = units["bob-giant-poison-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
type = "projectile",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-poison-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
unit = units["bob-titan-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
type = "projectile",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-titan-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
unit = units["bob-behemoth-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 90,
|
||||
range = 16,
|
||||
type = "projectile",
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
warmup = 30,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-behemoth-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
|
||||
unit = units["bob-leviathan-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 90,
|
||||
type = "projectile",
|
||||
range = 17,
|
||||
min_range = 3,
|
||||
warmup = 30,
|
||||
turn_range = 1,
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"bob-leviathan-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
end
|
||||
|
||||
return bobsUpdates
|
@ -1,14 +1,11 @@
|
||||
local vanillaUpdates = {}
|
||||
|
||||
local FORCE_OLD_PROJECTILES = settings.startup["rampant-forceOldProjectiles"].value
|
||||
|
||||
local biterUtils = require("BiterUtils")
|
||||
|
||||
function vanillaUpdates.useDumbProjectiles()
|
||||
local turrets = data.raw["turret"];
|
||||
|
||||
local attackType = (FORCE_OLD_PROJECTILES and "stream") or "projectile"
|
||||
local unitPrefix = (FORCE_OLD_PROJECTILES and "") or "direction-"
|
||||
local attackType = "projectile"
|
||||
|
||||
turrets["small-worm-turret"]["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -65,20 +62,21 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
|
||||
local unit = units["small-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
cooldown = 100,
|
||||
range = 13,
|
||||
warmup = 30,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "projectile",
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-" .. unitPrefix .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
|
||||
{
|
||||
cooldown = 100,
|
||||
range = 13,
|
||||
warmup = 30,
|
||||
min_range = 3,
|
||||
turn_range = 1,
|
||||
type = "projectile",
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-" .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
tint_1_spitter_small,
|
||||
tint_2_spitter_small))
|
||||
|
||||
unit = units["medium-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
{
|
||||
@ -91,9 +89,10 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-1-" .. unitPrefix .. attackType .. "-rampant",
|
||||
"acid-ball-1-" .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
tint_1_spitter_medium,
|
||||
tint_2_spitter_medium))
|
||||
|
||||
unit = units["big-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
@ -107,9 +106,10 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-2-" .. unitPrefix .. attackType .. "-rampant",
|
||||
"acid-ball-2-direction-" .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
tint_1_spitter_big,
|
||||
tint_2_spitter_big))
|
||||
|
||||
unit = units["behemoth-spitter"]
|
||||
unit["attack_parameters"] = biterUtils.createRangedAttack(
|
||||
@ -123,9 +123,78 @@ function vanillaUpdates.useDumbProjectiles()
|
||||
fire_penalty = 15,
|
||||
scale = biterUtils.findRunScale(unit)
|
||||
},
|
||||
"acid-ball-3-" .. unitPrefix .. attackType .. "-rampant",
|
||||
"acid-ball-3-direction-" .. attackType .. "-rampant",
|
||||
spitterattackanimation(biterUtils.findRunScale(unit),
|
||||
biterUtils.findTint(unit)))
|
||||
tint_1_spitter_behemoth,
|
||||
tint_2_spitter_behemoth))
|
||||
|
||||
unit = units["small-biter"]
|
||||
unit["attack_parameters"]["ammo_type"]["action"] = {
|
||||
type = "area",
|
||||
radius = 0.2,
|
||||
force = "enemy",
|
||||
ignore_collision_condition = true,
|
||||
action_delivery =
|
||||
{
|
||||
type = "instant",
|
||||
target_effects =
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 7, type = "physical" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unit = units["medium-biter"]
|
||||
unit["attack_parameters"]["ammo_type"]["action"] = {
|
||||
type = "area",
|
||||
radius = 0.6,
|
||||
force = "enemy",
|
||||
ignore_collision_condition = true,
|
||||
action_delivery =
|
||||
{
|
||||
type = "instant",
|
||||
target_effects =
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 15, type = "physical" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unit = units["big-biter"]
|
||||
unit["attack_parameters"]["ammo_type"]["action"] = {
|
||||
type = "area",
|
||||
radius = 0.9,
|
||||
force = "enemy",
|
||||
ignore_collision_condition = true,
|
||||
action_delivery =
|
||||
{
|
||||
type = "instant",
|
||||
target_effects =
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 30, type = "physical" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unit = units["behemoth-biter"]
|
||||
unit["attack_parameters"]["ammo_type"]["action"] = {
|
||||
type = "area",
|
||||
radius = 1.2,
|
||||
force = "enemy",
|
||||
ignore_collision_condition = true,
|
||||
action_delivery =
|
||||
{
|
||||
type = "instant",
|
||||
target_effects =
|
||||
{
|
||||
type = "damage",
|
||||
damage = { amount = 90, type = "physical" }
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
return vanillaUpdates
|
||||
|
59
settings.lua
59
settings.lua
@ -10,33 +10,6 @@ data:extend({
|
||||
per_user = false
|
||||
},
|
||||
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "rampant-useNEUnitLaunchers",
|
||||
setting_type = "startup",
|
||||
default_value = true,
|
||||
order = "a[modifier]-b[projectiles]",
|
||||
per_user = false
|
||||
},
|
||||
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "rampant-forceOldProjectiles",
|
||||
setting_type = "startup",
|
||||
default_value = false,
|
||||
order = "a[modifier]-b[projectiles]",
|
||||
per_user = false
|
||||
},
|
||||
|
||||
-- {
|
||||
-- type = "bool-setting",
|
||||
-- name = "rampant-attackWaveGenerationUsePollution",
|
||||
-- setting_type = "runtime-global",
|
||||
-- default_value = true,
|
||||
-- order = "b[modifier]-a[trigger]",
|
||||
-- per_user = false
|
||||
-- },
|
||||
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "rampant-attackWaveGenerationUsePlayerProximity",
|
||||
@ -56,26 +29,6 @@ data:extend({
|
||||
per_user = false
|
||||
},
|
||||
|
||||
-- {
|
||||
-- type = "double-setting",
|
||||
-- name = "rampant-attackWaveGenerationThresholdMax",
|
||||
-- setting_type = "runtime-global",
|
||||
-- minimum_value = 0,
|
||||
-- default_value = 20,
|
||||
-- order = "b[modifier]-d[threshold]",
|
||||
-- per_user = false
|
||||
-- },
|
||||
|
||||
-- {
|
||||
-- type = "double-setting",
|
||||
-- name = "rampant-attackWaveGenerationThresholdMin",
|
||||
-- setting_type = "runtime-global",
|
||||
-- minimum_value = 0,
|
||||
-- default_value = 0,
|
||||
-- order = "b[modifier]-e[threshold]",
|
||||
-- per_user = false
|
||||
-- },
|
||||
|
||||
{
|
||||
type = "int-setting",
|
||||
name = "rampant-attackWaveMaxSize",
|
||||
@ -547,18 +500,6 @@ data:extend({
|
||||
per_user = false
|
||||
},
|
||||
|
||||
-- {
|
||||
-- type = "bool-setting",
|
||||
-- name = "rampant-attack-warning",
|
||||
-- description = "rampant-attack-warning",
|
||||
-- setting_type = "runtime-per-user",
|
||||
-- default_value = false,
|
||||
-- order = "o[modifer]-a[message]",
|
||||
-- per_user = true
|
||||
-- },
|
||||
|
||||
|
||||
|
||||
{
|
||||
type = "double-setting",
|
||||
name = "rampant-unitBiterHealthScaler",
|
||||
|
Loading…
Reference in New Issue
Block a user