From c9e883274f37e34bfd87896c3a336fbdb6556f18 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 6 Oct 2023 13:57:40 +0200 Subject: Fix count_group_assets. --- rules.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/rules.js b/rules.js index 4121260..e4286de 100644 --- a/rules.js +++ b/rules.js @@ -944,14 +944,12 @@ function count_group_ships() { } function count_group_assets(type, group = game.group) { - let m = 0 let n = 0 for (let lord of group) { n += get_lord_assets(lord, type) - if ((game.state === 'command' || game.state === 'march_laden') && lord_has_capability(lord, AOW_LANCASTER_HAY_WAINS) && type === CART) - m = get_lord_assets(lord, CART) - n += m - } + if ((game.state === "command" || game.state === "march_laden") && lord_has_capability(lord, AOW_LANCASTER_HAY_WAINS) && type === CART) + n += get_lord_assets(lord, CART) + } return n } -- cgit v1.2.3