mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 07:23:24 +02:00
* Reworked status code, fixed bugs and added Rest tests * Fixed rest bug * Fixed bugs, split up status code, re-added required Rest parameter * Cleaned up comments and such * Added edge case to rest about locales * Maybe did stuff * Split up `trySetStatus` fully; fixed rest turn order display to match mainline * Reverted healing changes to move to other PR * Fixed message code a bit * Condensed all status immunity tests under 1 roof * Fixed the tests * Added pollen puff tests back again * Fixed swallow test * Reverted swallow test fixing in other prs * Fixed pollen puff * Fixed cirrc dep isuse * fixed stockpile to no longer fail on stack full * Fixed rest thing...? * readded swallow conds * Fixed tests * wip * Fixed tests * Added pokemon heal phase to the turn queue * ddddd * Fixed the tests * Fixed corrosion test * Ran linting * Fixed infiltrator bug * Fix pokemon.ts * Update move.ts * Update corrosion.test.ts * Update pokemon.ts documentation * Remove missed line in TSDocs * Update pokemon.ts Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> * Update modifier.ts Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> * Update modifier.ts Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> * Update obtain-status-effect-phase.ts * Fix merge issues and apply Biome * Revert pokemon-heal-phase.ts * ddddd * Fixed test file syntax err * Update toxic spikes status set text to be quiet * ran biome * ran boime * Prevent rest failure message from displaying outside of move phase --------- Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
56 lines
1.5 KiB
TypeScript
56 lines
1.5 KiB
TypeScript
import { MoveId } from "#enums/move-id";
|
|
import { SpeciesId } from "#enums/species-id";
|
|
import { StatusEffect } from "#enums/status-effect";
|
|
import { TurnStartPhase } from "#phases/turn-start-phase";
|
|
import { GameManager } from "#test/test-utils/game-manager";
|
|
import Phaser from "phaser";
|
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|
|
|
describe("Moves - Fusion Flare", () => {
|
|
let phaserGame: Phaser.Game;
|
|
let game: GameManager;
|
|
|
|
const fusionFlare = MoveId.FUSION_FLARE;
|
|
|
|
beforeAll(() => {
|
|
phaserGame = new Phaser.Game({
|
|
type: Phaser.HEADLESS,
|
|
});
|
|
});
|
|
|
|
afterEach(() => {
|
|
game.phaseInterceptor.restoreOg();
|
|
});
|
|
|
|
beforeEach(() => {
|
|
game = new GameManager(phaserGame);
|
|
game.override
|
|
.moveset([fusionFlare])
|
|
.startingLevel(1)
|
|
.enemySpecies(SpeciesId.RATTATA)
|
|
.enemyMoveset(MoveId.REST)
|
|
.battleStyle("single")
|
|
.startingWave(97)
|
|
.criticalHits(false);
|
|
});
|
|
|
|
it("should thaw freeze status condition", async () => {
|
|
await game.classicMode.startBattle([SpeciesId.RESHIRAM]);
|
|
|
|
const partyMember = game.field.getPlayerPokemon();
|
|
|
|
game.move.select(fusionFlare);
|
|
|
|
await game.phaseInterceptor.to(TurnStartPhase, false);
|
|
|
|
// Inflict freeze quietly and check if it was properly inflicted
|
|
partyMember.doSetStatus(StatusEffect.FREEZE);
|
|
expect(partyMember.status!.effect).toBe(StatusEffect.FREEZE);
|
|
|
|
await game.toNextTurn();
|
|
|
|
// Check if FUSION_FLARE thawed freeze
|
|
expect(partyMember.status?.effect).toBeUndefined();
|
|
});
|
|
});
|