summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-01-04 13:06:41 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:38 +0100
commit6c32ef91a9f4a76f3cf082a032a870d2f654274e (patch)
treeb288fda5e2a0b174bd9330575e040ea55bc43df3 /rules.js
parent7556b97dcf895ae59ba4f9ada19baa6e00477cc8 (diff)
downloadnevsky-6c32ef91a9f4a76f3cf082a032a870d2f654274e.tar.gz
Fix Famine (1 seat per command card, not action).
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js8
1 files changed, 7 insertions, 1 deletions
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 {