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 --- rules.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rules.js') 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