1
0
mirror of https://github.com/veden/Rampant.git synced 2025-03-11 14:49:32 +02:00

working dumb projectiles

This commit is contained in:
Aaron Veden 2017-04-01 16:40:47 -07:00
parent c33e338dac
commit f92679dc05
17 changed files with 2318 additions and 360 deletions

View File

@ -3,6 +3,11 @@ local config = {}
local mathUtils = require("libs/MathUtils")
local gaussianRandomRange = mathUtils.gaussianRandomRange
--[[
turns off homing projectiles for worms and spitters
]]
config.useDumbProjectiles = true
--[[
the attackWaveGenerationUse* options are used to score chunks with biter nests that will generate a Rampant attack wave.
Pollution, the vanilla pollution mechanic (shown on the minimap).

20
data-updates.lua Normal file
View File

@ -0,0 +1,20 @@
local config = require("config")
local vanillaUpdates = require("prototypes/enemies/UpdatesVanilla")
local bobsUpdates = require("prototypes/enemies/UpdatesBobs")
local function bobsDetected()
return data.raw["turret"]["bob-big-explosive-worm-turret"] ~= nil
end
if config.useDumbProjectiles then
vanillaUpdates.useDumbProjectiles()
if bobsDetected() then
require("prototypes/enemies/AttackBobs")
bobsUpdates.useDumbProjectiles()
end
end

View File

@ -1,8 +1,12 @@
-- local config = require("config")
local config = require("config")
require("prototypes/enemies/AttackAcidBall")
require("prototypes/enemies/AttackAcidFlame")
require("prototypes/buildings/tunnel")
require("prototypes/tile/fillableDirt")
require("prototypes/enemies/suicideBiters")
require("prototypes/enemies/fireSpitters")
require("prototypes/enemies/UnitSuicideBiters")
require("prototypes/enemies/UnitFireSpitters")

View File

@ -29,6 +29,7 @@
(string->path "control.lua")
(string->path "config.lua")
(string->path "data.lua")
(string->path "data-updates.lua")
(string->path "LICENSE.md")
(string->path "tests.lua")
; (string->path "setupUtils.lua")
@ -68,6 +69,7 @@
(copyFile "info.json" modFolder)
; (copyFile "setupUtils.lua" modFolder)
(copyFile "data.lua" modFolder)
(copyFile "data-updates.lua" modFolder)
(copyFile "tests.lua" modFolder)
(copyDirectory "libs" modFolder)
(copyDirectory "locale" modFolder)

View File

@ -0,0 +1,421 @@
local biterStreamUtils = require("BiterStreamUtils")
-- dumb acid projectiles
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "acid-ball-stream-rampant",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 2,
particleHoizontalSpeed = 0.2* 0.75 * 4,
particleHoizontalSpeedDeviation = 0.005 * 0.50,
particleTint = {r=0, g=1, b=1, a=0.5},
actions = {
{
type = "area",
perimeter = 1.5,
action_delivery =
{
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 5, type = "acid" }
}
}
}
}
},
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
spineAnimationTint = {r=0, g=1, b=1, a=0.5},
fireFlameName = "acid-ball-flame-rampant",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-acid-ball-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "acid-ball-smoke-rampant",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "acid-ball-sticker-rampant",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "acid-ball-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "acid-ball-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "acid-ball-smoke-on-adding-fuel-rampant"
}
)
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "acid-ball-1-stream-rampant",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 2,
particleHoizontalSpeed = 0.2* 0.75 * 4,
particleHoizontalSpeedDeviation = 0.005 * 0.50,
particleTint = {r=0, g=1, b=1, a=0.5},
actions = {
{
type = "area",
perimeter = 1.5,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 15, type = "acid" }
},
{
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
spineAnimationTint = {r=0, g=1, b=1, a=0.5},
fireFlameName = "acid-ball-1-flame-rampant",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-acid-ball-1-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "acid-ball-1-smoke-rampant",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "acid-ball-1-sticker-rampant",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "acid-ball-1-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "acid-ball-1-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "acid-ball-1-smoke-on-adding-fuel-rampant"
}
)
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "acid-ball-2-stream-rampant",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 2,
particleHoizontalSpeed = 0.2* 0.75 * 4,
particleHoizontalSpeedDeviation = 0.005 * 0.50,
particleTint = {r=0, g=1, b=1, a=0.5},
actions = {
{
type = "area",
perimeter = 1.5,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 25, type = "acid" }
},
{
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
spineAnimationTint = {r=0, g=1, b=1, a=0.5},
fireFlameName = "acid-ball-2-flame-rampant",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-acid-ball-2-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "acid-ball-2-smoke-rampant",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "acid-ball-2-sticker-rampant",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "acid-ball-2-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "acid-ball-2-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "acid-ball-2-smoke-on-adding-fuel-rampant"
}
)
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "acid-ball-3-stream-rampant",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 2,
particleHoizontalSpeed = 0.2* 0.75 * 4,
particleHoizontalSpeedDeviation = 0.005 * 0.50,
particleTint = {r=0, g=1, b=1, a=0.5},
actions = {
{
type = "area",
perimeter = 1.5,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 45, type = "acid" }
},
{
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
spineAnimationTint = {r=0, g=1, b=1, a=0.5},
fireFlameName = "acid-ball-3-flame-rampant",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-acid-ball-3-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "acid-ball-3-smoke-rampant",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "acid-ball-3-sticker-rampant",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "acid-ball-3-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "acid-ball-3-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "acid-ball-3-smoke-on-adding-fuel-rampant"
}
)
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "wide-acid-ball-stream-rampant",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 2,
particleHoizontalSpeed = 0.2* 0.75 * 4,
particleHoizontalSpeedDeviation = 0.005 * 0.50,
particleTint = {r=0, g=1, b=1, a=0.5},
actions = {
{
type = "area",
perimeter = 3,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 35, type = "acid" }
},
{
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
spineAnimationTint = {r=0, g=1, b=1, a=0.5},
fireFlameName = "wide-acid-ball-flame-rampant",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-wide-acid-ball-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "wide-acid-ball-smoke-rampant",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "wide-acid-ball-sticker-rampant",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "wide-acid-ball-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "wide-acid-ball-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "wide-acid-ball-smoke-on-adding-fuel-rampant"
}
)
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "acid-ball-4-stream-rampant",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 2,
particleHoizontalSpeed = 0.2* 0.75 * 4,
particleHoizontalSpeedDeviation = 0.005 * 0.50,
particleTint = {r=0, g=1, b=1, a=0.5},
actions = {
{
type = "area",
perimeter = 2,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 95, type = "acid" }
},
{
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
spineAnimationTint = {r=0, g=1, b=1, a=0.5},
fireFlameName = "acid-ball-4-flame-rampant",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-acid-ball-4-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "acid-ball-4-smoke-rampant",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "acid-ball-4-sticker-rampant",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "acid-ball-4-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "acid-ball-4-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "acid-ball-4-smoke-on-adding-fuel-rampant"
}
)
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "acid-ball-5-stream-rampant",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 2,
particleHoizontalSpeed = 0.2* 0.75 * 4,
particleHoizontalSpeedDeviation = 0.005 * 0.50,
particleTint = {r=0, g=1, b=1, a=0.5},
actions = {
{
type = "area",
perimeter = 2,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 145, type = "acid" }
},
{
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
type= "create-entity",
entity_name = "acid-splash-purple"
}
}
}
},
spineAnimationTint = {r=0, g=1, b=1, a=0.5},
fireFlameName = "acid-ball-5-flame-rampant",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-acid-ball-5-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "acid-ball-5-smoke-rampant",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "acid-ball-5-sticker-rampant",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "acid-ball-5-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "acid-ball-5-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "acid-ball-5-smoke-on-adding-fuel-rampant"
}
)

