diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-04-17 10:53:23 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-04-17 10:53:23 +0200 |
commit | 1a19cf4334cbe2eeb17fde78028b76e20d5afdd1 (patch) | |
tree | 6a505ad07e41174b7ee10d73f7c45cdcb8485639 | |
parent | b97b42328029109190a7ade03753a35e7abbbcbc (diff) | |
download | plantagenet-1a19cf4334cbe2eeb17fde78028b76e20d5afdd1.tar.gz |
Fix count_deplete.
-rw-r--r-- | rules.js | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -9286,19 +9286,18 @@ function deplete_merchants() { } function count_deplete(loc) { - game.count = 0 + let n = 0 for (let next of data.locales[loc].adjacent) { if (has_exhausted_marker(next) || has_depleted_marker(next)) { - ++game.count + ++n } } if (has_exhausted_marker(loc) || has_depleted_marker(loc)) { - ++game.count + ++n } - if (game.count > 1) - return game.count = 2 - else - return game.count + if (n > 1) + n = 2 + return n } // === CAPABILITY: BURGUNDIANS === |