From 89e43355853162edd446266f3b926391dd2e3a6c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 6 Mar 2023 23:44:58 +0100 Subject: Use correct Lodya flag when checking if lord can Sail. --- rules.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rules.js') 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 -- cgit v1.2.3