2018-03-02 10:30:25 +02:00
|
|
|
local bombUtils = {}
|
|
|
|
|
|
|
|
function bombUtils.makeAtomicBlast(attributes)
|
|
|
|
local name = attributes.name .. "-atomic-blast-rampant"
|
|
|
|
data:extend({{
|
2019-11-12 08:05:54 +02:00
|
|
|
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",
|
2019-11-13 07:00:43 +02:00
|
|
|
damage = {amount = (attributes.damage * 2) or 400,
|
|
|
|
type = attributes.damageType or "explosion"}
|
2019-11-12 08:05:54 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
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
|