summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-12-14 11:20:04 +0100
committerTor Andersson <tor@ccxvii.net>2024-01-08 16:36:48 +0100
commitfc17fd425e861c7c92c85f94e3483efc004d4868 (patch)
tree2320d63db63a415f3d9abfbb2bb5c5243a1a7db7 /rules.js
parent0806d5c2dab3f0af175a1b9d4f91f07b65ebebc6 (diff)
downloadtable-battles-fc17fd425e861c7c92c85f94e3483efc004d4868.tar.gz
no target_list for special commands
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js3
1 files changed, 3 insertions, 0 deletions
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