apply game.override.ability

This commit is contained in:
Felix Staud 2024-07-25 15:35:20 -07:00
parent 7732411c92
commit c7a3ae24ac
56 changed files with 75 additions and 76 deletions

View File

@ -33,7 +33,7 @@ describe("Ability Timing", () => {
game.override.enemyAbility(Abilities.INTIMIDATE); game.override.enemyAbility(Abilities.INTIMIDATE);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(SPLASH_ONLY);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); game.override.ability(Abilities.BALL_FETCH);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.ICE_BEAM]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.ICE_BEAM]);
}); });

View File

@ -39,7 +39,7 @@ describe("Abilities - Aura Break", () => {
const moveToCheck = allMoves[Moves.MOONBLAST]; const moveToCheck = allMoves[Moves.MOONBLAST];
const basePower = moveToCheck.power; const basePower = moveToCheck.power;
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.FAIRY_AURA); game.override.ability(Abilities.FAIRY_AURA);
vi.spyOn(moveToCheck, "calculateBattlePower"); vi.spyOn(moveToCheck, "calculateBattlePower");
await game.startBattle([Species.PIKACHU]); await game.startBattle([Species.PIKACHU]);
@ -53,7 +53,7 @@ describe("Abilities - Aura Break", () => {
const moveToCheck = allMoves[Moves.DARK_PULSE]; const moveToCheck = allMoves[Moves.DARK_PULSE];
const basePower = moveToCheck.power; const basePower = moveToCheck.power;
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.DARK_AURA); game.override.ability(Abilities.DARK_AURA);
vi.spyOn(moveToCheck, "calculateBattlePower"); vi.spyOn(moveToCheck, "calculateBattlePower");
await game.startBattle([Species.PIKACHU]); await game.startBattle([Species.PIKACHU]);

View File

@ -29,7 +29,7 @@ describe("Abilities - BATTLE BOND", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
const moveToUse = Moves.SPLASH; const moveToUse = Moves.SPLASH;
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BATTLE_BOND); game.override.ability(Abilities.BATTLE_BOND);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
}); });

View File

@ -29,7 +29,7 @@ describe("Abilities - COSTAR", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("double"); game.override.battleType("double");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.COSTAR); game.override.ability(Abilities.COSTAR);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NASTY_PLOT]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NASTY_PLOT]);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(SPLASH_ONLY);
}); });

View File

@ -29,7 +29,7 @@ describe("Abilities - DISGUISE", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
const moveToUse = Moves.SPLASH; const moveToUse = Moves.SPLASH;
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.DISGUISE); game.override.ability(Abilities.DISGUISE);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
}); });

View File

@ -30,7 +30,7 @@ describe("Abilities - Dry Skin", () => {
game.override.enemyAbility(Abilities.DRY_SKIN); game.override.enemyAbility(Abilities.DRY_SKIN);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemySpecies(Species.CHARMANDER); game.override.enemySpecies(Species.CHARMANDER);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.UNNERVE); game.override.ability(Abilities.UNNERVE);
game.override.starterSpecies(Species.CHANDELURE); game.override.starterSpecies(Species.CHANDELURE);
}); });

View File

@ -259,7 +259,7 @@ describe("Abilities - Ice Face", () => {
}); });
it("cannot be copied", async () => { it("cannot be copied", async () => {
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.TRACE); game.override.ability(Abilities.TRACE);
await game.startBattle([Species.MAGIKARP]); await game.startBattle([Species.MAGIKARP]);

View File

@ -33,7 +33,7 @@ describe("Abilities - Intimidate", () => {
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.INTIMIDATE); game.override.enemyAbility(Abilities.INTIMIDATE);
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION); vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INTIMIDATE); game.override.ability(Abilities.INTIMIDATE);
game.override.startingWave(3); game.override.startingWave(3);
game.override.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]); game.override.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
}); });

View File

