diff options
author | teisuru <31881306+teisuru@users.noreply.github.com> | 2024-02-18 03:20:44 +0100 |
---|---|---|
committer | teisuru <31881306+teisuru@users.noreply.github.com> | 2024-02-18 03:20:44 +0100 |
commit | 207cf362a12beee6294f8d8aa0b0b15386106dbd (patch) | |
tree | db3e1e6c058146ca11731e4647779856fbd1c1d9 | |
parent | d913d2c8e1d8d3fb37e725a1dff250636762f024 (diff) | |
download | plantagenet-207cf362a12beee6294f8d8aa0b0b15386106dbd.tar.gz |
fix warden of the march routed units
-rw-r--r-- | rules.js | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -8253,6 +8253,21 @@ states.warden_of_the_marches = { for (let lord = first_lancaster_lord; lord <= last_lancaster_lord; lord++) { if (get_lord_locale(lord) === game.battle.where) { set_lord_locale(lord, loc) + if (!lord_has_unrouted_troops(lord)) { + disband_lord(lord, false) + } + else { + set_lord_forces(lord, RETINUE, 1) + } + if (get_lord_routed_forces(lord, x) > 0) { + set_lord_routed_forces(lord, x, 0) + } + 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) + } + }) } } logi(`Moved to ${data.locales[loc].name}`) |