diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2025-01-02 23:30:44 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2025-01-02 23:30:44 +0000 |
commit | eec721d105dbb0f8835e5624c2927999c2e77ac5 (patch) | |
tree | f7f8f7f4a327d636c81e52e46167ca41b5e1d132 | |
parent | ab2a641ec97cb6c766bc85436f20b5453c33eb13 (diff) | |
download | 1989-dawn-of-freedom-eec721d105dbb0f8835e5624c2927999c2e77ac5.tar.gz |
Add powercard placeholder
-rw-r--r-- | play.css | 1 | ||||
-rw-r--r-- | play.js | 10 |
2 files changed, 7 insertions, 4 deletions
@@ -540,3 +540,4 @@ body.Communist header.your_turn { background-color: hsl(355, 70%, 75%); } .card.power_50 { background-image: url(cards75/power_50.avif) } .card.power_51 { background-image: url(cards75/power_51.avif) } .card.power_52 { background-image: url(cards75/power_52.avif) } +.card.power_53 { background-image: url(cards75/power_back.avif) }
\ No newline at end of file @@ -509,7 +509,7 @@ function create_ui() { } ui.power_cards = [] - for (let c = 1; c <= last_power_card; ++c) { + for (let c = 1; c <= last_power_card + 1; ++c) { const power_card_e = document.createElement("div") register_action(power_card_e, "power_card", c) power_card_e.className = "card power_card power_" + c @@ -848,9 +848,11 @@ function on_update() { ui.hand.appendChild(ui.cards[c]) ui.power_hand.replaceChildren() - if (view.power_hand) - for (let c of view.power_hand) - ui.power_hand.appendChild(ui.power_cards[c]) + if (view.is_pwr_struggle) + ui.power_hand.appendChild(ui.power_cards[53]) + if (view.power_hand.length > 0) + for (let c of view.power_hand) + ui.power_hand.appendChild(ui.power_cards[c]) ui.power_discard.replaceChildren() if (view.power_struggle_discard) |