diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -509,7 +509,6 @@ function on_update() { stack_cache = {} - ui.body.classList.toggle("p1", view.solo === 1) ui.body.classList.toggle("p2", player_count === 2) ui.body.classList.toggle("p3", player_count === 3) ui.body.classList.toggle("p4", player_count === 4) @@ -657,6 +656,10 @@ function on_update() { } } + for (let region = 0; region < 21; ++region) { + ui.regions[region].classList.toggle("selected", view.selected_region === region) + } + for (let region = 0; region < 12; ++region) { if (has_militia(region)) { let lone_militia = true @@ -738,6 +741,7 @@ function on_update() { avail_stack.push(e) } e.classList.toggle("unavailable", region === UNAVAILABLE) + e.classList.toggle("selected", view.selected_general === pi * 6 + ai) } layout_available(avail_stack, 63, pi * 625 + 0, 30) } @@ -748,7 +752,7 @@ function on_update() { let id = 100 + 100 * pi + ai let region = get_governor_location(first_governor[pi] + ai) let e = ui.governors[pi][ai] - if (region >= 1 && region < 12) { + if (region < 12) { layout_governor(e, PLAYER_CLASS[pi], region) } else { if (region === AVAILABLE) @@ -758,6 +762,7 @@ function on_update() { avail_stack.push(e) } e.classList.toggle("unavailable", region === UNAVAILABLE) + e.classList.toggle("selected", view.selected_governor === pi * 6 + ai) } layout_available(avail_stack, 58, pi * 625 + 325, 27) } @@ -797,9 +802,9 @@ function on_update() { } ui.market.replaceChildren() - for (let pile of view.market) { - if (pile.length > 0) - ui.market.appendChild(ui.cards[pile[0]]) + for (let c of view.market) { + if (c > 0) + ui.market.appendChild(ui.cards[c]) } for (let e of action_register) |