summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-06-08 01:36:35 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:31:29 +0100
commit24a0043e272dafe097cb13386fd607c7d9d68088 (patch)
tree33f10464d4c3a68fceaedadc69f2ed67ace9b0b1 /rules.js
parente8cf1f4cc0b953dadcc06ccfd0ee4e6ce29be2ad (diff)
downloadpax-pamir-24a0043e272dafe097cb13386fd607c7d9d68088.tar.gz
Fix instability check when 2 dominance checks appear at once.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index ac6fda0..605b560 100644
--- a/rules.js
+++ b/rules.js
@@ -2444,9 +2444,11 @@ function goto_refill_market() {
if (game.market_cards[row][col] === 0) {
let c = game.deck.pop()
game.market_cards[row][col] = c
- if (instability > 0 && is_dominance_check(c)) {
- game.state = 'instability'
- return
+ if (is_dominance_check(c)) {
+ if (++instability > 1) {
+ game.state = 'instability'
+ return
+ }
}
}
}