1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-07 23:01:39 +02:00
Rampant/prototypes/Poison.lua

74 lines
2.7 KiB
Lua
Raw Normal View History

2019-02-14 07:53:31 +02:00
-- imports
local smokeUtils = require("utils/SmokeUtils")
-- constants
local poison = {}
-- imported functions
local makeCloud = smokeUtils.makeCloud
2019-11-13 07:21:55 +02:00
function poison.addFactionAddon()
2021-02-28 00:50:26 +02:00
2019-02-14 07:53:31 +02:00
for i=1,10 do
makeCloud(
{
name = "poison-cloud-v" .. i,
scale = 0.80 + (i * 0.15),
wind = true,
slowdown = -1.3,
2019-10-30 04:36:18 +02:00
duration = 10 * (i * 5),
cooldown = 5
2019-02-14 07:53:31 +02:00
},
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
type = "nested-result",
action =
{
{
type = "area",
radius = 2 + (i * 0.5),
force = "ally",
entity_flags = {"placeable-enemy"},
action_delivery =
{
type = "instant",
target_effects =
{
type = "damage",
2019-10-30 04:36:18 +02:00
damage = { amount = -2 * i, type = "healing"}
2019-02-14 07:53:31 +02:00
}
}
},
{
type = "area",
radius = 2 + (i * 0.5),
force = "enemy",
action_delivery =
{
type = "instant",
target_effects =
{
type = "damage",
2021-04-04 02:16:25 +02:00
damage = { amount = 0.9 * i, type = "poison"}
2019-02-14 07:53:31 +02:00
}
}
}
}
}
}
}
)
end
2021-02-28 00:50:26 +02:00
2019-02-14 07:53:31 +02:00
end
return poison