From a358902a20400c79d63acbe0dec80fb5e861cb2e Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Mon, 27 Jan 2025 00:03:41 +0100 Subject: [PATCH] Changing order for PreSwitchOutAbAttr --- src/phases/switch-summon-phase.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/phases/switch-summon-phase.ts b/src/phases/switch-summon-phase.ts index 94e57435922..01bc57a209b 100644 --- a/src/phases/switch-summon-phase.ts +++ b/src/phases/switch-summon-phase.ts @@ -64,6 +64,7 @@ export class SwitchSummonPhase extends SummonPhase { const pokemon = this.getPokemon(); (this.player ? globalScene.getEnemyField() : globalScene.getPlayerField()).forEach(enemyPokemon => enemyPokemon.removeTagsBySourceId(pokemon.id)); + if (this.switchType === SwitchType.SWITCH || this.switchType === SwitchType.INITIAL_SWITCH) { const substitute = pokemon.getTag(SubstituteTag); if (substitute) { @@ -93,8 +94,8 @@ export class SwitchSummonPhase extends SummonPhase { ease: "Sine.easeIn", scale: 0.5, onComplete: () => { - pokemon.leaveField(this.switchType === SwitchType.SWITCH, false); globalScene.time.delayedCall(750, () => this.switchAndSummon()); + pokemon.leaveField(this.switchType === SwitchType.SWITCH, false); } }); }