summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-02-06 16:25:48 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:39 +0100
commit4bd6a5a1144af3392c73c1e98254cd3ae83c7cc0 (patch)
tree7854a6c421877775b903208afbfa6e0b8991b9eb
parente6e9dbf6b3492f8fabbb84ca1eddc9d61f08654d (diff)
downloadnevsky-4bd6a5a1144af3392c73c1e98254cd3ae83c7cc0.tar.gz
Fix Supply + Famine.
-rw-r--r--rules.js6
1 files 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)