From 1b3c32195d2741ac44aa35271b399c3fa2e6f2c2 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 14 Dec 2023 15:12:03 +0100 Subject: Squeeze layout. --- tools/gendata.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/gendata.js b/tools/gendata.js index d96d46e..1df67b1 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -24,6 +24,9 @@ h1{color: white} const WING = { red: 0, pink: 1, blue: 2, dkblue: 3 } const WING_ICON = [ "\u2666", "\u2665", "\u2663", "\u2660" ] +const SQUEEZE_BOXES = [ "82A", "128A", "136B" , "274B", "291A" ] +const SQUEEZE_MARGINS = [ "91B", "239B", "274B", "291A", "69B", "82A" ] + var cards = [ ] var card_index = {} var cards_show = [ ] @@ -83,7 +86,21 @@ for (let c of card_records) { card.dice = c.dice card.actions = [] - result.push(`
`) + let squeeze = 0 + if (c.action1_effect && c.action2_effect && (c.rule_text || c.lore_text)) + squeeze |= 1 + else if (SQUEEZE_BOXES.includes(c.number)) + squeeze |= 1 + if (SQUEEZE_MARGINS.includes(c.number)) + squeeze |= 2 + + if (squeeze) { + card.squeeze = squeeze + result.push(`
`) + } else { + result.push(`
`) + } + if (c.symbol) result.push(`
${c.name}
`) else @@ -200,7 +217,7 @@ for (let c of card_records) { if (card.retire && card.reserve) result.push(`
RETIRE; RESERVE (${card.reserve.join(", ")})
`) else if (card.retire && card.pursuit) - result.push(`
RETIRE, PURSUIT)})
`) + result.push(`
RETIRE, PURSUIT
`) else if (card.retire) result.push(`
RETIRE
`) else if (card.pursuit) @@ -376,6 +393,7 @@ for (let s of scenario_records) { ], rule: s.rule || undefined, rule_text: s.rule_text || undefined, + lore_text: s.lore_text || undefined, }) result.push(`
-- cgit v1.2.3