diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-27 20:22:42 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-27 20:22:42 +0100 |
commit | ca168e3d99fd49602ea290c04045e7140c5da70e (patch) | |
tree | d02322ddf131414ad3ac036f70354b09257503dc /play.js | |
parent | a6776816e5493055ecf16d5ff9c81c4ebe131f0b (diff) | |
download | maria-ca168e3d99fd49602ea290c04045e7140c5da70e.tar.gz |
political flavor texts and log formatting
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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 |