apply game.override.starterForms

This commit is contained in:
Felix Staud 2024-07-25 16:03:26 -07:00
parent 97376d5c70
commit 4c15fd86b0
8 changed files with 53 additions and 59 deletions

View File

@ -1,13 +1,12 @@
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";
import { TurnEndPhase } from "#app/phases.js";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#test/utils/gameManagerUtils";
import Overrides from "#app/overrides";
import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { TurnEndPhase } from "#app/phases.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
const TIMEOUT = 20 * 1000;
@ -37,10 +36,10 @@ describe("Abilities - BATTLE BOND", () => {
test(
"check if fainted pokemon switches to base form on arena reset",
async () => {
const baseForm = 1,
ashForm = 2;
const baseForm = 1;
const ashForm = 2;
game.override.startingWave(4);
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
game.override.starterForms({
[Species.GRENINJA]: ashForm,
});

View File

@ -40,7 +40,7 @@ describe("Abilities - DISGUISE", () => {
const baseForm = 0,
bustedForm = 1;
game.override.startingWave(4);
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
game.override.starterForms({
[Species.MIMIKYU]: bustedForm,
});
@ -75,7 +75,7 @@ describe("Abilities - DISGUISE", () => {
game.override.startingLevel(20);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(20);
game.override.enemySpecies(Species.MAGIKARP);
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
game.override.starterForms({
[Species.MIMIKYU]: baseForm,
});

View File

@ -205,7 +205,7 @@ describe("Abilities - Ice Face", () => {
game.override.startingWave(4);
game.override.startingLevel(4);
game.override.enemySpecies(Species.MAGIKARP);
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
game.override.starterForms({
[Species.EISCUE]: noiceForm,
});

View File

@ -1,13 +1,12 @@
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";
import { TurnEndPhase } from "#app/phases.js";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#test/utils/gameManagerUtils";
import Overrides from "#app/overrides";
import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { TurnEndPhase } from "#app/phases.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
const TIMEOUT = 20 * 1000;
@ -40,7 +39,7 @@ describe("Abilities - POWER CONSTRUCT", () => {
const baseForm = 2,
completeForm = 4;
game.override.startingWave(4);
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
game.override.starterForms({
[Species.ZYGARDE]: completeForm,
});

View File

@ -1,13 +1,12 @@
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";
import { TurnEndPhase } from "#app/phases.js";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#test/utils/gameManagerUtils";
import Overrides from "#app/overrides";
import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { TurnEndPhase } from "#app/phases.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
const TIMEOUT = 20 * 1000;
@ -40,7 +39,7 @@ describe("Abilities - SCHOOLING", () => {
const soloForm = 0,
schoolForm = 1;
game.override.startingWave(4);
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
game.override.starterForms({
[Species.WISHIWASHI]: schoolForm,
});

View File

@ -1,13 +1,12 @@
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";
import { TurnEndPhase } from "#app/phases.js";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#test/utils/gameManagerUtils";
import Overrides from "#app/overrides";
import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { TurnEndPhase } from "#app/phases.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
const TIMEOUT = 20 * 1000;
@ -40,7 +39,7 @@ describe("Abilities - SHIELDS DOWN", () => {
const meteorForm = 0,
coreForm = 7;
game.override.startingWave(4);
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
game.override.starterForms({
[Species.MINIOR]: coreForm,
});

View File

@ -1,7 +1,6 @@
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import Overrides from "#app/overrides";
import { Stat } from "#app/data/pokemon-stat";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { QuietFormChangePhase } from "#app/form-change-phase";
import {
CommandPhase,
DamagePhase,
@ -14,15 +13,15 @@ import {
TurnInitPhase,
TurnStartPhase,
} from "#app/phases";
import { Mode } from "#app/ui/ui";
import { Stat } from "#app/data/pokemon-stat";
import GameManager from "#app/test/utils/gameManager";
import { getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Command } from "#app/ui/command-ui-handler";
import { QuietFormChangePhase } from "#app/form-change-phase";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { Mode } from "#app/ui/ui";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
const TIMEOUT = 20 * 1000;
@ -154,7 +153,7 @@ describe("Abilities - ZEN MODE", () => {
const baseForm = 0,
zenForm = 1;
game.override.startingWave(4);
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
game.override.starterForms({
[Species.DARMANITAN]: zenForm,
});

View File

@ -1,13 +1,12 @@
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";
import { TurnEndPhase } from "#app/phases.js";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { getMovePosition } from "#test/utils/gameManagerUtils";
import Overrides from "#app/overrides";
import { Moves } from "#enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Status, StatusEffect } from "#app/data/status-effect.js";
import { TurnEndPhase } from "#app/phases.js";
import { QuietFormChangePhase } from "#app/form-change-phase.js";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
const TIMEOUT = 20 * 1000;
@ -40,7 +39,7 @@ describe("Abilities - ZERO TO HERO", () => {
const baseForm = 0,
heroForm = 1;
game.override.startingWave(4);
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
game.override.starterForms({
[Species.PALAFIN]: heroForm,
});