summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-12-12 17:31:06 +0100
committerTor Andersson <tor@ccxvii.net>2024-01-08 16:36:48 +0100
commit89890d99c1f8b87ebeae1aff08c5be24a28247cb (patch)
treebd6c295358d854d3f9ca0cc4ab31568a96cbed63
parent156ce97d9f46e6a792d74f340e1076761083b8f3 (diff)
downloadtable-battles-89890d99c1f8b87ebeae1aff08c5be24a28247cb.tar.gz
Log tactical victory and scenario rules.
-rw-r--r--play.html3
-rw-r--r--play.js2
-rw-r--r--rules.js9
3 files changed, 13 insertions, 1 deletions
diff --git a/play.html b/play.html
index 444b3ae..18bf4df 100644
--- a/play.html
+++ b/play.html
@@ -89,6 +89,9 @@ main {
/* S37 Inkerman - The Fog */
[data-card="225B"] .slot_sticks { display: none }
+/* S?? XXX - Retreat to Nivelles */
+[data-card="237A"] .slot_dice { height: 32px; }
+[data-card="237A"] .slot_sticks { height: 55px; }
.slot_sticks {
height: 87px;
diff --git a/play.js b/play.js
index 6b3cd81..869d55c 100644
--- a/play.js
+++ b/play.js
@@ -120,7 +120,7 @@ function create_formation_slot(id, top) {
e.appendChild(ui.cards[id])
}
- if (card.special || card.name === "The Fog")
+ if (card.special || card.name === "The Fog" || card.name === "Retreat to Nivelles")
ui.slot_cubes[id] = append_div(e, "slot_cubes")
if (!card.special)
ui.slot_sticks[id] = append_div(e, "slot_sticks")
diff --git a/rules.js b/rules.js
index c533c9d..3bd8f1e 100644
--- a/rules.js
+++ b/rules.js
@@ -304,6 +304,15 @@ exports.setup = function (seed, scenario, options) {
log(".h1 " + info.name)
log(".h2 " + info.date)
log("")
+ if (info.rule_text)
+ log(info.rule_text)
+ if (info.players[0].tactical > 0 || info.players[1].tactical > 0) {
+ log("Tactical Victory:")
+ if (info.players[0].tactical > 0)
+ log(">" + player_name(0) + ": " + info.players[0].tactical)
+ if (info.players[1].tactical > 0)
+ log(">" + player_name(1) + ": " + info.players[1].tactical)
+ }
if (game.scenario === S37_INKERMAN) {
map_set(game.cubes, S37_THE_FOG, 3)