Fixed stuff

This commit is contained in:
Bertie690 2025-06-05 08:16:37 -04:00
parent 90f3803d54
commit ef08575b4c
101 changed files with 442 additions and 429 deletions

View File

@ -138,7 +138,6 @@ export class SwitchSummonPhase extends SummonPhase {
return;
}
if (this.switchType === SwitchType.BATON_PASS) {
// If switching via baton pass, update opposing tags coming from the prior pokemon
(this.player ? globalScene.getEnemyField() : globalScene.getPlayerField()).forEach((enemyPokemon: Pokemon) =>

View File

@ -174,7 +174,24 @@ export async function initI18n(): Promise<void> {
"es-MX": ["es-ES", "en"],
default: ["en"],
},
supportedLngs: ["en", "es-ES", "es-MX", "fr", "it", "de", "zh-CN", "zh-TW", "pt-BR", "ko", "ja", "ca", "da", "tr", "ro", "ru"],
supportedLngs: [
"en",
"es-ES",
"es-MX",
"fr",
"it",
"de",
"zh-CN",
"zh-TW",
"pt-BR",
"ko",
"ja",
"ca",
"da",
"tr",
"ro",
"ru",
],
backend: {
loadPath(lng: string, [ns]: string[]) {
let fileName: string;

View File

@ -959,7 +959,7 @@ export function setSetting(setting: string, value: number): boolean {
},
{
label: "Türkçe (Needs Help)",
handler: () => changeLocaleHandler("tr")
handler: () => changeLocaleHandler("tr"),
},
{
label: "Русский (Needs Help)",
@ -967,11 +967,11 @@ export function setSetting(setting: string, value: number): boolean {
},
{
label: "Dansk (Needs Help)",
handler: () => changeLocaleHandler("da")
handler: () => changeLocaleHandler("da"),
},
{
label: "Română (Needs Help)",
handler: () => changeLocaleHandler("ro")
handler: () => changeLocaleHandler("ro"),
},
{
label: i18next.t("settings:back"),

View File

@ -29,9 +29,9 @@ describe("Abilities - Battery", () => {
game.override
.battleStyle("double")
.enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.BALL_FETCH)
.moveset([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM])
.enemyMoveset(Moves.SPLASH);
.enemyAbility(AbilityId.BALL_FETCH)
.moveset([MoveId.TACKLE, MoveId.BREAKING_SWIPE, MoveId.SPLASH, MoveId.DAZZLING_GLEAM])
.enemyMoveset(MoveId.SPLASH);
});
it("raises the power of allies' special moves by 30%", async () => {

View File

@ -26,9 +26,9 @@ describe("Abilities - COSTAR", () => {
game = new GameManager(phaserGame);
game.override
.battleStyle("double")
.ability(Abilities.COSTAR)
.moveset([Moves.SPLASH, Moves.NASTY_PLOT])
.enemyMoveset(Moves.SPLASH);
.ability(AbilityId.COSTAR)
.moveset([MoveId.SPLASH, MoveId.NASTY_PLOT])
.enemyMoveset(MoveId.SPLASH);
});
test("ability copies positive stat stages", async () => {

View File

@ -66,7 +66,7 @@ describe("Abilities - Disguise", () => {
});
it("takes no damage from the first hit of a multihit move and transforms to Busted form, then takes damage from the second hit", async () => {
game.override.moveset([Moves.SURGING_STRIKES]).enemyLevel(5);
game.override.moveset([MoveId.SURGING_STRIKES]).enemyLevel(5);
await game.classicMode.startBattle();
const mimikyu = game.scene.getEnemyPokemon()!;
@ -105,7 +105,7 @@ describe("Abilities - Disguise", () => {
});
it("persists form change when switched out", async () => {
game.override.enemyMoveset([Moves.SHADOW_SNEAK]).starterSpecies(0);
game.override.enemyMoveset([MoveId.SHADOW_SNEAK]).starterSpecies(0);
await game.classicMode.startBattle([SpeciesId.MIMIKYU, SpeciesId.FURRET]);
@ -205,7 +205,7 @@ describe("Abilities - Disguise", () => {
});
it("activates when Aerilate circumvents immunity to the move's base type", async () => {
game.override.ability(Abilities.AERILATE).moveset([Moves.TACKLE]);
game.override.ability(AbilityId.AERILATE).moveset([MoveId.TACKLE]);
await game.classicMode.startBattle();

View File

@ -73,7 +73,7 @@ describe("Abilities - Flash Fire", () => {
}, 20000);
it("activated after being frozen", async () => {
game.override.enemyMoveset([Moves.EMBER]).moveset(Moves.SPLASH).statusEffect(StatusEffect.FREEZE);
game.override.enemyMoveset([MoveId.EMBER]).moveset(MoveId.SPLASH).statusEffect(StatusEffect.FREEZE);
await game.classicMode.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!;
@ -102,10 +102,10 @@ describe("Abilities - Flash Fire", () => {
it("boosts Fire-type move when the ability is activated", async () => {
game.override
.enemyMoveset([Moves.FIRE_PLEDGE])
.moveset([Moves.EMBER, Moves.SPLASH])
.enemyAbility(Abilities.FLASH_FIRE)
.ability(Abilities.NONE);
.enemyMoveset([MoveId.FIRE_PLEDGE])
.moveset([MoveId.EMBER, MoveId.SPLASH])
.enemyAbility(AbilityId.FLASH_FIRE)
.ability(AbilityId.NONE);
await game.classicMode.startBattle([Species.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!;
const initialHP = 1000;
@ -130,10 +130,10 @@ describe("Abilities - Flash Fire", () => {
it("still activates regardless of accuracy check", async () => {
game.override
.moveset(Moves.FIRE_PLEDGE)
.enemyMoveset(Moves.EMBER)
.enemyAbility(Abilities.NONE)
.ability(Abilities.FLASH_FIRE)
.moveset(MoveId.FIRE_PLEDGE)
.enemyMoveset(MoveId.EMBER)
.enemyAbility(AbilityId.NONE)
.ability(AbilityId.FLASH_FIRE)
.enemySpecies(Species.BLISSEY);
await game.classicMode.startBattle([Species.RATTATA]);

View File

@ -49,8 +49,8 @@ describe("Abilities - Flower Gift", () => {
): Promise<[number, number]> => {
game.override
.battleStyle("double")
.moveset([Moves.SPLASH, Moves.SUNNY_DAY, move, Moves.HEAL_PULSE])
.enemyMoveset([Moves.SPLASH, Moves.HEAL_PULSE]);
.moveset([MoveId.SPLASH, MoveId.SUNNY_DAY, move, MoveId.HEAL_PULSE])
.enemyMoveset([MoveId.SPLASH, MoveId.HEAL_PULSE]);
const target_index = allyAttacker ? BattlerIndex.ENEMY : BattlerIndex.PLAYER_2;
const attacker_index = allyAttacker ? BattlerIndex.PLAYER_2 : BattlerIndex.ENEMY;
const ally_move = allyAttacker ? move : MoveId.SPLASH;

View File

@ -65,8 +65,8 @@ describe("Abilities - Good As Gold", () => {
it("should not block any status moves that target the field, one side, or all pokemon", async () => {
game.override
.battleStyle("double")
.enemyMoveset([Moves.STEALTH_ROCK, Moves.HAZE])
.moveset([Moves.SWORDS_DANCE, Moves.SAFEGUARD]);
.enemyMoveset([MoveId.STEALTH_ROCK, MoveId.HAZE])
.moveset([MoveId.SWORDS_DANCE, MoveId.SAFEGUARD]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]);
const [good_as_gold, ball_fetch] = game.scene.getPlayerField();
@ -86,7 +86,7 @@ describe("Abilities - Good As Gold", () => {
});
it("should not block field targeted effects in singles", async () => {
game.override.battleStyle("single").enemyMoveset([Moves.SPIKES]);
game.override.battleStyle("single").enemyMoveset([MoveId.SPIKES]);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(MoveId.SPLASH, 0);
@ -96,7 +96,7 @@ describe("Abilities - Good As Gold", () => {
});
it("should block the ally's helping hand", async () => {
game.override.battleStyle("double").moveset([Moves.HELPING_HAND, Moves.TACKLE]);
game.override.battleStyle("double").moveset([MoveId.HELPING_HAND, MoveId.TACKLE]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]);
game.move.select(MoveId.HELPING_HAND, 0);
@ -128,7 +128,7 @@ describe("Abilities - Good As Gold", () => {
});
it("should not block field targeted effects like rain dance", async () => {
game.override.battleStyle("single").enemyMoveset([Moves.RAIN_DANCE]);
game.override.battleStyle("single").enemyMoveset([MoveId.RAIN_DANCE]);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.use(MoveId.SPLASH, 0);

View File

@ -33,8 +33,8 @@ describe("Abilities - Ice Face", () => {
game.override
.battleStyle("single")
.enemySpecies(Species.EISCUE)
.enemyAbility(Abilities.ICE_FACE)
.moveset([Moves.TACKLE, Moves.ICE_BEAM, Moves.TOXIC_THREAD, Moves.HAIL]);
.enemyAbility(AbilityId.ICE_FACE)
.moveset([MoveId.TACKLE, MoveId.ICE_BEAM, MoveId.TOXIC_THREAD, MoveId.HAIL]);
});
it("takes no damage from physical move and transforms to Noice", async () => {
@ -52,7 +52,7 @@ describe("Abilities - Ice Face", () => {
});
it("takes no damage from the first hit of multihit physical move and transforms to Noice", async () => {
game.override.moveset([Moves.SURGING_STRIKES]).enemyLevel(1);
game.override.moveset([MoveId.SURGING_STRIKES]).enemyLevel(1);
await game.classicMode.startBattle([Species.HITMONLEE]);
game.move.select(MoveId.SURGING_STRIKES);

View File

@ -117,12 +117,12 @@ describe("Abilities - Illusion", () => {
});
it("should not break from indirect damage from status, weather or recoil", async () => {
game.override.enemySpecies(Species.GIGALITH).enemyAbility(Abilities.SAND_STREAM);
game.override.enemySpecies(Species.GIGALITH).enemyAbility(AbilityId.SAND_STREAM);
await game.classicMode.startBattle([SpeciesId.ZOROARK, SpeciesId.AZUMARILL]);
game.move.use(Moves.FLARE_BLITZ);
await game.move.forceEnemyMove(Moves.WILL_O_WISP);
game.move.use(MoveId.FLARE_BLITZ);
await game.move.forceEnemyMove(MoveId.WILL_O_WISP);
await game.toEndOfTurn();
const zoroark = game.scene.getPlayerPokemon()!;
@ -130,7 +130,7 @@ describe("Abilities - Illusion", () => {
});
it("copies the the name, nickname, gender, shininess, and pokeball from the illusion source", async () => {
game.override.enemyMoveset(Moves.SPLASH);
game.override.enemyMoveset(MoveId.SPLASH);
await game.classicMode.startBattle([Species.ABRA, Species.ZOROARK, Species.AXEW]);
const axew = game.scene.getPlayerParty().at(2)!;

View File

@ -162,7 +162,7 @@ describe("Abilities - Imposter", () => {
});
it("should stay transformed with the correct form after reload", async () => {
game.override.moveset([Moves.ABSORB]).enemySpecies(Species.UNOWN);
game.override.moveset([MoveId.ABSORB]).enemySpecies(Species.UNOWN);
await game.classicMode.startBattle([Species.DITTO]);
const enemy = game.scene.getEnemyPokemon()!;

View File

@ -88,7 +88,7 @@ describe("Abilities - Intimidate", () => {
}, 20000);
it("should not activate again if there is no switch or new entry", async () => {
game.override.startingWave(2).moveset([Moves.SPLASH]);
game.override.startingWave(2).moveset([MoveId.SPLASH]);
await game.classicMode.startBattle([Species.MIGHTYENA, Species.POOCHYENA]);
const playerPokemon = game.scene.getPlayerPokemon()!;

View File

@ -25,8 +25,8 @@ describe("Abilities - Intrepid Sword", () => {
game.override
.battleStyle("single")
.enemySpecies(Species.ZACIAN)
.enemyAbility(Abilities.INTREPID_SWORD)
.ability(Abilities.INTREPID_SWORD);
.enemyAbility(AbilityId.INTREPID_SWORD)
.ability(AbilityId.INTREPID_SWORD);
});
it("should raise ATK stat stage by 1 on entry", async () => {

View File

@ -108,7 +108,7 @@ describe("Abilities - Libero", () => {
});
test("ability applies correctly even if the type has changed by another ability", async () => {
game.override.moveset([Moves.TACKLE]).passiveAbility(Abilities.REFRIGERATE);
game.override.moveset([MoveId.TACKLE]).passiveAbility(AbilityId.REFRIGERATE);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -155,7 +155,7 @@ describe("Abilities - Libero", () => {
});
test("ability applies correctly even if the pokemon's move misses", async () => {
game.override.moveset([Moves.TACKLE]).enemyMoveset(Moves.SPLASH);
game.override.moveset([MoveId.TACKLE]).enemyMoveset(MoveId.SPLASH);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -186,7 +186,7 @@ describe("Abilities - Libero", () => {
});
test("ability applies correctly even if the pokemon's move fails because of type immunity", async () => {
game.override.moveset([Moves.TACKLE]).enemySpecies(Species.GASTLY);
game.override.moveset([MoveId.TACKLE]).enemySpecies(Species.GASTLY);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -259,7 +259,7 @@ describe("Abilities - Libero", () => {
});
test("ability applies correctly even if the pokemon's Trick-or-Treat fails", async () => {
game.override.moveset([Moves.TRICK_OR_TREAT]).enemySpecies(Species.GASTLY);
game.override.moveset([MoveId.TRICK_OR_TREAT]).enemySpecies(Species.GASTLY);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);

View File

@ -41,7 +41,7 @@ describe("Abilities - Magic Bounce", () => {
it("should reflect basic status moves", async () => {
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
game.move.use(Moves.GROWL);
game.move.use(MoveId.GROWL);
await game.phaseInterceptor.to("BerryPhase");
expect(game.scene.getPlayerPokemon()!.getStatStage(Stat.ATK)).toBe(-1);
});
@ -49,8 +49,8 @@ describe("Abilities - Magic Bounce", () => {
it("should not bounce moves while the target is in the semi-invulnerable state", async () => {
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.use(Moves.GROWL);
await game.move.forceEnemyMove(Moves.FLY);
game.move.use(MoveId.GROWL);
await game.move.forceEnemyMove(MoveId.FLY);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.phaseInterceptor.to("BerryPhase");
@ -61,8 +61,8 @@ describe("Abilities - Magic Bounce", () => {
game.override.battleStyle("double");
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
game.move.use(Moves.GROWL, 0);
game.move.use(Moves.SPLASH, 1);
game.move.use(MoveId.GROWL, 0);
game.move.use(MoveId.SPLASH, 1);
await game.phaseInterceptor.to("BerryPhase");
const user = game.scene.getPlayerField()[0];
@ -73,7 +73,7 @@ describe("Abilities - Magic Bounce", () => {
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
game.scene.getEnemyPokemon()?.setStatStage(Stat.ATK, -6);
game.move.use(Moves.GROWL);
game.move.use(MoveId.GROWL);
await game.phaseInterceptor.to("BerryPhase");
expect(game.scene.getPlayerPokemon()!.getStatStage(Stat.ATK)).toBe(-1);
@ -103,25 +103,25 @@ describe("Abilities - Magic Bounce", () => {
game.override.ability(AbilityId.MOLD_BREAKER);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
game.move.use(Moves.GROWL);
game.move.use(MoveId.GROWL);
await game.phaseInterceptor.to("BerryPhase");
expect(game.scene.getEnemyPokemon()!.getStatStage(Stat.ATK)).toBe(-1);
});
it("should bounce back a spread status move against both pokemon", async () => {
game.override.battleStyle("double").enemyMoveset([Moves.SPLASH]);
game.override.battleStyle("double").enemyMoveset([MoveId.SPLASH]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
game.move.use(Moves.GROWL, 0);
game.move.use(Moves.SPLASH, 1);
game.move.use(MoveId.GROWL, 0);
game.move.use(MoveId.SPLASH, 1);
await game.phaseInterceptor.to("BerryPhase");
expect(game.scene.getPlayerField().every(p => p.getStatStage(Stat.ATK) === -2)).toBeTruthy();
});
it("should only bounce spikes back once in doubles when both targets have magic bounce", async () => {
game.override.battleStyle("double").moveset([Moves.SPIKES]);
game.override.battleStyle("double").moveset([MoveId.SPIKES]);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(MoveId.SPIKES);
@ -132,7 +132,7 @@ describe("Abilities - Magic Bounce", () => {
});
it("should bounce spikes even when the target is protected", async () => {
game.override.moveset([Moves.SPIKES]).enemyMoveset([Moves.PROTECT]);
game.override.moveset([MoveId.SPIKES]).enemyMoveset([MoveId.PROTECT]);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(MoveId.SPIKES);
@ -141,7 +141,7 @@ describe("Abilities - Magic Bounce", () => {
});
it("should not bounce spikes when the target is in the semi-invulnerable state", async () => {
game.override.moveset([Moves.SPIKES]).enemyMoveset([Moves.FLY]);
game.override.moveset([MoveId.SPIKES]).enemyMoveset([MoveId.FLY]);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(MoveId.SPIKES);
@ -151,7 +151,7 @@ describe("Abilities - Magic Bounce", () => {
});
it("should not bounce back curse", async () => {
game.override.moveset([Moves.CURSE]);
game.override.moveset([MoveId.CURSE]);
await game.classicMode.startBattle([Species.GASTLY]);
game.move.select(MoveId.CURSE);
@ -161,8 +161,8 @@ describe("Abilities - Magic Bounce", () => {
});
it("should not cause encore to be interrupted after bouncing", async () => {
game.override.moveset([Moves.SPLASH, Moves.GROWL, Moves.ENCORE]).enemyMoveset([Moves.TACKLE, Moves.GROWL]);
// game.override.ability(Abilities.MOLD_BREAKER);
game.override.moveset([MoveId.SPLASH, MoveId.GROWL, MoveId.ENCORE]).enemyMoveset([MoveId.TACKLE, MoveId.GROWL]);
// game.override.ability(AbilityId.MOLD_BREAKER);
await game.classicMode.startBattle([Species.MAGIKARP]);
const playerPokemon = game.scene.getPlayerPokemon()!;
const enemyPokemon = game.scene.getEnemyPokemon()!;
@ -189,9 +189,9 @@ describe("Abilities - Magic Bounce", () => {
// TODO: encore is failing if the last move was virtual.
it.todo("should not cause the bounced move to count for encore", async () => {
game.override
.moveset([Moves.SPLASH, Moves.GROWL, Moves.ENCORE])
.enemyMoveset([Moves.GROWL, Moves.TACKLE])
.enemyAbility(Abilities.MAGIC_BOUNCE);
.moveset([MoveId.SPLASH, MoveId.GROWL, MoveId.ENCORE])
.enemyMoveset([MoveId.GROWL, MoveId.TACKLE])
.enemyAbility(AbilityId.MAGIC_BOUNCE);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
const playerPokemon = game.scene.getPlayerPokemon()!;
@ -217,7 +217,7 @@ describe("Abilities - Magic Bounce", () => {
// TODO: stomping tantrum should consider moves that were bounced.
it.todo("should cause stomping tantrum to double in power when the last move was bounced", async () => {
game.override.battleStyle("single").moveset([Moves.STOMPING_TANTRUM, Moves.CHARM]);
game.override.battleStyle("single").moveset([MoveId.STOMPING_TANTRUM, MoveId.CHARM]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const stomping_tantrum = allMoves[MoveId.STOMPING_TANTRUM];
@ -233,28 +233,28 @@ describe("Abilities - Magic Bounce", () => {
// TODO: stomping tantrum should consider moves that were bounced
it.todo("should boost enemy's stomping tantrum after failed bounce", async () => {
game.override.enemyMoveset([Moves.STOMPING_TANTRUM, Moves.SPLASH, Moves.CHARM]);
game.override.enemyMoveset([MoveId.STOMPING_TANTRUM, MoveId.SPLASH, MoveId.CHARM]);
await game.classicMode.startBattle([Species.BULBASAUR]);
const stomping_tantrum = allMoves[Moves.STOMPING_TANTRUM];
const stomping_tantrum = allMoves[MoveId.STOMPING_TANTRUM];
const enemy = game.scene.getEnemyPokemon()!;
vi.spyOn(stomping_tantrum, "calculateBattlePower");
// Spore gets reflected back onto us
game.move.select(Moves.SPORE);
await game.move.selectEnemyMove(Moves.CHARM);
game.move.select(MoveId.SPORE);
await game.move.selectEnemyMove(MoveId.CHARM);
await game.toNextTurn();
expect(enemy.getLastXMoves(1)[0].result).toBe("success");
game.move.select(Moves.SPORE);
await game.move.selectEnemyMove(Moves.STOMPING_TANTRUM);
game.move.select(MoveId.SPORE);
await game.move.selectEnemyMove(MoveId.STOMPING_TANTRUM);
await game.toNextTurn();
expect(stomping_tantrum.calculateBattlePower).toHaveReturnedWith(150);
});
it("should respect immunities when bouncing a move", async () => {
vi.spyOn(allMoves[Moves.THUNDER_WAVE], "accuracy", "get").mockReturnValue(100);
game.override.moveset([Moves.THUNDER_WAVE, Moves.GROWL]).ability(Abilities.SOUNDPROOF);
vi.spyOn(allMoves[MoveId.THUNDER_WAVE], "accuracy", "get").mockReturnValue(100);
game.override.moveset([MoveId.THUNDER_WAVE, MoveId.GROWL]).ability(AbilityId.SOUNDPROOF);
await game.classicMode.startBattle([Species.PHANPY]);
// Turn 1 - thunder wave immunity test
@ -292,7 +292,7 @@ describe("Abilities - Magic Bounce", () => {
});
it("should always apply the leftmost available target's magic bounce when bouncing moves like sticky webs in doubles", async () => {
game.override.battleStyle("double").moveset([Moves.STICKY_WEB, Moves.SPLASH, Moves.TRICK_ROOM]);
game.override.battleStyle("double").moveset([MoveId.STICKY_WEB, MoveId.SPLASH, MoveId.TRICK_ROOM]);
await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.MAGIKARP]);
const [enemy_1, enemy_2] = game.scene.getEnemyField();
@ -325,11 +325,11 @@ describe("Abilities - Magic Bounce", () => {
});
it("should not bounce back status moves that hit through semi-invulnerable states", async () => {
game.override.moveset([Moves.TOXIC, Moves.CHARM]);
game.override.moveset([MoveId.TOXIC, MoveId.CHARM]);
await game.classicMode.startBattle([Species.BULBASAUR]);
game.move.select(Moves.TOXIC);
await game.move.selectEnemyMove(Moves.FLY);
game.move.select(MoveId.TOXIC);
await game.move.selectEnemyMove(MoveId.FLY);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.phaseInterceptor.to("BerryPhase");
expect(game.scene.getEnemyPokemon()!.status?.effect).toBe(StatusEffect.TOXIC);

View File

@ -31,13 +31,13 @@ describe("Abilities - Magic Guard", () => {
game.override
/** Player Pokemon overrides */
.ability(Abilities.MAGIC_GUARD)
.moveset([Moves.SPLASH])
.ability(AbilityId.MAGIC_GUARD)
.moveset([MoveId.SPLASH])
.startingLevel(100)
/** Enemy Pokemon overrides */
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(AbilityId.INSOMNIA)
.enemyMoveset(MoveId.SPLASH)
.enemyLevel(100);
});
@ -89,7 +89,7 @@ describe("Abilities - Magic Guard", () => {
it("ability effect should not persist when the ability is replaced", async () => {
game.override
.enemyMoveset([Moves.WORRY_SEED, Moves.WORRY_SEED, Moves.WORRY_SEED, Moves.WORRY_SEED])
.enemyMoveset([MoveId.WORRY_SEED, MoveId.WORRY_SEED, MoveId.WORRY_SEED, MoveId.WORRY_SEED])
.statusEffect(StatusEffect.POISON);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -108,7 +108,7 @@ describe("Abilities - Magic Guard", () => {
});
it("Magic Guard prevents damage caused by burn but other non-damaging effects are still applied", async () => {
game.override.enemyStatusEffect(StatusEffect.BURN).enemyAbility(Abilities.MAGIC_GUARD);
game.override.enemyStatusEffect(StatusEffect.BURN).enemyAbility(AbilityId.MAGIC_GUARD);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -129,7 +129,7 @@ describe("Abilities - Magic Guard", () => {
});
it("Magic Guard prevents damage caused by toxic but other non-damaging effects are still applied", async () => {
game.override.enemyStatusEffect(StatusEffect.TOXIC).enemyAbility(Abilities.MAGIC_GUARD);
game.override.enemyStatusEffect(StatusEffect.TOXIC).enemyAbility(AbilityId.MAGIC_GUARD);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -206,7 +206,7 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents against damage from volatile status effects", async () => {
await game.classicMode.startBattle([Species.DUSKULL]);
game.override.moveset([Moves.CURSE]).enemyAbility(Abilities.MAGIC_GUARD);
game.override.moveset([MoveId.CURSE]).enemyAbility(AbilityId.MAGIC_GUARD);
const leadPokemon = game.scene.getPlayerPokemon()!;
@ -328,7 +328,9 @@ describe("Abilities - Magic Guard", () => {
//Tests the ability Bad Dreams
game.override.statusEffect(StatusEffect.SLEEP);
//enemy pokemon is given Spore just in case player pokemon somehow awakens during test
game.override.enemyMoveset([Moves.SPORE, Moves.SPORE, Moves.SPORE, Moves.SPORE]).enemyAbility(Abilities.BAD_DREAMS);
game.override
.enemyMoveset([MoveId.SPORE, MoveId.SPORE, MoveId.SPORE, MoveId.SPORE])
.enemyAbility(AbilityId.BAD_DREAMS);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -349,7 +351,7 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents damage from abilities with PostFaintContactDamageAbAttr", async () => {
//Tests the abilities Innards Out/Aftermath
game.override.moveset([Moves.TACKLE]).enemyAbility(Abilities.AFTERMATH);
game.override.moveset([MoveId.TACKLE]).enemyAbility(AbilityId.AFTERMATH);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -372,7 +374,7 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents damage from abilities with PostDefendContactDamageAbAttr", async () => {
//Tests the abilities Iron Barbs/Rough Skin
game.override.moveset([Moves.TACKLE]).enemyAbility(Abilities.IRON_BARBS);
game.override.moveset([MoveId.TACKLE]).enemyAbility(AbilityId.IRON_BARBS);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -394,7 +396,7 @@ describe("Abilities - Magic Guard", () => {
it("Magic Guard prevents damage from abilities with ReverseDrainAbAttr", async () => {
//Tests the ability Liquid Ooze
game.override.moveset([Moves.ABSORB]).enemyAbility(Abilities.LIQUID_OOZE);
game.override.moveset([MoveId.ABSORB]).enemyAbility(AbilityId.LIQUID_OOZE);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -415,7 +417,7 @@ describe("Abilities - Magic Guard", () => {
});
it("Magic Guard prevents HP loss from abilities with PostWeatherLapseDamageAbAttr", async () => {
game.override.passiveAbility(Abilities.SOLAR_POWER).weather(WeatherType.SUNNY);
game.override.passiveAbility(AbilityId.SOLAR_POWER).weather(WeatherType.SUNNY);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;

View File

@ -37,7 +37,7 @@ describe("Ability - Mirror Armor", () => {
});
it("Player side + single battle Intimidate - opponent loses stats", async () => {
game.override.ability(Abilities.MIRROR_ARMOR).enemyAbility(Abilities.INTIMIDATE);
game.override.ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!;
@ -53,7 +53,7 @@ describe("Ability - Mirror Armor", () => {
});
it("Enemy side + single battle Intimidate - player loses stats", async () => {
game.override.enemyAbility(Abilities.MIRROR_ARMOR).ability(Abilities.INTIMIDATE);
game.override.enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!;
@ -69,7 +69,7 @@ describe("Ability - Mirror Armor", () => {
});
it("Player side + double battle Intimidate - opponents each lose -2 atk", async () => {
game.override.battleStyle("double").ability(Abilities.MIRROR_ARMOR).enemyAbility(Abilities.INTIMIDATE);
game.override.battleStyle("double").ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER]);
const [enemy1, enemy2] = game.scene.getEnemyField();
@ -89,7 +89,7 @@ describe("Ability - Mirror Armor", () => {
});
it("Enemy side + double battle Intimidate - players each lose -2 atk", async () => {
game.override.battleStyle("double").enemyAbility(Abilities.MIRROR_ARMOR).ability(Abilities.INTIMIDATE);
game.override.battleStyle("double").enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER]);
const [enemy1, enemy2] = game.scene.getEnemyField();
@ -109,7 +109,7 @@ describe("Ability - Mirror Armor", () => {
});
it("Player side + single battle Intimidate + Tickle - opponent loses stats", async () => {
game.override.ability(Abilities.MIRROR_ARMOR).enemyAbility(Abilities.INTIMIDATE);
game.override.ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!;
@ -127,7 +127,7 @@ describe("Ability - Mirror Armor", () => {
});
it("Player side + double battle Intimidate + Tickle - opponents each lose -3 atk, -1 def", async () => {
game.override.battleStyle("double").ability(Abilities.MIRROR_ARMOR).enemyAbility(Abilities.INTIMIDATE);
game.override.battleStyle("double").ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER]);
const [enemy1, enemy2] = game.scene.getEnemyField();
@ -150,7 +150,7 @@ describe("Ability - Mirror Armor", () => {
});
it("Enemy side + single battle Intimidate + Tickle - player loses stats", async () => {
game.override.enemyAbility(Abilities.MIRROR_ARMOR).ability(Abilities.INTIMIDATE);
game.override.enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!;
@ -168,7 +168,7 @@ describe("Ability - Mirror Armor", () => {
});
it("Player side + single battle Intimidate + oppoenent has white smoke - no one loses stats", async () => {
game.override.enemyAbility(Abilities.WHITE_SMOKE).ability(Abilities.MIRROR_ARMOR);
game.override.enemyAbility(AbilityId.WHITE_SMOKE).ability(AbilityId.MIRROR_ARMOR);
await game.classicMode.startBattle([Species.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!;
@ -186,7 +186,7 @@ describe("Ability - Mirror Armor", () => {
});
it("Enemy side + single battle Intimidate + player has white smoke - no one loses stats", async () => {
game.override.ability(Abilities.WHITE_SMOKE).enemyAbility(Abilities.MIRROR_ARMOR);
game.override.ability(AbilityId.WHITE_SMOKE).enemyAbility(AbilityId.MIRROR_ARMOR);
await game.classicMode.startBattle([Species.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!;
@ -240,7 +240,7 @@ describe("Ability - Mirror Armor", () => {
});
it("Both sides have mirror armor - does not loop, player loses attack", async () => {
game.override.enemyAbility(Abilities.MIRROR_ARMOR).ability(Abilities.MIRROR_ARMOR).ability(Abilities.INTIMIDATE);
game.override.enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!;
@ -274,7 +274,7 @@ describe("Ability - Mirror Armor", () => {
});
it("Double battle + sticky web applied player side - player switches out and enemy 1 should lose -1 speed", async () => {
game.override.battleStyle("double").ability(Abilities.MIRROR_ARMOR);
game.override.battleStyle("double").ability(AbilityId.MIRROR_ARMOR);
await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE]);
const [enemy1, enemy2] = game.scene.getEnemyField();

View File

@ -26,15 +26,15 @@ describe("Abilities - Moxie", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
const moveToUse = Moves.AERIAL_ACE;
const moveToUse = MoveId.AERIAL_ACE;
game.override
.battleStyle("single")
.enemySpecies(Species.RATTATA)
.enemyAbility(Abilities.MOXIE)
.ability(Abilities.MOXIE)
.enemyAbility(AbilityId.MOXIE)
.ability(AbilityId.MOXIE)
.startingLevel(2000)
.moveset([moveToUse])
.enemyMoveset(Moves.SPLASH);
.enemyMoveset(MoveId.SPLASH);
});
it("should raise ATK stat stage by 1 when winning a battle", async () => {

View File

@ -47,7 +47,7 @@ describe("Abilities - Normalize", () => {
it("should not apply the old type boost item after changing a move's type", async () => {
game.override
.startingHeldItems([{ name: "ATTACK_TYPE_BOOSTER", count: 1, type: PokemonType.GRASS }])
.moveset([Moves.LEAFAGE]);
.moveset([MoveId.LEAFAGE]);
const powerSpy = vi.spyOn(allMoves[MoveId.LEAFAGE], "calculateBattlePower");
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -61,7 +61,7 @@ describe("Abilities - Normalize", () => {
it("should apply silk scarf's power boost after changing a move's type", async () => {
game.override
.startingHeldItems([{ name: "ATTACK_TYPE_BOOSTER", count: 1, type: PokemonType.NORMAL }])
.moveset([Moves.LEAFAGE]);
.moveset([MoveId.LEAFAGE]);
const powerSpy = vi.spyOn(allMoves[MoveId.LEAFAGE], "calculateBattlePower");
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);

View File

@ -29,10 +29,10 @@ describe("Abilities - Parental Bond", () => {
game.override
.battleStyle("single")
.disableCrits()
.ability(Abilities.PARENTAL_BOND)
.ability(AbilityId.PARENTAL_BOND)
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.FUR_COAT)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(AbilityId.FUR_COAT)
.enemyMoveset(MoveId.SPLASH)
.startingLevel(100)
.enemyLevel(100);
});
@ -62,7 +62,7 @@ describe("Abilities - Parental Bond", () => {
});
it("should apply secondary effects to both strikes", async () => {
game.override.moveset([Moves.POWER_UP_PUNCH]).enemySpecies(Species.AMOONGUSS);
game.override.moveset([MoveId.POWER_UP_PUNCH]).enemySpecies(Species.AMOONGUSS);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -148,7 +148,7 @@ describe("Abilities - Parental Bond", () => {
});
it("should not apply multiplier to counter moves", async () => {
game.override.moveset([Moves.COUNTER]).enemyMoveset([Moves.TACKLE]);
game.override.moveset([MoveId.COUNTER]).enemyMoveset([MoveId.TACKLE]);
await game.classicMode.startBattle([SpeciesId.SHUCKLE]);
@ -166,7 +166,7 @@ describe("Abilities - Parental Bond", () => {
});
it("should not apply to multi-target moves", async () => {
game.override.battleStyle("double").moveset([Moves.EARTHQUAKE]).passiveAbility(Abilities.LEVITATE);
game.override.battleStyle("double").moveset([MoveId.EARTHQUAKE]).passiveAbility(AbilityId.LEVITATE);
await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.FEEBAS]);
@ -234,7 +234,7 @@ describe("Abilities - Parental Bond", () => {
});
it("Moves boosted by this ability and Multi-Lens should strike 3 times", async () => {
game.override.moveset([Moves.TACKLE]).startingHeldItems([{ name: "MULTI_LENS", count: 1 }]);
game.override.moveset([MoveId.TACKLE]).startingHeldItems([{ name: "MULTI_LENS", count: 1 }]);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -248,7 +248,7 @@ describe("Abilities - Parental Bond", () => {
});
it("Seismic Toss boosted by this ability and Multi-Lens should strike 3 times", async () => {
game.override.moveset([Moves.SEISMIC_TOSS]).startingHeldItems([{ name: "MULTI_LENS", count: 1 }]);
game.override.moveset([MoveId.SEISMIC_TOSS]).startingHeldItems([{ name: "MULTI_LENS", count: 1 }]);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -373,7 +373,7 @@ describe("Abilities - Parental Bond", () => {
});
it("should not cause user to hit into King's Shield more than once", async () => {
game.override.moveset([Moves.TACKLE]).enemyMoveset([Moves.KINGS_SHIELD]);
game.override.moveset([MoveId.TACKLE]).enemyMoveset([MoveId.KINGS_SHIELD]);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -387,7 +387,7 @@ describe("Abilities - Parental Bond", () => {
});
it("should not cause user to hit into Storm Drain more than once", async () => {
game.override.moveset([Moves.WATER_GUN]).enemyAbility(Abilities.STORM_DRAIN);
game.override.moveset([MoveId.WATER_GUN]).enemyAbility(AbilityId.STORM_DRAIN);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);

View File

@ -25,11 +25,11 @@ describe("Abilities - Perish Song", () => {
.battleStyle("single")
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyAbility(AbilityId.BALL_FETCH)
.starterSpecies(Species.CURSOLA)
.ability(Abilities.PERISH_BODY)
.moveset([Moves.SPLASH])
.enemyMoveset([Moves.AQUA_JET]);
.ability(AbilityId.PERISH_BODY)
.moveset([MoveId.SPLASH])
.enemyMoveset([MoveId.AQUA_JET]);
});
it("should trigger when hit with damaging move", async () => {
@ -87,8 +87,8 @@ describe("Abilities - Perish Song", () => {
it("should activate if cursola already has perish song, but not reset its counter", async () => {
game.override
.enemyMoveset([Moves.PERISH_SONG, Moves.AQUA_JET, Moves.SPLASH])
.moveset([Moves.WHIRLWIND, Moves.SPLASH])
.enemyMoveset([MoveId.PERISH_SONG, MoveId.AQUA_JET, MoveId.SPLASH])
.moveset([MoveId.WHIRLWIND, MoveId.SPLASH])
.startingWave(5);
await game.classicMode.startBattle([Species.CURSOLA]);
const cursola = game.scene.getPlayerPokemon();

View File

@ -36,7 +36,7 @@ describe("Abilities - POWER CONSTRUCT", () => {
const baseForm = 2,
completeForm = 4;
game.override.startingWave(4).starterForms({
[Species.ZYGARDE]: completeForm,
[SpeciesId.ZYGARDE]: completeForm,
});
await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.ZYGARDE]);
@ -62,7 +62,7 @@ describe("Abilities - POWER CONSTRUCT", () => {
const baseForm = 3,
completeForm = 5;
game.override.startingWave(4).starterForms({
[Species.ZYGARDE]: completeForm,
[SpeciesId.ZYGARDE]: completeForm,
});
await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.ZYGARDE]);

View File

@ -28,10 +28,10 @@ describe("Abilities - Power Spot", () => {
game = new GameManager(phaserGame);
game.override
.battleStyle("double")
.moveset([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM])
.enemyMoveset(Moves.SPLASH)
.moveset([MoveId.TACKLE, MoveId.BREAKING_SWIPE, MoveId.SPLASH, MoveId.DAZZLING_GLEAM])
.enemyMoveset(MoveId.SPLASH)
.enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.BALL_FETCH);
.enemyAbility(AbilityId.BALL_FETCH);
});
it("raises the power of allies' special moves by 30%", async () => {

View File

@ -108,7 +108,7 @@ describe("Abilities - Protean", () => {
});
test("ability applies correctly even if the type has changed by another ability", async () => {
game.override.moveset([Moves.TACKLE]).passiveAbility(Abilities.REFRIGERATE);
game.override.moveset([MoveId.TACKLE]).passiveAbility(AbilityId.REFRIGERATE);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -155,7 +155,7 @@ describe("Abilities - Protean", () => {
});
test("ability applies correctly even if the pokemon's move misses", async () => {
game.override.moveset([Moves.TACKLE]).enemyMoveset(Moves.SPLASH);
game.override.moveset([MoveId.TACKLE]).enemyMoveset(MoveId.SPLASH);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -186,7 +186,7 @@ describe("Abilities - Protean", () => {
});
test("ability applies correctly even if the pokemon's move fails because of type immunity", async () => {
game.override.moveset([Moves.TACKLE]).enemySpecies(Species.GASTLY);
game.override.moveset([MoveId.TACKLE]).enemySpecies(Species.GASTLY);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -259,7 +259,7 @@ describe("Abilities - Protean", () => {
});
test("ability applies correctly even if the pokemon's Trick-or-Treat fails", async () => {
game.override.moveset([Moves.TRICK_OR_TREAT]).enemySpecies(Species.GASTLY);
game.override.moveset([MoveId.TRICK_OR_TREAT]).enemySpecies(Species.GASTLY);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);

View File

@ -3,7 +3,6 @@ import { allAbilities } from "#app/data/data-lists";
import { FaintPhase } from "#app/phases/faint-phase";
import { AbilityId } from "#enums/ability-id";
import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
@ -27,12 +26,12 @@ describe("Abilities - Quick Draw", () => {
game.override
.battleStyle("single")
.starterSpecies(Species.MAGIKARP)
.ability(Abilities.QUICK_DRAW)
.moveset([Moves.TACKLE, Moves.TAIL_WHIP])
.ability(AbilityId.QUICK_DRAW)
.moveset([MoveId.TACKLE, MoveId.TAIL_WHIP])
.enemyLevel(100)
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset([Moves.TACKLE]);
.enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset([MoveId.TACKLE]);
vi.spyOn(allAbilities[AbilityId.QUICK_DRAW].getAttrs(BypassSpeedChanceAbAttr)[0], "chance", "get").mockReturnValue(
100,

View File

@ -26,10 +26,10 @@ describe("Abilities - Sand Spit", () => {
.battleStyle("single")
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyAbility(AbilityId.BALL_FETCH)
.starterSpecies(Species.SILICOBRA)
.ability(Abilities.SAND_SPIT)
.moveset([Moves.SPLASH, Moves.COIL]);
.ability(AbilityId.SAND_SPIT)
.moveset([MoveId.SPLASH, MoveId.COIL]);
});
it("should trigger when hit with damaging move", async () => {

View File

@ -32,7 +32,7 @@ describe("Abilities - SCHOOLING", () => {
const soloForm = 0,
schoolForm = 1;
game.override.startingWave(4).starterForms({
[Species.WISHIWASHI]: schoolForm,
[SpeciesId.WISHIWASHI]: schoolForm,
});
await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.WISHIWASHI]);

View File

@ -24,7 +24,7 @@ describe("Abilities - Screen Cleaner", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.battleStyle("single").ability(Abilities.SCREEN_CLEANER).enemySpecies(Species.SHUCKLE);
game.override.battleStyle("single").ability(AbilityId.SCREEN_CLEANER).enemySpecies(Species.SHUCKLE);
});
it("removes Aurora Veil", async () => {

View File

@ -26,10 +26,10 @@ describe("Abilities - Seed Sower", () => {
.battleStyle("single")
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyAbility(AbilityId.BALL_FETCH)
.starterSpecies(Species.ARBOLIVA)
.ability(Abilities.SEED_SOWER)
.moveset([Moves.SPLASH]);
.ability(AbilityId.SEED_SOWER)
.moveset([MoveId.SPLASH]);
});
it("should trigger when hit with damaging move", async () => {

View File

@ -34,10 +34,10 @@ describe("Abilities - Shield Dust", () => {
game.override
.battleStyle("single")
.enemySpecies(Species.ONIX)
.enemyAbility(Abilities.SHIELD_DUST)
.enemyAbility(AbilityId.SHIELD_DUST)
.startingLevel(100)
.moveset(Moves.AIR_SLASH)
.enemyMoveset(Moves.TACKLE);
.moveset(MoveId.AIR_SLASH)
.enemyMoveset(MoveId.TACKLE);
});
it("Shield Dust", async () => {

View File

@ -25,12 +25,12 @@ describe("Abilities - SHIELDS DOWN", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
const moveToUse = Moves.SPLASH;
const moveToUse = MoveId.SPLASH;
game.override
.battleStyle("single")
.ability(Abilities.SHIELDS_DOWN)
.ability(AbilityId.SHIELDS_DOWN)
.moveset([moveToUse])
.enemyMoveset([Moves.TACKLE]);
.enemyMoveset([MoveId.TACKLE]);
});
test("check if fainted pokemon switched to base form on arena reset", async () => {
@ -70,7 +70,7 @@ describe("Abilities - SHIELDS DOWN", () => {
});
test("should still ignore non-volatile status moves used by a pokemon with mold breaker", async () => {
game.override.enemyAbility(Abilities.MOLD_BREAKER).enemyMoveset([Moves.SPORE]);
game.override.enemyAbility(AbilityId.MOLD_BREAKER).enemyMoveset([MoveId.SPORE]);
await game.classicMode.startBattle([SpeciesId.MINIOR]);
@ -93,7 +93,7 @@ describe("Abilities - SHIELDS DOWN", () => {
});
test("should ignore status moves even through mold breaker", async () => {
game.override.enemyMoveset([Moves.SPORE]).enemyAbility(Abilities.MOLD_BREAKER);
game.override.enemyMoveset([MoveId.SPORE]).enemyAbility(AbilityId.MOLD_BREAKER);
await game.classicMode.startBattle([SpeciesId.MINIOR]);
@ -107,8 +107,8 @@ describe("Abilities - SHIELDS DOWN", () => {
// toxic spikes currently does not poison flying types when gravity is in effect
test.todo("should become poisoned by toxic spikes when grounded", async () => {
game.override
.enemyMoveset([Moves.GRAVITY, Moves.TOXIC_SPIKES, Moves.SPLASH])
.moveset([Moves.GRAVITY, Moves.SPLASH]);
.enemyMoveset([MoveId.GRAVITY, MoveId.TOXIC_SPIKES, MoveId.SPLASH])
.moveset([MoveId.GRAVITY, MoveId.SPLASH]);
await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.MINIOR]);
@ -154,7 +154,7 @@ describe("Abilities - SHIELDS DOWN", () => {
// the `NoTransformAbilityAbAttr` attribute is not checked anywhere, so this test cannot pass.
test.todo("ditto should not be immune to status after transforming", async () => {
game.override.enemySpecies(Species.DITTO).enemyAbility(Abilities.IMPOSTER).moveset([Moves.SPLASH, Moves.SPORE]);
game.override.enemySpecies(Species.DITTO).enemyAbility(AbilityId.IMPOSTER).moveset([MoveId.SPLASH, MoveId.SPORE]);
await game.classicMode.startBattle([SpeciesId.MINIOR]);
@ -167,8 +167,8 @@ describe("Abilities - SHIELDS DOWN", () => {
test("should not prevent minior from receiving the fainted status effect in trainer battles", async () => {
game.override
.enemyMoveset([Moves.TACKLE])
.moveset([Moves.THUNDERBOLT])
.enemyMoveset([MoveId.TACKLE])
.moveset([MoveId.THUNDERBOLT])
.startingLevel(100)
.startingWave(5)
.enemySpecies(Species.MINIOR);

View File

@ -31,9 +31,9 @@ describe("Abilities - Steely Spirit", () => {
game.override
.battleStyle("double")
.enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.BALL_FETCH)
.moveset([Moves.IRON_HEAD, Moves.SPLASH])
.enemyMoveset(Moves.SPLASH);
.enemyAbility(AbilityId.BALL_FETCH)
.moveset([MoveId.IRON_HEAD, MoveId.SPLASH])
.enemyMoveset(MoveId.SPLASH);
vi.spyOn(allMoves[moveToCheck], "calculateBattlePower");
});

View File

@ -3,7 +3,6 @@ import { DamageAnimPhase } from "#app/phases/damage-anim-phase";
import { MoveEndPhase } from "#app/phases/move-end-phase";
import { AbilityId } from "#enums/ability-id";
import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";
@ -28,10 +27,10 @@ describe("Abilities - Sturdy", () => {
.battleStyle("single")
.starterSpecies(Species.LUCARIO)
.startingLevel(100)
.moveset([Moves.CLOSE_COMBAT, Moves.FISSURE])
.moveset([MoveId.CLOSE_COMBAT, MoveId.FISSURE])
.enemySpecies(Species.ARON)
.enemyLevel(5)
.enemyAbility(Abilities.STURDY);
.enemyAbility(AbilityId.STURDY);
});
test("Sturdy activates when user is at full HP", async () => {

View File

@ -69,7 +69,7 @@ describe("Abilities - Sweet Veil", () => {
});
it("prevents the user and its allies already drowsy due to Yawn from falling asleep.", async () => {
game.override.enemySpecies(Species.PIKACHU).enemyLevel(5).startingLevel(5).enemyMoveset(Moves.SPLASH);
game.override.enemySpecies(Species.PIKACHU).enemyLevel(5).startingLevel(5).enemyMoveset(MoveId.SPLASH);
await game.classicMode.startBattle([SpeciesId.SHUCKLE, SpeciesId.SHUCKLE, SpeciesId.SWIRLIX]);

View File

@ -51,7 +51,7 @@ describe("Abilities - Unseen Fist", () => {
await testUnseenFistHitResult(game, MoveId.BULLDOZE, MoveId.WIDE_GUARD, false));
it("should cause a contact move to ignore Protect, but not Substitute", async () => {
game.override.enemyLevel(1).moveset([Moves.TACKLE]);
game.override.enemyLevel(1).moveset([MoveId.TACKLE]);
await game.classicMode.startBattle();

View File

@ -3,7 +3,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { AbilityId } from "#enums/ability-id";
import { BattlerTagType } from "#enums/battler-tag-type";
import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -36,9 +35,9 @@ describe("Abilities - Volt Absorb", () => {
game.override
.moveset([moveToUse])
.ability(ability)
.enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE])
.enemyMoveset([MoveId.SPLASH, MoveId.NONE, MoveId.NONE, MoveId.NONE])
.enemySpecies(Species.DUSKULL)
.enemyAbility(Abilities.BALL_FETCH);
.enemyAbility(AbilityId.BALL_FETCH);
await game.classicMode.startBattle();
@ -55,10 +54,10 @@ describe("Abilities - Volt Absorb", () => {
it("should activate regardless of accuracy checks", async () => {
game.override
.moveset(Moves.THUNDERBOLT)
.enemyMoveset(Moves.SPLASH)
.moveset(MoveId.THUNDERBOLT)
.enemyMoveset(MoveId.SPLASH)
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.VOLT_ABSORB);
.enemyAbility(AbilityId.VOLT_ABSORB);
await game.classicMode.startBattle();
@ -76,10 +75,10 @@ describe("Abilities - Volt Absorb", () => {
it("regardless of accuracy should not trigger on pokemon in semi invulnerable state", async () => {
game.override
.moveset(Moves.THUNDERBOLT)
.enemyMoveset(Moves.DIVE)
.moveset(MoveId.THUNDERBOLT)
.enemyMoveset(MoveId.DIVE)
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.VOLT_ABSORB);
.enemyAbility(AbilityId.VOLT_ABSORB);
await game.classicMode.startBattle();

View File

@ -26,9 +26,9 @@ describe("Abilities - Wind Power", () => {
game.override
.battleStyle("single")
.enemySpecies(Species.SHIFTRY)
.enemyAbility(Abilities.WIND_POWER)
.moveset([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM])
.enemyMoveset(Moves.SPLASH);
.enemyAbility(AbilityId.WIND_POWER)
.moveset([MoveId.TAILWIND, MoveId.SPLASH, MoveId.PETAL_BLIZZARD, MoveId.SANDSTORM])
.enemyMoveset(MoveId.SPLASH);
});
it("becomes charged when hit by wind moves", async () => {
@ -44,7 +44,7 @@ describe("Abilities - Wind Power", () => {
});
it("becomes charged when Tailwind takes effect on its side", async () => {
game.override.ability(Abilities.WIND_POWER).enemySpecies(Species.MAGIKARP);
game.override.ability(AbilityId.WIND_POWER).enemySpecies(Species.MAGIKARP);
await game.classicMode.startBattle([SpeciesId.SHIFTRY]);
const shiftry = game.scene.getPlayerPokemon()!;
@ -58,7 +58,7 @@ describe("Abilities - Wind Power", () => {
});
it("does not become charged when Tailwind takes effect on opposing side", async () => {
game.override.enemySpecies(Species.MAGIKARP).ability(Abilities.WIND_POWER);
game.override.enemySpecies(Species.MAGIKARP).ability(AbilityId.WIND_POWER);
await game.classicMode.startBattle([SpeciesId.SHIFTRY]);
const magikarp = game.scene.getEnemyPokemon()!;

View File

@ -25,11 +25,11 @@ describe("Abilities - Wonder Skin", () => {
game = new GameManager(phaserGame);
game.override
.battleStyle("single")
.moveset([Moves.TACKLE, Moves.CHARM])
.ability(Abilities.BALL_FETCH)
.enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.WONDER_SKIN)
.enemyMoveset(Moves.SPLASH);
.moveset([MoveId.TACKLE, MoveId.CHARM])
.ability(AbilityId.BALL_FETCH)
.enemySpecies(SpeciesId.SHUCKLE)
.enemyAbility(AbilityId.WONDER_SKIN)
.enemyMoveset(MoveId.SPLASH);
});
it("lowers accuracy of status moves to 50%", async () => {

View File

@ -86,7 +86,7 @@ describe("Abilities - ZEN MODE", () => {
it("should switch to base form on arena reset", async () => {
game.override.startingWave(4).starterForms({
[Species.DARMANITAN]: zenForm,
[SpeciesId.DARMANITAN]: zenForm,
});
await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.DARMANITAN]);

View File

@ -35,7 +35,7 @@ describe("Abilities - ZERO TO HERO", () => {
it("should swap to base form on arena reset", async () => {
game.override.startingWave(4).starterForms({
[Species.PALAFIN]: heroForm,
[SpeciesId.PALAFIN]: heroForm,
});
await game.classicMode.startBattle([SpeciesId.FEEBAS, SpeciesId.PALAFIN, SpeciesId.PALAFIN]);

View File

@ -27,11 +27,11 @@ describe("Weather - Fog", () => {
game.override
.weather(WeatherType.FOG)
.battleStyle("single")
.moveset([Moves.TACKLE])
.ability(Abilities.BALL_FETCH)
.enemyAbility(Abilities.BALL_FETCH)
.moveset([MoveId.TACKLE])
.ability(AbilityId.BALL_FETCH)
.enemyAbility(AbilityId.BALL_FETCH)
.enemySpecies(Species.MAGIKARP)
.enemyMoveset([Moves.SPLASH]);
.enemyMoveset([MoveId.SPLASH]);
});
it("move accuracy is multiplied by 90%", async () => {

View File

@ -28,8 +28,8 @@ describe("Weather - Strong Winds", () => {
.battleStyle("single")
.startingLevel(10)
.enemySpecies(Species.TAILLOW)
.enemyAbility(Abilities.DELTA_STREAM)
.moveset([Moves.THUNDERBOLT, Moves.ICE_BEAM, Moves.ROCK_SLIDE]);
.enemyAbility(AbilityId.DELTA_STREAM)
.moveset([MoveId.THUNDERBOLT, MoveId.ICE_BEAM, MoveId.ROCK_SLIDE]);
});
it("electric type move is not very effective on Rayquaza", async () => {

View File

@ -27,9 +27,9 @@ describe("Battle order", () => {
game.override
.battleStyle("single")
.enemySpecies(Species.MEWTWO)
.enemyAbility(Abilities.INSOMNIA)
.ability(Abilities.INSOMNIA)
.moveset([Moves.TACKLE]);
.enemyAbility(AbilityId.INSOMNIA)
.ability(AbilityId.INSOMNIA)
.moveset([MoveId.TACKLE]);
});
it("opponent faster than player 50 vs 150", async () => {

View File

@ -23,7 +23,6 @@ import { PlayerGender } from "#enums/player-gender";
import { SpeciesId } from "#enums/species-id";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { BiomeId } from "#enums/biome-id";
describe("Test Battle Phase", () => {
let phaserGame: Phaser.Game;
@ -91,7 +90,7 @@ describe("Test Battle Phase", () => {
it("do attack wave 3 - single battle - regular - OHKO", async () => {
game.override.enemySpecies(Species.RATTATA).startingLevel(2000).battleStyle("single");
await game.classicMode.startBattle([Species.MEWTWO]);
game.move.use(Moves.TACKLE);
game.move.use(MoveId.TACKLE);
await game.phaseInterceptor.to("SelectModifierPhase");
}, 20000);
@ -100,12 +99,12 @@ describe("Test Battle Phase", () => {
.enemySpecies(Species.RATTATA)
.startingLevel(5)
.startingWave(3)
.moveset([Moves.TACKLE])
.enemyAbility(Abilities.HYDRATION)
.enemyMoveset([Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP])
.moveset([MoveId.TACKLE])
.enemyAbility(AbilityId.HYDRATION)
.enemyMoveset([MoveId.TAIL_WHIP, MoveId.TAIL_WHIP, MoveId.TAIL_WHIP, MoveId.TAIL_WHIP])
.battleStyle("single");
await game.classicMode.startBattle([Species.MEWTWO]);
game.move.select(Moves.TACKLE);
game.move.select(MoveId.TACKLE);
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase, false);
}, 20000);
@ -237,17 +236,17 @@ describe("Test Battle Phase", () => {
}, 20000);
it("kill opponent pokemon", async () => {
const moveToUse = Moves.SPLASH;
const moveToUse = MoveId.SPLASH;
game.override
.battleStyle("single")
.starterSpecies(Species.MEWTWO)
.enemySpecies(Species.RATTATA)
.enemyAbility(Abilities.HYDRATION)
.ability(Abilities.ZEN_MODE)
.enemyAbility(AbilityId.HYDRATION)
.ability(AbilityId.ZEN_MODE)
.startingLevel(2000)
.startingWave(3)
.moveset([moveToUse])
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
.enemyMoveset([MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE]);
await game.classicMode.startBattle([Species.DARMANITAN, Species.CHARIZARD]);
game.move.select(moveToUse);
@ -258,16 +257,16 @@ describe("Test Battle Phase", () => {
});
it("to next turn", async () => {
const moveToUse = Moves.SPLASH;
const moveToUse = MoveId.SPLASH;
game.override
.battleStyle("single")
.enemySpecies(Species.RATTATA)
.enemyAbility(Abilities.HYDRATION)
.ability(Abilities.ZEN_MODE)
.enemyAbility(AbilityId.HYDRATION)
.ability(AbilityId.ZEN_MODE)
.startingLevel(2000)
.startingWave(3)
.moveset([moveToUse])
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
.enemyMoveset([MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE]);
await game.classicMode.startBattle([Species.MEWTWO]);
const turn = game.scene.currentBattle.turn;
game.move.select(moveToUse);
@ -287,7 +286,7 @@ describe("Test Battle Phase", () => {
.startingWave(3)
.startingBiome(Biome.LAKE)
.moveset([moveToUse])
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
.enemyMoveset([MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE]);
await game.classicMode.startBattle();
const waveIndex = game.scene.currentBattle.waveIndex;
game.move.select(moveToUse);

View File

@ -263,7 +263,7 @@ describe("Escape chance calculations", () => {
it("double boss opponent", async () => {
game.override.battleStyle("double").startingWave(10);
await game.classicMode.startBattle([Species.BULBASAUR, Species.ABOMASNOW]);
await game.classicMode.startBattle([SpeciesId.BULBASAUR, SpeciesId.ABOMASNOW]);
const playerPokemon = game.scene.getPlayerField();
const enemyField = game.scene.getEnemyField();

View File

@ -31,7 +31,7 @@ describe("Evolution", () => {
game.override
.battleStyle("single")
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyAbility(AbilityId.BALL_FETCH)
.startingLevel(60);
});

View File

@ -88,7 +88,7 @@ describe("Spec - Pokemon", () => {
let scene: BattleScene;
beforeEach(async () => {
game.override.enemySpecies(Species.ZUBAT).starterSpecies(Species.ABRA).enableStarterFusion();
game.override.enemySpecies(SpeciesId.ZUBAT).starterSpecies(SpeciesId.ABRA).enableStarterFusion();
scene = game.scene;
});
@ -144,7 +144,7 @@ describe("Spec - Pokemon", () => {
});
it("Fusing mons with one and two types", async () => {
game.override.starterSpecies(Species.CHARMANDER).starterFusionSpecies(Species.HOUNDOUR);
game.override.starterSpecies(SpeciesId.CHARMANDER).starterFusionSpecies(SpeciesId.HOUNDOUR);
await game.classicMode.startBattle();
const pokemon = scene.getPlayerParty()[0];
@ -154,7 +154,7 @@ describe("Spec - Pokemon", () => {
});
it("Fusing mons with two and one types", async () => {
game.override.starterSpecies(Species.NUMEL).starterFusionSpecies(Species.CHARMANDER);
game.override.starterSpecies(SpeciesId.NUMEL).starterFusionSpecies(SpeciesId.CHARMANDER);
await game.classicMode.startBattle();
const pokemon = scene.getPlayerParty()[0];
@ -164,7 +164,7 @@ describe("Spec - Pokemon", () => {
});
it("Fusing two mons with two types", async () => {
game.override.starterSpecies(Species.NATU).starterFusionSpecies(Species.HOUNDOUR);
game.override.starterSpecies(SpeciesId.NATU).starterFusionSpecies(SpeciesId.HOUNDOUR);
await game.classicMode.startBattle();
const pokemon = scene.getPlayerParty()[0];

View File

@ -22,7 +22,7 @@ describe("EXP Modifier Items", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.enemyAbility(Abilities.BALL_FETCH).ability(Abilities.BALL_FETCH).battleStyle("single");
game.override.enemyAbility(AbilityId.BALL_FETCH).ability(AbilityId.BALL_FETCH).battleStyle("single");
});
it("EXP booster items stack multiplicatively", async () => {

View File

@ -26,10 +26,10 @@ describe("Moves - Baneful Bunker", () => {
game.override
.battleStyle("single")
.moveset(Moves.SLASH)
.moveset(MoveId.SLASH)
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(Moves.BANEFUL_BUNKER)
.enemyAbility(AbilityId.INSOMNIA)
.enemyMoveset(MoveId.BANEFUL_BUNKER)
.startingLevel(100)
.enemyLevel(100);
});

View File

@ -59,17 +59,17 @@ describe("Moves - Baton Pass", () => {
it("passes stat stage buffs when AI uses it", async () => {
// arrange
game.override.startingWave(5).enemyMoveset([Moves.NASTY_PLOT, Moves.BATON_PASS]);
game.override.startingWave(5).enemyMoveset([MoveId.NASTY_PLOT, MoveId.BATON_PASS]);
await game.classicMode.startBattle([Species.RAICHU, Species.SHUCKLE]);
// round 1 - ai buffs
game.move.select(Moves.SPLASH);
await game.move.forceEnemyMove(Moves.NASTY_PLOT);
game.move.select(MoveId.SPLASH);
await game.move.forceEnemyMove(MoveId.NASTY_PLOT);
await game.toNextTurn();
// round 2 - baton pass
game.move.select(Moves.SPLASH);
await game.move.forceEnemyMove(Moves.BATON_PASS);
game.move.select(MoveId.SPLASH);
await game.move.forceEnemyMove(MoveId.BATON_PASS);
await game.phaseInterceptor.to("PostSummonPhase", false);
// check buffs are still there

View File

@ -129,9 +129,9 @@ describe("Moves - Beak Blast", () => {
});
it("should not burn a long reach enemy that hits the user with a contact move", async () => {
game.override.enemyAbility(Abilities.LONG_REACH).enemyMoveset([Moves.FALSE_SWIPE]).enemyLevel(100);
game.override.enemyAbility(AbilityId.LONG_REACH).enemyMoveset([MoveId.FALSE_SWIPE]).enemyLevel(100);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(Moves.BEAK_BLAST);
game.move.select(MoveId.BEAK_BLAST);
await game.phaseInterceptor.to("BerryPhase", false);
const enemyPokemon = game.scene.getEnemyPokemon()!;
expect(enemyPokemon.status?.effect).not.toBe(StatusEffect.BURN);

View File

@ -27,10 +27,10 @@ describe("Moves - Beat Up", () => {
.battleStyle("single")
.enemySpecies(Species.SNORLAX)
.enemyLevel(100)
.enemyMoveset([Moves.SPLASH])
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset([MoveId.SPLASH])
.enemyAbility(AbilityId.INSOMNIA)
.startingLevel(100)
.moveset([Moves.BEAT_UP]);
.moveset([MoveId.BEAT_UP]);
});
it("should hit once for each healthy player Pokemon", async () => {

View File

@ -29,13 +29,13 @@ describe("Moves - Ceaseless Edge", () => {
game.override
.battleStyle("single")
.enemySpecies(Species.RATTATA)
.enemyAbility(Abilities.RUN_AWAY)
.enemyPassiveAbility(Abilities.RUN_AWAY)
.enemyAbility(AbilityId.RUN_AWAY)
.enemyPassiveAbility(AbilityId.RUN_AWAY)
.startingLevel(100)
.enemyLevel(100)
.moveset([Moves.CEASELESS_EDGE, Moves.SPLASH, Moves.ROAR])
.enemyMoveset(Moves.SPLASH);
vi.spyOn(allMoves[Moves.CEASELESS_EDGE], "accuracy", "get").mockReturnValue(100);
.moveset([MoveId.CEASELESS_EDGE, MoveId.SPLASH, MoveId.ROAR])
.enemyMoveset(MoveId.SPLASH);
vi.spyOn(allMoves[MoveId.CEASELESS_EDGE], "accuracy", "get").mockReturnValue(100);
});
test("move should hit and apply spikes", async () => {

View File

@ -32,8 +32,8 @@ describe("Moves - Clangorous Soul", () => {
.enemySpecies(Species.SNORLAX)
.startingLevel(100)
.enemyLevel(100)
.moveset([Moves.CLANGOROUS_SOUL])
.enemyMoveset(Moves.SPLASH);
.moveset([MoveId.CLANGOROUS_SOUL])
.enemyMoveset(MoveId.SPLASH);
});
//Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Clangorous_Soul_(move)

View File

@ -28,10 +28,10 @@ describe("Moves - Crafty Shield", () => {
game.override
.battleStyle("double")
.moveset([Moves.CRAFTY_SHIELD, Moves.SPLASH, Moves.SWORDS_DANCE])
.moveset([MoveId.CRAFTY_SHIELD, MoveId.SPLASH, MoveId.SWORDS_DANCE])
.enemySpecies(Species.SNORLAX)
.enemyMoveset([Moves.GROWL])
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset([MoveId.GROWL])
.enemyAbility(AbilityId.INSOMNIA)
.startingLevel(100)
.enemyLevel(100);
});
@ -71,7 +71,7 @@ describe("Moves - Crafty Shield", () => {
});
test("should protect the user and allies from moves that ignore other protection", async () => {
game.override.enemySpecies(Species.DUSCLOPS).enemyMoveset([Moves.CURSE]);
game.override.enemySpecies(Species.DUSCLOPS).enemyMoveset([MoveId.CURSE]);
await game.classicMode.startBattle([SpeciesId.CHARIZARD, SpeciesId.BLASTOISE]);

View File

@ -1,6 +1,5 @@
import { Stat } from "#enums/stat";
import { PokemonType } from "#enums/pokemon-type";
import { SpeciesId } from "#enums/species-id";
import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { AbilityId } from "#enums/ability-id";
@ -34,14 +33,14 @@ describe("Moves - Dragon Rage", () => {
game.override
.battleStyle("single")
.starterSpecies(Species.SNORLAX)
.moveset([Moves.DRAGON_RAGE])
.ability(Abilities.BALL_FETCH)
.passiveAbility(Abilities.BALL_FETCH)
.moveset([MoveId.DRAGON_RAGE])
.ability(AbilityId.BALL_FETCH)
.passiveAbility(AbilityId.BALL_FETCH)
.startingLevel(100)
.enemySpecies(Species.SNORLAX)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH)
.enemyPassiveAbility(Abilities.BALL_FETCH)
.enemyMoveset(MoveId.SPLASH)
.enemyAbility(AbilityId.BALL_FETCH)
.enemyPassiveAbility(AbilityId.BALL_FETCH)
.enemyLevel(100);
await game.classicMode.startBattle();
@ -100,7 +99,7 @@ describe("Moves - Dragon Rage", () => {
});
it("ignores damage modification from abilities, for example ICE_SCALES", async () => {
game.override.disableCrits().enemyAbility(Abilities.ICE_SCALES);
game.override.disableCrits().enemyAbility(AbilityId.ICE_SCALES);
game.move.select(MoveId.DRAGON_RAGE);
await game.phaseInterceptor.to(TurnEndPhase);

View File

@ -38,7 +38,7 @@ describe("Moves - Dynamax Cannon", () => {
.enemySpecies(SpeciesId.MAGIKARP)
.enemyMoveset(MoveId.SPLASH);
vi.spyOn(allMoves[Moves.DYNAMAX_CANNON], "calculateBattlePower");
vi.spyOn(allMoves[MoveId.DYNAMAX_CANNON], "calculateBattlePower");
});
it("should return 100 power against an enemy below level cap", async () => {

View File

@ -33,8 +33,8 @@ describe("Moves - FILLET AWAY", () => {
.enemySpecies(Species.SNORLAX)
.startingLevel(100)
.enemyLevel(100)
.moveset([Moves.FILLET_AWAY])
.enemyMoveset(Moves.SPLASH);
.moveset([MoveId.FILLET_AWAY])
.enemyMoveset(MoveId.SPLASH);
});
//Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/fillet_away_(move)

View File

@ -1,5 +1,4 @@
import { Stat } from "#enums/stat";
import { SpeciesId } from "#enums/species-id";
import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
import { DamageAnimPhase } from "#app/phases/damage-anim-phase";
import { TurnEndPhase } from "#app/phases/turn-end-phase";
@ -32,12 +31,12 @@ describe("Moves - Fissure", () => {
.battleStyle("single")
.disableCrits()
.starterSpecies(Species.SNORLAX)
.moveset([Moves.FISSURE])
.passiveAbility(Abilities.BALL_FETCH)
.moveset([MoveId.FISSURE])
.passiveAbility(AbilityId.BALL_FETCH)
.startingLevel(100)
.enemySpecies(Species.SNORLAX)
.enemyMoveset(Moves.SPLASH)
.enemyPassiveAbility(Abilities.BALL_FETCH)
.enemyMoveset(MoveId.SPLASH)
.enemyPassiveAbility(AbilityId.BALL_FETCH)
.enemyLevel(100);
await game.classicMode.startBattle();
@ -47,7 +46,7 @@ describe("Moves - Fissure", () => {
});
it("ignores damage modification from abilities, for example FUR_COAT", async () => {
game.override.ability(Abilities.NO_GUARD).enemyAbility(Abilities.FUR_COAT);
game.override.ability(AbilityId.NO_GUARD).enemyAbility(AbilityId.FUR_COAT);
game.move.select(MoveId.FISSURE);
await game.phaseInterceptor.to(DamageAnimPhase, true);

View File

@ -37,13 +37,13 @@ describe("Moves - Flame Burst", () => {
game = new GameManager(phaserGame);
game.override
.battleStyle("double")
.moveset([Moves.FLAME_BURST, Moves.SPLASH])
.moveset([MoveId.FLAME_BURST, MoveId.SPLASH])
.disableCrits()
.ability(Abilities.UNNERVE)
.ability(AbilityId.UNNERVE)
.startingWave(4)
.enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset([Moves.SPLASH]);
.enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset([MoveId.SPLASH]);
});
it("inflicts damage to the target's ally equal to 1/16 of its max HP", async () => {

View File

@ -27,11 +27,11 @@ describe("Moves - Flower Shield", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override
.ability(Abilities.NONE)
.enemyAbility(Abilities.NONE)
.ability(AbilityId.NONE)
.enemyAbility(AbilityId.NONE)
.battleStyle("single")
.moveset([Moves.FLOWER_SHIELD, Moves.SPLASH])
.enemyMoveset(Moves.SPLASH);
.moveset([MoveId.FLOWER_SHIELD, MoveId.SPLASH])
.enemyMoveset(MoveId.SPLASH);
});
it("raises DEF stat stage by 1 for all Grass-type Pokemon on the field by one stage - single battle", async () => {

View File

@ -27,12 +27,12 @@ describe("Moves - Follow Me", () => {
game.override
.battleStyle("double")
.starterSpecies(Species.AMOONGUSS)
.ability(Abilities.BALL_FETCH)
.ability(AbilityId.BALL_FETCH)
.enemySpecies(Species.SNORLAX)
.startingLevel(100)
.enemyLevel(100)
.moveset([Moves.FOLLOW_ME, Moves.RAGE_POWDER, Moves.SPOTLIGHT, Moves.QUICK_ATTACK])
.enemyMoveset([Moves.TACKLE, Moves.FOLLOW_ME, Moves.SPLASH]);
.moveset([MoveId.FOLLOW_ME, MoveId.RAGE_POWDER, MoveId.SPOTLIGHT, MoveId.QUICK_ATTACK])
.enemyMoveset([MoveId.TACKLE, MoveId.FOLLOW_ME, MoveId.SPLASH]);
});
test("move should redirect enemy attacks to the user", async () => {
@ -74,7 +74,7 @@ describe("Moves - Follow Me", () => {
});
test("move effect should be bypassed by Stalwart", async () => {
game.override.ability(Abilities.STALWART).moveset([Moves.QUICK_ATTACK]);
game.override.ability(AbilityId.STALWART).moveset([MoveId.QUICK_ATTACK]);
await game.classicMode.startBattle([SpeciesId.AMOONGUSS, SpeciesId.CHARIZARD]);

View File

@ -26,11 +26,11 @@ describe("Moves - Gastro Acid", () => {
.battleStyle("double")
.startingLevel(1)
.enemyLevel(100)
.ability(Abilities.NONE)
.moveset([Moves.GASTRO_ACID, Moves.WATER_GUN, Moves.SPLASH, Moves.CORE_ENFORCER])
.ability(AbilityId.NONE)
.moveset([MoveId.GASTRO_ACID, MoveId.WATER_GUN, MoveId.SPLASH, MoveId.CORE_ENFORCER])
.enemySpecies(Species.BIDOOF)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.WATER_ABSORB);
.enemyMoveset(MoveId.SPLASH)
.enemyAbility(AbilityId.WATER_ABSORB);
});
it("suppresses effect of ability", async () => {

View File

@ -1,7 +1,6 @@
import { allMoves } from "#app/data/data-lists";
import { AbilityId } from "#enums/ability-id";
import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -26,10 +25,10 @@ describe("Moves - Glaive Rush", () => {
.battleStyle("single")
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset([Moves.GLAIVE_RUSH])
.ability(Abilities.BALL_FETCH)
.moveset([Moves.SHADOW_SNEAK, Moves.AVALANCHE, Moves.SPLASH, Moves.GLAIVE_RUSH]);
.enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset([MoveId.GLAIVE_RUSH])
.ability(AbilityId.BALL_FETCH)
.moveset([MoveId.SHADOW_SNEAK, MoveId.AVALANCHE, MoveId.SPLASH, MoveId.GLAIVE_RUSH]);
});
it("takes double damage from attacks", async () => {
@ -60,7 +59,7 @@ describe("Moves - Glaive Rush", () => {
});
it("interacts properly with multi-lens", async () => {
game.override.startingHeldItems([{ name: "MULTI_LENS", count: 2 }]).enemyMoveset([Moves.AVALANCHE]);
game.override.startingHeldItems([{ name: "MULTI_LENS", count: 2 }]).enemyMoveset([MoveId.AVALANCHE]);
await game.classicMode.startBattle([Species.KLINK]);
const player = game.scene.getPlayerPokemon()!;
@ -80,7 +79,7 @@ describe("Moves - Glaive Rush", () => {
});
it("secondary effects only last until next move", async () => {
game.override.enemyMoveset([Moves.SHADOW_SNEAK]);
game.override.enemyMoveset([MoveId.SHADOW_SNEAK]);
await game.classicMode.startBattle([Species.KLINK]);
const player = game.scene.getPlayerPokemon()!;
@ -105,7 +104,7 @@ describe("Moves - Glaive Rush", () => {
});
it("secondary effects are removed upon switching", async () => {
game.override.enemyMoveset([Moves.SHADOW_SNEAK]);
game.override.enemyMoveset([MoveId.SHADOW_SNEAK]);
await game.classicMode.startBattle([Species.KLINK, Species.FEEBAS]);
const player = game.scene.getPlayerPokemon()!;
@ -127,8 +126,8 @@ describe("Moves - Glaive Rush", () => {
it("secondary effects don't activate if move fails", async () => {
game.override
.moveset([Moves.SHADOW_SNEAK, Moves.PROTECT, Moves.SPLASH, Moves.GLAIVE_RUSH])
.enemyMoveset([Moves.GLAIVE_RUSH, Moves.SPLASH]);
.moveset([MoveId.SHADOW_SNEAK, MoveId.PROTECT, MoveId.SPLASH, MoveId.GLAIVE_RUSH])
.enemyMoveset([MoveId.GLAIVE_RUSH, MoveId.SPLASH]);
await game.classicMode.startBattle([Species.KLINK]);
const player = game.scene.getPlayerPokemon()!;
@ -137,18 +136,18 @@ describe("Moves - Glaive Rush", () => {
enemy.hp = 1000;
player.hp = 1000;
game.move.select(Moves.PROTECT);
await game.move.forceEnemyMove(Moves.GLAIVE_RUSH);
game.move.select(MoveId.PROTECT);
await game.move.forceEnemyMove(MoveId.GLAIVE_RUSH);
await game.phaseInterceptor.to("TurnEndPhase");
game.move.select(Moves.SHADOW_SNEAK);
await game.move.forceEnemyMove(Moves.GLAIVE_RUSH);
game.move.select(MoveId.SHADOW_SNEAK);
await game.move.forceEnemyMove(MoveId.GLAIVE_RUSH);
await game.phaseInterceptor.to("TurnEndPhase");
const damagedHP1 = 1000 - enemy.hp;
enemy.hp = 1000;
game.move.select(Moves.SHADOW_SNEAK);
await game.move.forceEnemyMove(Moves.SPLASH);
game.move.select(MoveId.SHADOW_SNEAK);
await game.move.forceEnemyMove(MoveId.SPLASH);
await game.phaseInterceptor.to("TurnEndPhase");
const damagedHP2 = 1000 - enemy.hp;

View File

@ -26,10 +26,10 @@ describe("Moves - Growth", () => {
game = new GameManager(phaserGame);
game.override
.battleStyle("single")
.enemyAbility(Abilities.MOXIE)
.ability(Abilities.INSOMNIA)
.moveset([Moves.GROWTH])
.enemyMoveset(Moves.SPLASH);
.enemyAbility(AbilityId.MOXIE)
.ability(AbilityId.INSOMNIA)
.moveset([MoveId.GROWTH])
.enemyMoveset(MoveId.SPLASH);
});
it("should raise SPATK stat stage by 1", async () => {

View File

@ -29,11 +29,11 @@ describe("Moves - Hard Press", () => {
game = new GameManager(phaserGame);
game.override
.battleStyle("single")
.ability(Abilities.BALL_FETCH)
.ability(AbilityId.BALL_FETCH)
.enemySpecies(Species.MUNCHLAX)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(Moves.SPLASH)
.moveset([Moves.HARD_PRESS]);
.enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset(MoveId.SPLASH)
.moveset([MoveId.HARD_PRESS]);
vi.spyOn(moveToCheck, "calculateBattlePower");
});

View File

@ -27,11 +27,11 @@ describe("Moves - Haze", () => {
.battleStyle("single")
.enemySpecies(Species.RATTATA)
.enemyLevel(100)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(MoveId.SPLASH)
.enemyAbility(AbilityId.BALL_FETCH)
.startingLevel(100)
.moveset([Moves.HAZE, Moves.SWORDS_DANCE, Moves.CHARM, Moves.SPLASH])
.ability(Abilities.BALL_FETCH);
.moveset([MoveId.HAZE, MoveId.SWORDS_DANCE, MoveId.CHARM, MoveId.SPLASH])
.ability(AbilityId.BALL_FETCH);
});
it("should reset all stat changes of all Pokemon on field", async () => {

View File

@ -28,13 +28,13 @@ describe("Moves - Hyper Beam", () => {
game.override
.battleStyle("single")
.ability(Abilities.BALL_FETCH)
.ability(AbilityId.BALL_FETCH)
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset([Moves.SPLASH])
.enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset([MoveId.SPLASH])
.enemyLevel(100)
.moveset([Moves.HYPER_BEAM, Moves.TACKLE]);
vi.spyOn(allMoves[Moves.HYPER_BEAM], "accuracy", "get").mockReturnValue(100);
.moveset([MoveId.HYPER_BEAM, MoveId.TACKLE]);
vi.spyOn(allMoves[MoveId.HYPER_BEAM], "accuracy", "get").mockReturnValue(100);
});
it("should force the user to recharge on the next turn (and only that turn)", async () => {

View File

@ -25,10 +25,10 @@ describe("Moves - Lunar Blessing", () => {
game.override
.battleStyle("double")
.enemySpecies(Species.SHUCKLE)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.BALL_FETCH)
.moveset([Moves.LUNAR_BLESSING, Moves.SPLASH])
.ability(Abilities.BALL_FETCH);
.enemyMoveset(MoveId.SPLASH)
.enemyAbility(AbilityId.BALL_FETCH)
.moveset([MoveId.LUNAR_BLESSING, MoveId.SPLASH])
.ability(AbilityId.BALL_FETCH);
});
it("should restore 25% HP of the user and its ally", async () => {

View File

@ -56,7 +56,7 @@ describe("Moves - Magic Coat", () => {
});
it("should not reflect moves used on the next turn", async () => {
game.override.moveset([Moves.GROWL, Moves.SPLASH]).enemyMoveset([Moves.MAGIC_COAT, Moves.SPLASH]);
game.override.moveset([MoveId.GROWL, MoveId.SPLASH]).enemyMoveset([MoveId.MAGIC_COAT, MoveId.SPLASH]);
await game.classicMode.startBattle([Species.MAGIKARP]);
// turn 1
@ -81,7 +81,7 @@ describe("Moves - Magic Coat", () => {
});
it("should individually bounce back multi-target moves when used by both targets in doubles", async () => {
game.override.battleStyle("double").moveset([Moves.GROWL, Moves.SPLASH]);
game.override.battleStyle("double").moveset([MoveId.GROWL, MoveId.SPLASH]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
game.move.select(MoveId.GROWL, 0);
@ -95,8 +95,8 @@ describe("Moves - Magic Coat", () => {
it("should bounce back a spread status move against both pokemon", async () => {
game.override
.battleStyle("double")
.moveset([Moves.GROWL, Moves.SPLASH])
.enemyMoveset([Moves.SPLASH, Moves.MAGIC_COAT]);
.moveset([MoveId.GROWL, MoveId.SPLASH])
.enemyMoveset([MoveId.SPLASH, MoveId.MAGIC_COAT]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
game.move.select(MoveId.GROWL, 0);
@ -122,9 +122,9 @@ describe("Moves - Magic Coat", () => {
it("should not bounce back a move that was just bounced", async () => {
game.override
.battleStyle("double")
.ability(Abilities.MAGIC_BOUNCE)
.moveset([Moves.GROWL, Moves.MAGIC_COAT])
.enemyMoveset([Moves.SPLASH, Moves.MAGIC_COAT]);
.ability(AbilityId.MAGIC_BOUNCE)
.moveset([MoveId.GROWL, MoveId.MAGIC_COAT])
.enemyMoveset([MoveId.SPLASH, MoveId.MAGIC_COAT]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
game.move.select(MoveId.MAGIC_COAT, 0);
@ -147,7 +147,7 @@ describe("Moves - Magic Coat", () => {
});
it("should still bounce back a move from a mold breaker user", async () => {
game.override.ability(Abilities.MOLD_BREAKER).moveset([Moves.GROWL]);
game.override.ability(AbilityId.MOLD_BREAKER).moveset([MoveId.GROWL]);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(MoveId.GROWL);
@ -158,7 +158,7 @@ describe("Moves - Magic Coat", () => {
});
it("should only bounce spikes back once when both targets use magic coat in doubles", async () => {
game.override.battleStyle("double").moveset([Moves.SPIKES]);
game.override.battleStyle("double").moveset([MoveId.SPIKES]);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(MoveId.SPIKES);
@ -169,7 +169,7 @@ describe("Moves - Magic Coat", () => {
});
it("should not bounce back curse", async () => {
game.override.moveset([Moves.CURSE]);
game.override.moveset([MoveId.CURSE]);
await game.classicMode.startBattle([Species.GASTLY]);
game.move.select(MoveId.CURSE);
@ -181,9 +181,9 @@ describe("Moves - Magic Coat", () => {
// TODO: encore is failing if the last move was virtual.
it.todo("should not cause the bounced move to count for encore", async () => {
game.override
.moveset([Moves.GROWL, Moves.ENCORE])
.enemyMoveset([Moves.MAGIC_COAT, Moves.TACKLE])
.enemyAbility(Abilities.MAGIC_BOUNCE);
.moveset([MoveId.GROWL, MoveId.ENCORE])
.enemyMoveset([MoveId.MAGIC_COAT, MoveId.TACKLE])
.enemyAbility(AbilityId.MAGIC_BOUNCE);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
const enemyPokemon = game.scene.getEnemyPokemon()!;
@ -204,7 +204,7 @@ describe("Moves - Magic Coat", () => {
// TODO: stomping tantrum should consider moves that were bounced.
it.todo("should cause stomping tantrum to double in power when the last move was bounced", async () => {
game.override.battleStyle("single").moveset([Moves.STOMPING_TANTRUM, Moves.CHARM]);
game.override.battleStyle("single").moveset([MoveId.STOMPING_TANTRUM, MoveId.CHARM]);
await game.classicMode.startBattle([Species.MAGIKARP]);
const stomping_tantrum = allMoves[MoveId.STOMPING_TANTRUM];
@ -245,8 +245,8 @@ describe("Moves - Magic Coat", () => {
);
it("should respect immunities when bouncing a move", async () => {
vi.spyOn(allMoves[Moves.THUNDER_WAVE], "accuracy", "get").mockReturnValue(100);
game.override.moveset([Moves.THUNDER_WAVE, Moves.GROWL]).ability(Abilities.SOUNDPROOF);
vi.spyOn(allMoves[MoveId.THUNDER_WAVE], "accuracy", "get").mockReturnValue(100);
game.override.moveset([MoveId.THUNDER_WAVE, MoveId.GROWL]).ability(AbilityId.SOUNDPROOF);
await game.classicMode.startBattle([Species.PHANPY]);
// Turn 1 - thunder wave immunity test

View File

@ -26,10 +26,10 @@ describe("Moves - Make It Rain", () => {
game = new GameManager(phaserGame);
game.override
.battleStyle("double")
.moveset([Moves.MAKE_IT_RAIN, Moves.SPLASH])
.moveset([MoveId.MAKE_IT_RAIN, MoveId.SPLASH])
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(AbilityId.INSOMNIA)
.enemyMoveset(MoveId.SPLASH)
.startingLevel(100)
.enemyLevel(100);
});

View File

@ -28,10 +28,10 @@ describe("Moves - Mat Block", () => {
game.override
.battleStyle("double")
.moveset([Moves.MAT_BLOCK, Moves.SPLASH])
.moveset([MoveId.MAT_BLOCK, MoveId.SPLASH])
.enemySpecies(Species.SNORLAX)
.enemyMoveset([Moves.TACKLE])
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset([MoveId.TACKLE])
.enemyAbility(AbilityId.INSOMNIA)
.startingLevel(100)
.enemyLevel(100);
});

View File

@ -28,8 +28,8 @@ describe("Moves - Parting Shot", () => {
game = new GameManager(phaserGame);
game.override
.battleStyle("single")
.moveset([Moves.PARTING_SHOT, Moves.SPLASH])
.enemyMoveset(Moves.SPLASH)
.moveset([MoveId.PARTING_SHOT, MoveId.SPLASH])
.enemyMoveset(MoveId.SPLASH)
.startingLevel(5)
.enemyLevel(5);
});

View File

@ -29,7 +29,7 @@ describe("Moves - Powder", () => {
game = new GameManager(phaserGame);
game.override
.battleStyle("single")
.enemySpecies(Species.SNORLAX)
.enemySpecies(SpeciesId.SNORLAX)
.enemyLevel(100)
.enemyMoveset(MoveId.EMBER)
.enemyAbility(AbilityId.INSOMNIA)

View File

@ -29,10 +29,10 @@ describe("Moves - Protect", () => {
game.override
.battleStyle("single")
.moveset([Moves.PROTECT])
.moveset([MoveId.PROTECT])
.enemySpecies(Species.SNORLAX)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset([Moves.TACKLE])
.enemyAbility(AbilityId.INSOMNIA)
.enemyMoveset([MoveId.TACKLE])
.startingLevel(100)
.enemyLevel(100);
});

View File

@ -3,7 +3,6 @@ import { Status } from "#app/data/status-effect";
import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
import { MoveEndPhase } from "#app/phases/move-end-phase";
import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import { StatusEffect } from "#enums/status-effect";
import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser";
@ -29,10 +28,10 @@ describe("Moves - Purify", () => {
.battleStyle("single")
.starterSpecies(Species.PYUKUMUKU)
.startingLevel(10)
.moveset([Moves.PURIFY, Moves.SIZZLY_SLIDE])
.moveset([MoveId.PURIFY, MoveId.SIZZLY_SLIDE])
.enemySpecies(Species.MAGIKARP)
.enemyLevel(10)
.enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]);
.enemyMoveset([MoveId.SPLASH, MoveId.NONE, MoveId.NONE, MoveId.NONE]);
});
test("Purify heals opponent status effect and restores user hp", async () => {

View File

@ -27,10 +27,10 @@ describe("Moves - Quick Guard", () => {
game.override
.battleStyle("double")
.moveset([Moves.QUICK_GUARD, Moves.SPLASH, Moves.FOLLOW_ME])
.moveset([MoveId.QUICK_GUARD, MoveId.SPLASH, MoveId.FOLLOW_ME])
.enemySpecies(Species.SNORLAX)
.enemyMoveset([Moves.QUICK_ATTACK])
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset([MoveId.QUICK_ATTACK])
.enemyAbility(AbilityId.INSOMNIA)
.startingLevel(100)
.enemyLevel(100);
});
@ -49,7 +49,7 @@ describe("Moves - Quick Guard", () => {
});
test("should protect the user and allies from Prankster-boosted moves", async () => {
game.override.enemyAbility(Abilities.PRANKSTER).enemyMoveset([Moves.GROWL]);
game.override.enemyAbility(AbilityId.PRANKSTER).enemyMoveset([MoveId.GROWL]);
await game.classicMode.startBattle([SpeciesId.CHARIZARD, SpeciesId.BLASTOISE]);
@ -81,7 +81,7 @@ describe("Moves - Quick Guard", () => {
});
test("should fail if the user is the last to move in the turn", async () => {
game.override.battleStyle("single").enemyMoveset([Moves.QUICK_GUARD]);
game.override.battleStyle("single").enemyMoveset([MoveId.QUICK_GUARD]);
await game.classicMode.startBattle([SpeciesId.CHARIZARD]);

View File

@ -27,8 +27,8 @@ describe("Moves - Rage Powder", () => {
.enemySpecies(Species.SNORLAX)
.startingLevel(100)
.enemyLevel(100)
.moveset([Moves.FOLLOW_ME, Moves.RAGE_POWDER, Moves.SPOTLIGHT, Moves.QUICK_ATTACK])
.enemyMoveset([Moves.RAGE_POWDER, Moves.TACKLE, Moves.SPLASH]);
.moveset([MoveId.FOLLOW_ME, MoveId.RAGE_POWDER, MoveId.SPOTLIGHT, MoveId.QUICK_ATTACK])
.enemyMoveset([MoveId.RAGE_POWDER, MoveId.TACKLE, MoveId.SPLASH]);
});
test("move effect should be bypassed by Grass type", async () => {

View File

@ -2,7 +2,6 @@ import { allMoves } from "#app/data/data-lists";
import { CommandPhase } from "#app/phases/command-phase";
import { AbilityId } from "#enums/ability-id";
import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
@ -27,17 +26,17 @@ describe("Moves - Rollout", () => {
.disableCrits()
.battleStyle("single")
.starterSpecies(Species.RATTATA)
.ability(Abilities.BALL_FETCH)
.ability(AbilityId.BALL_FETCH)
.enemySpecies(Species.BIDOOF)
.enemyAbility(Abilities.BALL_FETCH)
.enemyAbility(AbilityId.BALL_FETCH)
.startingLevel(100)
.enemyLevel(100)
.enemyMoveset(Moves.SPLASH);
.enemyMoveset(MoveId.SPLASH);
});
it("should double its dmg on sequential uses but reset after 5", async () => {
game.override.moveset([Moves.ROLLOUT]);
vi.spyOn(allMoves[Moves.ROLLOUT], "accuracy", "get").mockReturnValue(100); //always hit
game.override.moveset([MoveId.ROLLOUT]);
vi.spyOn(allMoves[MoveId.ROLLOUT], "accuracy", "get").mockReturnValue(100); //always hit
const variance = 5;
const turns = 6;

View File

@ -30,8 +30,8 @@ describe("Moves - Roost", () => {
.enemySpecies(Species.RELICANTH)
.startingLevel(100)
.enemyLevel(100)
.enemyMoveset(Moves.EARTHQUAKE)
.moveset([Moves.ROOST, Moves.BURN_UP, Moves.DOUBLE_SHOCK]);
.enemyMoveset(MoveId.EARTHQUAKE)
.moveset([MoveId.ROOST, MoveId.BURN_UP, MoveId.DOUBLE_SHOCK]);
});
/**

View File

@ -1,6 +1,5 @@
import { BattlerIndex } from "#app/battle";
import { PostDefendContactApplyStatusEffectAbAttr } from "#app/data/abilities/ability";
import { Abilities } from "#app/enums/abilities";
import { StatusEffect } from "#app/enums/status-effect";
import GameManager from "#test/testUtils/gameManager";
import { MoveId } from "#enums/move-id";
@ -118,16 +117,16 @@ describe("Moves - Safeguard", () => {
const enemyPokemon = game.scene.getEnemyPokemon()!;
enemyPokemon.hp = 1;
game.move.select(Moves.SPLASH);
await game.move.forceEnemyMove(Moves.SAFEGUARD);
game.move.select(MoveId.SPLASH);
await game.move.forceEnemyMove(MoveId.SAFEGUARD);
await game.toNextTurn();
expect(enemyPokemon.status?.effect).toBe(StatusEffect.BURN);
enemyPokemon.resetStatus();
game.move.select(Moves.SPLASH);
await game.move.forceEnemyMove(Moves.REST);
game.move.select(MoveId.SPLASH);
await game.move.forceEnemyMove(MoveId.REST);
await game.toNextTurn();
expect(enemyPokemon.status?.effect).toBe(StatusEffect.SLEEP);
@ -137,19 +136,19 @@ describe("Moves - Safeguard", () => {
await game.classicMode.startBattle();
const player = game.field.getPlayerPokemon();
game.field.mockAbility(player, Abilities.STATIC);
game.field.mockAbility(player, AbilityId.STATIC);
vi.spyOn(
player.getAbility().getAttrs(PostDefendContactApplyStatusEffectAbAttr)[0],
"chance",
"get",
).mockReturnValue(100);
game.move.select(Moves.SPLASH);
await game.move.forceEnemyMove(Moves.SAFEGUARD);
game.move.select(MoveId.SPLASH);
await game.move.forceEnemyMove(MoveId.SAFEGUARD);
await game.toNextTurn();
game.move.select(Moves.SPLASH);
await game.move.forceEnemyMove(Moves.TACKLE);
game.move.select(MoveId.SPLASH);
await game.move.forceEnemyMove(MoveId.TACKLE);
await game.toNextTurn();
const enemyPokemon = game.field.getEnemyPokemon();

View File

@ -80,8 +80,8 @@ describe("Moves - Spikes", () => {
}, 20000);
it("should work when all targets fainted", async () => {
game.override.enemySpecies(Species.DIGLETT).battleStyle("double").startingLevel(50);
await game.classicMode.startBattle([Species.RAYQUAZA, Species.ROWLET]);
game.override.enemySpecies(SpeciesId.DIGLETT).battleStyle("double").startingLevel(50);
await game.classicMode.startBattle([SpeciesId.RAYQUAZA, SpeciesId.ROWLET]);
game.move.select(MoveId.EARTHQUAKE);
game.move.select(MoveId.SPIKES, 1);

View File

@ -35,11 +35,11 @@ describe("Moves - Spit Up", () => {
game.override
.battleStyle("single")
.enemySpecies(Species.RATTATA)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.NONE)
.enemyMoveset(MoveId.SPLASH)
.enemyAbility(AbilityId.NONE)
.enemyLevel(2000)
.moveset(Moves.SPIT_UP)
.ability(Abilities.NONE);
.moveset(MoveId.SPIT_UP)
.ability(AbilityId.NONE);
vi.spyOn(spitUp, "calculateBattlePower");
});

View File

@ -28,8 +28,8 @@ describe("Moves - Spotlight", () => {
.enemySpecies(Species.SNORLAX)
.startingLevel(100)
.enemyLevel(100)
.moveset([Moves.FOLLOW_ME, Moves.RAGE_POWDER, Moves.SPOTLIGHT, Moves.QUICK_ATTACK])
.enemyMoveset([Moves.FOLLOW_ME, Moves.SPLASH]);
.moveset([MoveId.FOLLOW_ME, MoveId.RAGE_POWDER, MoveId.SPOTLIGHT, MoveId.QUICK_ATTACK])
.enemyMoveset([MoveId.FOLLOW_ME, MoveId.SPLASH]);
});
test("move should redirect attacks to the target", async () => {

View File

@ -30,11 +30,11 @@ describe("Moves - Stockpile", () => {
game.override
.battleStyle("single")
.enemySpecies(Species.RATTATA)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.NONE)
.enemyMoveset(MoveId.SPLASH)
.enemyAbility(AbilityId.NONE)
.startingLevel(2000)
.moveset([Moves.STOCKPILE, Moves.SPLASH])
.ability(Abilities.NONE);
.moveset([MoveId.STOCKPILE, MoveId.SPLASH])
.ability(AbilityId.NONE);
});
it("gains a stockpile stack and raises user's DEF and SPDEF stat stages by 1 on each use, fails at max stacks (3)", async () => {

View File

@ -138,7 +138,7 @@ describe("Moves - Substitute", () => {
});
it("should be bypassed by attackers with Infiltrator", async () => {
game.override.enemyMoveset(Moves.TACKLE).enemyAbility(Abilities.INFILTRATOR);
game.override.enemyMoveset(MoveId.TACKLE).enemyAbility(AbilityId.INFILTRATOR);
await game.classicMode.startBattle([SpeciesId.BLASTOISE]);
@ -229,7 +229,7 @@ describe("Moves - Substitute", () => {
});
it("should protect the user from flinching", async () => {
game.override.enemyMoveset(Moves.FAKE_OUT).startingLevel(1); // Ensures the Substitute will break
game.override.enemyMoveset(MoveId.FAKE_OUT).startingLevel(1); // Ensures the Substitute will break
await game.classicMode.startBattle([SpeciesId.BLASTOISE]);
@ -296,8 +296,8 @@ describe("Moves - Substitute", () => {
});
it("should prevent the user's items from being stolen", async () => {
game.override.enemyMoveset(Moves.THIEF).startingHeldItems([{ name: "BERRY", type: BerryType.SITRUS }]);
vi.spyOn(allMoves[Moves.THIEF], "attrs", "get").mockReturnValue([new StealHeldItemChanceAttr(1.0)]); // give Thief 100% steal rate
game.override.enemyMoveset(MoveId.THIEF).startingHeldItems([{ name: "BERRY", type: BerryType.SITRUS }]);
vi.spyOn(allMoves[MoveId.THIEF], "attrs", "get").mockReturnValue([new StealHeldItemChanceAttr(1.0)]); // give Thief 100% steal rate
await game.classicMode.startBattle([SpeciesId.BLASTOISE]);
@ -313,7 +313,7 @@ describe("Moves - Substitute", () => {
});
it("should prevent the user's items from being removed", async () => {
game.override.moveset([Moves.KNOCK_OFF]).enemyHeldItems([{ name: "BERRY", type: BerryType.SITRUS }]);
game.override.moveset([MoveId.KNOCK_OFF]).enemyHeldItems([{ name: "BERRY", type: BerryType.SITRUS }]);
await game.classicMode.startBattle([SpeciesId.BLASTOISE]);
@ -330,7 +330,7 @@ describe("Moves - Substitute", () => {
});
it("move effect should prevent the user's berries from being stolen and eaten", async () => {
game.override.enemyMoveset(Moves.BUG_BITE).startingHeldItems([{ name: "BERRY", type: BerryType.SITRUS }]);
game.override.enemyMoveset(MoveId.BUG_BITE).startingHeldItems([{ name: "BERRY", type: BerryType.SITRUS }]);
await game.classicMode.startBattle([SpeciesId.BLASTOISE]);
@ -407,7 +407,7 @@ describe("Moves - Substitute", () => {
});
it("should prevent the source's Rough Skin from activating when hit", async () => {
game.override.enemyMoveset(Moves.TACKLE).ability(Abilities.ROUGH_SKIN);
game.override.enemyMoveset(MoveId.TACKLE).ability(AbilityId.ROUGH_SKIN);
await game.classicMode.startBattle([SpeciesId.BLASTOISE]);
@ -421,7 +421,7 @@ describe("Moves - Substitute", () => {
});
it("should prevent the source's Focus Punch from failing when hit", async () => {
game.override.enemyMoveset(Moves.TACKLE).moveset([Moves.FOCUS_PUNCH]);
game.override.enemyMoveset(MoveId.TACKLE).moveset([MoveId.FOCUS_PUNCH]);
// Make Focus Punch 40 power to avoid a KO
vi.spyOn(allMoves[MoveId.FOCUS_PUNCH], "calculateBattlePower").mockReturnValue(40);
@ -442,7 +442,7 @@ describe("Moves - Substitute", () => {
});
it("should not allow Shell Trap to activate when attacked", async () => {
game.override.enemyMoveset(Moves.TACKLE).moveset([Moves.SHELL_TRAP]);
game.override.enemyMoveset(MoveId.TACKLE).moveset([MoveId.SHELL_TRAP]);
await game.classicMode.startBattle([SpeciesId.BLASTOISE]);
@ -458,7 +458,7 @@ describe("Moves - Substitute", () => {
});
it("should not allow Beak Blast to burn opponents when hit", async () => {
game.override.enemyMoveset(Moves.TACKLE).moveset([Moves.BEAK_BLAST]);
game.override.enemyMoveset(MoveId.TACKLE).moveset([MoveId.BEAK_BLAST]);
await game.classicMode.startBattle([SpeciesId.BLASTOISE]);
@ -475,7 +475,7 @@ describe("Moves - Substitute", () => {
});
it("should cause incoming attacks to not activate Counter", async () => {
game.override.enemyMoveset(Moves.TACKLE).moveset([Moves.COUNTER]);
game.override.enemyMoveset(MoveId.TACKLE).moveset([MoveId.COUNTER]);
await game.classicMode.startBattle([SpeciesId.BLASTOISE]);

View File

@ -35,7 +35,7 @@ describe("Moves - Tackle", () => {
});
it("TACKLE against ghost", async () => {
const moveToUse = Moves.TACKLE;
const moveToUse = MoveId.TACKLE;
game.override.enemySpecies(Species.GENGAR);
await game.classicMode.startBattle([Species.MIGHTYENA]);

View File

@ -24,15 +24,15 @@ describe("Moves - Tail whip", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
const moveToUse = Moves.TAIL_WHIP;
const moveToUse = MoveId.TAIL_WHIP;
game.override
.battleStyle("single")
.enemySpecies(Species.RATTATA)
.enemyAbility(Abilities.INSOMNIA)
.ability(Abilities.INSOMNIA)
.enemyAbility(AbilityId.INSOMNIA)
.ability(AbilityId.INSOMNIA)
.startingLevel(2000)
.moveset([moveToUse])
.enemyMoveset(Moves.SPLASH);
.enemyMoveset(MoveId.SPLASH);
});
it("should lower DEF stat stage by 1", async () => {

View File

@ -29,8 +29,8 @@ describe("Moves - Thousand Arrows", () => {
.enemySpecies(Species.TOGETIC)
.startingLevel(100)
.enemyLevel(100)
.moveset([Moves.THOUSAND_ARROWS])
.enemyMoveset(Moves.SPLASH);
.moveset([MoveId.THOUSAND_ARROWS])
.enemyMoveset(MoveId.SPLASH);
});
it("move should hit and ground Flying-type targets", async () => {
@ -51,7 +51,7 @@ describe("Moves - Thousand Arrows", () => {
});
it("move should hit and ground targets with Levitate", async () => {
game.override.enemySpecies(Species.SNORLAX).enemyAbility(Abilities.LEVITATE);
game.override.enemySpecies(Species.SNORLAX).enemyAbility(AbilityId.LEVITATE);
await game.classicMode.startBattle([SpeciesId.ILLUMISE]);

View File

@ -4,7 +4,6 @@ import { MoveEndPhase } from "#app/phases/move-end-phase";
import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { AbilityId } from "#enums/ability-id";
import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -29,11 +28,11 @@ describe("Moves - Tidy Up", () => {
game.override
.battleStyle("single")
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(Moves.SPLASH)
.enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset(MoveId.SPLASH)
.starterSpecies(Species.FEEBAS)
.ability(Abilities.BALL_FETCH)
.moveset([Moves.TIDY_UP])
.ability(AbilityId.BALL_FETCH)
.moveset([MoveId.TIDY_UP])
.startingLevel(50);
});

View File

@ -75,7 +75,7 @@ describe("Moves - Toxic", () => {
});
it("moves other than Toxic should not hit semi-invulnerable targets even if user is Poison-type", async () => {
game.override.moveset(Moves.SWIFT).enemyMoveset(Moves.FLY);
game.override.moveset(MoveId.SWIFT).enemyMoveset(MoveId.FLY);
await game.classicMode.startBattle([Species.TOXAPEX]);
game.move.select(MoveId.SWIFT);

View File

@ -154,7 +154,7 @@ describe("Moves - Transform", () => {
});
it("should stay transformed with the correct form after reload", async () => {
game.override.enemyMoveset([]).moveset([]).enemySpecies(Species.DARMANITAN);
game.override.enemyMoveset([]).moveset([]).enemySpecies(SpeciesId.DARMANITAN);
await game.classicMode.startBattle([SpeciesId.DITTO]);

View File

@ -27,10 +27,10 @@ describe("Moves - Wide Guard", () => {
game.override
.battleStyle("double")
.moveset([Moves.WIDE_GUARD, Moves.SPLASH, Moves.SURF])
.moveset([MoveId.WIDE_GUARD, MoveId.SPLASH, MoveId.SURF])
.enemySpecies(Species.SNORLAX)
.enemyMoveset(Moves.SWIFT)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset(MoveId.SWIFT)
.enemyAbility(AbilityId.INSOMNIA)
.startingLevel(100)
.enemyLevel(100);
});

View File

@ -138,7 +138,7 @@ describe("Absolute Avarice - Mystery Encounter", () => {
expect(enemyField.length).toBe(1);
expect(enemyField[0].species.speciesId).toBe(SpeciesId.GREEDENT);
const moveset = enemyField[0].moveset.map(m => m.moveId);
expect(moveset).toEqual([Moves.THRASH, Moves.CRUNCH, Moves.BODY_PRESS, Moves.SLACK_OFF]);
expect(moveset).toEqual([MoveId.THRASH, MoveId.CRUNCH, MoveId.BODY_PRESS, MoveId.SLACK_OFF]);
const movePhases = phaseSpy.mock.calls.filter(p => p[0] instanceof MovePhase).map(p => p[0]);
expect(movePhases.length).toBe(1);

View File

@ -116,25 +116,31 @@ const POOL_3_POKEMON: { species: SpeciesId; formIndex?: number }[] = [
const POOL_4_POKEMON = [SpeciesId.GENESECT, SpeciesId.SLITHER_WING, SpeciesId.BUZZWOLE, SpeciesId.PHEROMOSA];
const PHYSICAL_TUTOR_MOVES = [Moves.MEGAHORN, Moves.ATTACK_ORDER, Moves.BUG_BITE, Moves.FIRST_IMPRESSION, Moves.LUNGE];
const PHYSICAL_TUTOR_MOVES = [
MoveId.MEGAHORN,
MoveId.ATTACK_ORDER,
MoveId.BUG_BITE,
MoveId.FIRST_IMPRESSION,
MoveId.LUNGE,
];
const SPECIAL_TUTOR_MOVES = [
Moves.SILVER_WIND,
Moves.SIGNAL_BEAM,
Moves.BUG_BUZZ,
Moves.POLLEN_PUFF,
Moves.STRUGGLE_BUG,
MoveId.SILVER_WIND,
MoveId.SIGNAL_BEAM,
MoveId.BUG_BUZZ,
MoveId.POLLEN_PUFF,
MoveId.STRUGGLE_BUG,
];
const STATUS_TUTOR_MOVES = [
Moves.STRING_SHOT,
Moves.DEFEND_ORDER,
Moves.RAGE_POWDER,
Moves.STICKY_WEB,
Moves.SILK_TRAP,
MoveId.STRING_SHOT,
MoveId.DEFEND_ORDER,
MoveId.RAGE_POWDER,
MoveId.STICKY_WEB,
MoveId.SILK_TRAP,
];
const MISC_TUTOR_MOVES = [Moves.LEECH_LIFE, Moves.U_TURN, Moves.HEAL_ORDER, Moves.QUIVER_DANCE, Moves.INFESTATION];
const MISC_TUTOR_MOVES = [MoveId.LEECH_LIFE, MoveId.U_TURN, MoveId.HEAL_ORDER, MoveId.QUIVER_DANCE, MoveId.INFESTATION];
describe("Bug-Type Superfan - Mystery Encounter", () => {
let phaserGame: Phaser.Game;

View File

@ -38,7 +38,7 @@ describe("Field Trip - Mystery Encounter", () => {
.startingWave(defaultWave)
.startingBiome(defaultBiome)
.disableTrainerWaves()
.moveset([Moves.TACKLE, Moves.UPROAR, Moves.SWORDS_DANCE]);
.moveset([MoveId.TACKLE, MoveId.UPROAR, MoveId.SWORDS_DANCE]);
vi.spyOn(MysteryEncounters, "mysteryEncountersByBiome", "get").mockReturnValue(
new Map<BiomeId, MysteryEncounterType[]>([[BiomeId.CAVE, [MysteryEncounterType.FIELD_TRIP]]]),

View File

@ -68,7 +68,7 @@ describe("Lost at Sea - Mystery Encounter", () => {
});
it("should not spawn outside of sea biome", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON).startingBiome(Biome.MOUNTAIN);
game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON).startingBiome(BiomeId.MOUNTAIN);
await game.runToMysteryEncounter();
expect(game.scene.currentBattle.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.LOST_AT_SEA);

View File

@ -502,13 +502,13 @@ describe("UI - Pokedex", () => {
// Nab the pokemon that is selected for comparison later.
// @ts-expect-error - `lastSpecies` is private
const selectedPokemon = pokedexHandler.lastSpecies.speciesId;
const selectedPokemon = pokedexHandler.lastSpeciesId.speciesId;
for (let i = 0; i < 11; i++) {
pokedexHandler.processInput(Button.DOWN);
}
// @ts-expect-error `lastSpecies` is private
expect(selectedPokemon).toEqual(pokedexHandler.lastSpecies.speciesId);
expect(selectedPokemon).toEqual(pokedexHandler.lastSpeciesId.speciesId);
},
);

View File

@ -579,7 +579,7 @@ describe("UI - Starter select", () => {
});
});
expect(starterSelectUiHandler?.starterSpecies.length).toBe(1);
expect(starterSelectUiHandler?.starterSpeciesId.length).toBe(1);
expect(starterSelectUiHandler?.starterSpecies[0].generation).toBe(1);
expect(starterSelectUiHandler?.starterSpecies[0].speciesId).toBe(32);
expect(starterSelectUiHandler?.cursorObj.x).toBe(53);

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