Fix unreliable Speed Boost test

This commit is contained in:
NightKev 2024-11-15 18:40:02 -08:00
parent be908f8394
commit daeaf9d3fd
1 changed files with 13 additions and 9 deletions

View File

@ -28,7 +28,9 @@ describe("Abilities - Speed Boost", () => {
game.override
.battleType("single")
.enemySpecies(Species.DRAGAPULT)
.enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.BALL_FETCH)
.enemyLevel(100)
.ability(Abilities.SPEED_BOOST)
.enemyMoveset(Moves.SPLASH)
.moveset([ Moves.SPLASH, Moves.U_TURN ]);
@ -70,21 +72,23 @@ describe("Abilities - Speed Boost", () => {
Species.NINJASK
]);
game.move.select(Moves.U_TURN);
game.doSelectPartyPokemon(1);
await game.toNextTurn();
let playerPokemon = game.scene.getPlayerPokemon()!;
expect(playerPokemon.getStatStage(Stat.SPD)).toBe(0);
const [ shuckle, ninjask ] = game.scene.getPlayerParty();
game.move.select(Moves.U_TURN);
game.doSelectPartyPokemon(1);
await game.toNextTurn();
playerPokemon = game.scene.getPlayerPokemon()!;
expect(playerPokemon.getStatStage(Stat.SPD)).toBe(0);
expect(game.scene.getPlayerPokemon()!).toBe(ninjask);
expect(ninjask.getStatStage(Stat.SPD)).toBe(0);
game.move.select(Moves.U_TURN);
game.doSelectPartyPokemon(1);
await game.toNextTurn();
expect(game.scene.getPlayerPokemon()!).toBe(shuckle);
expect(shuckle.getStatStage(Stat.SPD)).toBe(0);
game.move.select(Moves.SPLASH);
await game.toNextTurn();
expect(playerPokemon.getStatStage(Stat.SPD)).toBe(1);
expect(shuckle.getStatStage(Stat.SPD)).toBe(1);
});
it("should not trigger this turn if pokemon was switched into combat via normal switch, but the turn after",