From d5dcddaba64662068453dc7e9e37e91b49ef92ce Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 22 Jan 2023 17:04:21 +0100 Subject: Fix Famine. --- rules.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rules.js b/rules.js index 04d6b3e..6c27d32 100644 --- a/rules.js +++ b/rules.js @@ -5954,12 +5954,11 @@ function can_supply() { function goto_supply() { push_undo() - if (is_famine_in_play() && game.flags.famine === 0) { + if (is_famine_in_play() && !game.flags.famine) { if (game.active === TEUTONS) logevent(EVENT_RUSSIAN_FAMINE) else logevent(EVENT_TEUTONIC_FAMINE) - game.flags.famine = 1 } if (init_lodya_supply()) { @@ -6024,6 +6023,8 @@ states.supply_source = { logi(`Seat at %${source}`) game.supply.available-- array_remove_item(game.supply.seats, source) + if (is_famine_in_play()) + game.flags.famine = 1 } else { logi(`Seaport at %${source}`) game.supply.ships-- -- cgit v1.2.3