diff --git a/src/data/ability.ts b/src/data/ability.ts index 9c74b896ac5..5501425e32e 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -3743,7 +3743,7 @@ function applyAbAttrsInternal(attrType: { new(...args: any const attrs = ability.getAttrs(attrType); const clearSpliceQueueAndResolve = () => { - pokemon.scene.clearPhaseQueueSplice(); + pokemon.scene?.clearPhaseQueueSplice(); if (!passive) { return applyAbAttrsInternal(attrType, pokemon, applyFunc, args, isAsync, showAbilityInstant, quiet, true).then(() => resolve()); } else { diff --git a/src/form-change-phase.ts b/src/form-change-phase.ts index f2cf9933b17..7d4e8349775 100644 --- a/src/form-change-phase.ts +++ b/src/form-change-phase.ts @@ -278,7 +278,7 @@ export class QuietFormChangePhase extends BattlePhase { } end(): void { - if (this.pokemon.scene.currentBattle.battleSpec === BattleSpec.FINAL_BOSS && this.pokemon instanceof EnemyPokemon) { + if (this.pokemon.scene?.currentBattle.battleSpec === BattleSpec.FINAL_BOSS && this.pokemon instanceof EnemyPokemon) { this.scene.playBgm(); this.pokemon.summonData.battleStats = [ 0, 0, 0, 0, 0, 0, 0 ]; this.scene.unshiftPhase(new PokemonHealPhase(this.scene, this.pokemon.getBattlerIndex(), this.pokemon.getMaxHp(), null, false, false, false, true)); diff --git a/src/test/abilities/ice_face.test.ts b/src/test/abilities/ice_face.test.ts index 58937ddf231..09fd8733f93 100644 --- a/src/test/abilities/ice_face.test.ts +++ b/src/test/abilities/ice_face.test.ts @@ -53,7 +53,7 @@ describe("Abilities - Ice Face", () => { expect(eiscue.getTag(BattlerTagType.ICE_FACE)).toBe(undefined); }); - it("takes no damage from multihit physical move and transforms to Noice", async () => { + it("takes no damage from the first hit of multihit physical move and transforms to Noice", async () => { vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SURGING_STRIKES]); vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(5); await game.startBattle([Species.HITMONLEE]);