diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -93,7 +93,6 @@ let ui = { months: [], axis_supply: document.getElementById("axis_supply"), allied_supply: document.getElementById("allied_supply"), - turn_info: document.getElementById("turn_info"), hand: document.getElementById("hand"), battle: document.getElementById("battle"), battle_hits: [ @@ -1015,9 +1014,15 @@ function on_update() { else ui.pursuit.classList.add("hide") - ui.axis_supply.textContent = view.axis_hand - ui.allied_supply.textContent = view.allied_hand - ui.turn_info.textContent = `Month: ${view.month} / ${view.end}\nSupply Commitment: ${view.commit}` + if (view.phasing === "Axis" && view.commit >= 0) + ui.axis_supply.textContent = view.commit + " + " + view.axis_hand + else + ui.axis_supply.textContent = view.axis_hand + + if (view.phasing === "Allied" && view.commit >= 0) + ui.allied_supply.textContent = view.commit + " + " + view.allied_hand + else + ui.allied_supply.textContent = view.allied_hand for (let i = 0; i < 28; ++i) ui.cards[i].classList.toggle("action", !!(view.actions && view.actions.real_card)) |