summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js10
1 files changed, 10 insertions, 0 deletions
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)) {