Today morning it occured to me. For long it was a military tactic to undermine city walls and make them collapse. By digging a cavity under the city walls and either blowing up a large quantity of explosives; or earlier start a fire and set the mine prop on fire.
See also: https://en.wikipedia.org/wiki/Tunnel_warfare
Proposed unit flag:
Code: Select all
_("WallAttacker"), _("Can do a surgical strike attack against city walls")
units. Ruleset
Code: Select all
[unit_miners]
name = _("Miners")
class = "Land"
tech_req = "Construction"
obsolete_by = "Flight"
graphic = "u.miner"
graphic_alt = "u.engineer"
sound_move = "m_warriors"
sound_move_alt = "m_generic"
sound_fight = "f_warriors"
sound_fight_alt = "f_generic"
build_cost = 20
pop_cost = 0
attack = 1
defense = 1
hitpoints = 6
firepower = 1
move_rate = 1
vision_radius_sq = 1
transport_cap = 0
fuel = 0
uk_happy = 0
uk_shield = 1
uk_food = 1
uk_gold = 0
flags = "WallAttacker", "BarbarianTech"
helptext = _("\
Miners, or Sappers, are Combat Engineers who dig tunnels under\
City Walls in order to breach through them.\
"), _("\
Miners are a cheap unit. Because they can be recruited from the city\
population which has experience in mining. But they cost one food\
per turn.
"), _("\
Miners are weak in offense and defense. They need an escort to be effective.
")
Proposed Action:
Code: Select all
; /* TRANS: Destroy City Walls (33% chance of success). */
ui_name_surgical_strike_citywalls = _("Destroy City Walls")
How can I write an action enabler for a surgical strike on city walls?
For game.ruleset
Code: Select all
[actionenabler_destroy_city_walls]
action = "User Action 2"
actor_reqs = {
"type", "name", "range", "present"
"UnitFlag", "WallAttacker", "Local", TRUE
"DiplRel", "War", "Local", TRUE
"UnitState", "OnLivableTile", "Local" TRUE
"MinMoveFrags", "1", "Local" TRUE
"UnitState", "Transported", "Local", FALSE
}
target_reqs = {
"type", "name", "range", "present"
"Building", "City Walls", "City", TRUE
}
Code: Select all
[effect_action_success_move_cost_miner]
type = "Action_Success_Actor_Move_Cost"
value = 65535
reqs = {
"type", "name", "range", "present"
"Action", "User Action 2", "Local", TRUE
}
[effect_destroywalls_half_chance]
type = "Action_Odds_Pct"
value = -67
reqs = {
"type", "name", "range", "present"
"Action", "User Action 2", "Local", TRUE
}
am I'm doing it right?
\\//_ Live long and prosper