diff options
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 48 |
1 files changed, 41 insertions, 7 deletions
@@ -837,7 +837,10 @@ let event_side = null function sub_card_name(_match, p1) { let x = p1 | 0 - return `<span class="card_name" onmouseenter="on_focus_card_tip(${x})" onmouseleave="on_blur_card_tip()">${cards[x].name.replace("*", "")}</span>` + if (scoring_cards.includes(x)) + return `<span class="scoring_card_name" onmouseenter="on_focus_card_tip(${x})" onmouseleave="on_blur_card_tip()">${cards[x].name.replace("*", "")}</span>` + else + return `<span class="card_name" onmouseenter="on_focus_card_tip(${x})" onmouseleave="on_blur_card_tip()">${cards[x].name.replace("*", "")}</span>` } function sub_power_card_name(_match, p1) { @@ -898,6 +901,7 @@ const die = { function on_log(text, ix) { let p = document.createElement("div") + console.log('text', text) let event_string = text.match(/^C(\d+)/) if (event_string) event_n = parseInt(event_string[1]) @@ -932,16 +936,46 @@ function on_log(text, ix) { text = text.substring(4) p.className = "h2" log_event = 0 - } else if (text.match(/^\.d/)) { - text = "Democrat Action Round" + } else if (text.match(/^\.O\.d/)) { + text = "operations" p.className = "h2 dem" log_event = 0 - } /*else if (text.match(/\.D$/)) { - p.classList.add("dem") - } */ else if (text.match(/^\.c/)) { - text = "Communist Action Round" + } else if (text.match(/^\.V\.d/)) { + text = "event" + p.className = "h2 dem" + log_event = 0 + } else if (text.match(/^\.T\.d/)) { + text = "event and operations" + p.className = "h2 dem" + log_event = 0 + } else if (text.match(/^\.S\.d/)) { + text = text.replace(".S.d", "") + p.className = "h2 dem" + log_event = 0 + } else if (text.match(/^\.O\.c/)) { + text = "operations" + p.className = "h2 com" + log_event = 0 + } else if (text.match(/^\.V\.c/)) { + text = "event" + p.className = "h2 com" + log_event = 0 + } else if (text.match(/^\.T\.c/)) { + text = "event and operations" + p.className = "h2 com" + log_event = 0 + } else if (text.match(/^\.S\.c/)) { + text = text.replace(".S.c", "") p.className = "h2 com" log_event = 0 + } else if (text.match(/\.c/)) { + text = text.replace(".c", "") + p.className = "h2 com" + log_event = 0 + } else if (text.match(/\.d/)) { + text = text.replace(".d", "") + p.className = "h2 dem" + log_event = 0 } else if (text.match(/^\.h3/)) { text = text.substring(4) p.className = "h3" |