apply game.override.enemyAbility
This commit is contained in:
parent
7cd75b13b9
commit
d14799f37a
|
@ -29,7 +29,7 @@ describe("Ability Timing", () => {
|
|||
game.override.battleType("single");
|
||||
|
||||
game.override.enemySpecies(Species.PIDGEY);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INTIMIDATE);
|
||||
game.override.enemyAbility(Abilities.INTIMIDATE);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(Array(4).fill(Moves.SPLASH));
|
||||
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
|
|
|
@ -30,7 +30,7 @@ describe("Abilities - Aura Break", () => {
|
|||
game.override.battleType("single");
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.MOONBLAST, Moves.DARK_PULSE, Moves.MOONBLAST, Moves.DARK_PULSE]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.AURA_BREAK);
|
||||
game.override.enemyAbility(Abilities.AURA_BREAK);
|
||||
game.override.enemySpecies(Species.SHUCKLE);
|
||||
});
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ describe("Abilities - Battery", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
game.override.battleType("double");
|
||||
game.override.enemySpecies(Species.SHUCKLE);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
});
|
||||
|
|
|
@ -37,7 +37,7 @@ describe("Abilities - COSTAR", () => {
|
|||
test(
|
||||
"ability copies positive stat changes",
|
||||
async () => {
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
|
||||
await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]);
|
||||
|
||||
|
@ -68,7 +68,7 @@ describe("Abilities - COSTAR", () => {
|
|||
test(
|
||||
"ability copies negative stat changes",
|
||||
async () => {
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INTIMIDATE);
|
||||
game.override.enemyAbility(Abilities.INTIMIDATE);
|
||||
|
||||
await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ describe("Abilities - Dry Skin", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
game.override.battleType("single");
|
||||
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.DRY_SKIN);
|
||||
game.override.enemyAbility(Abilities.DRY_SKIN);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
game.override.enemySpecies(Species.CHARMANDER);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.UNNERVE);
|
||||
|
@ -94,7 +94,7 @@ describe("Abilities - Dry Skin", () => {
|
|||
|
||||
expect(enemy.hp > 0);
|
||||
enemy.hp = initialHP;
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
|
||||
game.override.enemyAbility(Abilities.NONE);
|
||||
|
||||
// second turn
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.FLAMETHROWER));
|
||||
|
|
|
@ -33,7 +33,7 @@ describe("Abilities - Hustle", () => {
|
|||
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(5);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
game.override.enemySpecies(Species.SHUCKLE);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
});
|
||||
|
||||
it("increases the user's Attack stat by 50%", async () => {
|
||||
|
|
|
@ -35,7 +35,7 @@ describe("Abilities - Ice Face", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.EISCUE);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ICE_FACE);
|
||||
game.override.enemyAbility(Abilities.ICE_FACE);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.ICE_BEAM, Moves.TOXIC_THREAD, Moves.HAIL]);
|
||||
});
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("Abilities - Intimidate", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INTIMIDATE);
|
||||
game.override.enemyAbility(Abilities.INTIMIDATE);
|
||||
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INTIMIDATE);
|
||||
game.override.startingWave(3);
|
||||
|
|
|
@ -28,7 +28,7 @@ describe("Abilities - Intrepid Sword", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.ZACIAN);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INTREPID_SWORD);
|
||||
game.override.enemyAbility(Abilities.INTREPID_SWORD);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INTREPID_SWORD);
|
||||
});
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ describe("Abilities - Moxie", () => {
|
|||
const moveToUse = Moves.AERIAL_ACE;
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MOXIE);
|
||||
game.override.enemyAbility(Abilities.MOXIE);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MOXIE);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
|
|
|
@ -34,7 +34,7 @@ describe("Abilities - Parental Bond", () => {
|
|||
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.PARENTAL_BOND);
|
||||
game.override.enemySpecies(Species.SNORLAX);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
game.override.enemyAbility(Abilities.INSOMNIA);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
|
@ -591,7 +591,7 @@ describe("Abilities - Parental Bond", () => {
|
|||
"ability should not cause user to hit into Storm Drain more than once",
|
||||
async () => {
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.WATER_GUN]);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.STORM_DRAIN);
|
||||
game.override.enemyAbility(Abilities.STORM_DRAIN);
|
||||
|
||||
await game.startBattle([Species.CHARIZARD]);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("Abilities - Power Spot", () => {
|
|||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
game.override.enemySpecies(Species.SHUCKLE);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
});
|
||||
|
||||
it("raises the power of allies' special moves by 30%", async () => {
|
||||
|
|
|
@ -33,7 +33,7 @@ describe("Abilities - Quick Draw", () => {
|
|||
|
||||
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
game.override.enemySpecies(Species.MAGIKARP);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(Array(4).fill(Moves.TACKLE));
|
||||
|
||||
vi.spyOn(allAbilities[Abilities.QUICK_DRAW].getAttrs(BypassSpeedChanceAbAttr)[0], "chance", "get").mockReturnValue(100);
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("Abilities - Sand Veil", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH]);
|
||||
game.override.enemySpecies(Species.MEOWSCARADA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
game.override.enemyAbility(Abilities.INSOMNIA);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TWISTER, Moves.TWISTER, Moves.TWISTER, Moves.TWISTER]);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
|
|
|
@ -41,7 +41,7 @@ describe("Abilities - Sap Sipper", () => {
|
|||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]);
|
||||
game.override.enemySpecies(Species.DUSKULL);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(enemyAbility);
|
||||
game.override.enemyAbility(enemyAbility);
|
||||
|
||||
await game.startBattle();
|
||||
|
||||
|
@ -62,7 +62,7 @@ describe("Abilities - Sap Sipper", () => {
|
|||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]);
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(enemyAbility);
|
||||
game.override.enemyAbility(enemyAbility);
|
||||
|
||||
await game.startBattle();
|
||||
|
||||
|
@ -81,7 +81,7 @@ describe("Abilities - Sap Sipper", () => {
|
|||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]);
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(enemyAbility);
|
||||
game.override.enemyAbility(enemyAbility);
|
||||
|
||||
await game.startBattle();
|
||||
|
||||
|
@ -101,7 +101,7 @@ describe("Abilities - Sap Sipper", () => {
|
|||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]);
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(enemyAbility);
|
||||
game.override.enemyAbility(enemyAbility);
|
||||
|
||||
await game.startBattle();
|
||||
|
||||
|
@ -123,7 +123,7 @@ describe("Abilities - Sap Sipper", () => {
|
|||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(ability);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]);
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
|
||||
game.override.enemyAbility(Abilities.NONE);
|
||||
|
||||
await game.startBattle();
|
||||
|
||||
|
@ -148,7 +148,7 @@ describe("Abilities - Sap Sipper", () => {
|
|||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]);
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(enemyAbility);
|
||||
game.override.enemyAbility(enemyAbility);
|
||||
|
||||
await game.startBattle();
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ describe("Abilities - Sheer Force", () => {
|
|||
|
||||
it("Sheer Force Disabling Specific Abilities", async() => {
|
||||
const moveToUse = Moves.CRUSH_CLAW;
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(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, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.SHEER_FORCE);
|
||||
await game.startBattle([
|
||||
|
|
|
@ -36,7 +36,7 @@ describe("Abilities - Shield Dust", () => {
|
|||
const movesToUse = [Moves.AIR_SLASH];
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.ONIX);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.SHIELD_DUST);
|
||||
game.override.enemyAbility(Abilities.SHIELD_DUST);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue(movesToUse);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("Abilities - Steely Spirit", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
game.override.battleType("double");
|
||||
game.override.enemySpecies(Species.SHUCKLE);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.IRON_HEAD, Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(allMoves[moveToCheck], "calculateBattlePower");
|
||||
|
|
|
@ -38,7 +38,7 @@ describe("Abilities - Sturdy", () => {
|
|||
|
||||
game.override.enemySpecies(Species.ARON);
|
||||
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(5);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.STURDY);
|
||||
game.override.enemyAbility(Abilities.STURDY);
|
||||
});
|
||||
|
||||
test(
|
||||
|
|
|
@ -41,7 +41,7 @@ describe("Abilities - Volt Absorb", () => {
|
|||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(ability);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]);
|
||||
game.override.enemySpecies(Species.DUSKULL);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
|
||||
await game.startBattle();
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ describe("Abilities - Wind Power", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.SHIFTRY);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.WIND_POWER);
|
||||
game.override.enemyAbility(Abilities.WIND_POWER);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
});
|
||||
|
|
|
@ -29,7 +29,7 @@ describe("Abilities - Wind Rider", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.SHIFTRY);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.WIND_RIDER);
|
||||
game.override.enemyAbility(Abilities.WIND_RIDER);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
});
|
||||
|
|
|
@ -30,7 +30,7 @@ describe("Abilities - Wonder Skin", () => {
|
|||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.CHARM]);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemySpecies(Species.SHUCKLE);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.WONDER_SKIN);
|
||||
game.override.enemyAbility(Abilities.WONDER_SKIN);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
});
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ describe("Abilities - ZEN MODE", () => {
|
|||
const moveToUse = Moves.SPLASH;
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
|
|
|
@ -32,7 +32,7 @@ describe("Arena - Gravity", () => {
|
|||
game.override.battleType("single");
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.GRAVITY, Moves.FISSURE]);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.UNNERVE);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
game.override.enemySpecies(Species.SHUCKLE);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(new Array(4).fill(Moves.SPLASH));
|
||||
});
|
||||
|
|
|
@ -33,7 +33,7 @@ describe("Weather - Fog", () => {
|
|||
.battleType("single");
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
game.override.enemySpecies(Species.MAGIKARP);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(new Array(4).fill(Moves.SPLASH));
|
||||
});
|
||||
|
|
|
@ -30,7 +30,7 @@ describe("Weather - Strong Winds", () => {
|
|||
game.override.battleType("single");
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(10);
|
||||
game.override.enemySpecies(Species.TAILLOW);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.DELTA_STREAM);
|
||||
game.override.enemyAbility(Abilities.DELTA_STREAM);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.THUNDERBOLT, Moves.ICE_BEAM, Moves.ROCK_SLIDE]);
|
||||
});
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ describe("Battle order", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.MEWTWO);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
game.override.enemyAbility(Abilities.INSOMNIA);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
||||
});
|
||||
|
|
|
@ -97,7 +97,7 @@ describe("Test Battle Phase", () => {
|
|||
.startingWave(3)
|
||||
.battleType("single");
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
|
||||
await game.startBattle();
|
||||
game.onNextPrompt("CommandPhase", Mode.COMMAND, () => {
|
||||
|
@ -116,7 +116,7 @@ describe("Test Battle Phase", () => {
|
|||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(5);
|
||||
game.override.startingWave(3);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP]);
|
||||
game.override.battleType("single");
|
||||
await game.startBattle();
|
||||
|
@ -207,7 +207,7 @@ describe("Test Battle Phase", () => {
|
|||
it("2vs1", async() => {
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.MIGHTYENA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
|
@ -220,7 +220,7 @@ describe("Test Battle Phase", () => {
|
|||
it("1vs1", async() => {
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.MIGHTYENA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
await game.startBattle([
|
||||
Species.BLASTOISE,
|
||||
|
@ -232,7 +232,7 @@ describe("Test Battle Phase", () => {
|
|||
it("2vs2", async() => {
|
||||
game.override.battleType("double");
|
||||
game.override.enemySpecies(Species.MIGHTYENA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.startingWave(3);
|
||||
await game.startBattle([
|
||||
|
@ -246,7 +246,7 @@ describe("Test Battle Phase", () => {
|
|||
it("4vs2", async() => {
|
||||
game.override.battleType("double");
|
||||
game.override.enemySpecies(Species.MIGHTYENA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.startingWave(3);
|
||||
await game.startBattle([
|
||||
|
@ -264,7 +264,7 @@ describe("Test Battle Phase", () => {
|
|||
game.override.battleType("single");
|
||||
vi.spyOn(Overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MEWTWO);
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
game.override.startingWave(3);
|
||||
|
@ -293,7 +293,7 @@ describe("Test Battle Phase", () => {
|
|||
game.override.battleType("single");
|
||||
vi.spyOn(Overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MEWTWO);
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
game.override.startingWave(3);
|
||||
|
@ -311,7 +311,7 @@ describe("Test Battle Phase", () => {
|
|||
game.override.battleType("single");
|
||||
vi.spyOn(Overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MEWTWO);
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
game.override.startingWave(3);
|
||||
|
|
|
@ -28,7 +28,7 @@ describe("Test Battle Phase", () => {
|
|||
.startingWave(3);
|
||||
vi.spyOn(Overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.MEWTWO);
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
|
|
|
@ -29,7 +29,7 @@ describe("Test Battle Phase", () => {
|
|||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
|
||||
});
|
||||
|
|
|
@ -27,7 +27,7 @@ describe("Evolution", () => {
|
|||
game.override.battleType("single");
|
||||
|
||||
game.override.enemySpecies(Species.MAGIKARP);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(60);
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ describe("EXP Modifier Items", () => {
|
|||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.battleType("single");
|
||||
});
|
||||
|
|
|
@ -30,7 +30,7 @@ describe("Items - Leftovers", () => {
|
|||
vi.spyOn(overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.UNNERVE);
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH]);
|
||||
game.override.enemySpecies(Species.SHUCKLE);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.UNNERVE);
|
||||
game.override.enemyAbility(Abilities.UNNERVE);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
|
||||
vi.spyOn(overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{name: "LEFTOVERS", count: 1}]);
|
||||
});
|
||||
|
|
|
@ -39,7 +39,7 @@ describe("Items - Toxic orb", () => {
|
|||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
game.override.enemyAbility(Abilities.INSOMNIA);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([oppMoveToUse, oppMoveToUse, oppMoveToUse, oppMoveToUse]);
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("Moves - Astonish", () => {
|
|||
game.override.battleType("single");
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.ASTONISH, Moves.SPLASH]);
|
||||
game.override.enemySpecies(Species.BLASTOISE);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
game.override.enemyAbility(Abilities.INSOMNIA);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
|
|
|
@ -34,7 +34,7 @@ describe("Moves - Ceaseless Edge", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.RUN_AWAY);
|
||||
game.override.enemyAbility(Abilities.RUN_AWAY);
|
||||
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.RUN_AWAY);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
|
|
|
@ -32,7 +32,7 @@ describe("Moves - Double Team", () => {
|
|||
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemySpecies(Species.SHUCKLE);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
|
||||
});
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ describe("Moves - Dragon Rage", () => {
|
|||
|
||||
game.override.enemySpecies(Species.SNORLAX);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
|
||||
|
@ -111,7 +111,7 @@ describe("Moves - Dragon Rage", () => {
|
|||
});
|
||||
|
||||
it("ignores damage modification from abilities such as ice scales", async () => {
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ICE_SCALES);
|
||||
game.override.enemyAbility(Abilities.ICE_SCALES);
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.DRAGON_RAGE));
|
||||
await game.phaseInterceptor.to(TurnEndPhase);
|
||||
|
|
|
@ -54,7 +54,7 @@ describe("Moves - Fissure", () => {
|
|||
|
||||
it("ignores damage modification from abilities such as fur coat", async () => {
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NO_GUARD);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.FUR_COAT);
|
||||
game.override.enemyAbility(Abilities.FUR_COAT);
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.FISSURE));
|
||||
await game.phaseInterceptor.to(DamagePhase, true);
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("Moves - Flower Shield", () => {
|
|||
beforeEach(() => {
|
||||
game = new GameManager(phaserGame);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
|
||||
game.override.enemyAbility(Abilities.NONE);
|
||||
game.override.battleType("single");
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.FLOWER_SHIELD, Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
|
|
|
@ -36,7 +36,7 @@ describe("Moves - Gastro Acid", () => {
|
|||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.GASTRO_ACID, Moves.WATER_GUN, Moves.SPLASH, Moves.CORE_ENFORCER]);
|
||||
game.override.enemySpecies(Species.BIDOOF);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.WATER_ABSORB);
|
||||
game.override.enemyAbility(Abilities.WATER_ABSORB);
|
||||
});
|
||||
|
||||
it("suppresses effect of ability", async () => {
|
||||
|
|
|
@ -29,7 +29,7 @@ describe("Moves - Glaive Rush", () => {
|
|||
game.override.battleType("single");
|
||||
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
|
||||
game.override.enemySpecies(Species.MAGIKARP);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(Array(4).fill(Moves.GLAIVE_RUSH));
|
||||
vi.spyOn(Overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.KLINK);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.UNNERVE);
|
||||
|
|
|
@ -36,7 +36,7 @@ describe("Moves - Growth", () => {
|
|||
const moveToUse = Moves.GROWTH;
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MOXIE);
|
||||
game.override.enemyAbility(Abilities.MOXIE);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
|
|
|
@ -32,7 +32,7 @@ describe("Moves - Hard Press", () => {
|
|||
game.override.battleType("single");
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemySpecies(Species.MUNCHLAX);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.HARD_PRESS]);
|
||||
vi.spyOn(moveToCheck, "calculateBattlePower");
|
||||
|
|
|
@ -32,7 +32,7 @@ describe("Moves - Hyper Beam", () => {
|
|||
game.override.battleType("single");
|
||||
vi.spyOn(overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemySpecies(Species.SNORLAX);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(Array(4).fill(Moves.SPLASH));
|
||||
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.HYPER_BEAM, Moves.TACKLE]);
|
||||
|
|
|
@ -34,7 +34,7 @@ describe("Moves - Make It Rain", () => {
|
|||
game.override.battleType("double");
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.MAKE_IT_RAIN, Moves.SPLASH]);
|
||||
game.override.enemySpecies(Species.SNORLAX);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
game.override.enemyAbility(Abilities.INSOMNIA);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
|
|
|
@ -69,7 +69,7 @@ describe("Moves - Multi target", () => {
|
|||
|
||||
async function checkTargetMultiplier(game: GameManager, attackMove: Moves, killAlly: boolean, killSecondEnemy: boolean, shouldMultiplied: boolean, oppAbility?: Abilities) {
|
||||
// play an attack and check target count
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(oppAbility ? oppAbility : Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(oppAbility ? oppAbility : Abilities.BALL_FETCH);
|
||||
await game.startBattle();
|
||||
|
||||
const playerPokemonRepr = game.scene.getPlayerField();
|
||||
|
|
|
@ -32,7 +32,7 @@ describe("Moves - Octolock", () => {
|
|||
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
|
||||
game.override.enemyAbility(Abilities.NONE);
|
||||
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.OCTOLOCK, Moves.SPLASH]);
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("Moves - Rollout", () => {
|
|||
vi.spyOn(Overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
|
||||
game.override.enemySpecies(Species.BIDOOF);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
|
||||
game.override.enemyAbility(Abilities.NONE);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue(SPLASH_ONLY);
|
||||
|
|
|
@ -29,7 +29,7 @@ describe("Moves - Roost", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.STARAPTOR);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
game.override.enemyAbility(Abilities.INSOMNIA);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.STOMPING_TANTRUM ]);
|
||||
|
|
|
@ -29,7 +29,7 @@ describe("Moves - Spikes", () => {
|
|||
game.scene.battleStyle = 1;
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
game.override.enemyAbility(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("Moves - Spit Up", () => {
|
|||
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
|
||||
game.override.enemyAbility(Abilities.NONE);
|
||||
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPIT_UP, Moves.SPIT_UP, Moves.SPIT_UP, Moves.SPIT_UP]);
|
||||
|
|
|
@ -31,7 +31,7 @@ describe("Moves - Stockpile", () => {
|
|||
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
|
||||
game.override.enemyAbility(Abilities.NONE);
|
||||
|
||||
vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.STOCKPILE, Moves.SPLASH]);
|
||||
|
|
|
@ -30,7 +30,7 @@ describe("Moves - Swallow", () => {
|
|||
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
|
||||
game.override.enemyAbility(Abilities.NONE);
|
||||
vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
|
||||
vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SWALLOW, Moves.SWALLOW, Moves.SWALLOW, Moves.SWALLOW]);
|
||||
|
|
|
@ -35,7 +35,7 @@ describe("Moves - Tail whip", () => {
|
|||
const moveToUse = Moves.TAIL_WHIP;
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.RATTATA);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
game.override.enemyAbility(Abilities.INSOMNIA);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
|
||||
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
|
||||
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
|
||||
|
|
|
@ -62,7 +62,7 @@ describe("Moves - Thousand Arrows", () => {
|
|||
"move should hit and ground targets with Levitate",
|
||||
async () => {
|
||||
game.override.enemySpecies(Species.SNORLAX);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.LEVITATE);
|
||||
game.override.enemyAbility(Abilities.LEVITATE);
|
||||
|
||||
await game.startBattle([ Species.ILLUMISE ]);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ describe("Moves - Tidy Up", () => {
|
|||
game = new GameManager(phaserGame);
|
||||
game.override.battleType("single");
|
||||
game.override.enemySpecies(Species.MAGIKARP);
|
||||
vi.spyOn(Overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
||||
vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||
vi.spyOn(Overrides, "STARTER_SPECIES_OVERRIDE", "get").mockReturnValue(Species.FEEBAS);
|
||||
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
|
||||
|
|
Loading…
Reference in New Issue