diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-10-07 17:25:11 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-10 18:16:55 +0100 |
commit | dea6d3119e78bdd9cb459a1e56c1d71cfb4be747 (patch) | |
tree | 781ccf5f4fab7d513c040a48127a63e0946f0b7a | |
parent | 09077aaec083f2328e314a02110645fad24f5b7f (diff) | |
download | plantagenet-dea6d3119e78bdd9cb459a1e56c1d71cfb4be747.tar.gz |
Simplify gnarly if-statement in count_group_assets.
-rw-r--r-- | rules.js | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -1077,12 +1077,11 @@ function count_group_assets(type, group = game.group) { 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 - ) - n += get_lord_assets(lord, CART) + if (type === CART) { + if ((game.state === "command" || game.state === "march_laden")) + if (lord_has_capability(lord, AOW_LANCASTER_HAY_WAINS)) + n += get_lord_assets(lord, CART) + } } return n } @@ -3614,8 +3613,8 @@ states.parley = { } } - // === ACTION: LEVY VASSAL === + // 1) During Levy ONLY // 2) game.who location must be friendly and Vassal seat locale must be friendly // 3) there need to not be his vassal marker on the calendar (see vassal disband) |