summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-03-23 23:26:04 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 11:54:52 +0100
commite5edcf0b76e59e73c491291ce41b81549f0fa0b8 (patch)
treef7325ee3011d2fc0b8d7225b53fd6ae634fc1b6b /play.js
parentaa9d655781955ed63adc9d08097c7234bd1186ad (diff)
downloadwilderness-war-e5edcf0b76e59e73c491291ce41b81549f0fa0b8.tar.gz
Fix bugs found during play testing session.
Diffstat (limited to 'play.js')
-rw-r--r--play.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/play.js b/play.js
index b2c5b58..dc158ca 100644
--- a/play.js
+++ b/play.js
@@ -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