From ca168e3d99fd49602ea290c04045e7140c5da70e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 27 Oct 2024 20:22:42 +0100 Subject: political flavor texts and log formatting --- play.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'play.js') 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 -- cgit v1.2.3