diff --git a/src/phases/faint-phase.ts b/src/phases/faint-phase.ts index 73a1d6487ca..414aa84ce6c 100644 --- a/src/phases/faint-phase.ts +++ b/src/phases/faint-phase.ts @@ -121,7 +121,7 @@ export class FaintPhase extends PokemonPhase { if (pokemon.turnData?.attacksReceived?.length) { const defeatSource = this.source; - if (defeatSource instanceof Pokemon && defeatSource.isOnField()) { + if (defeatSource?.isOnField()) { applyPostVictoryAbAttrs(PostVictoryAbAttr, defeatSource); const pvmove = allMoves[pokemon.turnData.attacksReceived[0].move]; const pvattrs = pvmove.getAttrs(PostVictoryStatStageChangeAttr); diff --git a/src/test/moves/fell_stinger.test.ts b/src/test/moves/fell_stinger.test.ts index be39f51fb91..1b71a2ca642 100644 --- a/src/test/moves/fell_stinger.test.ts +++ b/src/test/moves/fell_stinger.test.ts @@ -35,14 +35,11 @@ describe("Moves - Fell Stinger", () => { Moves.LEECH_SEED ]) .startingLevel(50) - .disableCrits(); - - game.override.enemyAbility(Abilities.STURDY) + .disableCrits() + .enemyAbility(Abilities.STURDY) .enemySpecies(Species.HYPNO) - .enemyMoveset([ Moves.SPLASH ]) + .enemyMoveset(Moves.SPLASH) .enemyLevel(5); - - game.override.weather(WeatherType.NONE); }); it("should not grant stat boost if opponent gets KO'd by recoil", async () => {