summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-03-06 23:44:58 +0100
committerTor Andersson <tor@ccxvii.net>2023-03-06 23:44:58 +0100
commit89e43355853162edd446266f3b926391dd2e3a6c (patch)
treec0b7305ad16ed09941be975d6354d37fe44b43db /rules.js
parent25e4fa6d99c60770f4b382ddbf2a0993bce01735 (diff)
downloadnevsky-89e43355853162edd446266f3b926391dd2e3a6c.tar.gz
Use correct Lodya flag when checking if lord can Sail.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 3a7a051..6fdde84 100644
--- a/rules.js
+++ b/rules.js
@@ -5506,6 +5506,14 @@ function find_lodya_lord_in_group() {
return NOBODY
}
+function init_lodya_sail_silent() {
+ let lord = find_lodya_lord_in_group()
+ if (lord !== NOBODY)
+ game.flags.lodya = -Math.min(2, get_lord_assets(lord, BOAT))
+ else
+ game.flags.lodya = 0
+}
+
function init_lodya_sail() {
let lord = find_lodya_lord_in_group()
if (lord !== NOBODY) {
@@ -6480,6 +6488,7 @@ function can_action_sail() {
return false
// with enough ships to carry all the horses
+ init_lodya_sail_silent()
if (!has_enough_available_ships_for_horses())
return false