From 7ad50490019ab0967f42fb2ad14bc6d2b43816e8 Mon Sep 17 00:00:00 2001 From: Reldnahc Date: Sat, 4 May 2024 21:49:24 -0500 Subject: [PATCH] remove unneeded const. --- src/phases.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/phases.ts b/src/phases.ts index 9030da2ab..5da7500e8 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2421,9 +2421,8 @@ export class MoveEffectPhase extends PokemonPhase { isBounced = this.move.getMove().hasFlag(MoveFlags.MAGIC_COAT_MOVE) && (opponent.findTags(t => t instanceof MagicCoatTag).find(t => opponent.lapseTag(t.tagType)) || targetHasMagicBounce.value); if (isBounced) { this.scene.queueMessage(getPokemonMessage(opponent, '\nbounced the move back!')); - const tempTargets = targets; if (this.move.getMove().isMultiTarget()){ - this.targets = getMoveTargets(tempTargets[0], this.move.moveId).targets; + this.targets = getMoveTargets(opponent, this.move.moveId).targets; targets = []; for (let index of this.targets){ const target = this.scene.getField()[index]; @@ -2434,7 +2433,7 @@ export class MoveEffectPhase extends PokemonPhase { this.targets = [user.getBattlerIndex()]; targets = [user]; } - user = tempTargets[0]; + user = opponent; if (!this.move.getMove().applyConditions(user, opponent, this.move.getMove())) { this.scene.queueMessage(i18next.t('menu:attackFailed')); return this.end();