From eabedf314dfedd2ee5f641bf2e10564304d9d3f0 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 14 Dec 2023 11:18:52 +0100 Subject: fizzle -> null. --- tools/gendata.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/gendata.js b/tools/gendata.js index 283449d..d96d46e 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -132,7 +132,10 @@ for (let c of card_records) { if (c.action1_type) { card.actions.push(make_action(c.action1_type, c.action1_req, c.action1_target, c.action1_effect)) result.push(`
`) - result.push(`
${c.action1_type}
`) + if (/Screen|Absorb|Counterattack/.test(c.action1_type)) + result.push(`
${c.action1_type}
`) + else + result.push(`
${c.action1_type}
`) result.push(`
${c.action1_req}
`) result.push(`
${c.action1_target}
`) if (c.action1_effect) @@ -143,7 +146,10 @@ for (let c of card_records) { if (c.action2_type || c.action2_effect) { card.actions.push(make_action(c.action2_type, c.action2_req, c.action2_target, c.action2_effect)) result.push(`
`) - result.push(`
${c.action2_type}
`) + if (/Screen|Absorb|Counterattack/.test(c.action2_type)) + result.push(`
${c.action2_type}
`) + else + result.push(`
${c.action2_type}
`) result.push(`
${c.action2_req}
`) result.push(`
${c.action2_target}
`) if (c.action2_effect) @@ -278,11 +284,11 @@ function process_card(c, ix) { else if (tname === "Any friendly but Little Round Top") a.target_list = find_friendly_cards(c.scenario, c.wing).filter(x => x !== find_card(c.scenario, "Little Round Top")) else if (tname === 'Activate "Retreat to Nivelles"') - a.target_list = [ "Retreat to Nivelles" ] + a.target_list = null else if (tname === "The Fog Lifts...") - a.target_list = [ "The Fog" ] + a.target_list = null else if (tname === "See Below") - a.target_list = [ ] + a.target_list = null else a.target_list = tname.split(/, | OR | or | and /).map(name => find_card(c.scenario, name)) } -- cgit v1.2.3