diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-03-23 15:10:06 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:12:55 +0100 |
commit | d0d2772604ab579f951a746b53674632d4256ec4 (patch) | |
tree | 30cd437d2d77656bc9e69c34fd31efcab5360124 | |
parent | 198a0be104cfbcbd625bed36b57f65a970d991a9 (diff) | |
download | richard-iii-d0d2772604ab579f951a746b53674632d4256ec4.tar.gz |
Show current scenario in game log.
-rw-r--r-- | play.js | 4 | ||||
-rw-r--r-- | rules.js | 1 |
2 files changed, 4 insertions, 1 deletions
@@ -69,7 +69,9 @@ function on_log(text) { text = text.replace(/^([A-Z]):/, '<span class="$1"> $1 </span>'); - if (text.match(/^~ .* ~$/)) + if (text.match(/^Scenario: /)) + p.className = 'st', text = text.substring(10); + else if (text.match(/^~ .* ~$/)) p.className = 'br', text = text.substring(2, text.length-2); else if (text.match(/^Start Lancaster turn/)) p.className = 'L'; @@ -3412,6 +3412,7 @@ exports.setup = function (seed, scenario, options) { setup_richard_iii(); else throw new Error("Unknown scenario:", scenario); + log("Scenario: " + scenario); start_campaign(); return game; } |