summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-01-05 00:58:55 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:38 +0100
commit4cca4583503f22b375748f33f5aa2bcfc02a7281 (patch)
treeb8d60651ce8320741b9487615eb08504ac45d45f
parentb032ccd20677a8da17f061f4ded3b7dcae1c85ed (diff)
downloadnevsky-4cca4583503f22b375748f33f5aa2bcfc02a7281.tar.gz
Fix Storm reposition when routed.
-rw-r--r--rules.js8
1 files 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()
},