summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--const.js7
-rw-r--r--play.css2
-rw-r--r--play.js12
-rw-r--r--rules.js5
4 files changed, 21 insertions, 5 deletions
diff --git a/const.js b/const.js
index a464d64..9f0dd5f 100644
--- a/const.js
+++ b/const.js
@@ -29,7 +29,14 @@ const PIECE_FACTION_TYPE_NAME = [
[ "Temple", "Raja", null ],
[ null, null, "Invader" ]
]
+const PIECE_FACTION_TYPE_SYMBOL = [
+ [ null, "EDS", "CDS" ],
+ [ null, "EBK", null ],
+ [ null, "EVE", null ],
+ [ null, null, "CMI" ]
+]
const LAST_CAVALRY = 9
+const INF_TOKEN = [null, "IBK", "IVE"]
// Sequence of Play options
const ELIGIBLE = 0
diff --git a/play.css b/play.css
index 19625de..b2df5fc 100644
--- a/play.css
+++ b/play.css
@@ -167,6 +167,8 @@ img.f {
#log img.c { height: 15px; vertical-align: -3px }
#log img.f { height: 16px; vertical-align: -2px }
+#log img.h { height: 16px; vertical-align: -2px }
+#log img.i { height: 34px; vertical-align: -3px; margin: -10px; }
#log { font-variant-numeric: tabular-nums; }
#log .italic { font-style: italic; }
diff --git a/play.js b/play.js
index 1568708..71b70d2 100644
--- a/play.js
+++ b/play.js
@@ -1363,17 +1363,21 @@ function sub_space(match, p1) {
return `<span class="tip" onmouseenter="on_focus_space_tip(${x})" onmouseleave="on_blur_space_tip(${x})" onmousedown="on_click_space_tip(${x})">${n}</span>`
}
-const E_DS = '<img class="c" src="pieces/ds_governor.svg">'
-const E_BK = '<img class="c" src="pieces/bk_amir.svg">'
-const E_VE = '<img class="c" src="pieces/ve_raja.svg">'
+const E_DS = '<img class="h" src="pieces/ds_governor.svg">'
+const E_BK = '<img class="h" src="pieces/bk_amir.svg">'
+const E_VE = '<img class="h" src="pieces/ve_raja.svg">'
const C_DS = '<img class="c" src="pieces/ds_troop.svg">'
const C_MI = '<img class="c" src="pieces/mongol_invader.svg">'
+
const F_DS = '<img class="f" src="images/Flags_DS.png">'
const F_BK = '<img class="f" src="images/Flags_BK.png">'
const F_VE = '<img class="f" src="images/Flags_VE.png">'
const F_MI = '<img class="f" src="images/Flags_MI.png">'
+const I_BK = '<img class="i" src="images/Influence_BK.png">'
+const I_VE = '<img class="i" src="images/Influence_VE.png">'
+
function on_log(text) {
let p = document.createElement("div")
let sub_text = ""
@@ -1396,6 +1400,8 @@ function on_log(text) {
text = text.replace(/\bFBK\b/g, F_BK)
text = text.replace(/\bFVE\b/g, F_VE)
text = text.replace(/\bFMI\b/g, F_MI)
+ text = text.replace(/\bIBK\b/g, I_BK)
+ text = text.replace(/\bIVE\b/g, I_VE)
if (text.match(/^\.h1 Mongol Invaders/)) {
text = text.substring(19)
diff --git a/rules.js b/rules.js
index 44b3403..b51d206 100644
--- a/rules.js
+++ b/rules.js
@@ -3223,7 +3223,7 @@ function add_influence(faction) {
return
game.inf[faction]++
- log(faction_flags[faction] + " gained Influence.")
+ log(`Increased ${INF_TOKEN[faction]} to ${game.inf[faction]}.`)
update_vp()
if (faction === BK && game.inf[faction] === 2)
@@ -3239,7 +3239,7 @@ function remove_influence(faction) {
end_influence()
} else {
game.inf[faction]--
- log(faction_flags[faction] + " lost Influence.")
+ log(`Decreased ${INF_TOKEN[faction]} to ${game.inf[faction]}.`)
update_vp()
if (faction === BK && game.inf[faction] === 3)
@@ -5718,6 +5718,7 @@ const PIECE_FACTION_TYPE_SYMBOL = [
[ null, null, "CMI" ]
]
const LAST_CAVALRY = 9
+const INF_TOKEN = [null, "IBK", "IVE"]
// Sequence of Play options
const ELIGIBLE = 0