summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/rules.js b/rules.js
index fbd3c74..5ef9a10 100644
--- a/rules.js
+++ b/rules.js
@@ -557,6 +557,18 @@ function can_place_dice(c) {
if (!pred)
throw Error("bad pattern definition: " + pattern)
+ // At per card limit?
+ if (place_dice_once[pattern]) {
+ if (map_has(game.placed, c))
+ return false
+ }
+
+ // At cube limit?
+ if (data.cards[c].special)
+ if (map_get(game.cubes, c, 0) >= data.cards[c].special)
+ return false
+
+ // At per wing limit?
let wing = data.cards[c].wing
let n_wing = 0
for (let i = 0; i < game.placed.length; i += 2) {
@@ -572,11 +584,6 @@ function can_place_dice(c) {
// TODO: 91A Jackson - may only place dice if D.H. Hill has dice
- if (place_dice_once[pattern]) {
- if (map_has(game.placed, c))
- return false
- }
-
return pred(c)
}