summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/play.js b/play.js
index 24f26ee..918c052 100644
--- a/play.js
+++ b/play.js
@@ -605,7 +605,7 @@ function sub_card(_match, p1) {
}
function sub_medallion(_match, p1) {
- return `<span class="tip" onmouseenter="on_focus_medallion_tip(${p1})" onmouseleave="on_blur_tip()">${data.medallions[p1].name}</span>`
+ return `<i class="tip" onmouseenter="on_focus_medallion_tip(${p1})" onmouseleave="on_blur_tip()">${data.medallions[p1].name}</i>`
}
function sub_token(match) {
@@ -614,6 +614,7 @@ function sub_token(match) {
case "Tc": return `<img src="images/icons/player_communist.png">`
case "Tm": return `<img src="images/icons/player_moderate.png">`
case "Tf": return `<img src="images/icons/player_fascist.png">`
+ case "HP": return `<img src="images/icons/hero_point.png">`
}
return match
}
@@ -630,6 +631,9 @@ function on_log(text) { // eslint-disable-line no-unused-vars
p.className = "i"
}
+ text = text.replace(/<-/g, "\u2190")
+ text = text.replace(/->/g, "\u2192")
+
text = text.replace(/&/g, "&amp;")
text = text.replace(/</g, "&lt;")
text = text.replace(/>/g, "&gt;")
@@ -638,6 +642,9 @@ function on_log(text) { // eslint-disable-line no-unused-vars
text = text.replace(/\bC(\d+)\b/g, sub_card)
text = text.replace(/\bM(\d+)\b/g, sub_medallion)
text = text.replace(/\bT[acmf]\b/g, sub_token)
+ text = text.replace(/\bHP\b/g, "Hero points")
+ // text = text.replace(/\bHP\b/g, "\u272b")
+ // text = text.replace(/\bHP\b/g, sub_token)
if (text.startsWith("#")) {
p.className = "h " + text[1]