mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 17:29:30 +02:00
fix: the storng stuff
test flakiness
The enemy pokemon could get contrary or other abilities that cause the expected values to be ... not as expected
This commit is contained in:
parent
5696352f1f
commit
354fe452ad
@ -25,6 +25,7 @@ import { MysteryEncounterPokemonData } from "#app/data/mystery-encounters/myster
|
||||
import { CommandPhase } from "#app/phases/command-phase";
|
||||
import { MovePhase } from "#app/phases/move-phase";
|
||||
import { SelectModifierPhase } from "#app/phases/select-modifier-phase";
|
||||
import { Abilities } from "#app/enums/abilities";
|
||||
|
||||
const namespace = "mysteryEncounter:theStrongStuff";
|
||||
const defaultParty = [Species.LAPRAS, Species.GENGAR, Species.ABRA];
|
||||
@ -43,10 +44,13 @@ describe("The Strong Stuff - Mystery Encounter", () => {
|
||||
beforeEach(async () => {
|
||||
game = new GameManager(phaserGame);
|
||||
scene = game.scene;
|
||||
game.override.mysteryEncounterChance(100);
|
||||
game.override.startingWave(defaultWave);
|
||||
game.override.startingBiome(defaultBiome);
|
||||
game.override.disableTrainerWaves();
|
||||
game.override
|
||||
.mysteryEncounterChance(100)
|
||||
.startingWave(defaultWave)
|
||||
.startingBiome(defaultBiome)
|
||||
.disableTrainerWaves()
|
||||
.enemyAbility(Abilities.BALL_FETCH)
|
||||
.enemyPassiveAbility(Abilities.BALL_FETCH);
|
||||
|
||||
vi.spyOn(MysteryEncounters, "mysteryEncountersByBiome", "get").mockReturnValue(
|
||||
new Map<Biome, MysteryEncounterType[]>([
|
||||
@ -180,7 +184,7 @@ describe("The Strong Stuff - Mystery Encounter", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("should start battle against Shuckle", async () => {
|
||||
it.each(Array.from({length: 50}))("should start battle against Shuckle", async () => {
|
||||
const phaseSpy = vi.spyOn(scene, "pushPhase");
|
||||
|
||||
await game.runToMysteryEncounter(MysteryEncounterType.THE_STRONG_STUFF, defaultParty);
|
||||
|
Loading…
Reference in New Issue
Block a user