View File

@ -0,0 +1,206 @@
local biterStreamUtils = require("BiterStreamUtils")
-- persistent flame attacks
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "acid-flame-fire-stream-rampant",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 2,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=0, g=1, b=1, a=0.5},
actions = {
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-fire",
entity_name = "acid-flame-fire-flame-rampant"
}
}
}
},
{
type = "area",
perimeter = 2.5,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-sticker",
sticker = "acid-flame-fire-sticker-rampant"
},
{
type = "damage",
damage = { amount = 1, type = "fire" }
},
{
type = "damage",
damage = { amount = 1, type = "acid" }
}
}
}
}
},
spineAnimationTint = {r=0, g=1, b=1, a=0.5},
fireFlameName = "acid-flame-fire-flame-rampant",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-acid-flame-fire-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "acid-flame-fire-smoke-rampant",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "acid-flame-fire-sticker-rampant",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "acid-flame-fire-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "acid-flame-fire-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "acid-flame-fire-smoke-on-adding-fuel-rampant"
}
)
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "acid-flame-1-fire-stream-rampant",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 4,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=0, g=1, b=1, a=0.5},
actions = {
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-fire",
entity_name = "acid-flame-1-fire-flame-rampant"
}
}
}
},
{
type = "area",
perimeter = 2.5,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-sticker",
sticker = "acid-flame-1-fire-sticker-rampant"
},
{
type = "damage",
damage = { amount = 1, type = "fire" }
},
{
type = "damage",
damage = { amount = 2, type = "acid" }
}
}
}
}
},
spineAnimationTint = {r=0, g=1, b=1, a=0.5},
fireFlameName = "acid-flame-1-fire-flame-rampant",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-acid-flame-1-fire-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "acid-flame-1-fire-smoke-rampant",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "acid-flame-1-fire-sticker-rampant",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "acid-flame-1-fire-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "acid-flame-1-fire-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "acid-flame-1-fire-smoke-on-adding-fuel-rampant"
}
)
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "acid-flame-2-fire-stream-rampant",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 8,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=0, g=1, b=1, a=0.5},
actions = {
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-fire",
entity_name = "acid-flame-2-fire-flame-rampant"
}
}
}
},
{
type = "area",
perimeter = 2.5,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-sticker",
sticker = "acid-flame-2-fire-sticker-rampant"
},
{
type = "damage",
damage = { amount = 1, type = "fire" }
},
{
type = "damage",
damage = { amount = 2, type = "acid" }
}
}
}
}
},
spineAnimationTint = {r=0, g=1, b=1, a=0.5},
fireFlameName = "acid-flame-2-fire-flame-rampant",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-acid-flame-2-fire-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "acid-flame-2-fire-smoke-rampant",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "acid-flame-2-fire-sticker-rampant",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "acid-flame-2-fire-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "acid-flame-2-fire-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "acid-flame-2-fire-smoke-on-adding-fuel-rampant"
}
)

View File

