summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/play.js b/play.js
index a386b5a..e2e966d 100644
--- a/play.js
+++ b/play.js
@@ -243,6 +243,7 @@ function on_init() {
if (c > 0) {
e.my_id = c
e.onclick = on_click_card
+ register_action(e, "card", c)
}
}
@@ -621,9 +622,12 @@ function on_update() {
show_marker_at_xy(ui.french_alliance, data.layout.french_alliance_track[view.french_alliance])
ui.hand.replaceChildren()
- if (view.hand)
- for (let c of view.hand)
+ if (view.hand) {
+ for (let c of view.hand) {
+ ui.cards[c].classList.toggle("selected", view.selected_card === c)
ui.hand.appendChild(ui.cards[c])
+ }
+ }
e = document.getElementById("war_ends")
if (view.war_ends)
@@ -654,6 +658,15 @@ function on_update() {
animate_positions()
+ action_button("exchange", "Exchange")
+ action_button("queue", "Queue")
+ action_button("reinforce", "Reinforce")
+ action_button("activate", "Activate")
+ action_button("pc_action", "PC Action")
+ action_button("event", "Event")
+ action_button("campaign", "Campaign")
+
+
action_button("pickup_french_cu", "Take French CU")
action_button("pickup_british_cu", "Take CU")
action_button("pickup_american_cu", "Take CU")
@@ -1068,7 +1081,7 @@ function on_update() {
let cards = view.hand
for (let c = 1; c <= 110; ++c) {
- ui.cards[c].classList.remove("enabled")
+ ui.cards[c].classList.toggle("selected", view.selected_card === c)
if (cards && cards.includes(c))
ui.cards[c].classList.add("show")
else