diff --git a/test/abilities/imposter.test.ts b/test/abilities/imposter.test.ts index 976bc339dde..d58e6a4877a 100644 --- a/test/abilities/imposter.test.ts +++ b/test/abilities/imposter.test.ts @@ -78,7 +78,7 @@ describe("Abilities - Imposter", () => { game.override.ability(AbilityId.BALL_FETCH); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.DITTO]); - const [karp, ditto] = game.scene.getPlayerField(); + const [karp, ditto] = game.scene.getPlayerParty(); const enemy = game.field.getEnemyPokemon(); game.field.mockAbility(ditto, AbilityId.IMPOSTER); @@ -93,7 +93,7 @@ describe("Abilities - Imposter", () => { expect(enemy.getStat(Stat.ATK, false)).toBe(avgAtk); expect(enemy.getStat(Stat.SPATK, false)).toBe(avgSpAtk); - // Turn 2: Switch in ditto, should copy enemy ability + // Turn 2: Switch in ditto, should copy enemy stats game.doSwitchPokemon(1); await game.move.forceEnemyMove(MoveId.SPLASH); await game.toNextTurn(); diff --git a/test/abilities/storm_drain.test.ts b/test/abilities/storm_drain.test.ts index 6e56bf44fa7..44a615ba364 100644 --- a/test/abilities/storm_drain.test.ts +++ b/test/abilities/storm_drain.test.ts @@ -7,6 +7,7 @@ import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +// TODO: Condense with lightning rod tests sometime describe("Abilities - Storm Drain", () => { let phaserGame: Phaser.Game; let game: GameManager; @@ -39,7 +40,7 @@ describe("Abilities - Storm Drain", () => { const enemy1 = game.scene.getEnemyField()[0]; const enemy2 = game.scene.getEnemyField()[1]; - enemy2.summonData.ability = AbilityId.STORM_DRAIN; + game.field.mockAbility(enemy2, AbilityId.STORM_DRAIN); game.move.select(MoveId.WATER_GUN, BattlerIndex.PLAYER, BattlerIndex.ENEMY); game.move.select(MoveId.SPLASH, BattlerIndex.PLAYER_2); @@ -55,7 +56,7 @@ describe("Abilities - Storm Drain", () => { const enemy1 = game.scene.getEnemyField()[0]; const enemy2 = game.scene.getEnemyField()[1]; - enemy2.summonData.ability = AbilityId.STORM_DRAIN; + game.field.mockAbility(enemy2, AbilityId.STORM_DRAIN); game.move.select(MoveId.AERIAL_ACE, BattlerIndex.PLAYER, BattlerIndex.ENEMY); game.move.select(MoveId.SPLASH, BattlerIndex.PLAYER_2); @@ -68,8 +69,7 @@ describe("Abilities - Storm Drain", () => { await game.classicMode.startBattle([SpeciesId.FEEBAS, SpeciesId.MAGIKARP]); const enemy2 = game.scene.getEnemyField()[1]; - - enemy2.summonData.ability = AbilityId.STORM_DRAIN; + game.field.mockAbility(enemy2, AbilityId.STORM_DRAIN); game.move.select(MoveId.WATER_GUN, BattlerIndex.PLAYER, BattlerIndex.ENEMY); game.move.select(MoveId.SPLASH, BattlerIndex.PLAYER_2); @@ -85,8 +85,7 @@ describe("Abilities - Storm Drain", () => { const enemy1 = game.scene.getEnemyField()[0]; const enemy2 = game.scene.getEnemyField()[1]; - - enemy2.summonData.ability = AbilityId.STORM_DRAIN; + game.field.mockAbility(enemy2, AbilityId.STORM_DRAIN); game.move.select(MoveId.WATER_GUN, BattlerIndex.PLAYER, BattlerIndex.ENEMY); game.move.select(MoveId.SPLASH, BattlerIndex.PLAYER_2); @@ -102,9 +101,9 @@ describe("Abilities - Storm Drain", () => { const enemy1 = game.scene.getEnemyField()[0]; const enemy2 = game.scene.getEnemyField()[1]; - enemy2.summonData.ability = AbilityId.STORM_DRAIN; + game.field.mockAbility(enemy2, AbilityId.STORM_DRAIN); - game.move.use(MoveId.HYPER_VOICE, BattlerIndex.PLAYER); + game.move.use(MoveId.ROUND, BattlerIndex.PLAYER, BattlerIndex.ENEMY); await game.phaseInterceptor.to("BerryPhase"); expect(enemy1.isFullHp()).toBe(true);