@ -0,0 +1,840 @@
local biterStreamUtils = require("BiterStreamUtils")
-- bobs replacement attacks
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "bob-explosive-ball-stream-rampant",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=1, g=0.97, b=0.34, a=0.5},
actions = {
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
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"
}
}
}
},
{
type = "area",
perimeter = 3,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 35, type = "explosion" }
}
}
}
}
},
spineAnimationTint = {r=1, g=0.97, b=0.34, a=0.5},
fireFlameName = "bob-explosive-ball-flame-rampant",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-bob-explosive-ball-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "bob-explosive-ball-smoke-rampant",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "bob-explosive-ball-sticker-rampant",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "bob-explosive-ball-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "bob-explosive-ball-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "bob-explosive-ball-smoke-on-adding-fuel-rampant"
}
)
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "bob-explosive-ball-1-stream-rampant",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=1, g=0.97, b=0.34, a=0.5},
actions = {
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
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"
}
}
}
},
{
type = "area",
perimeter = 3,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 55, type = "explosion" }
}
}
}
}
},
spineAnimationTint = {r=1, g=0.97, b=0.34, a=0.5},
fireFlameName = "bob-explosive-ball-1-flame-rampant",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-bob-explosive-ball-1-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "bob-explosive-ball-1-smoke-rampant",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "bob-explosive-ball-1-sticker-rampant",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "bob-explosive-ball-1-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "bob-explosive-ball-1-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "bob-explosive-ball-1-smoke-on-adding-fuel-rampant"
}
)
-- fire
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "bob-fire-ball-stream-rampant",
firePictureTint = {r=1,g=1,b=1,a=1},
smallTreeFlameTint = {r=1,g=1,b=1,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=1, g=0.17, b=0.17, a=0.5},
actions = {
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-fire",
entity_name = "bob-fire-ball-flame-rampant"
}
}
}
},
{
type = "area",
perimeter = 2,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-sticker",
sticker = "bob-fire-ball-sticker-rampant",
},
{
type = "damage",
damage = { amount = 43, type = "fire" }
}
}
}
}
},
spineAnimationTint = {r=1, g=0.43, b=0.17, a=0.5},
fireFlameName = "bob-fire-ball-flame-rampant",
fireFlameTint = {r=1, g=0.64, b=0.05, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-bob-fire-ball-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.7, 0.4, 0.2, 0.1),
smokeName = "bob-fire-ball-smoke-rampant",
smokeTint = {r=0.2, g=0.2, b=0.2, a=0.25},
stickerName = "bob-fire-ball-sticker-rampant",
stickerTint = { r = 0.45, g = 0.25, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "bob-fire-ball-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.45,0.25,0.1, 0.25),
spawnEntityName = "bob-fire-ball-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "bob-fire-ball-smoke-on-adding-fuel-rampant"
}
)
-- poison
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "bob-poison-ball-stream-rampant",
firePictureTint = {r=1,g=1,b=1,a=1},
smallTreeFlameTint = {r=1,g=1,b=1,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=0.1, g=0.5, b=1, a=0.5},
actions = {
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-entity",
entity_name = "small-poison-cloud"
}
}
}
},
{
type = "area",
perimeter = 2,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 20, type = "poison" }
}
}
}
}
},
spineAnimationTint = {r=0, g=0, b=1, a=0.5},
fireFlameName = "bob-poison-ball-flame-rampant",
fireFlameTint = {r=1, g=0.64, b=0.05, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-bob-poison-ball-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.7, 0.4, 0.2, 0.1),
smokeName = "bob-poison-ball-smoke-rampant",
smokeTint = {r=0.2, g=0.2, b=0.2, a=0.25},
stickerName = "bob-poison-ball-sticker-rampant",
stickerTint = { r = 0.45, g = 0.25, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "bob-poison-ball-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.45,0.25,0.1, 0.25),
spawnEntityName = "bob-poison-ball-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "bob-poison-ball-smoke-on-adding-fuel-rampant"
}
)
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "bob-poison-ball-1-stream-rampant",
firePictureTint = {r=1,g=1,b=1,a=1},
smallTreeFlameTint = {r=1,g=1,b=1,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=0.1, g=0.5, b=1, a=0.5},
actions = {
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-entity",
entity_name = "small-poison-cloud"
}
}
}
},
{
type = "area",
perimeter = 2,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 43, type = "poison" }
}
}
}
}
},
spineAnimationTint = {r=0, g=0, b=1, a=0.5},
fireFlameName = "bob-poison-ball-1-flame-rampant",
fireFlameTint = {r=1, g=0.64, b=0.05, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-bob-poison-ball-1-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.7, 0.4, 0.2, 0.1),
smokeName = "bob-poison-ball-1-smoke-rampant",
smokeTint = {r=0.2, g=0.2, b=0.2, a=0.25},
stickerName = "bob-poison-ball-1-sticker-rampant",
stickerTint = { r = 0.45, g = 0.25, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "bob-poison-ball-1-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.45,0.25,0.1, 0.25),
spawnEntityName = "bob-poison-ball-1-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "bob-poison-ball-1-smoke-on-adding-fuel-rampant"
}
)
-- 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",
action_delivery =
{
type = "instant",
target_effects =
{
type = "damage",
damage = {amount = 8, type = "bob-pierce"}
}
}
},
animation =
{
filename = "__base__/graphics/entity/piercing-bullet/piercing-bullet.png",
frame_count = 1,
width = 3,
height = 50,
priority = "high"
},
}
})
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "bob-piercing-ball-stream-rampant",
firePictureTint = {r=1,g=1,b=1,a=1},
smallTreeFlameTint = {r=1,g=1,b=1,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=0.1, g=0.1, b=0.1, a=0.8},
actions = {
{
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
}
},
{
type = "area",
perimeter = 3,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 43, type = "bob-pierce" }
}
}
}
}
},
spineAnimationTint = {r=0.1, g=0.1, b=0.1, a=0.8},
fireFlameName = "bob-piercing-ball-flame-rampant",
fireFlameTint = {r=1, g=0.64, b=0.05, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-bob-piercing-ball-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.7, 0.4, 0.2, 0.1),
smokeName = "bob-piercing-ball-smoke-rampant",
smokeTint = {r=0.2, g=0.2, b=0.2, a=0.25},
stickerName = "bob-piercing-ball-sticker-rampant",
stickerTint = { r = 0.45, g = 0.25, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "bob-piercing-ball-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.45,0.25,0.1, 0.25),
spawnEntityName = "bob-piercing-ball-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "bob-piercing-ball-smoke-on-adding-fuel-rampant"
}
)
-- electric
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",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-entity",
entity_name = "laser-bubble"
},
{
type = "damage",
damage = { amount = 8, 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
}
})
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "bob-electric-ball-stream-rampant",
firePictureTint = {r=1,g=1,b=1,a=1},
smallTreeFlameTint = {r=1,g=1,b=1,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=0, g=0.1, b=1, a=1},
actions = {
{
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
}
},
{
type = "area",
perimeter = 3,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 10, type = "electric" }
}
}
}
}
},
spineAnimationTint = {r=0, g=0.1, b=1, a=1},
fireFlameName = "bob-electric-ball-flame-rampant",
fireFlameTint = {r=1, g=0.64, b=0.05, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-bob-electric-ball-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.7, 0.4, 0.2, 0.1),
smokeName = "bob-electric-ball-smoke-rampant",
smokeTint = {r=0.2, g=0.2, b=0.2, a=0.25},
stickerName = "bob-electric-ball-sticker-rampant",
stickerTint = { r = 0.45, g = 0.25, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "bob-electric-ball-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.45,0.25,0.1, 0.25),
spawnEntityName = "bob-electric-ball-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "bob-electric-ball-smoke-on-adding-fuel-rampant"
}
)
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "bob-electric-ball-1-stream-rampant",
firePictureTint = {r=1,g=1,b=1,a=1},
smallTreeFlameTint = {r=1,g=1,b=1,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=0, g=0.1, b=1, a=1},
actions = {
{
type = "cluster",
cluster_count = 10,
distance = 4,
distance_deviation = 3,
action_delivery =
{
type = "projectile",
projectile = "electric-spike-rampant",
direction_deviation = 0.6,
starting_speed = 0.65,
starting_speed_deviation = 0.0
}
},
{
type = "area",
perimeter = 3,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 55, type = "electric" }
}
}
}
}
},
spineAnimationTint = {r=0, g=0.1, b=1, a=1},
fireFlameName = "bob-electric-ball-1-flame-rampant",
fireFlameTint = {r=1, g=0.64, b=0.05, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-bob-electric-ball-1-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.7, 0.4, 0.2, 0.1),
smokeName = "bob-electric-ball-1-smoke-rampant",
smokeTint = {r=0.2, g=0.2, b=0.2, a=0.25},
stickerName = "bob-electric-ball-1-sticker-rampant",
stickerTint = { r = 0.45, g = 0.25, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "bob-electric-ball-1-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.45,0.25,0.1, 0.25),
spawnEntityName = "bob-electric-ball-1-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "bob-electric-ball-1-smoke-on-adding-fuel-rampant"
}
)
-- titan
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "bob-titan-ball-stream-rampant",
firePictureTint = {r=1,g=1,b=1,a=1},
smallTreeFlameTint = {r=1,g=1,b=1,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=0, g=0.1, b=1, a=1},
actions = {
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-entity",
entity_name = "small-fire-cloud"
},
{
type = "create-entity",
entity_name = "big-explosion"
}
}
}
},
{
type = "area",
perimeter = 3,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 15, type = "electric" }
},
{
type = "damage",
damage = { amount = 15, type = "explosion" }
},
{
type = "damage",
damage = { amount = 15, type = "fire" }
}
}
}
}
},
spineAnimationTint = {r=0, g=0.1, b=1, a=1},
fireFlameName = "bob-titan-ball-flame-rampant",
fireFlameTint = {r=1, g=0.64, b=0.05, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-bob-titan-ball-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.7, 0.4, 0.2, 0.1),
smokeName = "bob-titan-ball-smoke-rampant",
smokeTint = {r=0.2, g=0.2, b=0.2, a=0.25},
stickerName = "bob-titan-ball-sticker-rampant",
stickerTint = { r = 0.45, g = 0.25, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "bob-titan-ball-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.45,0.25,0.1, 0.25),
spawnEntityName = "bob-titan-ball-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "bob-titan-ball-smoke-on-adding-fuel-rampant"
}
)
-- behemoth
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "bob-behemoth-ball-stream-rampant",
firePictureTint = {r=1,g=1,b=1,a=1},
smallTreeFlameTint = {r=1,g=1,b=1,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=0, g=0.1, b=1, a=1},
actions = {
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-entity",
entity_name = "small-poison-cloud"
},
{
type = "create-entity",
entity_name = "big-explosion"
}
}
}
},
{
type = "area",
perimeter = 3,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 15, type = "electric" }
},
{
type = "damage",
damage = { amount = 15, type = "explosion" }
},
{
type = "damage",
damage = { amount = 15, type = "fire" }
},
{
type = "damage",
damage = { amount = 15, type = "poison" }
}
}
}
}
},
spineAnimationTint = {r=0, g=0.1, b=1, a=1},
fireFlameName = "bob-behemoth-ball-flame-rampant",
fireFlameTint = {r=1, g=0.64, b=0.05, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-bob-behemoth-ball-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.7, 0.4, 0.2, 0.1),
smokeName = "bob-behemoth-ball-smoke-rampant",
smokeTint = {r=0.2, g=0.2, b=0.2, a=0.25},
stickerName = "bob-behemoth-ball-sticker-rampant",
stickerTint = { r = 0.45, g = 0.25, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "bob-behemoth-ball-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.45,0.25,0.1, 0.25),
spawnEntityName = "bob-behemoth-ball-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "bob-behemoth-ball-smoke-on-adding-fuel-rampant"
}
)
-- leviathan
biterStreamUtils.createBiterStreamAttack(
{
fireFlameStreamName = "bob-leviathan-ball-stream-rampant",
firePictureTint = {r=1,g=1,b=1,a=1},
smallTreeFlameTint = {r=1,g=1,b=1,a=1},
particleTimeout = 1,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=0, g=0.1, b=1, a=1},
actions = {
{
type = "cluster",
cluster_count = 4,
distance = 3,
distance_deviation = 1,
action_delivery ={
type = "instant",
target_effects = {
{
type = "create-entity",
entity_name = "big-explosion",
direction_deviation = 0.6,
starting_speed = 1,
starting_speed_deviation = 0.0
}
}
}
},
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
{
type = "create-entity",
entity_name = "big-explosion",
direction_deviation = 0.6,
starting_speed = 1,
starting_speed_deviation = 0.0
}
}
}
},
{
type = "area",
perimeter = 3,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = { amount = 15, type = "electric" }
},
{
type = "damage",
damage = { amount = 20, type = "explosion" }
},
{
type = "damage",
damage = { amount = 15, type = "fire" }
},
{
type = "damage",
damage = { amount = 15, type = "poison" }
},
{
type = "damage",
damage = { amount = 15, type = "bob-pierce" }
},
{
type = "damage",
damage = { amount = 20, type = "acid" }
}
}
}
}
},
spineAnimationTint = {r=0, g=0.1, b=1, a=1},
fireFlameName = "bob-leviathan-ball-flame-rampant",
fireFlameTint = {r=1, g=0.64, b=0.05, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-bob-leviathan-ball-smoke-rampant",
softSmokeTint = biterStreamUtils.make_color(0.7, 0.4, 0.2, 0.1),
smokeName = "bob-leviathan-ball-smoke-rampant",
smokeTint = {r=0.2, g=0.2, b=0.2, a=0.25},
stickerName = "bob-leviathan-ball-sticker-rampant",
stickerTint = { r = 0.45, g = 0.25, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "bob-leviathan-ball-smoke-without-glow-rampant",
smokeWithoutGlowTint = biterStreamUtils.make_color(0.45,0.25,0.1, 0.25),
spawnEntityName = "bob-leviathan-ball-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "bob-leviathan-ball-smoke-on-adding-fuel-rampant"
}
)

