diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-22 22:19:15 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-22 23:37:57 +0200 |
commit | 23bd83c80d3e0a2d7dd18f76ae4039effd7ce448 (patch) | |
tree | fa5e2beeacbf025c8250cfe77059c7add6048363 /play.js | |
parent | 78754928c9b1c55bdffe40ff33342c7329f3ce77 (diff) | |
download | maria-23bd83c80d3e0a2d7dd18f76ae4039effd7ce448.tar.gz |
political shifts and troops+tcs
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 33 |
1 files changed, 24 insertions, 9 deletions
@@ -363,11 +363,11 @@ const ui = { pol_tracks: document.getElementById("pol_tracks"), pc_deck: document.getElementById("pc_deck"), pc_show: document.getElementById("pc_show"), - pc_display: [ - document.getElementById("display_france"), - document.getElementById("display_prussia"), - document.getElementById("display_pragmatic"), - document.getElementById("display_austria"), + pc_placed: [ + document.getElementById("placed_france"), + document.getElementById("placed_prussia"), + document.getElementById("placed_pragmatic"), + document.getElementById("placed_austria"), ], discard: [ document.getElementById("discard_1"), @@ -1094,12 +1094,15 @@ function on_update() { if (view.flags & F_IMPERIAL_ELECTION) ui.pc_deck.appendChild(ui.political[25]) + for (let pc = 1; pc <= 25; ++pc) + ui.political[pc].classList.toggle("selected", pc === view.pc) + for (let pow of all_major_powers) { - ui.pc_display[pow].replaceChildren() + ui.pc_placed[pow].replaceChildren() for (let tc of view.saved[pow]) - ui.pc_display[pow].appendChild(show_tc(tc)) - if (view.display && view.display[pow] >= 0) - ui.pc_display[pow].appendChild(show_tc(view.display[pow])) + ui.pc_placed[pow].appendChild(show_tc(tc)) + if (view.placed && view.placed[pow] >= 0) + ui.pc_placed[pow].appendChild(show_tc(view.placed[pow])) } ui.pc_show.replaceChildren() @@ -1171,6 +1174,17 @@ function on_update() { layout_combat_marker() } + action_button_with_argument("suit", SPADES, colorize_S) + action_button_with_argument("suit", CLUBS, colorize_C) + action_button_with_argument("suit", HEARTS, colorize_H) + action_button_with_argument("suit", DIAMONDS, colorize_D) + + action_button_with_argument("shift", -2, "\u2b05\u2b05") + action_button_with_argument("shift", -1, "\u2b05") + action_button_with_argument("shift", +1, "\u27a1") + action_button_with_argument("shift", +2, "\u27a1\u27a1") + action_button_with_argument("shift", +4, "\u27a1\u27a1\u27a1\u27a1") + for (let v = 16; v >= 0; --v) action_button_with_argument("value", v, v) @@ -1193,6 +1207,7 @@ function on_update() { action_button("next", "Next") action_button("done", "Done") + action_button("end_political_card", "End political card") action_button("end_cards", "End card draw") action_button("end_setup", "End setup") action_button("end_recruit", "End recruit") |