diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-04-20 01:32:15 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-04-20 01:32:15 +0200 |
commit | ffcdc5f11cf7affa60d804c63fddba06dbb3b2e7 (patch) | |
tree | b8a042f0de364612cb3ce2c532e586e1911d7c32 | |
parent | 95d2a81a4b418a7fcf2b0118edc24760597f4137 (diff) | |
download | plantagenet-ffcdc5f11cf7affa60d804c63fddba06dbb3b2e7.tar.gz |
Rout Vassals in death check step.
-rw-r--r-- | play.css | 4 | ||||
-rw-r--r-- | rules.ts | 26 |
2 files changed, 16 insertions, 14 deletions
@@ -376,11 +376,11 @@ body.shift .exhausted { } .unit.retinue.action { - box-shadow: 0 0 0 2px white; + box-shadow: 0 0 0 1px black, 0 0 0 4px white !important; } .unit.vassal.action { - box-shadow: 0 0 0 2px white; + box-shadow: 0 0 0 1px black, 0 0 0 4px white !important; } .unit.shape.action { @@ -7289,6 +7289,20 @@ states.battle_spoils = { function goto_death_or_disband() { remove_battle_capability_troops() + // TODO: manually disband routed vassals + + // Routed Vassals get disbanded + for (let lord of all_lords) { + if (is_lord_on_map(lord)) { + for_each_vassal_with_lord(lord, v => { + if (set_has(game.battle.routed_vassals, v)) { + array_remove(game.battle.routed_vassals, v) + disband_vassal(v) + } + }) + } + } + if (has_defeated_lords()) { if (is_bloody_thou_art_triggered()) game.state = "bloody_thou_art" @@ -7597,18 +7611,6 @@ function end_warden_of_the_marches() { function goto_battle_aftermath() { set_active(game.battle.attacker) - // Routed Vassals get disbanded - for (let lord of all_lords) { - if (is_lord_on_map(lord)) { - for_each_vassal_with_lord(lord, v => { - if (set_has(game.battle.routed_vassals, v)) { - array_remove(game.battle.routed_vassals, v) - disband_vassal(v) - } - }) - } - } - // Events discard_events("hold") |