From 6c32ef91a9f4a76f3cf082a032a870d2f654274e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 4 Jan 2023 13:06:41 +0100 Subject: Fix Famine (1 seat per command card, not action). --- rules.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 3444cca..0c3fa79 100644 --- a/rules.js +++ b/rules.js @@ -1624,6 +1624,7 @@ exports.setup = function (seed, scenario, options) { first_action: 0, first_march: 0, teutonic_raiders: 0, + famine: 0, }, command: NOBODY, @@ -4208,6 +4209,7 @@ function end_actions() { game.flags.first_action = 0 game.flags.first_march = 0 game.flags.teutonic_raiders = 0 + game.flags.famine = 0 goto_feed() } @@ -5102,7 +5104,7 @@ function update_supply() { ships = 2 if (is_famine_in_play()) - seats = 1 + seats = game.flags.famine ? 0 : 1 let sources = list_supply_sources(ships) let reachable = filter_reachable_supply_sources(sources, boats, carts, sleds) @@ -5323,6 +5325,10 @@ states.supply_source = { if (game.supply.supply_seats.includes(source)) { log(`Supplied from seat at %${source}.`) + if (is_famine_in_play()) { + log("Famine.") + game.flags.famine = 1 + } array_remove_item(game.supply.supply_seats, source) game.supply.seats-- } else { -- cgit v1.2.3