From c5bf68eaf286680014d6eaf2aab0b6350704e4b9 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Thu, 9 Jan 2025 11:24:40 +0000 Subject: Add confirm steps in Power Struggle --- play.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'play.js') 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)) -- cgit v1.2.3