From e40e0171938dfe33c7069f2ca5c199a294bcd586 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 16 Sep 2022 00:32:56 +0200 Subject: Show eliminated units off to the side of the Qattara depression. --- play.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'play.js') diff --git a/play.js b/play.js index ed17112..f083057 100644 --- a/play.js +++ b/play.js @@ -23,6 +23,7 @@ const SS_TOBRUK = 4 const SS_OASIS = 5 const DEPLOY = 1 +const ELIMINATED = 2 const ARMOR = 0 const INFANTRY = 1 @@ -375,6 +376,8 @@ function on_focus_unit(evt) { t += " - moved" if (is_unit_fired(u)) t += " - fired" + if (unit_hex(u) === ELIMINATED) + t += " - eliminated" document.getElementById("status").textContent = t } @@ -716,6 +719,7 @@ function layout_stack(stack, hex, start_x, start_y, wrap, xdir) { e.classList.toggle("action", !view.battle && is_unit_action(u)) e.classList.toggle("selected", !view.battle && is_unit_selected(u)) e.classList.toggle("moved", is_unit_moved(u)) + e.classList.toggle("eliminated", unit_hex(u) === ELIMINATED) } } @@ -750,6 +754,12 @@ function update_map() { for (let u = 0; u < unit_count; ++u) { let e = ui.units[u] let hex = unit_hex(u) + if (hex === 2) { + if (is_axis_unit(u)) + hex = 170 + else + hex = 171 + } if (hex >= hexdeploy + view.month + 10) hex = 0 if (is_setup_hex(hex)) { -- cgit v1.2.3