summaryrefslogtreecommitdiff
path: root/tools/gendata.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-12-12 17:29:58 +0100
committerTor Andersson <tor@ccxvii.net>2024-01-08 16:36:48 +0100
commit2b50d84d843bf2c1bff54393aa4421543d8134d9 (patch)
treebadbecaa71fdf4aab2a060fa296c20fa4378ac5c /tools/gendata.js
parent6195f24fc7abb0453356464a1f923a699e89da00 (diff)
downloadtable-battles-2b50d84d843bf2c1bff54393aa4421543d8134d9.tar.gz
symbols
Diffstat (limited to 'tools/gendata.js')
-rw-r--r--tools/gendata.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/gendata.js b/tools/gendata.js
index 07f58c0..98e4f20 100644
--- a/tools/gendata.js
+++ b/tools/gendata.js
@@ -73,7 +73,10 @@ for (let c of card_records) {
card.actions = []
result.push(`<div class="formation card">`)
- result.push(`<div class="name ${c.wing}">${c.name}</div>`)
+ if (c.symbol)
+ result.push(`<div class="name with_symbol ${c.wing}">${c.name}</div>`)
+ else
+ result.push(`<div class="name ${c.wing}">${c.name}</div>`)
if (c.symbol === "inf") {
card.infantry = 1
@@ -352,7 +355,8 @@ for (let s of scenario_records) {
{ name: s.player1, cards: parse_cards(s.cards1), morale: parseInt(s.morale1), tactical: parseInt(s.tactical1) },
{ name: s.player2, cards: parse_cards(s.cards2), morale: parseInt(s.morale2), tactical: parseInt(s.tactical2) },
],
- rule: s.rule || undefined
+ rule: s.rule || undefined,
+ rule_text: s.rule_text || undefined,
})
result.push(`
<div id="scenario_${s.number}" class="scenario card">