[Dev] Make `OPP_MOVESET_OVERRIDE` fully override the enemy's moveset (#4062)

* Make `OPP_MOVESET_OVERRIDE` fully override the enemy's moveset

* Update tests with new override behavior

* Fix tests

* Fix another test

* Move overrides no longer required to be arrays

* Remove `SPLASH_ONLY` test utility variable

* Update moveset override helper functions

* Missed some tests
This commit is contained in:
NightKev 2024-09-09 09:55:11 -07:00 committed by GitHub
parent c59f6edf36
commit 11d912bad8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
119 changed files with 260 additions and 352 deletions

View File

@ -984,10 +984,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
: this.moveset;
// Overrides moveset based on arrays specified in overrides.ts
const overrideArray: Array<Moves> = this.isPlayer() ? Overrides.MOVESET_OVERRIDE : Overrides.OPP_MOVESET_OVERRIDE;
let overrideArray: Moves | Array<Moves> = this.isPlayer() ? Overrides.MOVESET_OVERRIDE : Overrides.OPP_MOVESET_OVERRIDE;
if (!Array.isArray(overrideArray)) {
overrideArray = [overrideArray];
}
if (overrideArray.length > 0) {
if (!this.isPlayer()) {
this.moveset = [];
}
overrideArray.forEach((move: Moves, index: number) => {
const ppUsed = this.moveset[index]?.ppUsed || 0;
const ppUsed = this.moveset[index]?.ppUsed ?? 0;
this.moveset[index] = new PokemonMove(move, Math.min(ppUsed, allMoves[move].pp));
});
}

View File

@ -98,7 +98,7 @@ class DefaultOverrides {
readonly PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
readonly STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
readonly GENDER_OVERRIDE: Gender | null = null;
readonly MOVESET_OVERRIDE: Array<Moves> = [];
readonly MOVESET_OVERRIDE: Moves | Array<Moves> = [];
readonly SHINY_OVERRIDE: boolean = false;
readonly VARIANT_OVERRIDE: Variant = 0;
@ -111,7 +111,7 @@ class DefaultOverrides {
readonly OPP_PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
readonly OPP_STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
readonly OPP_GENDER_OVERRIDE: Gender | null = null;
readonly OPP_MOVESET_OVERRIDE: Array<Moves> = [];
readonly OPP_MOVESET_OVERRIDE: Moves | Array<Moves> = [];
readonly OPP_SHINY_OVERRIDE: boolean = false;
readonly OPP_VARIANT_OVERRIDE: Variant = 0;
readonly OPP_IVS_OVERRIDE: number | number[] = [];

View File

@ -3,7 +3,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -27,7 +26,7 @@ describe("Abilities - Aura Break", () => {
game = new GameManager(phaserGame);
game.override.battleType("single");
game.override.moveset([Moves.MOONBLAST, Moves.DARK_PULSE, Moves.MOONBLAST, Moves.DARK_PULSE]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyAbility(Abilities.AURA_BREAK);
game.override.enemySpecies(Species.SHUCKLE);
});

View File

@ -5,7 +5,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -31,7 +30,7 @@ describe("Abilities - Battery", () => {
game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.moveset([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
});
it("raises the power of allies' special moves by 30%", async () => {

View File

@ -4,7 +4,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -31,7 +30,7 @@ describe("Abilities - Beast Boost", () => {
.ability(Abilities.BEAST_BOOST)
.startingLevel(2000)
.moveset([ Moves.FLAMETHROWER ])
.enemyMoveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH);
});
it("should prefer highest stat to boost its corresponding stat stage by 1 when winning a battle", async() => {
@ -51,7 +50,7 @@ describe("Abilities - Beast Boost", () => {
}, 20000);
it("should use in-battle overriden stats when determining the stat stage to raise by 1", async() => {
game.override.enemyMoveset(new Array(4).fill(Moves.GUARD_SPLIT));
game.override.enemyMoveset([Moves.GUARD_SPLIT]);
await game.classicMode.startBattle([Species.SLOWBRO]);

View File

@ -1,10 +1,10 @@
import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager";
import { Moves } from "#app/enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Abilities - Contrary", () => {
let phaserGame: Phaser.Game;
@ -27,7 +27,7 @@ describe("Abilities - Contrary", () => {
.enemySpecies(Species.BULBASAUR)
.enemyAbility(Abilities.CONTRARY)
.ability(Abilities.INTIMIDATE)
.enemyMoveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH);
});
it("should invert stat changes when applied", async() => {

View File

@ -5,7 +5,6 @@ import { Species } from "#app/enums/species";
import { CommandPhase } from "#app/phases/command-phase";
import { MessagePhase } from "#app/phases/message-phase";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
@ -30,7 +29,7 @@ describe("Abilities - COSTAR", () => {
game.override.battleType("double");
game.override.ability(Abilities.COSTAR);
game.override.moveset([Moves.SPLASH, Moves.NASTY_PLOT]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
});

View File

@ -30,7 +30,7 @@ describe("Abilities - Dancer", () => {
.moveset([Moves.SWORDS_DANCE, Moves.SPLASH])
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.DANCER)
.enemyMoveset(Array(4).fill(Moves.VICTORY_DANCE));
.enemyMoveset([Moves.VICTORY_DANCE]);
});
// Reference Link: https://bulbapedia.bulbagarden.net/wiki/Dancer_(Ability)

View File

@ -6,7 +6,6 @@ import { StatusEffect } from "#app/data/status-effect";
import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
const TIMEOUT = 20 * 1000;
@ -31,7 +30,7 @@ describe("Abilities - Disguise", () => {
game.override
.battleType("single")
.enemySpecies(Species.MIMIKYU)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.starterSpecies(Species.REGIELEKI)
.moveset([Moves.SHADOW_SNEAK, Moves.VACUUM_WAVE, Moves.TOXIC_THREAD, Moves.SPLASH]);
}, TIMEOUT);
@ -108,7 +107,7 @@ describe("Abilities - Disguise", () => {
}, TIMEOUT);
it("persists form change when switched out", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK));
game.override.enemyMoveset([Moves.SHADOW_SNEAK]);
game.override.starterSpecies(0);
await game.classicMode.startBattle([ Species.MIMIKYU, Species.FURRET ]);
@ -194,7 +193,7 @@ describe("Abilities - Disguise", () => {
}, TIMEOUT);
it("doesn't faint twice when fainting due to Disguise break damage, nor prevent faint from Disguise break damage if using Endure", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.ENDURE));
game.override.enemyMoveset([Moves.ENDURE]);
await game.classicMode.startBattle();
const mimikyu = game.scene.getEnemyPokemon()!;

View File

@ -1,9 +1,7 @@
import { Species } from "#app/enums/species";
import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -23,63 +21,56 @@ describe("Abilities - Dry Skin", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.battleType("single");
game.override.disableCrits();
game.override.enemyAbility(Abilities.DRY_SKIN);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemySpecies(Species.CHARMANDER);
game.override.ability(Abilities.UNNERVE);
game.override.starterSpecies(Species.CHANDELURE);
game.override
.battleType("single")
.disableCrits()
.enemyAbility(Abilities.DRY_SKIN)
.enemyMoveset(Moves.SPLASH)
.enemySpecies(Species.CHARMANDER)
.ability(Abilities.BALL_FETCH)
.moveset([Moves.SUNNY_DAY, Moves.RAIN_DANCE, Moves.SPLASH, Moves.WATER_GUN])
.starterSpecies(Species.CHANDELURE);
});
it("during sunlight, lose 1/8 of maximum health at the end of each turn", async () => {
game.override.moveset([Moves.SUNNY_DAY, Moves.SPLASH]);
await game.startBattle();
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
expect(enemy).not.toBe(undefined);
// first turn
let previousEnemyHp = enemy.hp;
game.move.select(Moves.SUNNY_DAY);
await game.phaseInterceptor.to(TurnEndPhase);
expect(enemy.hp).toBeLessThan(previousEnemyHp);
await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.hp).toBeLessThan(enemy.getMaxHp());
// second turn
previousEnemyHp = enemy.hp;
enemy.hp = enemy.getMaxHp();
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to(TurnEndPhase);
expect(enemy.hp).toBeLessThan(previousEnemyHp);
await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.hp).toBeLessThan(enemy.getMaxHp());
});
it("during rain, gain 1/8 of maximum health at the end of each turn", async () => {
game.override.moveset([Moves.RAIN_DANCE, Moves.SPLASH]);
await game.startBattle();
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
expect(enemy).not.toBe(undefined);
enemy.hp = 1;
// first turn
let previousEnemyHp = enemy.hp;
game.move.select(Moves.RAIN_DANCE);
await game.phaseInterceptor.to(TurnEndPhase);
expect(enemy.hp).toBeGreaterThan(previousEnemyHp);
await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.hp).toBeGreaterThan(1);
// second turn
previousEnemyHp = enemy.hp;
enemy.hp = 1;
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to(TurnEndPhase);
expect(enemy.hp).toBeGreaterThan(previousEnemyHp);
await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.hp).toBeGreaterThan(1);
});
it("opposing fire attacks do 25% more damage", async () => {
game.override.moveset([Moves.FLAMETHROWER]);
await game.startBattle();
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
const initialHP = 1000;
@ -87,72 +78,65 @@ describe("Abilities - Dry Skin", () => {
// first turn
game.move.select(Moves.FLAMETHROWER);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
const fireDamageTakenWithDrySkin = initialHP - enemy.hp;
expect(enemy.hp > 0);
enemy.hp = initialHP;
game.override.enemyAbility(Abilities.NONE);
// second turn
game.move.select(Moves.FLAMETHROWER);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
const fireDamageTakenWithoutDrySkin = initialHP - enemy.hp;
expect(fireDamageTakenWithDrySkin).toBeGreaterThan(fireDamageTakenWithoutDrySkin);
});
it("opposing water attacks heal 1/4 of maximum health and deal no damage", async () => {
game.override.moveset([Moves.WATER_GUN]);
await game.startBattle();
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
expect(enemy).not.toBe(undefined);
enemy.hp = 1;
game.move.select(Moves.WATER_GUN);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.hp).toBeGreaterThan(1);
});
it("opposing water attacks do not heal if they were protected from", async () => {
game.override.moveset([Moves.WATER_GUN]);
game.override.enemyMoveset([Moves.PROTECT]);
await game.startBattle();
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
expect(enemy).not.toBe(undefined);
enemy.hp = 1;
game.override.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]);
game.move.select(Moves.WATER_GUN);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
expect(enemy.hp).toBe(1);
});
it("multi-strike water attacks only heal once", async () => {
game.override.moveset([Moves.WATER_GUN, Moves.WATER_SHURIKEN]);
await game.startBattle();
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
expect(enemy).not.toBe(undefined);
enemy.hp = 1;
// first turn
game.move.select(Moves.WATER_SHURIKEN);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
const healthGainedFromWaterShuriken = enemy.hp - 1;
enemy.hp = 1;
// second turn
game.move.select(Moves.WATER_GUN);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
const healthGainedFromWaterGun = enemy.hp - 1;
expect(healthGainedFromWaterShuriken).toBe(healthGainedFromWaterGun);

View File

@ -7,7 +7,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -38,7 +37,7 @@ describe("Abilities - Flash Fire", () => {
it("immune to Fire-type moves", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset(SPLASH_ONLY);
game.override.enemyMoveset([Moves.EMBER]).moveset(Moves.SPLASH);
await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!;
@ -49,7 +48,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000);
it("not activate if the Pokémon is protected from the Fire-type move", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset([Moves.PROTECT]);
game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.PROTECT]);
await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!;
@ -60,7 +59,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000);
it("activated by Will-O-Wisp", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.WILL_O_WISP)).moveset(SPLASH_ONLY);
game.override.enemyMoveset([Moves.WILL_O_WISP]).moveset(Moves.SPLASH);
await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!;
@ -75,7 +74,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000);
it("activated after being frozen", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset(SPLASH_ONLY);
game.override.enemyMoveset([Moves.EMBER]).moveset(Moves.SPLASH);
game.override.statusEffect(StatusEffect.FREEZE);
await game.startBattle([Species.BLISSEY]);
@ -88,7 +87,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000);
it("not passing with baton pass", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EMBER)).moveset([Moves.BATON_PASS]);
game.override.enemyMoveset([Moves.EMBER]).moveset([Moves.BATON_PASS]);
await game.startBattle([Species.BLISSEY, Species.CHANSEY]);
// ensure use baton pass after enemy moved
@ -104,7 +103,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000);
it("boosts Fire-type move when the ability is activated", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.FIRE_PLEDGE)).moveset([Moves.EMBER, Moves.SPLASH]);
game.override.enemyMoveset([Moves.FIRE_PLEDGE]).moveset([Moves.EMBER, Moves.SPLASH]);
game.override.enemyAbility(Abilities.FLASH_FIRE).ability(Abilities.NONE);
await game.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!;

View File

@ -5,7 +5,6 @@ import { WeatherType } from "#app/enums/weather-type";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -44,7 +43,7 @@ describe("Abilities - Flower Gift", () => {
game.override
.moveset([Moves.SPLASH, Moves.RAIN_DANCE, Moves.SUNNY_DAY, Moves.SKILL_SWAP])
.enemySpecies(Species.MAGIKARP)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH);
});
@ -92,7 +91,7 @@ describe("Abilities - Flower Gift", () => {
});
it("reverts to Overcast Form when the Pokémon loses Flower Gift, changes form under Harsh Sunlight/Sunny when it regains it", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SKILL_SWAP)).weather(WeatherType.HARSH_SUN);
game.override.enemyMoveset([Moves.SKILL_SWAP]).weather(WeatherType.HARSH_SUN);
await game.classicMode.startBattle([Species.CHERRIM]);
@ -111,7 +110,7 @@ describe("Abilities - Flower Gift", () => {
});
it("reverts to Overcast Form when the Flower Gift is suppressed, changes form under Harsh Sunlight/Sunny when it regains it", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID)).weather(WeatherType.HARSH_SUN);
game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.HARSH_SUN);
await game.classicMode.startBattle([Species.CHERRIM, Species.MAGIKARP]);

