diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-06-22 14:24:23 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:19:38 +0100 |
commit | 822e4c4932ea93e031fc031618e895eef6bbbd01 (patch) | |
tree | 34e9a6d4ca1d17eb70c17a377f42facea5e08395 /ui.js | |
parent | 3320cc77f28d56c33f7af492f87b4f06012937e3 (diff) | |
download | crusader-rex-822e4c4932ea93e031fc031618e895eef6bbbd01.tar.gz |
crusader: End storming when all withdraw.
Diffstat (limited to 'ui.js')
-rw-r--r-- | ui.js | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -119,8 +119,10 @@ function on_focus_battle_block(evt) { if (game.actions && game.actions.battle_fire && game.actions.battle_fire.includes(b)) msg = "Fire with " + msg; - else if (game.actions && game.actions.battle_retreat && game.actions.battle_retreat.includes(b)) - msg = "Retreat with " + msg; + else if (game.actions && game.actions.battle_storm && game.actions.battle_storm.includes(b)) + msg = "Storm with " + msg; + else if (game.actions && game.actions.battle_sally && game.actions.battle_sally.includes(b)) + msg = "Sally with " + msg; else if (game.actions && game.actions.battle_hit && game.actions.battle_hit.includes(b)) msg = "Take hit on " + msg; @@ -142,8 +144,12 @@ function on_focus_battle_fire(evt) { } function on_focus_battle_retreat(evt) { - document.getElementById("status").textContent = - "Retreat with " + block_name(evt.target.block); + if (game.battle.storming.includes(evt.target.block)) + document.getElementById("status").textContent = + "Withdraw with " + block_name(evt.target.block); + else + document.getElementById("status").textContent = + "Retreat with " + block_name(evt.target.block); } function on_focus_battle_harry(evt) { |