[Test] Fix Flash Fire tests to remove enemy ability RNG (#3523)

* Fix Flash Fire tests to remove enemy ability RNG

* Replace manual status application with override use
This commit is contained in:
NightKev 2024-08-12 19:21:51 -07:00 committed by GitHub
parent 6d515d58b5
commit 6c2c14cb1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -7,7 +7,7 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import { MovePhase, TurnEndPhase } from "#app/phases";
import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { StatusEffect } from "#app/data/status-effect.js";
import { BattlerTagType } from "#app/enums/battler-tag-type.js";
import { BattlerIndex } from "#app/battle.js";
@ -30,6 +30,7 @@ describe("Abilities - Flash Fire", () => {
game.override
.battleType("single")
.ability(Abilities.FLASH_FIRE)
.enemyAbility(Abilities.BALL_FETCH)
.startingLevel(20)
.enemyLevel(20)
.disableCrits();
@ -75,13 +76,11 @@ describe("Abilities - Flash Fire", () => {
it("activated after being frozen", async() => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset(SPLASH_ONLY);
game.override.statusEffect(StatusEffect.FREEZE);
await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!;
blissey!.status = new Status(StatusEffect.FREEZE);
expect(blissey.status?.effect).toBe(StatusEffect.FREEZE);
game.doAttack(getMovePosition(game.scene, 0, Moves.SPLASH));
await game.phaseInterceptor.to(TurnEndPhase);