summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-01-06 22:05:09 +0100
committerTor Andersson <tor@ccxvii.net>2025-01-08 10:46:27 +0100
commitaad5c0dfcec0e4eeefacb4bccce30e514d98b98c (patch)
tree63e9c70dc9262cf8cb14aab685a35ba3c88fb379
parenta5de4ca91a621eae2604d349d1852967a25aefee (diff)
download1989-dawn-of-freedom-aad5c0dfcec0e4eeefacb4bccce30e514d98b98c.tar.gz
use mathematical minus in log
-rw-r--r--play.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/play.js b/play.js
index 33220a5..fdc22f6 100644
--- a/play.js
+++ b/play.js
@@ -987,6 +987,10 @@ function sub_die(match) {
return die[match] || match
}
+function sub_minus(match) {
+ return "\u2012" + match.substring(1)
+}
+
function sub_icon(match) {
return ICONS[match] || match
}
@@ -1051,6 +1055,7 @@ function on_log(text, ix) {
text = text.replace(/V(\d+)/g, sub_power_card_value)
text = text.replace(/%(\d+)/g, sub_space_name)
text = text.replace(/D[1-6]/g, sub_die)
+ text = text.replace(/-\d/g, sub_minus)
text = text.replace(/£[CDU][CU]\b/g, sub_icon)
text = text.replace(/\.cT(\d+)/g, sub_icon)
text = text.replace(/\.dT(\d+)/g, sub_icon)