diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-03 08:10:13 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-03 08:10:13 +0000 |
commit | 3b1f1fcecea5f891131ae891299a5884fc12db0c (patch) | |
tree | 8dd59fce057f8d92b1a4f483f2f297e4c8318e5b | |
parent | 677818d36c8491ea9f6978e547f1e5428e280628 (diff) | |
download | 1989-dawn-of-freedom-3b1f1fcecea5f891131ae891299a5884fc12db0c.tar.gz |
Auto show discard for events
-rw-r--r-- | play.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) |