View File

@ -1,189 +0,0 @@
local biterFunctions = {}
require "BiterFire"
function biterFunctions.makeBiter(biterAttributes, biterAttack, biterResistances)
biterAttack.scale = biterAttributes.scale;
biterAttack.tint1 = biterAttributes.tint1;
biterAttack.tint2 = biterAttributes.tint2;
return {
type = "unit",
name = biterAttributes.name,
icon = "__base__/graphics/icons/small-biter.png",
flags = {"placeable-player", "placeable-enemy", "placeable-off-grid", "breaths-air"},
max_health = biterAttributes.health,
order = "b-b-a",
subgroup="enemies",
healing_per_tick = biterAttributes.healing,
resistances = biterResistances,
collision_box = {{-0.4 * biterAttributes.scale, -0.4 * biterAttributes.scale},
{0.4 * biterAttributes.scale, 0.4 * biterAttributes.scale}},
selection_box = {{-0.7 * biterAttributes.scale, -1.5 * biterAttributes.scale},
{0.7 * biterAttributes.scale, 0.3 * biterAttributes.scale}},
sticker_box = {{-0.6 * biterAttributes.scale, -0.8 * biterAttributes.scale},
{0.6 * biterAttributes.scale, 0}},
attack_parameters = biterAttack,
vision_distance = 30,
movement_speed = biterAttributes.movement,
distance_per_frame = 0.1,
pollution_to_join_attack = 200,
distraction_cooldown = 300,
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)
}
end
function biterFunctions.makeSpitter(biterAttributes, biterAttack, biterResistances)
-- biterAttack.scale = biterAttributes.scale;
-- biterAttack.tint1 = biterAttributes.tint1;
-- biterAttack.tint2 = biterAttributes.tint2;
return {
type = "unit",
name = biterAttributes.name,
icon = "__base__/graphics/icons/small-spitter.png",
flags = {"placeable-player", "placeable-enemy", "placeable-off-grid", "breaths-air"},
max_health = biterAttributes.health,
order = "b-b-a",
subgroup="enemies",
healing_per_tick = biterAttributes.healing,
resistances = biterResistances,
collision_box = {{-0.4 * biterAttributes.scale, -0.4 * biterAttributes.scale},
{0.4 * biterAttributes.scale, 0.4 * biterAttributes.scale}},
selection_box = {{-0.7 * biterAttributes.scale, -1.5 * biterAttributes.scale},
{0.7 * biterAttributes.scale, 0.3 * biterAttributes.scale}},
sticker_box = {{-0.6 * biterAttributes.scale, -0.8 * biterAttributes.scale},
{0.6 * biterAttributes.scale, 0}},
attack_parameters = biterAttack,
vision_distance = 30,
movement_speed = biterAttributes.movement,
distance_per_frame = biterAttributes.distancePerFrame,
pollution_to_join_attack = 200,
distraction_cooldown = 300,
dying_explosion = biterAttributes.explosion,
dying_sound = make_biter_dying_sounds(1.0),
working_sound = make_biter_calls(0.7),
run_animation = spitterrunanimation(biterAttributes.scale, biterAttributes.tint1, biterAttributes.tint2)
}
end
function biterFunctions.createSuicideAttack(attributes)
return { type = "projectile",
range = 0.5,
cooldown = 35,
ammo_category = "melee",
ammo_type = {
category = "biological",
action = { type = "direct",
action_delivery = { type = "instant",
target_effects = {
{ type = "create-entity",
entity_name = attributes.explosion
},
{ type = "nested-result",
action = { type = "area",
perimeter = attributes.area,
action_delivery = { type = "instant",
target_effects = {
{
type = "damage",
damage = {amount = attributes.damage,
type = "explosion"}
},
}
}
}
},
{
type = "create-entity",
entity_name = attributes.scorchmark,
check_buildability = true
}
}
}
}
},
sound = make_biter_roars(0.5),
animation = biterattackanimation(smallbiterscale, small_biter_tint1, small_biter_tint2)
}
end
function biterFunctions.createFireAttack(attributes)
return {
type = "stream",
ammo_category = "flame-thrower",
cooldown = attributes.cooldown,
range = attributes.range,
min_range = attributes.minRange,
turn_range = attributes.turnRange,
fire_penalty = attributes.firePenalty,
animation = spitterattackanimation(attributes.scale,
attributes.tint1,
attributes.tint2),
gun_barrel_length = 2 * attributes.scale,
gun_center_shift = {
north = {0, -0.65 * attributes.scale},
east = {0, 0},
south = {0, 0},
west = {0, 0}
},
ammo_type =
{
category = "flame-thrower",
action =
{
type = "direct",
action_delivery =
{
type = "stream",
stream = "green-fire-stream",
duration = 160,
}
}
},
cyclic_sound =
{
begin_sound =
{
{
filename = "__base__/sound/fight/flamethrower-start.ogg",
volume = 0.7
}
},
middle_sound =
{
{
filename = "__base__/sound/fight/flamethrower-mid.ogg",
volume = 0.7
}
},
end_sound =
{
{
filename = "__base__/sound/fight/flamethrower-end.ogg",
volume = 0.7
}
}
}
}
end
function biterFunctions.makeResistance(name, decrease, percentage)
local obj = {
type = name,
}
if (decrease ~= 0) then
obj.decrease = decrease
end
if (percentage ~= 0) then
obj.percentage = percentage
end
return obj
end
return biterFunctions

