From 1a19cf4334cbe2eeb17fde78028b76e20d5afdd1 Mon Sep 17 00:00:00 2001 From: Tor Andersson <tor@ccxvii.net> Date: Wed, 17 Apr 2024 10:53:23 +0200 Subject: Fix count_deplete. --- rules.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/rules.js b/rules.js index 359a203..4ce2ad6 100644 --- a/rules.js +++ b/rules.js @@ -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 === -- cgit v1.2.3