summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gendata.js16
1 files changed, 11 insertions, 5 deletions
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(`<div class="action_row">`)
- result.push(`<div class="action_type">${c.action1_type}</div>`)
+ if (/Screen|Absorb|Counterattack/.test(c.action1_type))
+ result.push(`<div class="action_type reaction">${c.action1_type}</div>`)
+ else
+ result.push(`<div class="action_type">${c.action1_type}</div>`)
result.push(`<div class="action_requirement">${c.action1_req}</div>`)
result.push(`<div class="action_target">${c.action1_target}</div>`)
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(`<div class="action_row">`)
- result.push(`<div class="action_type reaction">${c.action2_type}</div>`)
+ if (/Screen|Absorb|Counterattack/.test(c.action2_type))
+ result.push(`<div class="action_type reaction">${c.action2_type}</div>`)
+ else
+ result.push(`<div class="action_type">${c.action2_type}</div>`)
result.push(`<div class="action_requirement">${c.action2_req}</div>`)
result.push(`<div class="action_target">${c.action2_target}</div>`)
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))
}