mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 22:09:27 +02:00
Update test
This commit is contained in:
parent
d51daabb4f
commit
580702c9c8
@ -2,7 +2,6 @@ import { AbilityId } from "#enums/ability-id";
|
|||||||
import { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
import { Stat } from "#enums/stat";
|
import { Stat } from "#enums/stat";
|
||||||
import { QuietFormChangePhase } from "#phases/quiet-form-change-phase";
|
|
||||||
import { GameManager } from "#test/test-utils/game-manager";
|
import { GameManager } from "#test/test-utils/game-manager";
|
||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
@ -27,7 +26,7 @@ describe("Ability - Embody Aspect", () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
game = new GameManager(phaserGame);
|
game = new GameManager(phaserGame);
|
||||||
game.override
|
game.override
|
||||||
.moveset([MoveId.SPLASH])
|
.moveset(MoveId.SPLASH)
|
||||||
.ability(AbilityId.EMBODY_ASPECT_TEAL)
|
.ability(AbilityId.EMBODY_ASPECT_TEAL)
|
||||||
.battleStyle("single")
|
.battleStyle("single")
|
||||||
.criticalHits(false)
|
.criticalHits(false)
|
||||||
@ -38,16 +37,17 @@ describe("Ability - Embody Aspect", () => {
|
|||||||
it("Embody Aspect should activate on switching in if user is terrestrialized", async () => {
|
it("Embody Aspect should activate on switching in if user is terrestrialized", async () => {
|
||||||
await game.classicMode.startBattle([SpeciesId.OGERPON, SpeciesId.ABOMASNOW]);
|
await game.classicMode.startBattle([SpeciesId.OGERPON, SpeciesId.ABOMASNOW]);
|
||||||
|
|
||||||
const Ogerpon = game.scene.getPlayerParty()[0];
|
const ogerpon = game.field.getPlayerPokemon();
|
||||||
expect(Ogerpon.formIndex).toBe(baseForm);
|
expect(ogerpon.formIndex).toBe(baseForm);
|
||||||
|
expect(ogerpon.getStatStage(Stat.SPD)).toBe(0);
|
||||||
|
|
||||||
//Also terastallizes Ogerpon
|
//Also terastallizes Ogerpon
|
||||||
game.move.selectWithTera(MoveId.SPLASH);
|
game.move.selectWithTera(MoveId.SPLASH);
|
||||||
|
|
||||||
await game.phaseInterceptor.to(QuietFormChangePhase);
|
await game.phaseInterceptor.to("QuietFormChangePhase");
|
||||||
expect(Ogerpon.formIndex).toBe(teraForm);
|
expect(ogerpon.formIndex).toBe(teraForm);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
expect(Ogerpon.getStatStage(Stat.SPD)).toBe(1);
|
expect(ogerpon.getStatStage(Stat.SPD)).toBe(1);
|
||||||
|
|
||||||
//Switch Ogerpon out
|
//Switch Ogerpon out
|
||||||
game.doSwitchPokemon(1);
|
game.doSwitchPokemon(1);
|
||||||
@ -58,6 +58,6 @@ describe("Ability - Embody Aspect", () => {
|
|||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
//Ability activated
|
//Ability activated
|
||||||
expect(Ogerpon.getStatStage(Stat.SPD)).toBe(1);
|
expect(ogerpon.getStatStage(Stat.SPD)).toBe(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user