summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-10-27 20:22:42 +0100
committerTor Andersson <tor@ccxvii.net>2024-10-27 20:22:42 +0100
commitca168e3d99fd49602ea290c04045e7140c5da70e (patch)
treed02322ddf131414ad3ac036f70354b09257503dc /play.js
parenta6776816e5493055ecf16d5ff9c81c4ebe131f0b (diff)
downloadmaria-ca168e3d99fd49602ea290c04045e7140c5da70e.tar.gz
political flavor texts and log formatting
Diffstat (limited to 'play.js')
-rw-r--r--play.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/play.js b/play.js
index e5bb15b..fffe5ba 100644
--- a/play.js
+++ b/play.js
@@ -1445,7 +1445,11 @@ function on_log(text) {
text = text.replace(/P(\d+)/g, sub_piece)
text = text.replace(/C(\d+)/g, sub_political)
- if (text.startsWith("#")) {
+ if (text.startsWith("@")) {
+ p.className = "move_tip"
+ text = sub_path(text.substring(1).split(";"))
+ }
+ else if (text.startsWith("#")) {
p.className = "h turn"
text = text.substring(2)
}
@@ -1456,9 +1460,9 @@ function on_log(text) {
else
text = text.substring(2)
}
- else if (text.startsWith("@")) {
- p.className = "move_tip"
- text = sub_path(text.substring(1).split(";"))
+ else if (text.startsWith("%")) {
+ p.className = "q"
+ text = political_cards[text.substring(1)].flavor
}
p.innerHTML = text