diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-01-18 14:42:05 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 12:12:42 +0100 |
commit | d1dd9316d41cf86ccf4739355d88afd10ad27e05 (patch) | |
tree | ca0aa44e36861ac8cfd696143383f78fbe019be1 /play.js | |
parent | 5ecaccd4eb5abbf78a516fe234d49560addc7888 (diff) | |
download | shores-of-tripoli-d1dd9316d41cf86ccf4739355d88afd10ad27e05.tar.gz |
Improve log formatting.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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'; } |