@ -1,13 +1,12 @@
import {afterEach, beforeAll, beforeEach, describe, expect, it, vi} from "vitest"; import { BattleStat } from "#app/data/battle-stat";
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import Overrides from "#app/overrides";
import {Abilities} from "#enums/abilities";
import {Species} from "#enums/species";
import { import {
CommandPhase, CommandPhase,
} from "#app/phases"; } from "#app/phases";
import {BattleStat} from "#app/data/battle-stat"; import GameManager from "#app/test/utils/gameManager";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
describe("Abilities - Intrepid Sword", () => { describe("Abilities - Intrepid Sword", () => {
@ -29,7 +28,7 @@ describe("Abilities - Intrepid Sword", () => {
game.override.battleType("single"); game.override.battleType("single");
game.override.enemySpecies(Species.ZACIAN); game.override.enemySpecies(Species.ZACIAN);
game.override.enemyAbility(Abilities.INTREPID_SWORD); game.override.enemyAbility(Abilities.INTREPID_SWORD);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INTREPID_SWORD); game.override.ability(Abilities.INTREPID_SWORD);
}); });
it("INTREPID SWORD on player", async() => { it("INTREPID SWORD on player", async() => {

View File

@ -34,7 +34,7 @@ describe("Abilities - Protean", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.LIBERO); game.override.ability(Abilities.LIBERO);
game.override.startingLevel(100); game.override.startingLevel(100);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyMoveset([Moves.ENDURE, Moves.ENDURE, Moves.ENDURE, Moves.ENDURE]); game.override.enemyMoveset([Moves.ENDURE, Moves.ENDURE, Moves.ENDURE, Moves.ENDURE]);

View File

@ -37,7 +37,7 @@ describe("Abilities - Moxie", () => {
game.override.battleType("single"); game.override.battleType("single");
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.MOXIE); game.override.enemyAbility(Abilities.MOXIE);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MOXIE); game.override.ability(Abilities.MOXIE);
game.override.startingLevel(2000); game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);

View File

@ -33,7 +33,7 @@ describe("Abilities - Parental Bond", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true); vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.PARENTAL_BOND); game.override.ability(Abilities.PARENTAL_BOND);
game.override.enemySpecies(Species.SNORLAX); game.override.enemySpecies(Species.SNORLAX);
game.override.enemyAbility(Abilities.INSOMNIA); game.override.enemyAbility(Abilities.INSOMNIA);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(SPLASH_ONLY);

View File

@ -29,7 +29,7 @@ describe("Abilities - POWER CONSTRUCT", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
const moveToUse = Moves.SPLASH; const moveToUse = Moves.SPLASH;
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.POWER_CONSTRUCT); game.override.ability(Abilities.POWER_CONSTRUCT);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
}); });

View File

@ -34,7 +34,7 @@ describe("Abilities - Protean", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.PROTEAN); game.override.ability(Abilities.PROTEAN);
game.override.startingLevel(100); game.override.startingLevel(100);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyMoveset([Moves.ENDURE, Moves.ENDURE, Moves.ENDURE, Moves.ENDURE]); game.override.enemyMoveset([Moves.ENDURE, Moves.ENDURE, Moves.ENDURE, Moves.ENDURE]);

View File

@ -28,7 +28,7 @@ describe("Abilities - Quick Draw", () => {
game.override.battleType("single"); game.override.battleType("single");
game.override.starterSpecies(Species.MAGIKARP); game.override.starterSpecies(Species.MAGIKARP);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.QUICK_DRAW); game.override.ability(Abilities.QUICK_DRAW);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.TAIL_WHIP]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.TAIL_WHIP]);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);

View File

@ -120,7 +120,7 @@ describe("Abilities - Sap Sipper", () => {
const ability = Abilities.SAP_SIPPER; const ability = Abilities.SAP_SIPPER;
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(ability); game.override.ability(ability);
game.override.enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]); game.override.enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.NONE); game.override.enemyAbility(Abilities.NONE);

View File