View File

@ -10,7 +10,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -67,7 +66,7 @@ describe("Abilities - Forecast", () => {
game.override
.moveset([Moves.SPLASH, Moves.RAIN_DANCE, Moves.SUNNY_DAY, Moves.TACKLE])
.enemySpecies(Species.MAGIKARP)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH);
});
@ -229,7 +228,7 @@ describe("Abilities - Forecast", () => {
});
it("reverts to Normal Form when Forecast is suppressed, changes form to match the weather when it regains it", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID)).weather(WeatherType.RAIN);
game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.RAIN);
await game.startBattle([Species.CASTFORM, Species.PIKACHU]);
const castform = game.scene.getPlayerPokemon()!;
@ -260,7 +259,7 @@ describe("Abilities - Forecast", () => {
});
it("does not change Castform's form until after Stealth Rock deals damage", async () => {
game.override.weather(WeatherType.RAIN).enemyMoveset(Array(4).fill(Moves.STEALTH_ROCK));
game.override.weather(WeatherType.RAIN).enemyMoveset([Moves.STEALTH_ROCK]);
await game.startBattle([Species.PIKACHU, Species.CASTFORM]);
// First turn - set up stealth rock

View File

@ -6,7 +6,6 @@ import { Moves } from "#app/enums/moves";
import { Species } from "#app/enums/species";
import { HitResult } from "#app/field/pokemon";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -36,7 +35,7 @@ describe("Abilities - Galvanize", () => {
.moveset([Moves.TACKLE, Moves.REVELATION_DANCE, Moves.FURY_SWIPES])
.enemySpecies(Species.DUSCLOPS)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyLevel(100);
});

View File

@ -11,7 +11,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { Stat } from "#enums/stat";
describe("Abilities - Gulp Missile", () => {
@ -49,7 +48,7 @@ describe("Abilities - Gulp Missile", () => {
.moveset([Moves.SURF, Moves.DIVE, Moves.SPLASH])
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyLevel(5);
});
@ -108,7 +107,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("deals 1/4 of the attacker's maximum HP when hit by a damaging attack", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CRAMORANT]);
const enemy = game.scene.getEnemyPokemon()!;
@ -121,7 +120,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("does not have any effect when hit by non-damaging attack", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TAIL_WHIP));
game.override.enemyMoveset([Moves.TAIL_WHIP]);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;
@ -140,7 +139,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("lowers attacker's DEF stat stage by 1 when hit in Gulping form", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;
@ -164,7 +163,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("paralyzes the enemy when hit in Gorging form", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;
@ -188,7 +187,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("does not activate the ability when underwater", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SURF));
game.override.enemyMoveset([Moves.SURF]);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;
@ -201,7 +200,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("prevents effect damage but inflicts secondary effect on attacker with Magic Guard", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE)).enemyAbility(Abilities.MAGIC_GUARD);
game.override.enemyMoveset([Moves.TACKLE]).enemyAbility(Abilities.MAGIC_GUARD);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;
@ -225,7 +224,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("cannot be suppressed", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GASTRO_ACID));
game.override.enemyMoveset([Moves.GASTRO_ACID]);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;
@ -245,7 +244,7 @@ describe("Abilities - Gulp Missile", () => {
});
it("cannot be swapped with another ability", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SKILL_SWAP));
game.override.enemyMoveset([Moves.SKILL_SWAP]);
await game.startBattle([Species.CRAMORANT]);
const cramorant = game.scene.getPlayerPokemon()!;

