summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-10-22 22:19:15 +0200
committerTor Andersson <tor@ccxvii.net>2024-10-22 23:37:57 +0200
commit23bd83c80d3e0a2d7dd18f76ae4039effd7ce448 (patch)
treefa5e2beeacbf025c8250cfe77059c7add6048363 /play.js
parent78754928c9b1c55bdffe40ff33342c7329f3ce77 (diff)
downloadmaria-23bd83c80d3e0a2d7dd18f76ae4039effd7ce448.tar.gz
political shifts and troops+tcs
Diffstat (limited to 'play.js')
-rw-r--r--play.js33
1 files changed, 24 insertions, 9 deletions
diff --git a/play.js b/play.js
index 6a76f5f..363615d 100644
--- a/play.js
+++ b/play.js
@@ -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")