summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-08-14 11:47:11 +0200
committerTor Andersson <tor@ccxvii.net>2024-08-14 11:47:11 +0200
commit7012e86d0baabf06967d4b2fd3ffb6ebd78ca827 (patch)
tree5f4800724958c7deeceb9b3614823d4e672c5a80
parent21ad18f9e681743b7394368623c9f29948182aae (diff)
downloadfriedrich-7012e86d0baabf06967d4b2fd3ffb6ebd78ca827.tar.gz
fix flip generals too far away from supply train events.
...when the supply train is eliminated
-rw-r--r--rules.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 417951c..47b62d3 100644
--- a/rules.js
+++ b/rules.js
@@ -3701,7 +3701,7 @@ function goto_flip_5_or_6_from_nearest_train(power, list) {
game.selected = []
for (let p of list)
if (game.pos[p] < ELIMINATED && !is_out_of_supply(p))
- if (!set_has(game.supply, game.pos[p]))
+ if (!game.supply || !set_has(game.supply, game.pos[p]))
game.selected.push(p)
delete game.supply