From 3b1f1fcecea5f891131ae891299a5884fc12db0c Mon Sep 17 00:00:00 2001 From: iainp5 Date: Sun, 3 Nov 2024 08:10:13 +0000 Subject: Auto show discard for events --- play.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'play.js') diff --git a/play.js b/play.js index 8672373..3517802 100644 --- a/play.js +++ b/play.js @@ -667,7 +667,6 @@ function on_update() { ui.hand.replaceChildren() for (let c of view.hand) ui.hand.appendChild(ui.cards[c]) - console.log('ui.hand', ui.hand) ui.power_hand.replaceChildren() if (view.power_hand) @@ -695,6 +694,10 @@ function on_update() { ui.discard.replaceChildren() for (let c of view.strategy_discard) ui.discard.appendChild(ui.cards[c]) + if (view.discard) + document.getElementById("discard_panel").classList.remove("hide") + else + document.getElementById("discard_panel").classList.add("hide") ui.removed.replaceChildren() for (let c of view.strategy_removed) -- cgit v1.2.3