From 4cca4583503f22b375748f33f5aa2bcfc02a7281 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 5 Jan 2023 00:58:55 +0100 Subject: Fix Storm reposition when routed. --- rules.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rules.js b/rules.js index 35f6a2e..67773ce 100644 --- a/rules.js +++ b/rules.js @@ -6783,11 +6783,13 @@ states.reposition_storm = { log(`Swapped in L${lord}.`) set_delete(game.battle.reserves, lord) if (game.active === game.battle.attacker) { - set_add(game.battle.reserves, game.battle.array[A2]) + if (game.battle.array[A2] !== NOBODY) + set_add(game.battle.reserves, game.battle.array[A2]) game.battle.array[A2] = lord } else { - set_add(game.battle.reserves, game.battle.array[D2]) - game.battle.array[A2] = lord + if (game.battle.array[D2] !== NOBODY) + set_add(game.battle.reserves, game.battle.array[D2]) + game.battle.array[D2] = lord } end_reposition_storm() }, -- cgit v1.2.3