1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-05 22:53:24 +02:00
Rampant/prototypes/Poison.lua

90 lines
3.4 KiB
Lua
Raw Normal View History

2022-01-15 00:08:58 +02:00
-- Copyright (C) 2022 veden
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
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