diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -496,12 +496,10 @@ function make_tc_deck_hand(n) { return list } -function make_political_card(pc) { +function make_political_card(id) { let e = document.createElement("div") - if (pc === 0) - e.className = "card polcard reverse" - else - e.className = "card polcard c" + pc + e.className = "card polcard c" + id + register_action(e, "political", id) return e } @@ -1100,7 +1098,7 @@ function on_update() { ui.pc_display[pow].replaceChildren() for (let tc of view.saved[pow]) ui.pc_display[pow].appendChild(show_tc(tc)) - if (view.display[pow] >= 0) + if (view.display && view.display[pow] >= 0) ui.pc_display[pow].appendChild(show_tc(view.display[pow])) } @@ -1215,8 +1213,8 @@ function on_update() { function sub_political(match, p1) { let x = p1 | 0 - let n = political_name[x] - return `<span class="political_tip ${p}" onmouseenter="on_focus_political_tip(${x})" onmouseleave="on_blur_political_tip(${x})">${n}</span>` + let n = political_cards[x].title + return `<span class="card_tip" onmouseenter="on_focus_political_tip(${x})" onmouseleave="on_blur_political_tip(${x})">${n}</span>` } function sub_piece(match, p1) { |