mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-20 16:42:45 +02:00
Fixed tests
This commit is contained in:
parent
01c1f0e1e3
commit
f399e0a8c6
@ -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);
|
||||
});
|
||||
});
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user