summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-01-18 14:42:05 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:12:42 +0100
commitd1dd9316d41cf86ccf4739355d88afd10ad27e05 (patch)
treeca0aa44e36861ac8cfd696143383f78fbe019be1 /play.js
parent5ecaccd4eb5abbf78a516fe234d49560addc7888 (diff)
downloadshores-of-tripoli-d1dd9316d41cf86ccf4739355d88afd10ad27e05.tar.gz
Improve log formatting.
Diffstat (limited to 'play.js')
-rw-r--r--play.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/play.js b/play.js
index 277145e..f9fd829 100644
--- a/play.js
+++ b/play.js
@@ -133,10 +133,16 @@ create_log_entry = function (text) {
text = text.replace(/\u201c(.*)\u201d/g, sub_log_entry_tip);
if (text.match(/^Start of \d+/)) {
text = text.substring(9, text.length-1);
- p.className = 'st';
+ p.className = 'year';
} else if (text.match(/^Start of /)) {
text = text.substring(9, text.length-1);
- p.className = 'ss';
+ p.className = 'season';
+ } else if (text.match(/^Pirate raid from/)) {
+ p.className = 'raid';
+ } else if (text.match(/^(Naval|Land) (battle|bombardment) in/)) {
+ p.className = 'battle';
+ } else if (text.match(/^(Naval|Land) battle (round)/)) {
+ p.className = 'round';
} else if (text.match(/(victory:|ends in a draw)/)) {
p.className = 'end';
}