View File

@ -1,6 +1,8 @@
local biterStreamUtils = {}
local math3d = require "math3d"
local function make_color(r_,g_,b_,a_)
function biterStreamUtils.make_color(r_,g_,b_,a_)
return { r = r_ * a_, g = g_ * a_, b = b_ * a_, a = a_ }
end
@ -10,7 +12,7 @@ function foreach(table_, fun_)
end
-- biter stream attack
local function createBiterStreamAttack(attributes)
function biterStreamUtils.createBiterStreamAttack(attributes)
----- UTILS
local function create_burnt_patch_pictures()
@ -776,7 +778,7 @@ local function createBiterStreamAttack(attributes)
scale = 0.6,
shift = {-0.109375 * 0.6, -1.1875 * 0.6},
animation_speed = 0.5,
tint = make_color(0,1,0, 0.75),
tint = biterStreamUtils.make_color(0,1,0, 0.75),
},
{
filename = "__base__/graphics/entity/fire-flame/fire-smoke-source-2.png",
@ -789,7 +791,7 @@ local function createBiterStreamAttack(attributes)
scale = 0.6,
shift = {-0.203125 * 0.6, -1.21875 * 0.6},
animation_speed = 0.5,
tint = make_color(0,1,0, 0.75),
tint = biterStreamUtils.make_color(0,1,0, 0.75),
},
},
@ -817,70 +819,4 @@ local function createBiterStreamAttack(attributes)
}})
end
--- biter attacks
createBiterStreamAttack(
{
fireFlameStreamName = "green-fire-stream",
firePictureTint = {r=0.35,g=0.90,b=0,a=1},
smallTreeFlameTint = {r=0.35,g=0.8,b=0,a=1},
particleTimeout = 2,
particleVertialAcceleration = 0.005 * 0.60,
particleHoizontalSpeed = 0.2* 0.75 * 1.5,
particleHoizontalSpeedDeviation = 0.005 * 0.70,
particleTint = {r=0, g=1, b=1, a=0.5},
actions = {
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-fire",
entity_name = "green-fire-flame"
}
}
}
},
{
type = "area",
perimeter = 2.5,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-sticker",
sticker = "green-fire-sticker"
},
{
type = "damage",
damage = { amount = 1, type = "fire" }
}
}
}
}
},
spineAnimationTint = {r=0, g=1, b=1, a=0.5},
fireFlameName = "green-fire-flame",
fireFlameTint = {r=0, g=0.9, b=0, a=0.5},
fireFlameDamagePerTick = { amount = 45/60, type = "fire" },
softSmokeName = "soft-green-fire-smoke",
softSmokeTint = make_color(0.3, 0.75, 0.3, 0.1),
smokeName = "green-fire-smoke",
smokeTint = {r=0.2, g=0.8, b=0.2, a=0.25},
stickerName = "green-fire-sticker",
stickerTint = { r = 0.25, g = 0.5, b = 0.25, a = 0.18 },
stickerDamagePerTick = { amount = 120 / 60, type = "fire" },
smokeWithoutGlowName = "green-fire-smoke-without-glow",
smokeWithoutGlowTint = make_color(0.25,0.75,0.1, 0.25),
spawnEntityName = "green-fire-flame-on-tree",
spawnEntityDamagePerTick = { amount = 45/60, type = "fire" },
smokeOnAddingFuel = "green-fire-smoke-on-adding-fuel"
}
)
return biterStreamUtils

View File

