summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-20 01:32:15 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-20 01:32:15 +0200
commitffcdc5f11cf7affa60d804c63fddba06dbb3b2e7 (patch)
treeb8a042f0de364612cb3ce2c532e586e1911d7c32
parent95d2a81a4b418a7fcf2b0118edc24760597f4137 (diff)
downloadplantagenet-ffcdc5f11cf7affa60d804c63fddba06dbb3b2e7.tar.gz
Rout Vassals in death check step.
-rw-r--r--play.css4
-rw-r--r--rules.ts26
2 files changed, 16 insertions, 14 deletions
diff --git a/play.css b/play.css
index 3b41b6e..b6c0347 100644
--- a/play.css
+++ b/play.css
@@ -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 {
diff --git a/rules.ts b/rules.ts
index 914c7f6..603b036 100644
--- a/rules.ts
+++ b/rules.ts
@@ -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")