1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-10 00:28:31 +02:00
Rampant/prototypes/utils/BombUtils.lua

61 lines
2.2 KiB
Lua
Raw Normal View History

2018-03-02 10:30:25 +02:00
local bombUtils = {}
function bombUtils.makeAtomicBlast(attributes)
local name = attributes.name .. "-atomic-blast-rampant"
data:extend({{
type = "projectile",
name = name,
flags = {"not-on-map"},
acceleration = 0,
action =
{
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-entity",
entity_name = "explosion"
}
}
}
},
{
type = "area",
radius = 3,
action_delivery =
{
type = "instant",
target_effects =
{
type = "damage",
damage = {amount = (attributes.damage * 2) or 400, type = attributes.damageType or "explosion"}
}
}
}
},
animation =
{
filename = "__core__/graphics/empty.png",
frame_count = 1,
width = 1,
height = 1,
priority = "high"
},
shadow =
{
filename = "__core__/graphics/empty.png",
frame_count = 1,
width = 1,
height = 1,
priority = "high"
}
2018-03-02 10:30:25 +02:00
}})
return name
end
return bombUtils