@ -0,0 +1,256 @@
local biterFunctions = {}
function biterFunctions.makeBiter(biterAttributes, biterAttack, biterResistances)
biterAttack.scale = biterAttributes.scale;
biterAttack.tint1 = biterAttributes.tint1;
biterAttack.tint2 = biterAttributes.tint2;
return {
type = "unit",
name = biterAttributes.name,
icon = "__base__/graphics/icons/small-biter.png",
flags = {"placeable-player", "placeable-enemy", "placeable-off-grid", "breaths-air"},
max_health = biterAttributes.health,
order = "b-b-a",
subgroup="enemies",
healing_per_tick = biterAttributes.healing,
resistances = biterResistances,
collision_box = {{-0.4 * biterAttributes.scale, -0.4 * biterAttributes.scale},
{0.4 * biterAttributes.scale, 0.4 * biterAttributes.scale}},
selection_box = {{-0.7 * biterAttributes.scale, -1.5 * biterAttributes.scale},
{0.7 * biterAttributes.scale, 0.3 * biterAttributes.scale}},
sticker_box = {{-0.6 * biterAttributes.scale, -0.8 * biterAttributes.scale},
{0.6 * biterAttributes.scale, 0}},
attack_parameters = biterAttack,
vision_distance = 30,
movement_speed = biterAttributes.movement,
distance_per_frame = 0.1,
pollution_to_join_attack = 200,
distraction_cooldown = 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)
}
end
function biterFunctions.makeSpitter(biterAttributes, biterAttack, biterResistances)
-- biterAttack.scale = biterAttributes.scale;
-- biterAttack.tint1 = biterAttributes.tint1;
-- biterAttack.tint2 = biterAttributes.tint2;
return {
type = "unit",
name = biterAttributes.name,
icon = "__base__/graphics/icons/small-spitter.png",
flags = {"placeable-player", "placeable-enemy", "placeable-off-grid", "breaths-air"},
max_health = biterAttributes.health,
order = "b-b-a",
subgroup="enemies",
healing_per_tick = biterAttributes.healing,
resistances = biterResistances,
collision_box = {{-0.4 * biterAttributes.scale, -0.4 * biterAttributes.scale},
{0.4 * biterAttributes.scale, 0.4 * biterAttributes.scale}},
selection_box = {{-0.7 * biterAttributes.scale, -1.5 * biterAttributes.scale},
{0.7 * biterAttributes.scale, 0.3 * biterAttributes.scale}},
sticker_box = {{-0.6 * biterAttributes.scale, -0.8 * biterAttributes.scale},
{0.6 * biterAttributes.scale, 0}},
attack_parameters = biterAttack,
vision_distance = 30,
movement_speed = biterAttributes.movement,
distance_per_frame = biterAttributes.distancePerFrame,
pollution_to_join_attack = 200,
distraction_cooldown = 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 = spitterrunanimation(biterAttributes.scale, biterAttributes.tint1, biterAttributes.tint2)
}
end
function biterFunctions.createSuicideAttack(attributes)
return { type = "projectile",
range = 0.5,
cooldown = 35,
ammo_category = "melee",
ammo_type = {
category = "biological",
action = {
{
type = "direct",
action_delivery = {
type = "instant",
target_effects =
{
{
type = "create-entity",
entity_name = attributes.explosion,
check_buildability = true
},
{
type = "nested-result",
action = {
type = "area",
perimeter = attributes.area,
action_delivery = {
type = "instant",
target_effects = {
{
type = "damage",
damage = {
amount = attributes.damage,
type = "explosion"
}
},
}
}
}
},
{
type = "create-entity",
entity_name = attributes.scorchmark,
check_buildability = true
}
}
},
},
{
type = "cluster",
cluster_count = attributes.explosionCount,
distance = attributes.explosionDistance,
distance_deviation = 3,
action_delivery =
{
type = "instant",
target_effects= {
{
type="create-entity",
entity_name = attributes.explosion,
check_buildability = true
},
{
type = "create-entity",
entity_name = attributes.scorchmark,
check_buildability = true
},
{
type = "nested-result",
action = {
type = "area",
perimeter = attributes.area,
action_delivery = {
type = "instant",
target_effects = {
{
type = "damage",
damage = {
amount = attributes.damage,
type = "explosion"
}
},
}
}
}
}
}
}
}
}
},
sound = make_biter_roars(0.5),
animation = biterattackanimation(attributes.scale, attributes.tint1, attributes.tint2)
}
end
function biterFunctions.findRunScale(entity)
return entity.run_animation.layers[1].scale
end
function biterFunctions.findTint(entity)
return entity.run_animation.layers[2].tint
end
function biterFunctions.createFireAttack(attributes, fireAttack)
local attack = {
type = "stream",
ammo_category = "flame-thrower",
cooldown = attributes.cooldown,
range = attributes.range,
min_range = attributes.minRange,
turn_range = attributes.turnRange,
fire_penalty = attributes.firePenalty,
gun_barrel_length = 2 * attributes.scale,
gun_center_shift = {
north = {0, -0.65 * attributes.scale},
east = {0, 0},
south = {0, 0},
west = {0, 0}
},
ammo_type =
{
category = "flame-thrower",
action =
{
type = "direct",
action_delivery =
{
type = "stream",
stream = fireAttack,
duration = 160,
}
}
},
cyclic_sound =
{
begin_sound =
{
{
filename = "__base__/sound/fight/flamethrower-start.ogg",
volume = 0.7
}
},
middle_sound =
{
{
filename = "__base__/sound/fight/flamethrower-mid.ogg",
volume = 0.7
}
},
end_sound =
{
{
filename = "__base__/sound/fight/flamethrower-end.ogg",
volume = 0.7
}
}
}
}
if (attributes.tint1 ~= nil) then
attack.animation = spitterattackanimation(attributes.scale,
attributes.tint1,
attributes.tint2)
end
return attack
end
function biterFunctions.makeResistance(name, decrease, percentage)
local obj = {
type = name,
}
if (decrease ~= 0) then
obj.decrease = decrease
end
if (percentage ~= 0) then
obj.percentage = percentage
end
return obj
end
return biterFunctions

View File

@ -0,0 +1,112 @@
local biterUtils = require("BiterUtils")
local createFireAttack = biterUtils.createFireAttack
local makeSpitter = biterUtils.makeSpitter
local makeResistance = biterUtils.makeResistance
local smallFireBiterScale = 0.53
local smallFireBiterTint1 = {r=0.8, g=0.0, b=0.20, a=0.8}
local smallFireBiterTint2 = {r=0.7, g=0.0, b=0.30, a=0.4}
local mediumFireBiterScale = 0.73
local mediumFireBiterTint1 = {r=0.8, g=0.0, b=0.20, a=0.8}
local mediumFireBiterTint2 = {r=0.7, g=0.0, b=0.30, a=0.4}
local bigFireBiterScale = 1.05
local bigFireBiterTint1 = {r=0.8, g=0.0, b=0.20, a=0.8}
local bigFireBiterTint2 = {r=0.7, g=0.0, b=0.30, a=0.4}
local behemothFireBiterScale = 1.23
local behemothFireBiterTint1 = {r=0.8, g=0.0, b=0.20, a=0.8}
local behemothFireBiterTint2 = {r=0.7, g=0.0, b=0.30, a=0.4}
data:extend({
makeSpitter({name = "small-fire-spitter-rampant",
health = 15,
movement = 0.0,
distancePerFrame = 0.00,
healing = 0.01,
scale = smallFireBiterScale,
tint1 = smallFireBiterTint1,
tint2 = smallFireBiterTint2,
corpse = "small-spitter-corpse",
explosion = "blood-explosion-small"},
createFireAttack({ scale = smallFireBiterScale,
tint1 = smallFireBiterTint1,
tint2 = smallFireBiterTint2,
range = 13,
minRange = 5,
cooldown = 55,
turnRange = 1,
firePenalty = 15}, "acid-flame-fire-stream-rampant"),
{
makeResistance("fire", 0, 15)
}),
makeSpitter({name = "medium-fire-spitter-rampant",
health = 65,
movement = 0.165,
distancePerFrame = 0.055,
healing = 0.01,
scale = mediumFireBiterScale,
tint1 = mediumFireBiterTint1,
tint2 = mediumFireBiterTint2,
corpse = "medium-spitter-corpse",
explosion = "blood-explosion-small"},
createFireAttack({ scale = mediumFireBiterScale,
tint1 = mediumFireBiterTint1,
tint2 = mediumFireBiterTint2,
range = 14,
minRange = 5,
cooldown = 40,
turnRange = 1,
firePenalty = 15}, "acid-flame-1-fire-stream-rampant"),
{
makeResistance("fire", 2, 35)
}),
makeSpitter({name = "big-fire-spitter-rampant",
health = 225,
movement = 0.15,
distancePerFrame = 0.07,
healing = 0.01,
scale = bigFireBiterScale,
tint1 = bigFireBiterTint1,
tint2 = bigFireBiterTint2,
corpse = "big-spitter-corpse",
explosion = "blood-explosion-big"},
createFireAttack({ scale = bigFireBiterScale,
tint1 = bigFireBiterTint1,
tint2 = bigFireBiterTint2,
range = 16,
minRange = 5,
cooldown = 25,
turnRange = 1,
firePenalty = 15}, "acid-flame-1-fire-stream-rampant"),
{
makeResistance("fire", 4, 55)
}),
makeSpitter({name = "behemoth-fire-spitter-rampant",
health = 2250,
movement = 0.15,
distancePerFrame = 0.084,
healing = 0.01,
scale = behemothFireBiterScale,
tint1 = behemothFireBiterTint1,
tint2 = behemothFireBiterTint2,
corpse = "behemoth-spitter-corpse",
explosion = "blood-explosion-big"},
createFireAttack({ scale = behemothFireBiterScale,
tint1 = behemothFireBiterTint1,
tint2 = behemothFireBiterTint2,
range = 17,
minRange = 5,
cooldown = 15,
turnRange = 1,
firePenalty = 15}, "acid-flame-2-fire-stream-rampant"),
{
makeResistance("fire", 6, 75)
})
})