@ -29,7 +29,7 @@ describe("Abilities - SCHOOLING", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
const moveToUse = Moves.SPLASH; const moveToUse = Moves.SPLASH;
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.SCHOOLING); game.override.ability(Abilities.SCHOOLING);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
}); });

View File

@ -26,7 +26,7 @@ describe("Abilities - Screen Cleaner", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.SCREEN_CLEANER); game.override.ability(Abilities.SCREEN_CLEANER);
game.override.enemySpecies(Species.SHUCKLE); game.override.enemySpecies(Species.SHUCKLE);
}); });

View File

@ -76,7 +76,7 @@ describe("Abilities - Serene Grace", () => {
it("Move chance with Serene Grace", async() => { it("Move chance with Serene Grace", async() => {
const moveToUse = Moves.AIR_SLASH; const moveToUse = Moves.AIR_SLASH;
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.SERENE_GRACE); game.override.ability(Abilities.SERENE_GRACE);
await game.startBattle([ await game.startBattle([
Species.TOGEKISS Species.TOGEKISS
]); ]);

View File

@ -43,7 +43,7 @@ describe("Abilities - Sheer Force", () => {
it("Sheer Force", async() => { it("Sheer Force", async() => {
const moveToUse = Moves.AIR_SLASH; const moveToUse = Moves.AIR_SLASH;
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.SHEER_FORCE); game.override.ability(Abilities.SHEER_FORCE);
await game.startBattle([ await game.startBattle([
Species.PIDGEOT Species.PIDGEOT
]); ]);
@ -82,7 +82,7 @@ describe("Abilities - Sheer Force", () => {
it("Sheer Force with exceptions including binding moves", async() => { it("Sheer Force with exceptions including binding moves", async() => {
const moveToUse = Moves.BIND; const moveToUse = Moves.BIND;
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.SHEER_FORCE); game.override.ability(Abilities.SHEER_FORCE);
await game.startBattle([ await game.startBattle([
Species.PIDGEOT Species.PIDGEOT
]); ]);
@ -121,7 +121,7 @@ describe("Abilities - Sheer Force", () => {
it("Sheer Force with moves with no secondary effect", async() => { it("Sheer Force with moves with no secondary effect", async() => {
const moveToUse = Moves.TACKLE; const moveToUse = Moves.TACKLE;
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.SHEER_FORCE); game.override.ability(Abilities.SHEER_FORCE);
await game.startBattle([ await game.startBattle([
Species.PIDGEOT Species.PIDGEOT
]); ]);
@ -162,7 +162,7 @@ describe("Abilities - Sheer Force", () => {
const moveToUse = Moves.CRUSH_CLAW; const moveToUse = Moves.CRUSH_CLAW;
game.override.enemyAbility(Abilities.COLOR_CHANGE); game.override.enemyAbility(Abilities.COLOR_CHANGE);
vi.spyOn(Overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{name: "KINGS_ROCK", count: 1}]); vi.spyOn(Overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{name: "KINGS_ROCK", count: 1}]);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.SHEER_FORCE); game.override.ability(Abilities.SHEER_FORCE);
await game.startBattle([ await game.startBattle([
Species.PIDGEOT Species.PIDGEOT
]); ]);

View File

@ -29,7 +29,7 @@ describe("Abilities - SHIELDS DOWN", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
const moveToUse = Moves.SPLASH; const moveToUse = Moves.SPLASH;
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.SHIELDS_DOWN); game.override.ability(Abilities.SHIELDS_DOWN);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
}); });

View File

@ -85,7 +85,7 @@ describe("Abilities - Sturdy", () => {
test( test(
"Sturdy is ignored by pokemon with `Abilities.MOLD_BREAKER`", "Sturdy is ignored by pokemon with `Abilities.MOLD_BREAKER`",
async () => { async () => {
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MOLD_BREAKER); game.override.ability(Abilities.MOLD_BREAKER);
await game.startBattle(); await game.startBattle();
game.doAttack(getMovePosition(game.scene, 0, Moves.CLOSE_COMBAT)); game.doAttack(getMovePosition(game.scene, 0, Moves.CLOSE_COMBAT));

View File

@ -38,7 +38,7 @@ describe("Abilities - Volt Absorb", () => {
const ability = Abilities.VOLT_ABSORB; const ability = Abilities.VOLT_ABSORB;
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(ability); game.override.ability(ability);
game.override.enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]); game.override.enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]);
game.override.enemySpecies(Species.DUSKULL); game.override.enemySpecies(Species.DUSKULL);
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);

View File

@ -48,7 +48,7 @@ describe("Abilities - Wind Power", () => {
}); });
it("it becomes charged when Tailwind takes effect on its side", async () => { it("it becomes charged when Tailwind takes effect on its side", async () => {
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.WIND_POWER); game.override.ability(Abilities.WIND_POWER);
game.override.enemySpecies(Species.MAGIKARP); game.override.enemySpecies(Species.MAGIKARP);
await game.startBattle([Species.SHIFTRY]); await game.startBattle([Species.SHIFTRY]);
@ -64,7 +64,7 @@ describe("Abilities - Wind Power", () => {
it("does not become charged when Tailwind takes effect on opposing side", async () => { it("does not become charged when Tailwind takes effect on opposing side", async () => {
game.override.enemySpecies(Species.MAGIKARP); game.override.enemySpecies(Species.MAGIKARP);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.WIND_POWER); game.override.ability(Abilities.WIND_POWER);
await game.startBattle([Species.SHIFTRY]); await game.startBattle([Species.SHIFTRY]);
const magikarp = game.scene.getEnemyPokemon(); const magikarp = game.scene.getEnemyPokemon();

View File

@ -50,7 +50,7 @@ describe("Abilities - Wind Rider", () => {
}); });
it("Attack is increased by one stage when Tailwind is present on its side", async () => { it("Attack is increased by one stage when Tailwind is present on its side", async () => {
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.WIND_RIDER); game.override.ability(Abilities.WIND_RIDER);
game.override.enemySpecies(Species.MAGIKARP); game.override.enemySpecies(Species.MAGIKARP);
await game.startBattle([Species.SHIFTRY]); await game.startBattle([Species.SHIFTRY]);
@ -66,7 +66,7 @@ describe("Abilities - Wind Rider", () => {
}); });
it("does not increase Attack when Tailwind is present on opposing side", async () => { it("does not increase Attack when Tailwind is present on opposing side", async () => {
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.WIND_RIDER); game.override.ability(Abilities.WIND_RIDER);
game.override.enemySpecies(Species.MAGIKARP); game.override.enemySpecies(Species.MAGIKARP);
await game.startBattle([Species.SHIFTRY]); await game.startBattle([Species.SHIFTRY]);

View File

@ -29,7 +29,7 @@ describe("Abilities - Wonder Skin", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.CHARM]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.CHARM]);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); game.override.ability(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.SHUCKLE); game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.WONDER_SKIN); game.override.enemyAbility(Abilities.WONDER_SKIN);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(SPLASH_ONLY);
@ -65,7 +65,7 @@ describe("Abilities - Wonder Skin", () => {
it(`does not affect pokemon with ${allAbilities[ability].name}`, async () => { it(`does not affect pokemon with ${allAbilities[ability].name}`, async () => {
const moveToCheck = allMoves[Moves.CHARM]; const moveToCheck = allMoves[Moves.CHARM];
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(ability); game.override.ability(ability);
vi.spyOn(moveToCheck, "calculateBattleAccuracy"); vi.spyOn(moveToCheck, "calculateBattleAccuracy");
await game.startBattle([Species.PIKACHU]); await game.startBattle([Species.PIKACHU]);

View File

@ -46,7 +46,7 @@ describe("Abilities - ZEN MODE", () => {
game.override.battleType("single"); game.override.battleType("single");
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE); game.override.ability(Abilities.ZEN_MODE);
game.override.startingLevel(100); game.override.startingLevel(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);

View File

@ -29,7 +29,7 @@ describe("Abilities - ZERO TO HERO", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
const moveToUse = Moves.SPLASH; const moveToUse = Moves.SPLASH;
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZERO_TO_HERO); game.override.ability(Abilities.ZERO_TO_HERO);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
}); });

View File

@ -31,7 +31,7 @@ describe("Arena - Gravity", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.GRAVITY, Moves.FISSURE]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.GRAVITY, Moves.FISSURE]);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.UNNERVE); game.override.ability(Abilities.UNNERVE);
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.SHUCKLE); game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH)); game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH));

View File

@ -32,7 +32,7 @@ describe("Weather - Fog", () => {
.weather(WeatherType.FOG) .weather(WeatherType.FOG)
.battleType("single"); .battleType("single");
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); game.override.ability(Abilities.BALL_FETCH);
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.MAGIKARP); game.override.enemySpecies(Species.MAGIKARP);
game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH)); game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH));

View File

@ -36,7 +36,7 @@ describe("Battle order", () => {
game.override.battleType("single"); game.override.battleType("single");
game.override.enemySpecies(Species.MEWTWO); game.override.enemySpecies(Species.MEWTWO);
game.override.enemyAbility(Abilities.INSOMNIA); game.override.enemyAbility(Abilities.INSOMNIA);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA); game.override.ability(Abilities.INSOMNIA);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
}); });

View File

@ -208,7 +208,7 @@ describe("Test Battle Phase", () => {
game.override.battleType("single"); game.override.battleType("single");
game.override.enemySpecies(Species.MIGHTYENA); game.override.enemySpecies(Species.MIGHTYENA);
game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION); game.override.ability(Abilities.HYDRATION);
await game.startBattle([ await game.startBattle([
Species.BLASTOISE, Species.BLASTOISE,
Species.CHARIZARD, Species.CHARIZARD,
@ -221,7 +221,7 @@ describe("Test Battle Phase", () => {
game.override.battleType("single"); game.override.battleType("single");
game.override.enemySpecies(Species.MIGHTYENA); game.override.enemySpecies(Species.MIGHTYENA);
game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION); game.override.ability(Abilities.HYDRATION);
await game.startBattle([ await game.startBattle([
Species.BLASTOISE, Species.BLASTOISE,
]); ]);
@ -233,7 +233,7 @@ describe("Test Battle Phase", () => {
game.override.battleType("double"); game.override.battleType("double");
game.override.enemySpecies(Species.MIGHTYENA); game.override.enemySpecies(Species.MIGHTYENA);
game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION); game.override.ability(Abilities.HYDRATION);
game.override.startingWave(3); game.override.startingWave(3);
await game.startBattle([ await game.startBattle([
Species.BLASTOISE, Species.BLASTOISE,
@ -247,7 +247,7 @@ describe("Test Battle Phase", () => {
game.override.battleType("double"); game.override.battleType("double");
game.override.enemySpecies(Species.MIGHTYENA); game.override.enemySpecies(Species.MIGHTYENA);
game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION); game.override.ability(Abilities.HYDRATION);
game.override.startingWave(3); game.override.startingWave(3);
await game.startBattle([ await game.startBattle([
Species.BLASTOISE, Species.BLASTOISE,
@ -265,7 +265,7 @@ describe("Test Battle Phase", () => {
game.override.starterSpecies(Species.MEWTWO); game.override.starterSpecies(Species.MEWTWO);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE); game.override.ability(Abilities.ZEN_MODE);
game.override.startingLevel(2000); game.override.startingLevel(2000);
game.override.startingWave(3); game.override.startingWave(3);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
@ -294,7 +294,7 @@ describe("Test Battle Phase", () => {
game.override.starterSpecies(Species.MEWTWO); game.override.starterSpecies(Species.MEWTWO);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE); game.override.ability(Abilities.ZEN_MODE);
game.override.startingLevel(2000); game.override.startingLevel(2000);
game.override.startingWave(3); game.override.startingWave(3);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
@ -312,7 +312,7 @@ describe("Test Battle Phase", () => {
game.override.starterSpecies(Species.MEWTWO); game.override.starterSpecies(Species.MEWTWO);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE); game.override.ability(Abilities.ZEN_MODE);
game.override.startingLevel(2000); game.override.startingLevel(2000);
game.override.startingWave(3); game.override.startingWave(3);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);

View File

@ -29,7 +29,7 @@ describe("Test Battle Phase", () => {
game.override.starterSpecies(Species.MEWTWO); game.override.starterSpecies(Species.MEWTWO);
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE); game.override.ability(Abilities.ZEN_MODE);
game.override.startingLevel(2000); game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);

View File

@ -30,7 +30,7 @@ describe("Test Battle Phase", () => {
game.override.startingLevel(2000); game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION); game.override.ability(Abilities.HYDRATION);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
}); });

View File

@ -24,7 +24,7 @@ describe("EXP Modifier Items", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); game.override.ability(Abilities.BALL_FETCH);
game.override.battleType("single"); game.override.battleType("single");
}); });

View File

@ -34,7 +34,7 @@ describe("Items - Grip Claw", () => {
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.POPULATION_BOMB, Moves.SPLASH ]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.POPULATION_BOMB, Moves.SPLASH ]);
vi.spyOn(Overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{name: "GRIP_CLAW", count: 5}, {name: "MULTI_LENS", count: 3}]); vi.spyOn(Overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{name: "GRIP_CLAW", count: 5}, {name: "MULTI_LENS", count: 3}]);
game.override.enemySpecies(Species.SNORLAX); game.override.enemySpecies(Species.SNORLAX);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.KLUTZ); game.override.ability(Abilities.KLUTZ);
game.override.enemyMoveset([ Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH ]); game.override.enemyMoveset([ Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH ]);
vi.spyOn(Overrides, "OPP_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([ vi.spyOn(Overrides, "OPP_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([
{name: "BERRY", type: BerryType.SITRUS, count: 2}, {name: "BERRY", type: BerryType.SITRUS, count: 2},

View File

@ -38,7 +38,7 @@ describe("Items - Toxic orb", () => {
const oppMoveToUse = Moves.TACKLE; const oppMoveToUse = Moves.TACKLE;
game.override.battleType("single"); game.override.battleType("single");
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA); game.override.ability(Abilities.INSOMNIA);
game.override.enemyAbility(Abilities.INSOMNIA); game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(2000); game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);

View File

@ -36,7 +36,7 @@ describe("Moves - Aurora Veil", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE); game.override.ability(Abilities.NONE);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.ABSORB, Moves.ROCK_SLIDE, Moves.TACKLE]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.ABSORB, Moves.ROCK_SLIDE, Moves.TACKLE]);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.enemySpecies(Species.MAGIKARP); game.override.enemySpecies(Species.MAGIKARP);

View File

@ -30,7 +30,7 @@ describe("Moves - Double Team", () => {
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.DOUBLE_TEAM]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.DOUBLE_TEAM]);
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true); vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); game.override.ability(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.SHUCKLE); game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);

View File

@ -40,7 +40,7 @@ describe("Moves - Dragon Rage", () => {
game.override.starterSpecies(Species.SNORLAX); game.override.starterSpecies(Species.SNORLAX);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.DRAGON_RAGE]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.DRAGON_RAGE]);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); game.override.ability(Abilities.BALL_FETCH);
vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
game.override.startingLevel(100); game.override.startingLevel(100);

View File

@ -54,7 +54,7 @@ describe("Moves - Fissure", () => {
}); });
it("ignores damage modification from abilities such as fur coat", async () => { it("ignores damage modification from abilities such as fur coat", async () => {
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NO_GUARD); game.override.ability(Abilities.NO_GUARD);
game.override.enemyAbility(Abilities.FUR_COAT); game.override.enemyAbility(Abilities.FUR_COAT);
game.doAttack(getMovePosition(game.scene, 0, Moves.FISSURE)); game.doAttack(getMovePosition(game.scene, 0, Moves.FISSURE));

View File

@ -31,7 +31,7 @@ describe("Moves - Flower Shield", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE); game.override.ability(Abilities.NONE);
game.override.enemyAbility(Abilities.NONE); game.override.enemyAbility(Abilities.NONE);
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.FLOWER_SHIELD, Moves.SPLASH]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.FLOWER_SHIELD, Moves.SPLASH]);

View File

@ -101,7 +101,7 @@ describe("Moves - Follow Me", () => {
test( test(
"move effect should be bypassed by Stalwart", "move effect should be bypassed by Stalwart",
async () => { async () => {
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.STALWART); game.override.ability(Abilities.STALWART);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.QUICK_ATTACK ]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.QUICK_ATTACK ]);
game.override.enemyMoveset([ Moves.FOLLOW_ME, Moves.FOLLOW_ME, Moves.FOLLOW_ME, Moves.FOLLOW_ME ]); game.override.enemyMoveset([ Moves.FOLLOW_ME, Moves.FOLLOW_ME, Moves.FOLLOW_ME, Moves.FOLLOW_ME ]);

View File

@ -33,7 +33,7 @@ describe("Moves - Gastro Acid", () => {
game.override.battleType("double"); game.override.battleType("double");
game.override.startingLevel(1); game.override.startingLevel(1);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE); game.override.ability(Abilities.NONE);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.GASTRO_ACID, Moves.WATER_GUN, Moves.SPLASH, Moves.CORE_ENFORCER]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.GASTRO_ACID, Moves.WATER_GUN, Moves.SPLASH, Moves.CORE_ENFORCER]);
game.override.enemySpecies(Species.BIDOOF); game.override.enemySpecies(Species.BIDOOF);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(SPLASH_ONLY);

View File

@ -32,7 +32,7 @@ describe("Moves - Glaive Rush", () => {
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset(Array(4).fill(Moves.GLAIVE_RUSH)); game.override.enemyMoveset(Array(4).fill(Moves.GLAIVE_RUSH));
game.override.starterSpecies(Species.KLINK); game.override.starterSpecies(Species.KLINK);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.UNNERVE); game.override.ability(Abilities.UNNERVE);
vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.FUR_COAT); vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.FUR_COAT);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SHADOW_SNEAK, Moves.AVALANCHE, Moves.SPLASH, Moves.GLAIVE_RUSH]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SHADOW_SNEAK, Moves.AVALANCHE, Moves.SPLASH, Moves.GLAIVE_RUSH]);
}); });

