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