Hi,
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:Proposed unit:
units. RulesetMiners become obsolete after the invention of flight. Because flight makes city walls obsolete too – at least in my ruleset.
Proposed Action:That is the easy part, my question now is:
How can I write an action enabler for a surgical strike on city walls?
For game.rulesetFor effects.rulesetI only want to target the City Walls with the unit, nothing else.
am I'm doing it right?
\\//_ Live long and prosper
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:
_("WallAttacker"), _("Can do a surgical strike attack against city walls")
units. Ruleset
Code:
[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 = 20pop_cost = 0attack = 1defense = 1hitpoints = 6firepower = 1move_rate = 1vision_radius_sq = 1transport_cap = 0fuel = 0uk_happy = 0uk_shield = 1uk_food = 1uk_gold = 0flags = "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:
; /* 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:
[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:
[effect_action_success_move_cost_miner]type = "Action_Success_Actor_Move_Cost"value = 65535reqs = { "type", "name", "range", "present" "Action", "User Action 2", "Local", TRUE}[effect_destroywalls_half_chance]type = "Action_Odds_Pct"value = -67reqs = { "type", "name", "range", "present" "Action", "User Action 2", "Local", TRUE}
am I'm doing it right?
\\//_ Live long and prosper
Statistics: Posted by VulcanScout — Thu Apr 25, 2024 2:35 pm — Replies 1 — Views 18