diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -408,6 +408,9 @@ let ui = { pieces: document.getElementById("pieces"), cards: document.getElementById("cards"), last_card: document.getElementById("last_card"), + bpa_reluctant: document.getElementById("bpa_reluctant"), + bpa_supportive: document.getElementById("bpa_supportive"), + bpa_enthusiastic: document.getElementById("bpa_enthusiastic"), space_list: [], } @@ -1005,6 +1008,10 @@ for (let p = 0; p < pieces.length; ++p) else build_unit(p) +ui.bpa_reluctant.onclick = () => send_action("reluctant") +ui.bpa_supportive.onclick = () => send_action("supportive") +ui.bpa_enthusiastic.onclick = () => send_action("enthusiastic") + document.getElementById("last_card").addEventListener("mouseenter", on_focus_last_card) document.getElementById("last_card").addEventListener("mouseleave", on_blur_last_card) @@ -1388,6 +1395,7 @@ function update_card(id) { card.element.classList.add('highlight') else card.element.classList.remove('highlight') + card.element.classList.toggle('selected', id === view.selected_card) if (view.hand.includes(id)) card.element.classList.add("show") else @@ -1440,6 +1448,10 @@ function update_map() { for (let i = 0; i < pieces.length; ++i) update_piece(i) + ui.bpa_reluctant.classList.toggle("highlight", !!(view.actions && view.actions.reluctant)) + ui.bpa_supportive.classList.toggle("highlight", !!(view.actions && view.actions.supportive)) + ui.bpa_enthusiastic.classList.toggle("highlight", !!(view.actions && view.actions.enthusiastic)) + if (focus && focus.length === 0) focus = null @@ -1545,6 +1557,9 @@ function update_map() { "PASS on playing \"Foul Weather\" for the rest of this ACTION PHASE?" ) + action_button("roll", "Roll") + action_button("draw", "Draw") + action_button("pass", "Pass") action_button("next", "Next") action_button("end_construction", "End construction") |