summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-01-03 23:21:01 +0100
committerTor Andersson <tor@ccxvii.net>2024-01-08 16:36:48 +0100
commit201685449cbbe19ae90edd178febf0e8a0e6e3ba (patch)
tree5cd98f766c4a1b76689f77e316e52086475ac7da
parenta50c9daccbcf09c2ec3b68811466950de9c0ff5a (diff)
downloadtable-battles-201685449cbbe19ae90edd178febf0e8a0e6e3ba.tar.gz
fuzzer fix
-rw-r--r--rules.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 8e65a20..e11c5e2 100644
--- a/rules.js
+++ b/rules.js
@@ -16,7 +16,7 @@ function find_card(s, n) {
return ix
}
-for (let c of data.cards) for (let a of c.actions) console.log(a.type + ":", a.effect)
+// for (let c of data.cards) for (let a of c.actions) console.log(a.type + ":", a.effect)
// for (let c of data.cards) console.log(c.dice)
// for (let c of data.cards) for (let a of c.actions) { if (a.type === "Counterattack") console.log(c.number, a.type, a.sequence, a.target) }
@@ -1982,7 +1982,7 @@ function can_take_action(c, a, ix) {
}
if (a.type === "Bombard" || a.type === "Attack" || a.type === "Command") {
- if (data.cards[c].special)
+ if (data.cards[c].special > 0)
return check_cube_requirement(c, a.requirement)
else
return check_dice_requirement(c, a.requirement, false)