Add automated test for tera blast normalize interaction

This commit is contained in:
Sirz Benjie 2025-04-15 17:47:46 -05:00
parent 167c70c659
commit 402329b742
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E
1 changed files with 16 additions and 0 deletions

View File

@ -203,4 +203,20 @@ describe("Moves - Tera Blast", () => {
const playerPokemon = game.scene.getPlayerPokemon()!;
expect(playerPokemon.getMoveType(allMoves[Moves.TERA_BLAST])).toBe(ty_id);
});
it("should not be affected by normalize when the user is terastallized with tera normal", async () => {
game.override.moveset([Moves.TERA_BLAST]).ability(Abilities.NORMALIZE);
await game.classicMode.startBattle([Species.MAGIKARP]);
const playerPokemon = game.scene.getPlayerPokemon()!;
// override the tera state for the pokemon
playerPokemon.isTerastallized = true;
playerPokemon.teraType = PokemonType.NORMAL;
const move = allMoves[Moves.TERA_BLAST];
const powerSpy = vi.spyOn(move, "calculateBattlePower");
game.move.select(Moves.TERA_BLAST);
await game.phaseInterceptor.to("BerryPhase");
expect(powerSpy).toHaveLastReturnedWith(move.power);
});
});