View File

@ -5,7 +5,6 @@ import { toDmgValue } from "#app/utils";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -30,7 +29,7 @@ describe("Abilities - Heatproof", () => {
.disableCrits()
.enemySpecies(Species.CHARMANDER)
.enemyAbility(Abilities.HEATPROOF)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyLevel(100)
.starterSpecies(Species.CHANDELURE)
.ability(Abilities.BALL_FETCH)

View File

@ -4,7 +4,6 @@ import { Stat } from "#app/enums/stat";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -29,7 +28,7 @@ describe("Abilities - Hustle", () => {
.moveset([ Moves.TACKLE, Moves.GIGA_DRAIN, Moves.FISSURE ])
.disableCrits()
.battleType("single")
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.BALL_FETCH);
});

View File

@ -3,7 +3,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -29,7 +28,7 @@ describe("Abilities - Hyper Cutter", () => {
.ability(Abilities.BALL_FETCH)
.enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.HYPER_CUTTER)
.enemyMoveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH);
});
// Reference Link: https://bulbapedia.bulbagarden.net/wiki/Hyper_Cutter_(Ability)

View File

@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves";
import { Stat, BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat";
import { Abilities } from "#enums/abilities";
import { SPLASH_ONLY } from "../utils/testUtils";
// TODO: Add more tests once Imposter is fully implemented
describe("Abilities - Imposter", () => {
@ -31,9 +30,9 @@ describe("Abilities - Imposter", () => {
.enemyLevel(200)
.enemyAbility(Abilities.BEAST_BOOST)
.enemyPassiveAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.ability(Abilities.IMPOSTER)
.moveset(SPLASH_ONLY);
.moveset(Moves.SPLASH);
});
it("should copy species, ability, gender, all stats except HP, all stat stages, moveset, and types of target", async () => {
@ -77,7 +76,7 @@ describe("Abilities - Imposter", () => {
}, 20000);
it("should copy in-battle overridden stats", async () => {
game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT));
game.override.enemyMoveset([Moves.POWER_SPLIT]);
await game.startBattle([
Species.DITTO

View File

@ -7,7 +7,6 @@ import { getMovePosition } from "#test/utils/gameManagerUtils";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { SPLASH_ONLY } from "#test/utils/testUtils";
describe("Abilities - Intimidate", () => {
let phaserGame: Phaser.Game;
@ -31,7 +30,7 @@ describe("Abilities - Intimidate", () => {
.enemyPassiveAbility(Abilities.HYDRATION)
.ability(Abilities.INTIMIDATE)
.startingWave(3)
.enemyMoveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH);
});
it("should lower ATK stat stage by 1 of enemy Pokemon on entry and player switch", async () => {
@ -108,7 +107,7 @@ describe("Abilities - Intimidate", () => {
it("should lower ATK stat stage by 1 for every switch", async () => {
game.override.moveset([Moves.SPLASH])
.enemyMoveset(new Array(4).fill(Moves.VOLT_SWITCH))
.enemyMoveset([Moves.VOLT_SWITCH])
.startingWave(5);
await game.classicMode.startBattle([ Species.MIGHTYENA, Species.POOCHYENA ]);

View File

@ -9,7 +9,6 @@ import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
@ -183,7 +182,7 @@ describe("Abilities - Libero", () => {
"ability applies correctly even if the pokemon's move misses",
async () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([Species.MAGIKARP]);

View File

@ -8,7 +8,6 @@ import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -39,7 +38,7 @@ describe("Abilities - Magic Guard", () => {
/** Enemy Pokemon overrides */
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyLevel(100);
});

View File

@ -3,7 +3,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -29,8 +28,8 @@ describe("Abilities - Moody", () => {
.enemySpecies(Species.RATTATA)
.enemyAbility(Abilities.BALL_FETCH)
.ability(Abilities.MOODY)
.enemyMoveset(SPLASH_ONLY)
.moveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH)
.moveset(Moves.SPLASH);
});
it("should increase one stat stage by 2 and decrease a different stat stage by 1",

View File

@ -5,7 +5,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { BattlerIndex } from "#app/battle";
import { EnemyCommandPhase } from "#app/phases/enemy-command-phase";
import { VictoryPhase } from "#app/phases/victory-phase";
@ -34,7 +33,7 @@ describe("Abilities - Moxie", () => {
game.override.ability(Abilities.MOXIE);
game.override.startingLevel(2000);
game.override.moveset([ moveToUse ]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
});
it("should raise ATK stat stage by 1 when winning a battle", async() => {

View File

@ -7,7 +7,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -34,7 +33,7 @@ describe("Abilities - Parental Bond", () => {
game.override.ability(Abilities.PARENTAL_BOND);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyAbility(Abilities.FUR_COAT);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.startingLevel(100);
game.override.enemyLevel(100);
});
@ -175,7 +174,7 @@ describe("Abilities - Parental Bond", () => {
"should not apply multiplier to counter moves",
async () => {
game.override.moveset([Moves.COUNTER]);
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.classicMode.startBattle([Species.SHUCKLE]);
@ -465,7 +464,7 @@ describe("Abilities - Parental Bond", () => {
"should not cause user to hit into King's Shield more than once",
async () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemyMoveset(Array(4).fill(Moves.KINGS_SHIELD));
game.override.enemyMoveset([Moves.KINGS_SHIELD]);
await game.classicMode.startBattle([Species.MAGIKARP]);

View File

@ -8,7 +8,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Abilities - Pastel Veil", () => {
let phaserGame: Phaser.Game;
@ -31,7 +30,7 @@ describe("Abilities - Pastel Veil", () => {
.moveset([Moves.TOXIC_THREAD, Moves.SPLASH])
.enemyAbility(Abilities.BALL_FETCH)
.enemySpecies(Species.SUNKERN)
.enemyMoveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH);
});
it("prevents the user and its allies from being afflicted by poison", async () => {

View File

@ -5,7 +5,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -29,7 +28,7 @@ describe("Abilities - Power Spot", () => {
game = new GameManager(phaserGame);
game.override.battleType("double");
game.override.moveset([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.BALL_FETCH);
});

View File

@ -9,7 +9,6 @@ import { Biome } from "#enums/biome";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
@ -183,7 +182,7 @@ describe("Abilities - Protean", () => {
"ability applies correctly even if the pokemon's move misses",
async () => {
game.override.moveset([Moves.TACKLE]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([Species.MAGIKARP]);

View File

@ -32,7 +32,7 @@ describe("Abilities - Quick Draw", () => {
game.override.enemyLevel(100);
game.override.enemySpecies(Species.MAGIKARP);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
vi.spyOn(allAbilities[Abilities.QUICK_DRAW].getAttrs(BypassSpeedChanceAbAttr)[0], "chance", "get").mockReturnValue(100);
});
@ -76,7 +76,7 @@ describe("Abilities - Quick Draw", () => {
);
test("does not increase priority", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.EXTREME_SPEED));
game.override.enemyMoveset([Moves.EXTREME_SPEED]);
await game.startBattle();

View File

@ -35,7 +35,7 @@ describe("Abilities - Sand Spit", () => {
});
it("should trigger when hit with damaging move", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle();
game.move.select(Moves.SPLASH);
@ -45,7 +45,7 @@ describe("Abilities - Sand Spit", () => {
}, 20000);
it("should not trigger when targetted with status moves", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GROWL));
game.override.enemyMoveset([Moves.GROWL]);
await game.startBattle();
game.move.select(Moves.COIL);

View File

@ -9,7 +9,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
// See also: TypeImmunityAbAttr
describe("Abilities - Sap Sipper", () => {
@ -37,7 +36,7 @@ describe("Abilities - Sap Sipper", () => {
const enemyAbility = Abilities.SAP_SIPPER;
game.override.moveset([ moveToUse ]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.DUSKULL);
game.override.enemyAbility(enemyAbility);
@ -59,7 +58,7 @@ describe("Abilities - Sap Sipper", () => {
const enemyAbility = Abilities.SAP_SIPPER;
game.override.moveset([ moveToUse ]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(enemyAbility);
@ -80,7 +79,7 @@ describe("Abilities - Sap Sipper", () => {
const enemyAbility = Abilities.SAP_SIPPER;
game.override.moveset([ moveToUse ]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(enemyAbility);
@ -100,7 +99,7 @@ describe("Abilities - Sap Sipper", () => {
const enemyAbility = Abilities.SAP_SIPPER;
game.override.moveset([ moveToUse ]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(enemyAbility);
@ -123,7 +122,7 @@ describe("Abilities - Sap Sipper", () => {
game.override.moveset([ moveToUse ]);
game.override.ability(ability);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.NONE);

View File

@ -1,10 +1,10 @@
import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager";
import { Moves } from "#app/enums/moves";
import { Abilities } from "#enums/abilities";
import { Species } from "#enums/species";
import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Abilities - Simple", () => {
let phaserGame: Phaser.Game;
@ -27,7 +27,7 @@ describe("Abilities - Simple", () => {
.enemySpecies(Species.BULBASAUR)
.enemyAbility(Abilities.SIMPLE)
.ability(Abilities.INTIMIDATE)
.enemyMoveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH);
});
it("should double stat changes when applied", async() => {

View File

@ -4,7 +4,6 @@ import { Abilities } from "#app/enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -31,7 +30,7 @@ describe("Abilities - Steely Spirit", () => {
game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.moveset([Moves.IRON_HEAD, Moves.SPLASH]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
vi.spyOn(allMoves[moveToCheck], "calculateBattlePower");
});

View File

@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -45,7 +44,7 @@ describe("Abilities - Sweet Veil", () => {
});
it("causes Rest to fail when used by the user or its allies", async () => {
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]);
game.move.select(Moves.SPLASH);
@ -72,7 +71,7 @@ describe("Abilities - Sweet Veil", () => {
game.override.enemySpecies(Species.PIKACHU);
game.override.enemyLevel(5);
game.override.startingLevel(5);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([Species.SHUCKLE, Species.SHUCKLE, Species.SWIRLIX]);

View File

@ -30,7 +30,7 @@ describe("Abilities - Tera Shell", () => {
.moveset([Moves.SPLASH])
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(Array(4).fill(Moves.MACH_PUNCH))
.enemyMoveset([Moves.MACH_PUNCH])
.startingLevel(100)
.enemyLevel(100);
});
@ -60,7 +60,7 @@ describe("Abilities - Tera Shell", () => {
it(
"should not override type immunities",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK));
game.override.enemyMoveset([Moves.SHADOW_SNEAK]);
await game.classicMode.startBattle([Species.SNORLAX]);
@ -77,7 +77,7 @@ describe("Abilities - Tera Shell", () => {
it(
"should not override type multipliers less than 0.5x",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.QUICK_ATTACK));
game.override.enemyMoveset([Moves.QUICK_ATTACK]);
await game.classicMode.startBattle([Species.AGGRON]);
@ -94,7 +94,7 @@ describe("Abilities - Tera Shell", () => {
it(
"should not affect the effectiveness of fixed-damage moves",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.DRAGON_RAGE));
game.override.enemyMoveset([Moves.DRAGON_RAGE]);
await game.classicMode.startBattle([Species.CHARIZARD]);

View File

@ -4,7 +4,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -28,7 +27,7 @@ describe("Abilities - Wind Power", () => {
game.override.enemySpecies(Species.SHIFTRY);
game.override.enemyAbility(Abilities.WIND_POWER);
game.override.moveset([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
});
it("it becomes charged when hit by wind moves", async () => {

View File

@ -3,7 +3,6 @@ import GameManager from "#test/utils/gameManager";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -28,7 +27,7 @@ describe("Abilities - Wind Rider", () => {
.enemySpecies(Species.SHIFTRY)
.enemyAbility(Abilities.WIND_RIDER)
.moveset([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM])
.enemyMoveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH);
});
it("takes no damage from wind moves and its ATK stat stage is raised by 1 when hit by one", async () => {

View File

@ -5,7 +5,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -30,7 +29,7 @@ describe("Abilities - Wonder Skin", () => {
game.override.ability(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.WONDER_SKIN);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
});
it("lowers accuracy of status moves to 50%", async () => {

View File

@ -6,7 +6,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
const TIMEOUT = 20 * 1000;
@ -30,8 +29,8 @@ describe("Abilities - ZERO TO HERO", () => {
game = new GameManager(phaserGame);
game.override
.battleType("single")
.moveset(SPLASH_ONLY)
.enemyMoveset(SPLASH_ONLY)
.moveset(Moves.SPLASH)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH);
});

View File

@ -8,7 +8,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Arena - Gravity", () => {
let phaserGame: Phaser.Game;
@ -32,7 +31,7 @@ describe("Arena - Gravity", () => {
.ability(Abilities.UNNERVE)
.enemyAbility(Abilities.BALL_FETCH)
.enemySpecies(Species.SHUCKLE)
.enemyMoveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH);
});
// Reference: https://bulbapedia.bulbagarden.net/wiki/Gravity_(move)

View File

@ -31,7 +31,7 @@ describe("Weather - Fog", () => {
game.override.ability(Abilities.BALL_FETCH);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.MAGIKARP);
game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH));
game.override.enemyMoveset([Moves.SPLASH]);
});
it("move accuracy is multiplied by 90%", async () => {

View File

@ -4,7 +4,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { BattlerIndex } from "#app/battle";
describe("Weather - Hail", () => {
@ -26,8 +25,8 @@ describe("Weather - Hail", () => {
game.override
.weather(WeatherType.HAIL)
.battleType("single")
.moveset(SPLASH_ONLY)
.enemyMoveset(SPLASH_ONLY)
.moveset(Moves.SPLASH)
.enemyMoveset(Moves.SPLASH)
.enemySpecies(Species.MAGIKARP);
});

View File

@ -4,7 +4,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Weather - Sandstorm", () => {
let phaserGame: Phaser.Game;
@ -25,8 +24,8 @@ describe("Weather - Sandstorm", () => {
game.override
.weather(WeatherType.SANDSTORM)
.battleType("single")
.moveset(SPLASH_ONLY)
.enemyMoveset(SPLASH_ONLY)
.moveset(Moves.SPLASH)
.enemyMoveset(Moves.SPLASH)
.enemySpecies(Species.MAGIKARP);
});

View File

@ -25,7 +25,6 @@ import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Test Battle Phase", () => {
let phaserGame: Phaser.Game;
@ -319,7 +318,7 @@ describe("Test Battle Phase", () => {
.startingWave(1)
.startingLevel(100)
.moveset([moveToUse])
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.startingHeldItems([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }]);
await game.startBattle();

View File

@ -5,7 +5,6 @@ import { ArenaTagType } from "#enums/arena-tag-type";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -31,7 +30,7 @@ describe("Round Down and Minimun 1 test in Damage Calculation", () => {
it("When the user fails to use Jump Kick with Wonder Guard ability, the damage should be 1.", async () => {
game.override.enemySpecies(Species.GASTLY);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.starterSpecies(Species.SHEDINJA);
game.override.moveset([Moves.JUMP_KICK]);
game.override.ability(Abilities.WONDER_GUARD);

View File

@ -4,7 +4,6 @@ import { TurnInitPhase } from "#app/phases/turn-init-phase";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -29,7 +28,7 @@ describe("Double Battles", () => {
// double-battle player's pokemon both fainted in same round, then revive one, and next double battle summons two player's pokemon successfully.
// (There were bugs that either only summon one when can summon two, player stuck in switchPhase etc)
it("3v2 edge case: player summons 2 pokemon on the next battle after being fainted and revived", async () => {
game.override.battleType("double").enemyMoveset(SPLASH_ONLY).moveset(SPLASH_ONLY);
game.override.battleType("double").enemyMoveset(Moves.SPLASH).moveset(Moves.SPLASH);
await game.startBattle([
Species.BULBASAUR,
Species.CHARIZARD,

View File

@ -8,7 +8,6 @@ import { Species } from "#enums/species";
import { StatusEffect } from "#enums/status-effect";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
const TIMEOUT = 20 * 1000;
@ -38,7 +37,7 @@ describe("Inverse Battle", () => {
.ability(Abilities.BALL_FETCH)
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH);
});
it("Immune types are 2x effective - Thunderbolt against Ground Type", async () => {

View File

@ -2,7 +2,6 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import GameManager from "./utils/gameManager";
import { Species } from "#app/enums/species";
import { getPokemonSpecies } from "#app/data/pokemon-species";
import { SPLASH_ONLY } from "./utils/testUtils";
import { Abilities } from "#app/enums/abilities";
import { Moves } from "#app/enums/moves";
import { EFFECTIVE_STATS } from "#app/enums/stat";
@ -33,7 +32,7 @@ describe("Boss Pokemon / Shields", () => {
.disableTrainerWaves()
.disableCrits()
.enemySpecies(Species.RATTATA)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyHeldItems([])
.startingLevel(1000)
.moveset([Moves.FALSE_SWIPE, Moves.SUPER_FANG, Moves.SPLASH])

View File

@ -6,7 +6,6 @@ import * as Utils from "#app/utils";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "./utils/testUtils";
describe("Evolution", () => {
let phaserGame: Phaser.Game;
@ -99,7 +98,7 @@ describe("Evolution", () => {
it("should increase both HP and max HP when evolving", async () => {
game.override.moveset([Moves.SURF])
.enemySpecies(Species.GOLEM)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.startingWave(21)
.startingLevel(16)
.enemyLevel(50);
@ -126,7 +125,7 @@ describe("Evolution", () => {
it("should not fully heal HP when evolving", async () => {
game.override.moveset([Moves.SURF])
.enemySpecies(Species.GOLEM)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.startingWave(21)
.startingLevel(13)
.enemyLevel(30);

View File

@ -7,7 +7,6 @@ import { GameModes } from "#app/game-mode";
import { TurnHeldItemTransferModifier } from "#app/modifier/modifier";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import GameManager from "./utils/gameManager";
import { SPLASH_ONLY } from "./utils/testUtils";
const FinalWave = {
Classic: 200,
@ -29,7 +28,7 @@ describe("Final Boss", () => {
.startingWave(FinalWave.Classic)
.startingBiome(Biome.END)
.disableCrits()
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.moveset([ Moves.SPLASH, Moves.WILL_O_WISP, Moves.DRAGON_PULSE ])
.startingLevel(10000);
});

View File

@ -4,7 +4,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import Phase from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { BattleEndPhase } from "#app/phases/battle-end-phase";
import { TempCritBoosterModifier } from "#app/modifier/modifier";
import { Mode } from "#app/ui/ui";
@ -34,7 +33,7 @@ describe("Items - Dire Hit", () => {
game.override
.enemySpecies(Species.MAGIKARP)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.moveset([ Moves.POUND ])
.startingHeldItems([{ name: "DIRE_HIT" }])
.battleType("single")

View File

@ -4,7 +4,6 @@ import { DoubleBattleChanceBoosterModifier } from "#app/modifier/modifier";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { ShopCursorTarget } from "#app/enums/shop-cursor-target.js";
import { Mode } from "#app/ui/ui.js";
import ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler.js";
@ -64,7 +63,7 @@ describe("Items - Double Battle Chance Boosters", () => {
game.override
.startingModifier([{ name: "LURE" }])
.itemRewards([{ name: "LURE" }])
.moveset(SPLASH_ONLY)
.moveset(Moves.SPLASH)
.startingLevel(200);
await game.classicMode.startBattle([

View File

@ -8,7 +8,6 @@ import { MoveEndPhase } from "#app/phases/move-end-phase";
import GameManager from "#test/utils/gameManager";
import Phase from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
const TIMEOUT = 20 * 1000; // 20 seconds
@ -38,7 +37,7 @@ describe("Items - Grip Claw", () => {
])
.enemySpecies(Species.SNORLAX)
.ability(Abilities.KLUTZ)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyHeldItems([
{ name: "BERRY", type: BerryType.SITRUS, count: 2 },
{ name: "BERRY", type: BerryType.LUM, count: 2 },

View File

@ -4,7 +4,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import Phase from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Items - Scope Lens", () => {
let phaserGame: Phaser.Game;
@ -25,7 +24,7 @@ describe("Items - Scope Lens", () => {
game.override
.enemySpecies(Species.MAGIKARP)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.moveset([ Moves.POUND ])
.startingHeldItems([{ name: "SCOPE_LENS" }])
.battleType("single")

View File

@ -5,7 +5,6 @@ import Phase from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { Moves } from "#app/enums/moves";
import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { SPLASH_ONLY } from "../utils/testUtils";
import { Abilities } from "#app/enums/abilities";
import { TempStatStageBoosterModifier } from "#app/modifier/modifier";
import { Mode } from "#app/ui/ui";
@ -34,7 +33,7 @@ describe("Items - Temporary Stat Stage Boosters", () => {
game.override
.battleType("single")
.enemySpecies(Species.SHUCKLE)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH)
.moveset([ Moves.TACKLE, Moves.SPLASH, Moves.HONE_CLAWS, Moves.BELLY_DRUM ])
.startingModifier([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ATK }]);

View File

@ -31,7 +31,7 @@ describe("Moves - Alluring Voice", () => {
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.ICE_SCALES)
.enemyMoveset(Array(4).fill(Moves.HOWL))
.enemyMoveset([Moves.HOWL])
.startingLevel(10)
.enemyLevel(10)
.starterSpecies(Species.FEEBAS)

View File

@ -5,7 +5,6 @@ import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { Stat } from "#enums/stat";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -31,7 +30,7 @@ describe("Moves - Baton Pass", () => {
.enemyAbility(Abilities.BALL_FETCH)
.moveset([Moves.BATON_PASS, Moves.NASTY_PLOT, Moves.SPLASH])
.ability(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.disableCrits();
});
@ -71,7 +70,10 @@ describe("Moves - Baton Pass", () => {
// round 2 - baton pass
game.scene.getEnemyPokemon()!.hp = 100;
game.override.enemyMoveset(new Array(4).fill(Moves.BATON_PASS));
game.override.enemyMoveset([Moves.BATON_PASS]);
// Force moveset to update mid-battle
// TODO: replace with enemy ai control function when it's added
game.scene.getEnemyParty()[0].getMoveset();
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to("PostSummonPhase", false);
@ -90,7 +92,7 @@ describe("Moves - Baton Pass", () => {
}, 20000);
it("doesn't transfer effects that aren't transferrable", async() => {
game.override.enemyMoveset(Array(4).fill(Moves.SALT_CURE));
game.override.enemyMoveset([Moves.SALT_CURE]);
await game.classicMode.startBattle([Species.PIKACHU, Species.FEEBAS]);
const [player1, player2] = game.scene.getParty();

View File

@ -34,7 +34,7 @@ describe("Moves - Beak Blast", () => {
.moveset([Moves.BEAK_BLAST])
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(Array(4).fill(Moves.TACKLE))
.enemyMoveset([Moves.TACKLE])
.startingLevel(100)
.enemyLevel(100);
});
@ -80,7 +80,7 @@ describe("Moves - Beak Blast", () => {
it(
"should not burn attackers that don't make contact",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.WATER_GUN));
game.override.enemyMoveset([Moves.WATER_GUN]);
await game.startBattle([Species.BLASTOISE]);
@ -116,7 +116,7 @@ describe("Moves - Beak Blast", () => {
it(
"should be blocked by Protect",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.PROTECT));
game.override.enemyMoveset([Moves.PROTECT]);
await game.startBattle([Species.BLASTOISE]);

View File

@ -29,7 +29,7 @@ describe("Moves - Beat Up", () => {
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyLevel(100);
game.override.enemyMoveset(Array(4).fill(Moves.SPLASH));
game.override.enemyMoveset([Moves.SPLASH]);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(100);

View File

@ -6,7 +6,6 @@ import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { Abilities } from "#app/enums/abilities";
const TIMEOUT = 20 * 1000;
@ -37,7 +36,7 @@ describe("Moves - BELLY DRUM", () => {
.startingLevel(100)
.enemyLevel(100)
.moveset([Moves.BELLY_DRUM])
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH);
});

View File

@ -7,7 +7,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
const TIMEOUT = 20 * 1000;
@ -32,7 +31,7 @@ describe("Moves - Burning Jealousy", () => {
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.ICE_SCALES)
.enemyMoveset(Array(4).fill(Moves.HOWL))
.enemyMoveset([Moves.HOWL])
.startingLevel(10)
.enemyLevel(10)
.starterSpecies(Species.FEEBAS)
@ -73,7 +72,7 @@ describe("Moves - Burning Jealousy", () => {
game.override
.enemySpecies(Species.DITTO)
.enemyAbility(Abilities.IMPOSTER)
.enemyMoveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH);
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
@ -91,7 +90,7 @@ describe("Moves - Burning Jealousy", () => {
it("should be boosted by Sheer Force even if opponent didn't raise stat stages", async () => {
game.override
.ability(Abilities.SHEER_FORCE)
.enemyMoveset(SPLASH_ONLY);
.enemyMoveset(Moves.SPLASH);
vi.spyOn(allMoves[Moves.BURNING_JEALOUSY], "calculateBattlePower");
await game.classicMode.startBattle();

View File

@ -5,7 +5,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { Stat } from "#enums/stat";
import { SPLASH_ONLY } from "#test/utils/testUtils";
const TIMEOUT = 20 * 1000;
/** HP Cost of Move */
@ -34,7 +33,7 @@ describe("Moves - Clangorous Soul", () => {
game.override.startingLevel(100);
game.override.enemyLevel(100);
game.override.moveset([Moves.CLANGOROUS_SOUL]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
});
//Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Clangorous_Soul_(move)

View File

@ -33,7 +33,7 @@ describe("Moves - Crafty Shield", () => {
game.override.moveset([Moves.CRAFTY_SHIELD, Moves.SPLASH, Moves.SWORDS_DANCE]);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(Array(4).fill(Moves.GROWL));
game.override.enemyMoveset([Moves.GROWL]);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(100);
@ -62,7 +62,7 @@ describe("Moves - Crafty Shield", () => {
test(
"should not protect the user and allies from attack moves",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
@ -84,7 +84,7 @@ describe("Moves - Crafty Shield", () => {
"should protect the user and allies from moves that ignore other protection",
async () => {
game.override.enemySpecies(Species.DUSCLOPS);
game.override.enemyMoveset(Array(4).fill(Moves.CURSE));
game.override.enemyMoveset([Moves.CURSE]);
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);

View File

@ -4,7 +4,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
describe("Moves - Disable", () => {
@ -28,7 +27,7 @@ describe("Moves - Disable", () => {
.ability(Abilities.BALL_FETCH)
.enemyAbility(Abilities.BALL_FETCH)
.moveset([Moves.DISABLE, Moves.SPLASH])
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.starterSpecies(Species.PIKACHU)
.enemySpecies(Species.SHUCKLE);
});
@ -79,7 +78,7 @@ describe("Moves - Disable", () => {
}, 20000);
it("cannot disable STRUGGLE", async() => {
game.override.enemyMoveset(Array(4).fill(Moves.STRUGGLE));
game.override.enemyMoveset([Moves.STRUGGLE]);
await game.classicMode.startBattle();
const playerMon = game.scene.getPlayerPokemon()!;
@ -114,7 +113,7 @@ describe("Moves - Disable", () => {
}, 20000);
it("disables NATURE POWER, not the move invoked by it", async() => {
game.override.enemyMoveset(Array(4).fill(Moves.NATURE_POWER));
game.override.enemyMoveset([Moves.NATURE_POWER]);
await game.classicMode.startBattle();
const enemyMon = game.scene.getEnemyPokemon()!;

View File

@ -4,7 +4,6 @@ import { Moves } from "#app/enums/moves";
import { Species } from "#app/enums/species";
import { Abilities } from "#enums/abilities";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -28,7 +27,7 @@ describe("Moves - Dragon Cheer", () => {
game.override
.battleType("double")
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyLevel(20)
.moveset([Moves.DRAGON_CHEER, Moves.TACKLE, Moves.SPLASH]);
});

View File

@ -8,7 +8,6 @@ import { Abilities } from "#enums/abilities";
import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -42,7 +41,7 @@ describe("Moves - Dragon Rage", () => {
game.override.startingLevel(100);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyPassiveAbility(Abilities.BALL_FETCH);
game.override.enemyLevel(100);

View File

@ -9,7 +9,6 @@ import { Species } from "#enums/species";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
import GameManager from "../utils/gameManager";
import { SPLASH_ONLY } from "../utils/testUtils";
const TIMEOUT = 20 * 1000;
@ -32,7 +31,7 @@ describe("Moves - Dragon Tail", () => {
game.override.battleType("single")
.moveset([Moves.DRAGON_TAIL, Moves.SPLASH])
.enemySpecies(Species.WAILORD)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.startingLevel(5)
.enemyLevel(5);
@ -82,7 +81,7 @@ describe("Moves - Dragon Tail", () => {
test(
"Double battles should proceed without crashing",
async () => {
game.override.battleType("double").enemyMoveset(SPLASH_ONLY);
game.override.battleType("double").enemyMoveset(Moves.SPLASH);
game.override.moveset([Moves.DRAGON_TAIL, Moves.SPLASH, Moves.FLAMETHROWER])
.enemyAbility(Abilities.ROUGH_SKIN);
await game.startBattle([Species.DRATINI, Species.DRATINI, Species.WAILORD, Species.WAILORD]);
@ -116,7 +115,7 @@ describe("Moves - Dragon Tail", () => {
test(
"Flee move redirection works",
async () => {
game.override.battleType("double").enemyMoveset(SPLASH_ONLY);
game.override.battleType("double").enemyMoveset(Moves.SPLASH);
game.override.moveset([Moves.DRAGON_TAIL, Moves.SPLASH, Moves.FLAMETHROWER]);
game.override.enemyAbility(Abilities.ROUGH_SKIN);
await game.startBattle([Species.DRATINI, Species.DRATINI, Species.WAILORD, Species.WAILORD]);

View File

@ -3,7 +3,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Moves - Fake Out", () => {
let phaserGame: Phaser.Game;
@ -26,7 +25,7 @@ describe("Moves - Fake Out", () => {
.enemySpecies(Species.CORVIKNIGHT)
.starterSpecies(Species.FEEBAS)
.moveset([Moves.FAKE_OUT, Moves.SPLASH])
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.disableCrits();
});

View File

@ -4,7 +4,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { Stat } from "#enums/stat";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
@ -35,7 +34,7 @@ describe("Moves - FILLET AWAY", () => {
game.override.startingLevel(100);
game.override.enemyLevel(100);
game.override.moveset([Moves.FILLET_AWAY]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
});
//Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/fillet_away_(move)

View File

@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -38,7 +37,7 @@ describe("Moves - Fissure", () => {
game.override.startingLevel(100);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyPassiveAbility(Abilities.BALL_FETCH);
game.override.enemyLevel(100);

View File

@ -42,7 +42,7 @@ describe("Moves - Flame Burst", () => {
game.override.startingWave(4);
game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset(new Array(4).fill(Moves.SPLASH));
game.override.enemyMoveset([Moves.SPLASH]);
});
it("inflicts damage to the target's ally equal to 1/16 of its max HP", async () => {

View File

@ -7,7 +7,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -31,7 +30,7 @@ describe("Moves - Flower Shield", () => {
game.override.enemyAbility(Abilities.NONE);
game.override.battleType("single");
game.override.moveset([Moves.FLOWER_SHIELD, Moves.SPLASH]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
});
it("raises DEF stat stage by 1 for all Grass-type Pokemon on the field by one stage - single battle", async () => {

View File

@ -7,7 +7,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -35,7 +34,7 @@ describe("Moves - Focus Punch", () => {
.moveset([Moves.FOCUS_PUNCH])
.enemySpecies(Species.GROUDON)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.startingLevel(100)
.enemyLevel(100);
});
@ -68,7 +67,7 @@ describe("Moves - Focus Punch", () => {
it(
"should fail if the user is hit",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CHARIZARD]);
@ -95,7 +94,7 @@ describe("Moves - Focus Punch", () => {
it(
"should be cancelled if the user falls asleep mid-turn",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SPORE));
game.override.enemyMoveset([Moves.SPORE]);
await game.startBattle([Species.CHARIZARD]);

View File

@ -4,7 +4,6 @@ import { MoveEffectPhase } from "#app/phases/move-effect-phase";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Moves - Foresight", () => {
let phaserGame: Phaser.Game;
@ -25,7 +24,7 @@ describe("Moves - Foresight", () => {
game.override
.disableCrits()
.enemySpecies(Species.GASTLY)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyLevel(5)
.starterSpecies(Species.MAGIKARP)
.moveset([Moves.FORESIGHT, Moves.QUICK_ATTACK, Moves.MACH_PUNCH]);
@ -55,7 +54,7 @@ describe("Moves - Foresight", () => {
});
it("should ignore target's evasiveness boosts", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.MINIMIZE));
game.override.enemyMoveset([Moves.MINIMIZE]);
await game.startBattle();
const pokemon = game.scene.getPlayerPokemon()!;

View File

@ -3,7 +3,6 @@ import { Abilities } from "#app/enums/abilities";
import { Moves } from "#app/enums/moves";
import { Species } from "#app/enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -28,7 +27,7 @@ describe("Moves - Freeze-Dry", () => {
.battleType("single")
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.starterSpecies(Species.FEEBAS)
.ability(Abilities.BALL_FETCH)
.moveset([Moves.FREEZE_DRY]);
@ -92,7 +91,7 @@ describe("Moves - Freeze-Dry", () => {
// enable once Electrify is implemented (and the interaction is fixed, as above)
it.todo("should deal 2x damage to water types under Electrify", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.ELECTRIFY));
game.override.enemyMoveset([Moves.ELECTRIFY]);
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;

View File

@ -5,7 +5,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import { allMoves } from "#app/data/move";
import { TurnInitPhase } from "#app/phases/turn-init-phase";
@ -28,7 +27,7 @@ describe("Moves - Freezy Frost", () => {
game.override.enemySpecies(Species.RATTATA);
game.override.enemyLevel(100);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyAbility(Abilities.NONE);
game.override.startingLevel(100);

View File

@ -4,7 +4,6 @@ import { Moves } from "#app/enums/moves";
import { Species } from "#app/enums/species";
import { MoveResult } from "#app/field/pokemon";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
const TIMEOUT = 20 * 1000;
@ -31,7 +30,7 @@ describe("Moves - Gastro Acid", () => {
game.override.ability(Abilities.NONE);
game.override.moveset([Moves.GASTRO_ACID, Moves.WATER_GUN, Moves.SPLASH, Moves.CORE_ENFORCER]);
game.override.enemySpecies(Species.BIDOOF);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyAbility(Abilities.WATER_ABSORB);
});

View File

@ -4,7 +4,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Moves - Gigaton Hammer", () => {
let phaserGame: Phaser.Game;
@ -29,7 +28,7 @@ describe("Moves - Gigaton Hammer", () => {
.moveset([Moves.GIGATON_HAMMER])
.startingLevel(10)
.enemyLevel(100)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.disableCrits();
});

View File

@ -29,7 +29,7 @@ describe("Moves - Glaive Rush", () => {
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(Array(4).fill(Moves.GLAIVE_RUSH))
.enemyMoveset([Moves.GLAIVE_RUSH])
.starterSpecies(Species.KLINK)
.ability(Abilities.BALL_FETCH)
.moveset([Moves.SHADOW_SNEAK, Moves.AVALANCHE, Moves.SPLASH, Moves.GLAIVE_RUSH]);
@ -67,7 +67,7 @@ describe("Moves - Glaive Rush", () => {
it("interacts properly with multi-lens", async () => {
game.override
.startingHeldItems([{ name: "MULTI_LENS", count: 2 }])
.enemyMoveset(Array(4).fill(Moves.AVALANCHE));
.enemyMoveset([Moves.AVALANCHE]);
await game.classicMode.startBattle();
const player = game.scene.getPlayerPokemon()!;
@ -88,7 +88,7 @@ describe("Moves - Glaive Rush", () => {
}, TIMEOUT);
it("secondary effects only last until next move", async () => {
game.override.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK));
game.override.enemyMoveset([Moves.SHADOW_SNEAK]);
await game.classicMode.startBattle();
const player = game.scene.getPlayerPokemon()!;
@ -115,7 +115,7 @@ describe("Moves - Glaive Rush", () => {
it("secondary effects are removed upon switching", async () => {
game.override
.enemyMoveset(Array(4).fill(Moves.SHADOW_SNEAK))
.enemyMoveset([Moves.SHADOW_SNEAK])
.starterSpecies(0);
await game.classicMode.startBattle([Species.KLINK, Species.FEEBAS]);
@ -152,7 +152,7 @@ describe("Moves - Glaive Rush", () => {
game.move.select(Moves.SHADOW_SNEAK);
await game.phaseInterceptor.to("TurnEndPhase");
game.override.enemyMoveset(Array(4).fill(Moves.SPLASH));
game.override.enemyMoveset([Moves.SPLASH]);
const damagedHP1 = 1000 - enemy.hp;
enemy.hp = 1000;

View File

@ -5,7 +5,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
import { EnemyCommandPhase } from "#app/phases/enemy-command-phase";
import { TurnInitPhase } from "#app/phases/turn-init-phase";
@ -29,7 +28,7 @@ describe("Moves - Growth", () => {
game.override.enemyAbility(Abilities.MOXIE);
game.override.ability(Abilities.INSOMNIA);
game.override.moveset([ Moves.GROWTH ]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
});
it("should raise SPATK stat stage by 1", async() => {

View File

@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves";
import { Stat } from "#enums/stat";
import { Abilities } from "#enums/abilities";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Moves - Guard Split", () => {
let phaserGame: Phaser.Game;
@ -34,7 +33,7 @@ describe("Moves - Guard Split", () => {
});
it("should average the user's DEF and SPDEF stats with those of the target", async () => {
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([
Species.INDEEDEE
]);
@ -56,7 +55,7 @@ describe("Moves - Guard Split", () => {
}, 20000);
it("should be idempotent", async () => {
game.override.enemyMoveset(new Array(4).fill(Moves.GUARD_SPLIT));
game.override.enemyMoveset([Moves.GUARD_SPLIT]);
await game.startBattle([
Species.INDEEDEE
]);

View File

@ -27,7 +27,7 @@ describe("Moves - Guard Swap", () => {
game.override
.battleType("single")
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(new Array(4).fill(Moves.SHELL_SMASH))
.enemyMoveset([Moves.SHELL_SMASH])
.enemySpecies(Species.MEW)
.enemyLevel(200)
.moveset([ Moves.GUARD_SWAP ])

View File

@ -4,7 +4,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -30,7 +29,7 @@ describe("Moves - Hard Press", () => {
game.override.ability(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.MUNCHLAX);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.moveset([Moves.HARD_PRESS]);
vi.spyOn(moveToCheck, "calculateBattlePower");
});

View File

@ -5,7 +5,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import { TurnInitPhase } from "#app/phases/turn-init-phase";
describe("Moves - Haze", () => {
@ -28,7 +27,7 @@ describe("Moves - Haze", () => {
game.override.enemySpecies(Species.RATTATA);
game.override.enemyLevel(100);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyAbility(Abilities.NONE);
game.override.startingLevel(100);

View File

@ -32,7 +32,7 @@ describe("Moves - Hyper Beam", () => {
game.override.ability(Abilities.BALL_FETCH);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.enemyMoveset(Array(4).fill(Moves.SPLASH));
game.override.enemyMoveset([Moves.SPLASH]);
game.override.enemyLevel(100);
game.override.moveset([Moves.HYPER_BEAM, Moves.TACKLE]);

View File

@ -6,7 +6,6 @@ import { FaintPhase } from "#app/phases/faint-phase";
import { MoveEffectPhase } from "#app/phases/move-effect-phase";
import { TurnEndPhase } from "#app/phases/turn-end-phase";
import GameManager from "#app/test/utils/gameManager";
import { SPLASH_ONLY } from "#app/test/utils/testUtils";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import Phaser from "phaser";
@ -35,7 +34,7 @@ describe("Moves - Jaw Lock", () => {
.battleType("single")
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.moveset([Moves.JAW_LOCK, Moves.SPLASH])
.startingLevel(100)
.enemyLevel(100)
@ -153,7 +152,7 @@ describe("Moves - Jaw Lock", () => {
it(
"should not trap either pokemon if the target is protected",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.PROTECT));
game.override.enemyMoveset([Moves.PROTECT]);
await game.startBattle([Species.BULBASAUR]);

View File

@ -30,7 +30,7 @@ describe("Moves - Lash Out", () => {
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.FUR_COAT)
.enemyMoveset(Array(4).fill(Moves.GROWL))
.enemyMoveset([Moves.GROWL])
.startingLevel(10)
.enemyLevel(10)
.starterSpecies(Species.FEEBAS)

View File

@ -31,7 +31,7 @@ describe("Moves - Lucky Chant", () => {
.moveset([Moves.LUCKY_CHANT, Moves.SPLASH, Moves.FOLLOW_ME])
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(Array(4).fill(Moves.FLOWER_TRICK))
.enemyMoveset([Moves.FLOWER_TRICK])
.startingLevel(100)
.enemyLevel(100);
});
@ -87,7 +87,7 @@ describe("Moves - Lucky Chant", () => {
it(
"should prevent critical hits from field effects",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
await game.startBattle([Species.CHARIZARD]);

View File

@ -4,7 +4,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -26,7 +25,7 @@ describe("Moves - Lunar Blessing", () => {
game.override.battleType("double");
game.override.enemySpecies(Species.SHUCKLE);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.moveset([Moves.LUNAR_BLESSING, Moves.SPLASH]);

View File

@ -5,7 +5,6 @@ import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import { MoveEndPhase } from "#app/phases/move-end-phase";
import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase";
@ -31,7 +30,7 @@ describe("Moves - Make It Rain", () => {
game.override.moveset([Moves.MAKE_IT_RAIN, Moves.SPLASH]);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.startingLevel(100);
game.override.enemyLevel(100);
});

View File

@ -33,7 +33,7 @@ describe("Moves - Mat Block", () => {
game.override.moveset([Moves.MAT_BLOCK, Moves.SPLASH]);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(100);
@ -62,7 +62,7 @@ describe("Moves - Mat Block", () => {
test(
"should not protect the user and allies from status moves",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.GROWL));
game.override.enemyMoveset([Moves.GROWL]);
await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]);

View File

@ -5,7 +5,6 @@ import { MoveEffectPhase } from "#app/phases/move-effect-phase";
import GameManager from "#test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Moves - Miracle Eye", () => {
let phaserGame: Phaser.Game;
@ -26,7 +25,7 @@ describe("Moves - Miracle Eye", () => {
game.override
.disableCrits()
.enemySpecies(Species.UMBREON)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyLevel(5)
.starterSpecies(Species.MAGIKARP)
.moveset([Moves.MIRACLE_EYE, Moves.CONFUSION]);

View File

@ -4,7 +4,6 @@ import { Species } from "#app/enums/species";
import * as Utils from "#app/utils";
import { Moves } from "#enums/moves";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -32,7 +31,7 @@ describe("Multi-target damage reduction", () => {
.enemyLevel(100)
.startingLevel(100)
.enemySpecies(Species.POLIWAG)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH)
.moveset([Moves.TACKLE, Moves.DAZZLING_GLEAM, Moves.EARTHQUAKE, Moves.SPLASH])
.ability(Abilities.BALL_FETCH);

View File

@ -7,7 +7,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -30,7 +29,7 @@ describe("Moves - Octolock", () => {
game.override.battleType("single")
.enemySpecies(Species.RATTATA)
.enemyMoveset(SPLASH_ONLY)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH)
.startingLevel(2000)
.moveset([ Moves.OCTOLOCK, Moves.SPLASH ])

View File

@ -9,7 +9,6 @@ import { BerryPhase } from "#app/phases/berry-phase";
import { FaintPhase } from "#app/phases/faint-phase";
import { MessagePhase } from "#app/phases/message-phase";
import { TurnInitPhase } from "#app/phases/turn-init-phase";
import { SPLASH_ONLY } from "../utils/testUtils";
const TIMEOUT = 20 * 1000;
@ -31,7 +30,7 @@ describe("Moves - Parting Shot", () => {
game = new GameManager(phaserGame);
game.override.battleType("single");
game.override.moveset([Moves.PARTING_SHOT, Moves.SPLASH]);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
game.override.startingLevel(5);
game.override.enemyLevel(5);
@ -125,7 +124,7 @@ describe("Moves - Parting Shot", () => {
game.override
.enemySpecies(Species.ALTARIA)
.enemyAbility(Abilities.NONE)
.enemyMoveset(Array(4).fill(Moves.MIST));
.enemyMoveset([Moves.MIST]);
await game.startBattle([Species.SNORLAX, Species.MEOWTH]);
const enemyPokemon = game.scene.getEnemyPokemon()!;

View File

@ -6,7 +6,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Moves } from "#enums/moves";
import { Stat } from "#enums/stat";
import { Abilities } from "#enums/abilities";
import { SPLASH_ONLY } from "../utils/testUtils";
describe("Moves - Power Split", () => {
let phaserGame: Phaser.Game;
@ -34,7 +33,7 @@ describe("Moves - Power Split", () => {
});
it("should average the user's ATK and SPATK stats with those of the target", async () => {
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
await game.startBattle([
Species.INDEEDEE
]);
@ -56,7 +55,7 @@ describe("Moves - Power Split", () => {
}, 20000);
it("should be idempotent", async () => {
game.override.enemyMoveset(new Array(4).fill(Moves.POWER_SPLIT));
game.override.enemyMoveset([Moves.POWER_SPLIT]);
await game.startBattle([
Species.INDEEDEE
]);

View File

@ -27,7 +27,7 @@ describe("Moves - Power Swap", () => {
game.override
.battleType("single")
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(new Array(4).fill(Moves.SHELL_SMASH))
.enemyMoveset([Moves.SHELL_SMASH])
.enemySpecies(Species.MEW)
.enemyLevel(200)
.moveset([ Moves.POWER_SWAP ])

View File

@ -35,7 +35,7 @@ describe("Moves - Protect", () => {
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.enemyMoveset(Array(4).fill(Moves.TACKLE));
game.override.enemyMoveset([Moves.TACKLE]);
game.override.startingLevel(100);
game.override.enemyLevel(100);
@ -59,7 +59,7 @@ describe("Moves - Protect", () => {
test(
"should prevent secondary effects from the opponent's attack",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.CEASELESS_EDGE));
game.override.enemyMoveset([Moves.CEASELESS_EDGE]);
vi.spyOn(allMoves[Moves.CEASELESS_EDGE], "accuracy", "get").mockReturnValue(100);
await game.classicMode.startBattle([Species.CHARIZARD]);
@ -78,7 +78,7 @@ describe("Moves - Protect", () => {
test(
"should protect the user from status moves",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.CHARM));
game.override.enemyMoveset([Moves.CHARM]);
await game.classicMode.startBattle([Species.CHARIZARD]);
@ -95,7 +95,7 @@ describe("Moves - Protect", () => {
test(
"should stop subsequent hits of a multi-hit move",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.TACHYON_CUTTER));
game.override.enemyMoveset([Moves.TACHYON_CUTTER]);
await game.classicMode.startBattle([Species.CHARIZARD]);
@ -114,7 +114,7 @@ describe("Moves - Protect", () => {
test(
"should fail if the user is the last to move in the turn",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.PROTECT));
game.override.enemyMoveset([Moves.PROTECT]);
await game.classicMode.startBattle([Species.CHARIZARD]);

View File

@ -32,7 +32,7 @@ describe("Moves - Quick Guard", () => {
game.override.moveset([Moves.QUICK_GUARD, Moves.SPLASH, Moves.FOLLOW_ME]);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(Array(4).fill(Moves.QUICK_ATTACK));
game.override.enemyMoveset([Moves.QUICK_ATTACK]);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.startingLevel(100);
@ -59,7 +59,7 @@ describe("Moves - Quick Guard", () => {
"should protect the user and allies from Prankster-boosted moves",
async () => {
game.override.enemyAbility(Abilities.PRANKSTER);
game.override.enemyMoveset(Array(4).fill(Moves.GROWL));
game.override.enemyMoveset([Moves.GROWL]);
await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
@ -77,7 +77,7 @@ describe("Moves - Quick Guard", () => {
test(
"should stop subsequent hits of a multi-hit priority move",
async () => {
game.override.enemyMoveset(Array(4).fill(Moves.WATER_SHURIKEN));
game.override.enemyMoveset([Moves.WATER_SHURIKEN]);
await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]);
@ -98,7 +98,7 @@ describe("Moves - Quick Guard", () => {
"should fail if the user is the last to move in the turn",
async () => {
game.override.battleType("single");
game.override.enemyMoveset(Array(4).fill(Moves.QUICK_GUARD));
game.override.enemyMoveset([Moves.QUICK_GUARD]);
await game.classicMode.startBattle([Species.CHARIZARD]);

View File

@ -4,7 +4,6 @@ import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -32,7 +31,7 @@ describe("Moves - Rollout", () => {
game.override.enemyAbility(Abilities.BALL_FETCH);
game.override.startingLevel(100);
game.override.enemyLevel(100);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyMoveset(Moves.SPLASH);
});
it("should double it's dmg on sequential uses but reset after 5", async () => {

Some files were not shown because too many files have changed in this diff Show More