View File

@ -0,0 +1,110 @@
local biterUtils = require("BiterUtils")
local makeBiter = biterUtils.makeBiter
local createSuicideAttack = biterUtils.createSuicideAttack
local makeResistance = biterUtils.makeResistance
local smallSuicideBiterScale = 0.55
local smallSuicideBiterTint1 = {r=0.6, g=0.0, b=0.70, a=0.8}
local smallSuicideBiterTint2 = {r=0.7, g=0.0, b=0.72, a=0.4}
local mediumSuicideBiterScale = 0.75
local mediumSuicideBiterTint1 = {r=0.6, g=0.0, b=0.70, a=0.8}
local mediumSuicideBiterTint2 = {r=0.7, g=0.0, b=0.72, a=0.4}
local bigSuicideBiterScale = 1.05
local bigSuicideBiterTint1 = {r=0.6, g=0.0, b=0.70, a=0.8}
local bigSuicideBiterTint2 = {r=0.7, g=0.0, b=0.72, a=0.4}
local behemothSuicideBiterScale = 1.25
local behemothSuicideBiterTint1 = {r=0.6, g=0.0, b=0.70, a=0.8}
local behemothSuicideBiterTint2 = {r=0.7, g=0.0, b=0.72, a=0.4}
data:extend({
makeBiter({name = "small-suicide-biter-rampant",
health = 30,
movement = 0.21,
distancePerFrame = 0.1,
healing = 0.01,
scale = smallSuicideBiterScale,
tint1 = smallSuicideBiterTint1,
tint2 = smallSuicideBiterTint2,
explosion = "blood-explosion-small"},
createSuicideAttack({ area = 3.5,
damage = 20,
explosion = "explosion",
scorchmark = "small-scorchmark",
explosionCount = 2,
explosionDistance = 2,
scale = smallSuicideBiterScale,
tint1 = smallSuicideBiterTint1,
tint2 = smallSuicideBiterTint2}),
{makeResistance("explosion", 0, -50),
makeResistance("laser", 1, 0),
makeResistance("fire", 0, -60)}),
makeBiter({name = "medium-suicide-biter-rampant",
health = 125,
movement = 0.19,
distancePerFrame = 0.15,
healing = 0.01,
scale = mediumSuicideBiterScale,
tint1 = mediumSuicideBiterTint1,
tint2 = mediumSuicideBiterTint2,
explosion = "blood-explosion-small"},
createSuicideAttack({ area = 4.5,
damage = 28,
explosion = "big-explosion",
scorchmark = "small-scorchmark",
explosionCount = 4,
explosionDistance = 2,
scale = mediumSuicideBiterScale,
tint1 = mediumSuicideBiterTint1,
tint2 = mediumSuicideBiterTint2}),
{makeResistance("physical", 1, 0),
makeResistance("explosion", 0, -40),
makeResistance("laser", 1, 20),
makeResistance("fire", 0, -50)}),
makeBiter({name = "big-suicide-biter-rampant",
health = 425,
movement = 0.18,
distancePerFrame = 0.19,
scale = bigSuicideBiterScale,
tint1 = bigSuicideBiterTint1,
tint2 = bigSuicideBiterTint2,
explosion = "blood-explosion-big"},
createSuicideAttack({ area = 5.5,
damage = 63,
explosion = "big-explosion",
scorchmark = "small-scorchmark",
explosionCount = 8,
explosionDistance = 3,
scale = bigSuicideBiterScale,
tint1 = bigSuicideBiterTint1,
tint2 = bigSuicideBiterTint2}),
{makeResistance("physical", 2, 0),
makeResistance("explosion", 0, -30),
makeResistance("laser", 3, 25),
makeResistance("fire", 0, -30)}),
makeBiter({name = "behemoth-suicide-biter-rampant",
health = 1200,
movement = 0.18,
distancePerFrame = 0.19,
scale = behemothSuicideBiterScale,
tint1 = behemothSuicideBiterTint1,
tint2 = behemothSuicideBiterTint2,
explosion = "blood-explosion-big"},
createSuicideAttack({ area = 7.5,
damage = 150,
explosion = "massive-explosion",
scorchmark = "small-scorchmark",
explosionCount = 12,
explosionDistance = 3,
scale = behemothSuicideBiterScale,
tint1 = behemothSuicideBiterTint1,
tint2 = behemothSuicideBiterTint2}),
{makeResistance("physical", 4, 20),
makeResistance("explosion", 0, -20),
makeResistance("laser", 5, 30),
makeResistance("fire", 0, -10)})
})

View File

