In Angels Exploration I am creating an ammo that shoots 2 (identical) projectiles:
Code: Select all
ammo_type = {
category = "cannon-shell",
target_type = "direction",
action = {
type = "direct",
repeat_count = 2,
action_delivery = {
type = "projectile",
projectile = "heavy-explosive-cannon-projectile",
starting_speed = 1,
direction_deviation = 0.2,
range_deviation = 0.1,
max_range = 40,
source_effects = {
type = "create-explosion",
entity_name = "explosion-gunshot"
}
}
}
},
Code: Select all
action = {
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
{
type = "damage",
damage = {amount = 150, type = "physical"}
},
{
type = "create-entity",
entity_name = "explosion"
}
}
}
},
final_action = {
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
{
type = "create-entity",
entity_name = "big-explosion"
},
{
type = "nested-result",
action = {
type = "area",
radius = 4,
action_delivery = {
type = "instant",
target_effects = {
{
type = "damage",
damage = {amount = 300, type = "explosion"}
},
{
type = "create-entity",
entity_name = "explosion"
}
}
}
}
}
}
}
},
The code for the projectile and ammo can be found in prototypes/entities/ammo-heavy-cannon-shells.lua line 99-208.
Kind regards
lovely_santa