diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-03-23 23:26:04 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | e5edcf0b76e59e73c491291ce41b81549f0fa0b8 (patch) | |
tree | f7325ee3011d2fc0b8d7225b53fd6ae634fc1b6b /play.js | |
parent | aa9d655781955ed63adc9d08097c7234bd1186ad (diff) | |
download | wilderness-war-e5edcf0b76e59e73c491291ce41b81549f0fa0b8.tar.gz |
Fix bugs found during play testing session.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -161,6 +161,7 @@ const EARLY = 0; const LATE = 1; const VP_MARKER = "marker vps "; +const VP10_MARKER = "marker vps vps_10 "; const PA_MARKER = "marker provincial_assemblies "; const SEASON_MARKER_FF = "marker season_french_first "; const SEASON_MARKER_BF = "marker season_british_first "; @@ -331,6 +332,10 @@ function on_log(text) { text = "Raid at " + text.substring(6); p.className = 'h3 raid'; } + if (text.match(/^\.b /)) { + text = text.substring(3); + p.className = 'b'; + } if (text.indexOf("\n") < 0) { p.innerHTML = text; @@ -1288,6 +1293,10 @@ function update_card(id) { card.element.classList.add('enabled'); else card.element.classList.remove('enabled'); + if (view.actions && view.actions.card && view.actions.card.includes(id)) + card.element.classList.add('highlight'); + else + card.element.classList.remove('highlight'); if (view.hand.includes(id)) card.element.classList.add("show"); else @@ -1365,11 +1374,11 @@ function update_map() { let vpm = document.getElementById("vp_marker"); if (view.vp > 10) - vpm.className = VP_MARKER + "flip french_vp_" + (view.vp-10); + vpm.className = VP10_MARKER + "french_vp_" + (view.vp-10); else if (view.vp > 0) vpm.className = VP_MARKER + "french_vp_" + view.vp; else if (view.vp < -10) - vpm.className = VP_MARKER + "flip british_vp_" + (-(view.vp+10)); + vpm.className = VP10_MARKER + "flip british_vp_" + (-(view.vp+10)); else if (view.vp < 0) vpm.className = VP_MARKER + "british_vp_" + (-view.vp); else |