diff options
author | Troy Nordine <tdnordine@gmail.com> | 2023-09-28 08:54:51 -0500 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-10 18:16:55 +0100 |
commit | 11fc065ac09d0b57027ffec56a6ac0e90ca9a3a8 (patch) | |
tree | 38f19e9c0ea1203ed2fe86410c9d1eaaab6fde0f /play.js | |
parent | 1566a8613d4bf21eafdeaa3135c7c496d420e315 (diff) | |
download | plantagenet-11fc065ac09d0b57027ffec56a6ac0e90ca9a3a8.tar.gz |
Initial coding. Still needs testing.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -462,6 +462,10 @@ function is_lord_selected(ix) { return false } +function is_lord_in_exile(ix) { + return pack1_get(view.pieces.in_exile, ix) +} + function get_lord_capability(lord, n) { return view.pieces.capabilities[(lord << 1) + n] } @@ -801,6 +805,9 @@ function build_map() { register_action(e, "lord", ix) register_tooltip(e, on_focus_cylinder) document.getElementById("pieces").appendChild(e) + let exile = document.createElement("div") + exile.className = "exile hide" + e.appendChild(exile) build_lord_mat(lord, ix, side, lord.id) }) @@ -1184,6 +1191,7 @@ function update_lord(ix) { if (t > 16) t = 16 calendar_layout_cylinder[t].push(ui.lord_cylinder[ix]) ui.lord_cylinder[ix].classList.remove("hide") + ui.lord_cylinder[ix].getElementByClassName("exile")[0].classList.toggle("hide", is_lord_in_exile(ix)) } ui.lord_buttons[ix].classList.toggle("action", is_action("lord", ix)) ui.lord_cylinder[ix].classList.toggle("action", is_action("lord", ix)) |