View File

@ -37,7 +37,7 @@ describe("Moves - Growth", () => {
game.override.battleType("single"); game.override.battleType("single");
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.MOXIE); game.override.enemyAbility(Abilities.MOXIE);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA); game.override.ability(Abilities.INSOMNIA);
game.override.startingLevel(2000); game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);

View File

@ -31,7 +31,7 @@ describe("Moves - Hard Press", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); game.override.ability(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.MUNCHLAX); game.override.enemySpecies(Species.MUNCHLAX);
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(SPLASH_ONLY);

View File

@ -35,7 +35,7 @@ describe("Moves - Light Screen", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE); game.override.ability(Abilities.NONE);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.ABSORB, Moves.DAZZLING_GLEAM, Moves.TACKLE]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.ABSORB, Moves.DAZZLING_GLEAM, Moves.TACKLE]);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.enemySpecies(Species.MAGIKARP); game.override.enemySpecies(Species.MAGIKARP);

View File

@ -167,7 +167,7 @@ function beforeTrial(phaserGame: Phaser.Game, single: boolean = false) {
const game = new GameManager(phaserGame); const game = new GameManager(phaserGame);
game.override.battleType("double"); game.override.battleType("double");
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.EARTHQUAKE, Moves.HYPER_VOICE, Moves.SURF, Moves.SPLASH]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.EARTHQUAKE, Moves.HYPER_VOICE, Moves.SURF, Moves.SPLASH]);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); game.override.ability(Abilities.BALL_FETCH);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(SPLASH_ONLY);
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true); vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
game.override.startingLevel(50); game.override.startingLevel(50);

