diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-12-29 13:51:29 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:38 +0100 |
commit | 1159095b92d85e934037f2c0323135b2e443b0e6 (patch) | |
tree | fe70ff3c54f7fe1e6d6fb3cd087d5520480bc0d8 /play.js | |
parent | fe861a54da448078aac87288a1e8929a8bc2c5fb (diff) | |
download | nevsky-1159095b92d85e934037f2c0323135b2e443b0e6.tar.gz |
Storm.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -510,7 +510,7 @@ const ui = { court2: document.getElementById("court2"), battle_attacker_reserves: document.getElementById("mat_attacker_reserves"), battle_defender_reserves: document.getElementById("mat_defender_reserves"), - battle_garrison: document.getElementById("mat_garrison"), + garrison: document.getElementById("mat_garrison"), battle_panel: document.getElementById("battle_panel"), battle_header: document.getElementById("battle_header"), pursuit: document.getElementById("mat_pursuit"), @@ -1390,6 +1390,14 @@ function update_battle() { ui.battle_cylinder[lord].classList.toggle("action", is_battle_lord_action(lord)) ui.battle_cylinder[lord].classList.toggle("selected", view.who === lord) } + + ui.garrison.replaceChildren() + if (view.battle.garrison) { + for (let i = 0; i < view.battle.garrison.knights; ++i) + add_force(parent, KNIGHTS, -1, 0) + for (let i = 0; i < view.battle.garrison.men_at_arms; ++i) + add_force(parent, MEN_AT_ARMS, -1, 0) + } } function is_lord_in_grid(lord) { |