diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 259aea07672..61f1c6e0a70 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -1077,15 +1077,12 @@ export class CommonAnimPhase extends PokemonPhase { constructor(scene: BattleScene, battlerIndex: BattlerIndex, targetIndex: BattlerIndex, anim: CommonAnim) { super(scene, battlerIndex); - if (targetIndex === undefined) - targetIndex = this.battlerIndex; - this.anim = anim; this.targetIndex = targetIndex; } start() { - new CommonBattleAnim(this.anim, this.getPokemon(), (this.player ? this.scene.getEnemyField() : this.scene.getPlayerField())[this.targetIndex]).play(this.scene, () => { + new CommonBattleAnim(this.anim, this.getPokemon(), this.targetIndex !== undefined ? (this.player ? this.scene.getEnemyField() : this.scene.getPlayerField())[this.targetIndex] : this.getPokemon()).play(this.scene, () => { this.end(); }); }