summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
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))