summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-12-29 13:51:29 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:38 +0100
commit1159095b92d85e934037f2c0323135b2e443b0e6 (patch)
treefe70ff3c54f7fe1e6d6fb3cd087d5520480bc0d8 /play.js
parentfe861a54da448078aac87288a1e8929a8bc2c5fb (diff)
downloadnevsky-1159095b92d85e934037f2c0323135b2e443b0e6.tar.gz
Storm.
Diffstat (limited to 'play.js')
-rw-r--r--play.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/play.js b/play.js
index 48913b8..54a9853 100644
--- a/play.js
+++ b/play.js
@@ -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) {