From de47693a9db1392968a56e3ba12d542fe445e13f Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Thu, 20 Feb 2025 09:08:11 +0100 Subject: [PATCH] Removing redundant .leaveField() calls --- src/data/ability.ts | 1 - src/data/move.ts | 4 ---- 2 files changed, 5 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index bf3b04e1f63..b19d6b68e3a 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -4921,7 +4921,6 @@ class ForceSwitchOutHelper { } if (switchOutTarget.hp > 0) { - switchOutTarget.leaveField(this.switchType === SwitchType.SWITCH); globalScene.prependToPhase(new SwitchPhase(this.switchType, switchOutTarget.getFieldIndex(), true, true), MoveEndPhase); return true; } diff --git a/src/data/move.ts b/src/data/move.ts index 016dae6ab0d..f16758eb6cb 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -6122,7 +6122,6 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { if (switchOutTarget.hp > 0) { if (this.switchType === SwitchType.FORCE_SWITCH) { - switchOutTarget.leaveField(true); const slotIndex = eligibleNewIndices[user.randSeedInt(eligibleNewIndices.length)]; globalScene.prependToPhase( new SwitchSummonPhase( @@ -6135,7 +6134,6 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { MoveEndPhase ); } else { - switchOutTarget.leaveField(this.switchType === SwitchType.SWITCH); globalScene.prependToPhase( new SwitchPhase( this.switchType, @@ -6164,7 +6162,6 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { if (switchOutTarget.hp > 0) { if (this.switchType === SwitchType.FORCE_SWITCH) { - switchOutTarget.leaveField(true); const slotIndex = eligibleNewIndices[user.randSeedInt(eligibleNewIndices.length)]; globalScene.prependToPhase( new SwitchSummonPhase( @@ -6177,7 +6174,6 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { MoveEndPhase ); } else { - switchOutTarget.leaveField(this.switchType === SwitchType.SWITCH); globalScene.prependToPhase( new SwitchSummonPhase( this.switchType,