summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-06 13:57:40 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commitc9e883274f37e34bfd87896c3a336fbdb6556f18 (patch)
tree3c6cfaf906ff6250ce11a60a9d217583975afb78
parent9499b6cfe4f93b43a3c205646b4b45ea62f132f6 (diff)
downloadplantagenet-c9e883274f37e34bfd87896c3a336fbdb6556f18.tar.gz
Fix count_group_assets.
-rw-r--r--rules.js8
1 files 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
}