From 4bd6a5a1144af3392c73c1e98254cd3ae83c7cc0 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 6 Feb 2023 16:25:48 +0100 Subject: Fix Supply + Famine. --- rules.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rules.js b/rules.js index 07c31b1..ef0eda3 100644 --- a/rules.js +++ b/rules.js @@ -1002,10 +1002,10 @@ function used_seat_capability(lord, where, extra) { let seats = data.lords[lord].seats if (extra) { if (set_has(seats, where) && !extra.includes(where)) - return + return -1 } else { if (set_has(seats, where)) - return + return -1 } if (is_teutonic_lord(lord)) if (has_global_capability(AOW_TEUTONIC_ORDENSBURGEN)) @@ -6074,7 +6074,7 @@ states.supply_source = { view.actions.end_supply = 1 }, locale(source) { - if (game.supply.seats.includes(source)) { + if (game.supply.available > 0 && game.supply.seats.includes(source)) { array_remove_item(game.supply.seats, source) let cap = used_seat_capability(game.command, source, game.supply.seats) -- cgit v1.2.3