diff --git a/src/phases.ts b/src/phases.ts index 44ec262d3e6..62d944e68e7 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2646,8 +2646,14 @@ export class MoveEffectPhase extends PokemonPhase { constructor(scene: BattleScene, battlerIndex: BattlerIndex, targets: BattlerIndex[], move: PokemonMove) { super(scene, battlerIndex); - this.move = move; + // In double battles, if the right Pokemon selects a spread move and the left Pokemon dies + // with no party members available to switch in, then the right Pokemon takes the index + // of the left Pokemon and gets hit unless this is checked. + if (targets.includes(battlerIndex) && this.move.getMove().moveTarget === MoveTarget.ALL_NEAR_OTHERS) { + const i = targets.indexOf(battlerIndex); + targets.splice(i,i+1); + } this.targets = targets; }