@ -0,0 +1,229 @@
local bobsUpdates = {}
local biterUtils = require("BiterUtils")
function bobsUpdates.useDumbProjectiles()
local turrets = data.raw["turret"];
turrets["bob-big-explosive-worm-turret"]["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 25,
min_range = 3,
turn_range = 1,
fire_penalty = 0,
scale = 1.2
},
"bob-explosive-ball-1-stream-rampant")
turrets["bob-big-fire-worm-turret"]["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 25,
min_range = 3,
turn_range = 1,
fire_penalty = 0,
scale = 1.2
},
"bob-fire-ball-stream-rampant")
turrets["bob-big-poison-worm-turret"]["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 25,
min_range = 3,
turn_range = 1,
fire_penalty = 0,
scale = 1.2
},
"bob-poison-ball-1-stream-rampant")
turrets["bob-big-piercing-worm-turret"]["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 25,
min_range = 3,
turn_range = 1,
fire_penalty = 0,
scale = 1.2
},
"bob-piercing-ball-stream-rampant")
turrets["bob-big-electric-worm-turret"]["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 25,
min_range = 3,
turn_range = 1,
fire_penalty = 0,
scale = 1.2
},
"bob-electric-ball-1-stream-rampant")
turrets["bob-giant-worm-turret"]["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 28,
min_range = 3,
turn_range = 1,
fire_penalty = 0,
scale = 1.6
},
"acid-ball-4-stream-rampant")
turrets["bob-behemoth-worm-turret"]["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 30,
min_range = 3,
turn_range = 1,
fire_penalty = 0,
scale = 2
},
"acid-ball-5-stream-rampant")
local units = data.raw["unit"]
local unit = units["behemoth-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"acid-ball-3-stream-rampant")
unit = units["bob-big-electric-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 0,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"bob-electric-ball-stream-rampant")
unit = units["bob-huge-explosive-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"bob-explosive-ball-stream-rampant")
unit = units["bob-huge-acid-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"wide-acid-ball-stream-rampant")
unit = units["bob-giant-fire-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"bob-fire-ball-stream-rampant")
unit = units["bob-giant-poison-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"bob-poison-ball-stream-rampant")
unit = units["bob-giant-poison-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"bob-poison-ball-stream-rampant")
unit = units["bob-titan-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"bob-titan-ball-stream-rampant")
unit = units["bob-behemoth-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"bob-behemoth-ball-stream-rampant")
unit = units["bob-leviathan-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"bob-leviathan-ball-stream-rampant")
end
return bobsUpdates

View File

@ -0,0 +1,101 @@
local vanillaUpdates = {}
local biterUtils = require("BiterUtils")
function vanillaUpdates.useDumbProjectiles()
local turrets = data.raw["turret"];
turrets["small-worm-turret"]["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 30,
range = 17,
min_range = 5,
turn_range = 1,
fire_penalty = 0,
scale = 0.8
},
"acid-ball-stream-rampant")
turrets["medium-worm-turret"]["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 20,
min_range = 3,
turn_range = 1,
fire_penalty = 0,
scale = 1
},
"acid-ball-1-stream-rampant")
turrets["big-worm-turret"]["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 25,
min_range = 3,
turn_range = 1,
fire_penalty = 0,
scale = 1.2
},
"acid-ball-2-stream-rampant")
local units = data.raw["unit"];
local unit = units["small-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 55,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"acid-ball-stream-rampant")
unit = units["medium-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 50,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"acid-ball-1-stream-rampant")
unit = units["big-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 48,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"acid-ball-2-stream-rampant")
unit = units["behemoth-spitter"]
unit["attack_parameters"] = biterUtils.createFireAttack(
{
cooldown = 45,
range = 15,
min_range = 3,
turn_range = 1,
fire_penalty = 15,
scale = biterUtils.findRunScale(unit),
tint1 = biterUtils.findTint(unit),
tint2 = biterUtils.findTint(unit)
},
"acid-ball-3-stream-rampant")
end
return vanillaUpdates

View File

@ -1,33 +0,0 @@
local utils = require("BiterFunctions")
local createFireAttack = utils.createFireAttack
local makeSpitter = utils.makeSpitter
local makeResistance = utils.makeResistance
local smallFireBiterScale = 0.53
local smallFireBiterTint1 = {r=0.8, g=0.0, b=0.20, a=0.8}
local smallFireBiterTint2 = {r=0.7, g=0.0, b=0.30, a=0.4}
data:extend({
makeSpitter({name = "small-fire-spitter",
health = 15,
movement = 0.19,
distancePerFrame = 0.04,
healing = 0.01,
scale = smallFireBiterScale,
tint1 = smallFireBiterTint1,
tint2 = smallFireBiterTint2,
explosion = "blood-explosion-small"},
createFireAttack({ scale = smallFireBiterScale,
tint1 = smallFireBiterTint1,
tint2 = smallFireBiterTint2,
range = 12,
minRange = 1,
cooldown = 55,
turnRange = 1.0/3.0,
firePenalty = 15}),
{
makeResistance("fire", 0, 15)
})
})

View File

@ -1,63 +0,0 @@
local util = require("BiterFunctions")
local makeBiter = util.makeBiter
local createSuicideAttack = util.createSuicideAttack
local makeResistance = util.makeResistance
data:extend({
makeBiter({name = "small-suicide-biter",
health = 30,
movement = 0.25,
healing = 0.01,
scale = 0.55,
tint1 = {r=0.6, g=0.0, b=0.70, a=0.8},
tint2 = {r=0.7, g=0.0, b=0.72, a=0.4},
explosion = "blood-explosion-small"},
createSuicideAttack({ area = 3.5,
damage = 60,
explosion = "explosion",
scorchmark = "small-scorchmark"})),
makeBiter({name = "medium-suicide-biter",
health = 125,
movement = 0.24,
healing = 0.01,
scale = 0.75,
tint1 = {r=0.6, g=0.0, b=0.70, a=0.8},
tint2 = {r=0.7, g=0.0, b=0.72, a=0.4},
explosion = "blood-explosion-small"},
createSuicideAttack({ area = 4.5,
damage = 140,
explosion = "medium-explosion",
scorchmark = "small-scorchmark"}),
{makeResistance("physical", 4, 0),
makeResistance("explosion", 0, 10),
makeResistance("fire", 0, -50)}),
makeBiter({name = "big-suicide-biter",
health = 425,
movement = 0.23,
scale = 1.05,
tint1 = {r=0.6, g=0.0, b=0.70, a=0.8},
tint2 = {r=0.7, g=0.0, b=0.72, a=0.4},
explosion = "blood-explosion-big"},
createSuicideAttack({ area = 5.5,
damage = 500,
explosion = "big-explosion",
scorchmark = "small-scorchmark"}),
{makeResistance("physical", 8, 0),
makeResistance("explosion", 0, 10),
makeResistance("fire", 0, -30)}),
makeBiter({name = "behemoth-suicide-biter",
health = 1200,
movement = 0.22,
scale = 1.25,
tint1 = {r=0.6, g=0.0, b=0.70, a=0.8},
tint2 = {r=0.7, g=0.0, b=0.72, a=0.4},
explosion = "blood-explosion-big"},
createSuicideAttack({ area = 7.5,
damage = 3000,
explosion = "massive-explosion",
scorchmark = "small-scorchmark"}),
{makeResistance("physical", 8, 20),
makeResistance("explosion", 10, 20),
makeResistance("fire", 0, -10)})
})

View File

@ -97,7 +97,8 @@ function tests.test8(x)
local playerPosition = game.players[1].position
local chunkX = math.floor(playerPosition.x * 0.03125) * 32
local chunkY = math.floor(playerPosition.y * 0.03125) * 32
game.surfaces[1].create_entity({name=x, force="enemy", position={chunkX, chunkY}})
local entity = game.surfaces[1].create_entity({name=x, force="enemy", position={chunkX, chunkY}})
--entity.insert({ name = "flame-thrower-ammo", count = 1})
end
function tests.test9()