View File

@ -37,7 +37,7 @@ describe("Moves - Octolock", () => {
game.override.startingLevel(2000); game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.OCTOLOCK, Moves.SPLASH]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.OCTOLOCK, Moves.SPLASH]);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE); game.override.ability(Abilities.NONE);
}); });
it("Reduces DEf and SPDEF by 1 each turn", { timeout: 10000 }, async () => { it("Reduces DEf and SPDEF by 1 each turn", { timeout: 10000 }, async () => {

View File

@ -76,7 +76,7 @@ describe("Moves - Rage Powder", () => {
test( test(
"move effect should be bypassed by Overcoat", "move effect should be bypassed by Overcoat",
async () => { async () => {
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.OVERCOAT); game.override.ability(Abilities.OVERCOAT);
game.override.enemyMoveset([ Moves.RAGE_POWDER, Moves.RAGE_POWDER, Moves.RAGE_POWDER, Moves.RAGE_POWDER ]); game.override.enemyMoveset([ Moves.RAGE_POWDER, Moves.RAGE_POWDER, Moves.RAGE_POWDER, Moves.RAGE_POWDER ]);
// Test with two non-Grass type player Pokemon // Test with two non-Grass type player Pokemon

View File

@ -35,7 +35,7 @@ describe("Moves - Reflect", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override.battleType("single"); game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE); game.override.ability(Abilities.NONE);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.ABSORB, Moves.ROCK_SLIDE, Moves.TACKLE]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.ABSORB, Moves.ROCK_SLIDE, Moves.TACKLE]);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.enemySpecies(Species.MAGIKARP); game.override.enemySpecies(Species.MAGIKARP);

View File

@ -29,7 +29,7 @@ describe("Moves - Rollout", () => {
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true); vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
game.override.battleType("single"); game.override.battleType("single");
game.override.starterSpecies(Species.RATTATA); game.override.starterSpecies(Species.RATTATA);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE); game.override.ability(Abilities.NONE);
game.override.enemySpecies(Species.BIDOOF); game.override.enemySpecies(Species.BIDOOF);
game.override.enemyAbility(Abilities.NONE); game.override.enemyAbility(Abilities.NONE);
game.override.startingLevel(100); game.override.startingLevel(100);

View File

@ -31,7 +31,7 @@ describe("Moves - Spikes", () => {
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION); vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION); game.override.ability(Abilities.HYDRATION);
vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION); vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
game.override.startingWave(3); game.override.startingWave(3);
game.override.enemyMoveset([Moves.SPLASH,Moves.SPLASH,Moves.SPLASH,Moves.SPLASH]); game.override.enemyMoveset([Moves.SPLASH,Moves.SPLASH,Moves.SPLASH,Moves.SPLASH]);

View File

@ -36,7 +36,7 @@ describe("Moves - Tail whip", () => {
game.override.battleType("single"); game.override.battleType("single");
game.override.enemySpecies(Species.RATTATA); game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.INSOMNIA); game.override.enemyAbility(Abilities.INSOMNIA);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA); game.override.ability(Abilities.INSOMNIA);
game.override.startingLevel(2000); game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]); game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);

View File

@ -33,7 +33,7 @@ describe("Moves - Tidy Up", () => {
game.override.enemyAbility(Abilities.BALL_FETCH); game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset(SPLASH_ONLY); game.override.enemyMoveset(SPLASH_ONLY);
game.override.starterSpecies(Species.FEEBAS); game.override.starterSpecies(Species.FEEBAS);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH); game.override.ability(Abilities.BALL_FETCH);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TIDY_UP]); vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TIDY_UP]);
game.override.startingLevel(50); game.override.startingLevel(50);
}); });