diff --git a/test/moves/reflect_type.test.ts b/test/moves/reflect_type.test.ts index 0915069764c..e07c7b43ca4 100644 --- a/test/moves/reflect_type.test.ts +++ b/test/moves/reflect_type.test.ts @@ -30,30 +30,26 @@ describe("Moves - Reflect Type", () => { }); it("will make the user Normal/Grass if targetting a typeless Pokemon affected by Forest's Curse", async () => { - game.override - .moveset([MoveId.FORESTS_CURSE, MoveId.REFLECT_TYPE]) - .startingLevel(60) - .enemySpecies(SpeciesId.CHARMANDER) - .enemyMoveset([MoveId.BURN_UP, MoveId.SPLASH]); + game.override.startingLevel(60).enemySpecies(SpeciesId.CHARMANDER); await game.classicMode.startBattle([SpeciesId.FEEBAS]); - const playerPokemon = game.scene.getPlayerPokemon(); - const enemyPokemon = game.scene.getEnemyPokemon(); + const playerPokemon = game.field.getPlayerPokemon(); + const enemyPokemon = game.field.getEnemyPokemon(); - game.move.select(MoveId.SPLASH); - await game.move.selectEnemyMove(MoveId.BURN_UP); + game.move.use(MoveId.SPLASH); + await game.move.forceEnemyMove(MoveId.BURN_UP); await game.toNextTurn(); - game.move.select(MoveId.FORESTS_CURSE); - await game.move.selectEnemyMove(MoveId.SPLASH); + game.move.use(MoveId.FORESTS_CURSE); + await game.move.forceEnemyMove(MoveId.SPLASH); await game.toNextTurn(); - expect(enemyPokemon?.getTypes().includes(PokemonType.UNKNOWN)).toBe(true); - expect(enemyPokemon?.getTypes().includes(PokemonType.GRASS)).toBe(true); + expect(enemyPokemon.getTypes().includes(PokemonType.UNKNOWN)).toBe(true); + expect(enemyPokemon.getTypes().includes(PokemonType.GRASS)).toBe(true); - game.move.select(MoveId.REFLECT_TYPE); - await game.move.selectEnemyMove(MoveId.SPLASH); + game.move.use(MoveId.REFLECT_TYPE); + await game.move.forceEnemyMove(MoveId.SPLASH); await game.phaseInterceptor.to("TurnEndPhase"); - expect(playerPokemon?.getTypes()[0]).toBe(PokemonType.NORMAL); - expect(playerPokemon?.getTypes().includes(PokemonType.GRASS)).toBe(true); + expect(playerPokemon.getTypes()[0]).toBe(PokemonType.NORMAL); + expect(playerPokemon.getTypes().includes(PokemonType.GRASS)).toBe(true); }); }); diff --git a/test/moves/spikes.test.ts b/test/moves/spikes.test.ts index 49492701d18..f6f603ef2c4 100644 --- a/test/moves/spikes.test.ts +++ b/test/moves/spikes.test.ts @@ -82,10 +82,10 @@ describe("Moves - Spikes", () => { it("should work when all targets fainted", async () => { game.override.enemySpecies(SpeciesId.DIGLETT).battleStyle("double").startingLevel(50); - await game.classicMode.startBattle([SpeciesId.RAYQUAZA, SpeciesId.ROWLET]); + await game.classicMode.startBattle([SpeciesId.RAYQUAZA]); - game.move.select(MoveId.EARTHQUAKE); - game.move.select(MoveId.SPIKES, 1); + game.move.use(MoveId.SPIKES); + await game.doKillOpponents(); await game.phaseInterceptor.to("TurnEndPhase"); expect(game.scene.arena.getTagOnSide(ArenaTrapTag, ArenaTagSide.ENEMY)).toBeDefined();