From de87a35b971dd205865ef59cbdbd6c4bfaa6d91c Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sun, 31 Dec 2023 10:39:33 -0500 Subject: [PATCH] Fix switch out status moves in wild causing softlock --- src/data/move.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/data/move.ts b/src/data/move.ts index bd9fa62cecf..d0ad8c352e5 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2604,6 +2604,13 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { switchOutTarget.scene.field.remove(switchOutTarget); user.scene.queueMessage(getPokemonMessage(switchOutTarget, ' fled!'), null, true, 500); } + + if (move.category === MoveCategory.STATUS && !switchOutTarget.getAlly()?.isActive(true)) { + user.scene.clearEnemyHeldItemModifiers(); + + user.scene.pushPhase(new BattleEndPhase(user.scene)); + user.scene.pushPhase(new NewBattlePhase(user.scene)); + } } resolve(true);