summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.css2
-rw-r--r--play.js16
-rw-r--r--rules.js5
3 files changed, 14 insertions, 9 deletions
diff --git a/play.css b/play.css
index cd9ca39..b633b72 100644
--- a/play.css
+++ b/play.css
@@ -56,6 +56,8 @@
margin: 4px 0;
}
+#log .h.fate { text-align: center; }
+
#log .h.prussia { background-color: var(--color-light-prussia); }
#log .h.hanover { background-color: var(--color-light-hanover); }
#log .h.russia { background-color: var(--color-light-russia); }
diff --git a/play.js b/play.js
index 5ef6ab6..b4da448 100644
--- a/play.js
+++ b/play.js
@@ -564,6 +564,8 @@ function on_init() {
update_favicon()
}
+on_init()
+
/* SHOW PATH FOR MOVES */
function on_focus_city(evt) {
@@ -964,14 +966,14 @@ function on_log(text) {
text = text.replace(/C(\d+)/g, sub_tc)
text = text.replace(/P(\d+)/g, sub_piece)
- if (text.match(/^# /)) {
- p.className = "h"
- text = text.substring(2)
- }
- else if (text.match(/^\$(\d+)/)) {
+ if (text.match(/^\$(\d+)/)) {
let fx = parseInt(text.substring(1))
text = `<p class="q">${fate_flavor_text[fx]}<p>${fate_effect_text[fx]}`
}
+ else if (text.match(/^# /)) {
+ p.className = "h fate"
+ text = text.substring(2)
+ }
else if (text.match(/^=\d/)) {
p.className = "h " + power_class[text[1]]
text = power_name[text[1]]
@@ -981,9 +983,7 @@ function on_log(text) {
return p
}
-on_init()
-
-// === COMMON LIBRARY ===
+/* COMMON LIBRARY */
function array_insert(array, index, item) {
for (let i = array.length; i > index; --i)
diff --git a/rules.js b/rules.js
index 510f66f..b5b3319 100644
--- a/rules.js
+++ b/rules.js
@@ -2858,7 +2858,10 @@ exports.setup = function (seed, scenario, options) {
shuffle_bigint(game.deck)
- log("# " + scenario)
+ if (game.scenario === 1)
+ log("# The War in the West")
+ if (game.scenario === 2)
+ log("# The Austrian Theatre")
if (game.scenario === 1)
setup_the_war_in_the_west()