diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-04-23 19:12:18 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-04-23 19:12:18 +0200 |
commit | 2058441d7c20e436982f5bfdc4508ec0b0902bd2 (patch) | |
tree | 2842331164e03d3e44320213040b28ebf707f397 /rules.ts | |
parent | e762edb855ea1e1397acd37cf0b6877ee001b18f (diff) | |
download | plantagenet-2058441d7c20e436982f5bfdc4508ec0b0902bd2.tar.gz |
1.7.3 English Ships no more than 9 lords
Diffstat (limited to 'rules.ts')
-rw-r--r-- | rules.ts | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -3,10 +3,8 @@ // TODO: log end victory conditions at scenario start // TODO: check all who = NOBODY etc resets -// TODO: 1.7.3 English Ships -- no more than 9 lords may have ships // TODO: check interaction of Naval Blockade with Great Ships when parleying across multiple seas - // TODO: [Influence] button instead of [Pay] when paying influence (or [Pay influence])? // TODO: logcap hidden or not hidden checks @@ -3250,9 +3248,14 @@ function can_add_troops_sof(lord: Lord, locale: Locale) { function can_add_transport_ship(who: Lord, here: Locale) { if (is_seaport(here) || is_exile_box(here)) { - // TODO: 1.7.3 English Ships -- no more than 9 lords may have ships - if (get_lord_assets(who, SHIP) < 2) - return true + if (get_lord_assets(who, SHIP) < 2) { + let n = 0 + for (let other of all_lords) + if (other !== who && get_lord_assets(other, SHIP) > 0) + ++n + if (n < 9) + return true + } } return false } |