diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-12-08 17:26:46 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-01-08 16:36:47 +0100 |
commit | a1a893152ecc1fe0264e3210f89956c6dc7af306 (patch) | |
tree | 6a3c3224632a239e25fded5f9faaec93612ed56b | |
parent | b1e1daaa1945ee428aa113e85b2170007da398db (diff) | |
download | table-battles-a1a893152ecc1fe0264e3210f89956c6dc7af306.tar.gz |
no place at cube limit
-rw-r--r-- | rules.js | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -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) } |