From fc17fd425e861c7c92c85f94e3483efc004d4868 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 14 Dec 2023 11:20:04 +0100 Subject: no target_list for special commands --- data.js | 12 ++++-------- rules.js | 3 +++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/data.js b/data.js index 14daafd..2cbab33 100644 --- a/data.js +++ b/data.js @@ -14071,9 +14071,7 @@ cards: [ "type": "Command", "requirement": "Two Pairs", "target": "The Fog Lifts...", - "target_list": [ - "The Fog" - ] + "target_list": null } ], "rule_text": "At the start of the battle, place three cubes below. When this Command action is used, remove the cubes in order from top to bottom, resolving the effect given.
  1. Soimonoff special text negated.
  2. British Troops out of reserve.
  3. French Troops out of reserve.
" @@ -14435,9 +14433,7 @@ cards: [ "type": "Command", "requirement": "Two Pairs", "target": "Activate \"Retreat to Nivelles\"", - "target_list": [ - "Retreat to Nivelles" - ] + "target_list": null } ] }, @@ -16266,7 +16262,7 @@ cards: [ { "type": "Command", "target": "See Below", - "target_list": [] + "target_list": null } ], "rule_text": "Each Command action brings into play the next card in this sequence: Leopold's Right, Leopold's Center, Leopold's Left, Nassau, Zieten, Bayreuth Dragoons.

If at the start of your turn you have no Infantry or Cavalry cards in play, you lose.", @@ -16539,7 +16535,7 @@ cards: [ "type": "Command", "requirement": "Three Dice", "target": "See Below", - "target_list": [] + "target_list": null }, { "type": "Absorb", diff --git a/rules.js b/rules.js index 61d7244..4cf3b99 100644 --- a/rules.js +++ b/rules.js @@ -1780,6 +1780,9 @@ function find_first_target_of_command(c, a) { return S37_THE_FOG } + if (!a.target_list) + throw new Error("no rule for Command target: " + a.target) + for (let t of a.target_list) { if (is_card_in_reserve(t)) return t -- cgit v1.2.3