summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2025-01-09 11:24:40 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2025-01-09 11:24:40 +0000
commitc5bf68eaf286680014d6eaf2aab0b6350704e4b9 (patch)
tree300e39cc025ffba737ccb98de00d24fb08965ff0 /play.js
parent12ecf37f645f3b9c2ed958e914618b4ff6ff2b60 (diff)
download1989-dawn-of-freedom-c5bf68eaf286680014d6eaf2aab0b6350704e4b9.tar.gz
Add confirm steps in Power Struggle
Diffstat (limited to 'play.js')
-rw-r--r--play.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/play.js b/play.js
index 29d10e9..590d68d 100644
--- a/play.js
+++ b/play.js
@@ -892,14 +892,18 @@ function on_update() {
ui.persistent.appendChild(ui.cards[c])
ui.played_card.replaceChildren()
- if (view.played_card > 0)
- ui.played_card.appendChild(ui.cards[view.played_card])
- if (view.vm_event > 0 && view.vm_event < 111)
- ui.played_card.appendChild(ui.cards[view.vm_event])
- if (view.power_card_1 > 0)
- ui.played_card.appendChild(ui.power_cards[view.power_card_1])
- if (view.power_card_2 > 0)
- ui.played_card.appendChild(ui.power_cards[view.power_card_2])
+ if (!view.scoring_card) {
+ if (view.played_card > 0)
+ ui.played_card.appendChild(ui.cards[view.played_card])
+ if (view.vm_event > 0 && view.vm_event < 111)
+ ui.played_card.appendChild(ui.cards[view.vm_event])
+ } else {
+ ui.played_card.appendChild(ui.cards[view.scoring_card])
+ if (view.power_card_1 > 0)
+ ui.played_card.appendChild(ui.power_cards[view.power_card_1])
+ if (view.power_card_2 > 0)
+ ui.played_card.appendChild(ui.power_cards[view.power_card_2])
+ }
for (let e of action_register)
e.classList.toggle("action", is_action(e.my_action, e.my_id))