summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-01-22 17:04:21 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:39 +0100
commitd5dcddaba64662068453dc7e9e37e91b49ef92ce (patch)
tree6b9838b260c49ef615666cab6b627d2cd392a023
parentadb54e6f81724f64fa644f50dc7ca2e24f633a79 (diff)
downloadnevsky-d5dcddaba64662068453dc7e9e37e91b49ef92ce.tar.gz
Fix Famine.
-rw-r--r--rules.js5
1 files 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--