diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-12-29 16:44:13 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:38 +0100 |
commit | 08adea8de7a35f3c989f73257662e65a53b27fac (patch) | |
tree | 2afa4dfc2e82328437f8f3556cd861f140ed17c9 /play.js | |
parent | 1159095b92d85e934037f2c0323135b2e443b0e6 (diff) | |
download | nevsky-08adea8de7a35f3c989f73257662e65a53b27fac.tar.gz |
And lots of bug fixes.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1394,9 +1394,9 @@ function update_battle() { ui.garrison.replaceChildren() if (view.battle.garrison) { for (let i = 0; i < view.battle.garrison.knights; ++i) - add_force(parent, KNIGHTS, -1, 0) + add_force(ui.garrison, KNIGHTS, -1, 0) for (let i = 0; i < view.battle.garrison.men_at_arms; ++i) - add_force(parent, MEN_AT_ARMS, -1, 0) + add_force(ui.garrison, MEN_AT_ARMS, -1, 0) } } @@ -1496,7 +1496,7 @@ function on_update() { ui.veche.classList.toggle("action", is_veche_action()) - if (view.battle) { + if (view.battle && view.battle.array) { ui.battle_panel.classList.remove("hide") ui.battle_header.textContent = "~ Battle at " + data.locales[view.battle.where].name + " ~" if (view.battle.attacker === player) { |