Fixed things2.0

This commit is contained in:
Bertie690 2025-06-05 08:20:18 -04:00
parent ef08575b4c
commit 2eb5a03eda
71 changed files with 159 additions and 159 deletions

View File

@ -28,7 +28,7 @@ describe("Abilities - Battery", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("double") .battleStyle("double")
.enemySpecies(Species.SHUCKLE) .enemySpecies(SpeciesId.SHUCKLE)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.moveset([MoveId.TACKLE, MoveId.BREAKING_SWIPE, MoveId.SPLASH, MoveId.DAZZLING_GLEAM]) .moveset([MoveId.TACKLE, MoveId.BREAKING_SWIPE, MoveId.SPLASH, MoveId.DAZZLING_GLEAM])
.enemyMoveset(MoveId.SPLASH); .enemyMoveset(MoveId.SPLASH);

View File

@ -130,7 +130,7 @@ describe("Abilities - Disguise", () => {
it("persists form change when wave changes with no arena reset", async () => { it("persists form change when wave changes with no arena reset", async () => {
game.override.starterSpecies(0).starterForms({ game.override.starterSpecies(0).starterForms({
[Species.MIMIKYU]: bustedForm, [SpeciesId.MIMIKYU]: bustedForm,
}); });
await game.classicMode.startBattle([SpeciesId.FURRET, SpeciesId.MIMIKYU]); await game.classicMode.startBattle([SpeciesId.FURRET, SpeciesId.MIMIKYU]);
@ -147,9 +147,9 @@ describe("Abilities - Disguise", () => {
it("reverts to Disguised form on arena reset", async () => { it("reverts to Disguised form on arena reset", async () => {
game.override game.override
.startingWave(4) .startingWave(4)
.starterSpecies(Species.MIMIKYU) .starterSpecies(SpeciesId.MIMIKYU)
.starterForms({ .starterForms({
[Species.MIMIKYU]: bustedForm, [SpeciesId.MIMIKYU]: bustedForm,
}); });
await game.classicMode.startBattle(); await game.classicMode.startBattle();
@ -170,7 +170,7 @@ describe("Abilities - Disguise", () => {
.startingWave(10) .startingWave(10)
.starterSpecies(0) .starterSpecies(0)
.starterForms({ .starterForms({
[Species.MIMIKYU]: bustedForm, [SpeciesId.MIMIKYU]: bustedForm,
}); });
await game.classicMode.startBattle([SpeciesId.MIMIKYU, SpeciesId.FURRET]); await game.classicMode.startBattle([SpeciesId.MIMIKYU, SpeciesId.FURRET]);

View File

@ -74,7 +74,7 @@ describe("Abilities - Flash Fire", () => {
it("activated after being frozen", async () => { it("activated after being frozen", async () => {
game.override.enemyMoveset([MoveId.EMBER]).moveset(MoveId.SPLASH).statusEffect(StatusEffect.FREEZE); game.override.enemyMoveset([MoveId.EMBER]).moveset(MoveId.SPLASH).statusEffect(StatusEffect.FREEZE);
await game.classicMode.startBattle([Species.BLISSEY]); await game.classicMode.startBattle([SpeciesId.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!; const blissey = game.scene.getPlayerPokemon()!;
@ -106,7 +106,7 @@ describe("Abilities - Flash Fire", () => {
.moveset([MoveId.EMBER, MoveId.SPLASH]) .moveset([MoveId.EMBER, MoveId.SPLASH])
.enemyAbility(AbilityId.FLASH_FIRE) .enemyAbility(AbilityId.FLASH_FIRE)
.ability(AbilityId.NONE); .ability(AbilityId.NONE);
await game.classicMode.startBattle([Species.BLISSEY]); await game.classicMode.startBattle([SpeciesId.BLISSEY]);
const blissey = game.scene.getPlayerPokemon()!; const blissey = game.scene.getPlayerPokemon()!;
const initialHP = 1000; const initialHP = 1000;
blissey.hp = initialHP; blissey.hp = initialHP;
@ -134,8 +134,8 @@ describe("Abilities - Flash Fire", () => {
.enemyMoveset(MoveId.EMBER) .enemyMoveset(MoveId.EMBER)
.enemyAbility(AbilityId.NONE) .enemyAbility(AbilityId.NONE)
.ability(AbilityId.FLASH_FIRE) .ability(AbilityId.FLASH_FIRE)
.enemySpecies(Species.BLISSEY); .enemySpecies(SpeciesId.BLISSEY);
await game.classicMode.startBattle([Species.RATTATA]); await game.classicMode.startBattle([SpeciesId.RATTATA]);
const blissey = game.scene.getEnemyPokemon()!; const blissey = game.scene.getEnemyPokemon()!;
const initialHP = 1000; const initialHP = 1000;

View File

@ -67,7 +67,7 @@ describe("Abilities - Good As Gold", () => {
.battleStyle("double") .battleStyle("double")
.enemyMoveset([MoveId.STEALTH_ROCK, MoveId.HAZE]) .enemyMoveset([MoveId.STEALTH_ROCK, MoveId.HAZE])
.moveset([MoveId.SWORDS_DANCE, MoveId.SAFEGUARD]); .moveset([MoveId.SWORDS_DANCE, MoveId.SAFEGUARD]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.FEEBAS]);
const [good_as_gold, ball_fetch] = game.scene.getPlayerField(); const [good_as_gold, ball_fetch] = game.scene.getPlayerField();
// Force second pokemon to have ball fetch to isolate to a single mon. // Force second pokemon to have ball fetch to isolate to a single mon.
@ -87,7 +87,7 @@ describe("Abilities - Good As Gold", () => {
it("should not block field targeted effects in singles", async () => { it("should not block field targeted effects in singles", async () => {
game.override.battleStyle("single").enemyMoveset([MoveId.SPIKES]); game.override.battleStyle("single").enemyMoveset([MoveId.SPIKES]);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
game.move.select(MoveId.SPLASH, 0); game.move.select(MoveId.SPLASH, 0);
await game.phaseInterceptor.to("BerryPhase"); await game.phaseInterceptor.to("BerryPhase");
@ -97,7 +97,7 @@ describe("Abilities - Good As Gold", () => {
it("should block the ally's helping hand", async () => { it("should block the ally's helping hand", async () => {
game.override.battleStyle("double").moveset([MoveId.HELPING_HAND, MoveId.TACKLE]); game.override.battleStyle("double").moveset([MoveId.HELPING_HAND, MoveId.TACKLE]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.FEEBAS]);
game.move.select(MoveId.HELPING_HAND, 0); game.move.select(MoveId.HELPING_HAND, 0);
game.move.select(MoveId.TACKLE, 1); game.move.select(MoveId.TACKLE, 1);
@ -129,7 +129,7 @@ describe("Abilities - Good As Gold", () => {
it("should not block field targeted effects like rain dance", async () => { it("should not block field targeted effects like rain dance", async () => {
game.override.battleStyle("single").enemyMoveset([MoveId.RAIN_DANCE]); game.override.battleStyle("single").enemyMoveset([MoveId.RAIN_DANCE]);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
game.move.use(MoveId.SPLASH, 0); game.move.use(MoveId.SPLASH, 0);
await game.phaseInterceptor.to("BerryPhase"); await game.phaseInterceptor.to("BerryPhase");

View File

@ -32,7 +32,7 @@ describe("Abilities - Ice Face", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.EISCUE) .enemySpecies(SpeciesId.EISCUE)
.enemyAbility(AbilityId.ICE_FACE) .enemyAbility(AbilityId.ICE_FACE)
.moveset([MoveId.TACKLE, MoveId.ICE_BEAM, MoveId.TOXIC_THREAD, MoveId.HAIL]); .moveset([MoveId.TACKLE, MoveId.ICE_BEAM, MoveId.TOXIC_THREAD, MoveId.HAIL]);
}); });
@ -53,7 +53,7 @@ describe("Abilities - Ice Face", () => {
it("takes no damage from the first hit of multihit physical move and transforms to Noice", async () => { it("takes no damage from the first hit of multihit physical move and transforms to Noice", async () => {
game.override.moveset([MoveId.SURGING_STRIKES]).enemyLevel(1); game.override.moveset([MoveId.SURGING_STRIKES]).enemyLevel(1);
await game.classicMode.startBattle([Species.HITMONLEE]); await game.classicMode.startBattle([SpeciesId.HITMONLEE]);
game.move.select(MoveId.SURGING_STRIKES); game.move.select(MoveId.SURGING_STRIKES);
@ -199,9 +199,9 @@ describe("Abilities - Ice Face", () => {
game.override game.override
.startingWave(4) .startingWave(4)
.startingLevel(4) .startingLevel(4)
.enemySpecies(Species.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.starterForms({ .starterForms({
[Species.EISCUE]: noiceForm, [SpeciesId.EISCUE]: noiceForm,
}); });
await game.classicMode.startBattle([SpeciesId.EISCUE]); await game.classicMode.startBattle([SpeciesId.EISCUE]);

View File

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

View File

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

View File

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

View File

@ -24,7 +24,7 @@ describe("Abilities - Intrepid Sword", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.ZACIAN) .enemySpecies(SpeciesId.ZACIAN)
.enemyAbility(AbilityId.INTREPID_SWORD) .enemyAbility(AbilityId.INTREPID_SWORD)
.ability(AbilityId.INTREPID_SWORD); .ability(AbilityId.INTREPID_SWORD);
}); });

View File

@ -186,7 +186,7 @@ describe("Abilities - Libero", () => {
}); });
test("ability applies correctly even if the pokemon's move fails because of type immunity", async () => { test("ability applies correctly even if the pokemon's move fails because of type immunity", async () => {
game.override.moveset([MoveId.TACKLE]).enemySpecies(Species.GASTLY); game.override.moveset([MoveId.TACKLE]).enemySpecies(SpeciesId.GASTLY);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]); 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 () => { test("ability applies correctly even if the pokemon's Trick-or-Treat fails", async () => {
game.override.moveset([MoveId.TRICK_OR_TREAT]).enemySpecies(Species.GASTLY); game.override.moveset([MoveId.TRICK_OR_TREAT]).enemySpecies(SpeciesId.GASTLY);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);

View File

@ -47,7 +47,7 @@ describe("Abilities - Magic Bounce", () => {
}); });
it("should not bounce moves while the target is in the semi-invulnerable state", async () => { it("should not bounce moves while the target is in the semi-invulnerable state", async () => {
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
game.move.use(MoveId.GROWL); game.move.use(MoveId.GROWL);
await game.move.forceEnemyMove(MoveId.FLY); await game.move.forceEnemyMove(MoveId.FLY);
@ -59,7 +59,7 @@ describe("Abilities - Magic Bounce", () => {
it("should individually bounce back multi-target moves", async () => { it("should individually bounce back multi-target moves", async () => {
game.override.battleStyle("double"); game.override.battleStyle("double");
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.MAGIKARP]);
game.move.use(MoveId.GROWL, 0); game.move.use(MoveId.GROWL, 0);
game.move.use(MoveId.SPLASH, 1); game.move.use(MoveId.SPLASH, 1);
@ -111,7 +111,7 @@ describe("Abilities - Magic Bounce", () => {
it("should bounce back a spread status move against both pokemon", async () => { it("should bounce back a spread status move against both pokemon", async () => {
game.override.battleStyle("double").enemyMoveset([MoveId.SPLASH]); game.override.battleStyle("double").enemyMoveset([MoveId.SPLASH]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.MAGIKARP]);
game.move.use(MoveId.GROWL, 0); game.move.use(MoveId.GROWL, 0);
game.move.use(MoveId.SPLASH, 1); game.move.use(MoveId.SPLASH, 1);
@ -122,7 +122,7 @@ describe("Abilities - Magic Bounce", () => {
it("should only bounce spikes back once in doubles when both targets have magic bounce", async () => { it("should only bounce spikes back once in doubles when both targets have magic bounce", async () => {
game.override.battleStyle("double").moveset([MoveId.SPIKES]); game.override.battleStyle("double").moveset([MoveId.SPIKES]);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
game.move.select(MoveId.SPIKES); game.move.select(MoveId.SPIKES);
await game.phaseInterceptor.to("BerryPhase"); await game.phaseInterceptor.to("BerryPhase");
@ -133,7 +133,7 @@ describe("Abilities - Magic Bounce", () => {
it("should bounce spikes even when the target is protected", async () => { it("should bounce spikes even when the target is protected", async () => {
game.override.moveset([MoveId.SPIKES]).enemyMoveset([MoveId.PROTECT]); game.override.moveset([MoveId.SPIKES]).enemyMoveset([MoveId.PROTECT]);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
game.move.select(MoveId.SPIKES); game.move.select(MoveId.SPIKES);
await game.phaseInterceptor.to("BerryPhase"); await game.phaseInterceptor.to("BerryPhase");
@ -142,7 +142,7 @@ describe("Abilities - Magic Bounce", () => {
it("should not bounce spikes when the target is in the semi-invulnerable state", async () => { it("should not bounce spikes when the target is in the semi-invulnerable state", async () => {
game.override.moveset([MoveId.SPIKES]).enemyMoveset([MoveId.FLY]); game.override.moveset([MoveId.SPIKES]).enemyMoveset([MoveId.FLY]);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
game.move.select(MoveId.SPIKES); game.move.select(MoveId.SPIKES);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
@ -152,7 +152,7 @@ describe("Abilities - Magic Bounce", () => {
it("should not bounce back curse", async () => { it("should not bounce back curse", async () => {
game.override.moveset([MoveId.CURSE]); game.override.moveset([MoveId.CURSE]);
await game.classicMode.startBattle([Species.GASTLY]); await game.classicMode.startBattle([SpeciesId.GASTLY]);
game.move.select(MoveId.CURSE); game.move.select(MoveId.CURSE);
await game.phaseInterceptor.to("BerryPhase"); await game.phaseInterceptor.to("BerryPhase");
@ -163,7 +163,7 @@ describe("Abilities - Magic Bounce", () => {
it("should not cause encore to be interrupted after bouncing", async () => { it("should not cause encore to be interrupted after bouncing", async () => {
game.override.moveset([MoveId.SPLASH, MoveId.GROWL, MoveId.ENCORE]).enemyMoveset([MoveId.TACKLE, MoveId.GROWL]); game.override.moveset([MoveId.SPLASH, MoveId.GROWL, MoveId.ENCORE]).enemyMoveset([MoveId.TACKLE, MoveId.GROWL]);
// game.override.ability(AbilityId.MOLD_BREAKER); // game.override.ability(AbilityId.MOLD_BREAKER);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
const playerPokemon = game.scene.getPlayerPokemon()!; const playerPokemon = game.scene.getPlayerPokemon()!;
const enemyPokemon = game.scene.getEnemyPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!;
@ -218,7 +218,7 @@ describe("Abilities - Magic Bounce", () => {
// TODO: stomping tantrum should consider moves that were bounced. // 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 () => { it.todo("should cause stomping tantrum to double in power when the last move was bounced", async () => {
game.override.battleStyle("single").moveset([MoveId.STOMPING_TANTRUM, MoveId.CHARM]); game.override.battleStyle("single").moveset([MoveId.STOMPING_TANTRUM, MoveId.CHARM]);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
const stomping_tantrum = allMoves[MoveId.STOMPING_TANTRUM]; const stomping_tantrum = allMoves[MoveId.STOMPING_TANTRUM];
vi.spyOn(stomping_tantrum, "calculateBattlePower"); vi.spyOn(stomping_tantrum, "calculateBattlePower");
@ -234,7 +234,7 @@ describe("Abilities - Magic Bounce", () => {
// TODO: stomping tantrum should consider moves that were bounced // TODO: stomping tantrum should consider moves that were bounced
it.todo("should boost enemy's stomping tantrum after failed bounce", async () => { it.todo("should boost enemy's stomping tantrum after failed bounce", async () => {
game.override.enemyMoveset([MoveId.STOMPING_TANTRUM, MoveId.SPLASH, MoveId.CHARM]); game.override.enemyMoveset([MoveId.STOMPING_TANTRUM, MoveId.SPLASH, MoveId.CHARM]);
await game.classicMode.startBattle([Species.BULBASAUR]); await game.classicMode.startBattle([SpeciesId.BULBASAUR]);
const stomping_tantrum = allMoves[MoveId.STOMPING_TANTRUM]; const stomping_tantrum = allMoves[MoveId.STOMPING_TANTRUM];
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -255,7 +255,7 @@ describe("Abilities - Magic Bounce", () => {
it("should respect immunities when bouncing a move", async () => { it("should respect immunities when bouncing a move", async () => {
vi.spyOn(allMoves[MoveId.THUNDER_WAVE], "accuracy", "get").mockReturnValue(100); vi.spyOn(allMoves[MoveId.THUNDER_WAVE], "accuracy", "get").mockReturnValue(100);
game.override.moveset([MoveId.THUNDER_WAVE, MoveId.GROWL]).ability(AbilityId.SOUNDPROOF); game.override.moveset([MoveId.THUNDER_WAVE, MoveId.GROWL]).ability(AbilityId.SOUNDPROOF);
await game.classicMode.startBattle([Species.PHANPY]); await game.classicMode.startBattle([SpeciesId.PHANPY]);
// Turn 1 - thunder wave immunity test // Turn 1 - thunder wave immunity test
game.move.select(MoveId.THUNDER_WAVE); game.move.select(MoveId.THUNDER_WAVE);
@ -326,7 +326,7 @@ describe("Abilities - Magic Bounce", () => {
it("should not bounce back status moves that hit through semi-invulnerable states", async () => { it("should not bounce back status moves that hit through semi-invulnerable states", async () => {
game.override.moveset([MoveId.TOXIC, MoveId.CHARM]); game.override.moveset([MoveId.TOXIC, MoveId.CHARM]);
await game.classicMode.startBattle([Species.BULBASAUR]); await game.classicMode.startBattle([SpeciesId.BULBASAUR]);
game.move.select(MoveId.TOXIC); game.move.select(MoveId.TOXIC);
await game.move.selectEnemyMove(MoveId.FLY); await game.move.selectEnemyMove(MoveId.FLY);

View File

@ -35,7 +35,7 @@ describe("Abilities - Magic Guard", () => {
.moveset([MoveId.SPLASH]) .moveset([MoveId.SPLASH])
.startingLevel(100) .startingLevel(100)
/** Enemy Pokemon overrides */ /** Enemy Pokemon overrides */
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.enemyAbility(AbilityId.INSOMNIA) .enemyAbility(AbilityId.INSOMNIA)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.enemyLevel(100); .enemyLevel(100);
@ -205,7 +205,7 @@ describe("Abilities - Magic Guard", () => {
}); });
it("Magic Guard prevents against damage from volatile status effects", async () => { it("Magic Guard prevents against damage from volatile status effects", async () => {
await game.classicMode.startBattle([Species.DUSKULL]); await game.classicMode.startBattle([SpeciesId.DUSKULL]);
game.override.moveset([MoveId.CURSE]).enemyAbility(AbilityId.MAGIC_GUARD); game.override.moveset([MoveId.CURSE]).enemyAbility(AbilityId.MAGIC_GUARD);
const leadPokemon = game.scene.getPlayerPokemon()!; const leadPokemon = game.scene.getPlayerPokemon()!;

View File

@ -38,7 +38,7 @@ describe("Ability - Mirror Armor", () => {
it("Player side + single battle Intimidate - opponent loses stats", async () => { it("Player side + single battle Intimidate - opponent loses stats", async () => {
game.override.ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE); game.override.ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR]); await game.classicMode.startBattle([SpeciesId.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!;
const userPokemon = game.scene.getPlayerPokemon()!; const userPokemon = game.scene.getPlayerPokemon()!;
@ -54,7 +54,7 @@ describe("Ability - Mirror Armor", () => {
it("Enemy side + single battle Intimidate - player loses stats", async () => { it("Enemy side + single battle Intimidate - player loses stats", async () => {
game.override.enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE); game.override.enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR]); await game.classicMode.startBattle([SpeciesId.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!;
const userPokemon = game.scene.getPlayerPokemon()!; const userPokemon = game.scene.getPlayerPokemon()!;
@ -70,7 +70,7 @@ describe("Ability - Mirror Armor", () => {
it("Player side + double battle Intimidate - opponents each lose -2 atk", async () => { it("Player side + double battle Intimidate - opponents each lose -2 atk", async () => {
game.override.battleStyle("double").ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE); game.override.battleStyle("double").ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER]); await game.classicMode.startBattle([SpeciesId.BULBASAUR, SpeciesId.CHARMANDER]);
const [enemy1, enemy2] = game.scene.getEnemyField(); const [enemy1, enemy2] = game.scene.getEnemyField();
const [player1, player2] = game.scene.getPlayerField(); const [player1, player2] = game.scene.getPlayerField();
@ -90,7 +90,7 @@ describe("Ability - Mirror Armor", () => {
it("Enemy side + double battle Intimidate - players each lose -2 atk", async () => { it("Enemy side + double battle Intimidate - players each lose -2 atk", async () => {
game.override.battleStyle("double").enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE); game.override.battleStyle("double").enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER]); await game.classicMode.startBattle([SpeciesId.BULBASAUR, SpeciesId.CHARMANDER]);
const [enemy1, enemy2] = game.scene.getEnemyField(); const [enemy1, enemy2] = game.scene.getEnemyField();
const [player1, player2] = game.scene.getPlayerField(); const [player1, player2] = game.scene.getPlayerField();
@ -110,7 +110,7 @@ describe("Ability - Mirror Armor", () => {
it("Player side + single battle Intimidate + Tickle - opponent loses stats", async () => { it("Player side + single battle Intimidate + Tickle - opponent loses stats", async () => {
game.override.ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE); game.override.ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR]); await game.classicMode.startBattle([SpeciesId.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!;
const userPokemon = game.scene.getPlayerPokemon()!; const userPokemon = game.scene.getPlayerPokemon()!;
@ -128,7 +128,7 @@ describe("Ability - Mirror Armor", () => {
it("Player side + double battle Intimidate + Tickle - opponents each lose -3 atk, -1 def", async () => { it("Player side + double battle Intimidate + Tickle - opponents each lose -3 atk, -1 def", async () => {
game.override.battleStyle("double").ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE); game.override.battleStyle("double").ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER]); await game.classicMode.startBattle([SpeciesId.BULBASAUR, SpeciesId.CHARMANDER]);
const [enemy1, enemy2] = game.scene.getEnemyField(); const [enemy1, enemy2] = game.scene.getEnemyField();
const [player1, player2] = game.scene.getPlayerField(); const [player1, player2] = game.scene.getPlayerField();
@ -151,7 +151,7 @@ describe("Ability - Mirror Armor", () => {
it("Enemy side + single battle Intimidate + Tickle - player loses stats", async () => { it("Enemy side + single battle Intimidate + Tickle - player loses stats", async () => {
game.override.enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE); game.override.enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR]); await game.classicMode.startBattle([SpeciesId.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!;
const userPokemon = game.scene.getPlayerPokemon()!; const userPokemon = game.scene.getPlayerPokemon()!;
@ -169,7 +169,7 @@ describe("Ability - Mirror Armor", () => {
it("Player side + single battle Intimidate + oppoenent has white smoke - no one loses stats", async () => { it("Player side + single battle Intimidate + oppoenent has white smoke - no one loses stats", async () => {
game.override.enemyAbility(AbilityId.WHITE_SMOKE).ability(AbilityId.MIRROR_ARMOR); game.override.enemyAbility(AbilityId.WHITE_SMOKE).ability(AbilityId.MIRROR_ARMOR);
await game.classicMode.startBattle([Species.BULBASAUR]); await game.classicMode.startBattle([SpeciesId.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!;
const userPokemon = game.scene.getPlayerPokemon()!; const userPokemon = game.scene.getPlayerPokemon()!;
@ -187,7 +187,7 @@ describe("Ability - Mirror Armor", () => {
it("Enemy side + single battle Intimidate + player has white smoke - no one loses stats", async () => { it("Enemy side + single battle Intimidate + player has white smoke - no one loses stats", async () => {
game.override.ability(AbilityId.WHITE_SMOKE).enemyAbility(AbilityId.MIRROR_ARMOR); game.override.ability(AbilityId.WHITE_SMOKE).enemyAbility(AbilityId.MIRROR_ARMOR);
await game.classicMode.startBattle([Species.BULBASAUR]); await game.classicMode.startBattle([SpeciesId.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!;
const userPokemon = game.scene.getPlayerPokemon()!; const userPokemon = game.scene.getPlayerPokemon()!;
@ -241,7 +241,7 @@ describe("Ability - Mirror Armor", () => {
it("Both sides have mirror armor - does not loop, player loses attack", async () => { it("Both sides have mirror armor - does not loop, player loses attack", async () => {
game.override.enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE); game.override.enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE);
await game.classicMode.startBattle([Species.BULBASAUR]); await game.classicMode.startBattle([SpeciesId.BULBASAUR]);
const enemyPokemon = game.scene.getEnemyPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!;
const userPokemon = game.scene.getPlayerPokemon()!; const userPokemon = game.scene.getPlayerPokemon()!;
@ -275,7 +275,7 @@ describe("Ability - Mirror Armor", () => {
it("Double battle + sticky web applied player side - player switches out and enemy 1 should lose -1 speed", async () => { it("Double battle + sticky web applied player side - player switches out and enemy 1 should lose -1 speed", async () => {
game.override.battleStyle("double").ability(AbilityId.MIRROR_ARMOR); game.override.battleStyle("double").ability(AbilityId.MIRROR_ARMOR);
await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE]); await game.classicMode.startBattle([SpeciesId.BULBASAUR, SpeciesId.CHARMANDER, SpeciesId.SQUIRTLE]);
const [enemy1, enemy2] = game.scene.getEnemyField(); const [enemy1, enemy2] = game.scene.getEnemyField();
const [player1, player2] = game.scene.getPlayerField(); const [player1, player2] = game.scene.getPlayerField();

View File

@ -29,7 +29,7 @@ describe("Abilities - Moxie", () => {
const moveToUse = MoveId.AERIAL_ACE; const moveToUse = MoveId.AERIAL_ACE;
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.RATTATA) .enemySpecies(SpeciesId.RATTATA)
.enemyAbility(AbilityId.MOXIE) .enemyAbility(AbilityId.MOXIE)
.ability(AbilityId.MOXIE) .ability(AbilityId.MOXIE)
.startingLevel(2000) .startingLevel(2000)

View File

@ -30,7 +30,7 @@ describe("Abilities - Parental Bond", () => {
.battleStyle("single") .battleStyle("single")
.disableCrits() .disableCrits()
.ability(AbilityId.PARENTAL_BOND) .ability(AbilityId.PARENTAL_BOND)
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.enemyAbility(AbilityId.FUR_COAT) .enemyAbility(AbilityId.FUR_COAT)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.startingLevel(100) .startingLevel(100)
@ -62,7 +62,7 @@ describe("Abilities - Parental Bond", () => {
}); });
it("should apply secondary effects to both strikes", async () => { it("should apply secondary effects to both strikes", async () => {
game.override.moveset([MoveId.POWER_UP_PUNCH]).enemySpecies(Species.AMOONGUSS); game.override.moveset([MoveId.POWER_UP_PUNCH]).enemySpecies(SpeciesId.AMOONGUSS);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);

View File

@ -24,9 +24,9 @@ describe("Abilities - Perish Song", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.disableCrits() .disableCrits()
.enemySpecies(Species.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.starterSpecies(Species.CURSOLA) .starterSpecies(SpeciesId.CURSOLA)
.ability(AbilityId.PERISH_BODY) .ability(AbilityId.PERISH_BODY)
.moveset([MoveId.SPLASH]) .moveset([MoveId.SPLASH])
.enemyMoveset([MoveId.AQUA_JET]); .enemyMoveset([MoveId.AQUA_JET]);
@ -46,7 +46,7 @@ describe("Abilities - Perish Song", () => {
it("should trigger even when fainting", async () => { it("should trigger even when fainting", async () => {
game.override.enemyLevel(100).startingLevel(1); game.override.enemyLevel(100).startingLevel(1);
await game.classicMode.startBattle([Species.CURSOLA, Species.FEEBAS]); await game.classicMode.startBattle([SpeciesId.CURSOLA, SpeciesId.FEEBAS]);
const magikarp = game.scene.getEnemyPokemon(); const magikarp = game.scene.getEnemyPokemon();
game.move.select(MoveId.SPLASH); game.move.select(MoveId.SPLASH);
@ -90,7 +90,7 @@ describe("Abilities - Perish Song", () => {
.enemyMoveset([MoveId.PERISH_SONG, MoveId.AQUA_JET, MoveId.SPLASH]) .enemyMoveset([MoveId.PERISH_SONG, MoveId.AQUA_JET, MoveId.SPLASH])
.moveset([MoveId.WHIRLWIND, MoveId.SPLASH]) .moveset([MoveId.WHIRLWIND, MoveId.SPLASH])
.startingWave(5); .startingWave(5);
await game.classicMode.startBattle([Species.CURSOLA]); await game.classicMode.startBattle([SpeciesId.CURSOLA]);
const cursola = game.scene.getPlayerPokemon(); const cursola = game.scene.getPlayerPokemon();
game.move.select(MoveId.WHIRLWIND); game.move.select(MoveId.WHIRLWIND);

View File

@ -30,7 +30,7 @@ describe("Abilities - Power Spot", () => {
.battleStyle("double") .battleStyle("double")
.moveset([MoveId.TACKLE, MoveId.BREAKING_SWIPE, MoveId.SPLASH, MoveId.DAZZLING_GLEAM]) .moveset([MoveId.TACKLE, MoveId.BREAKING_SWIPE, MoveId.SPLASH, MoveId.DAZZLING_GLEAM])
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.enemySpecies(Species.SHUCKLE) .enemySpecies(SpeciesId.SHUCKLE)
.enemyAbility(AbilityId.BALL_FETCH); .enemyAbility(AbilityId.BALL_FETCH);
}); });

View File

@ -186,7 +186,7 @@ describe("Abilities - Protean", () => {
}); });
test("ability applies correctly even if the pokemon's move fails because of type immunity", async () => { test("ability applies correctly even if the pokemon's move fails because of type immunity", async () => {
game.override.moveset([MoveId.TACKLE]).enemySpecies(Species.GASTLY); game.override.moveset([MoveId.TACKLE]).enemySpecies(SpeciesId.GASTLY);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]); 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 () => { test("ability applies correctly even if the pokemon's Trick-or-Treat fails", async () => {
game.override.moveset([MoveId.TRICK_OR_TREAT]).enemySpecies(Species.GASTLY); game.override.moveset([MoveId.TRICK_OR_TREAT]).enemySpecies(SpeciesId.GASTLY);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);

View File

@ -25,11 +25,11 @@ describe("Abilities - Quick Draw", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.starterSpecies(Species.MAGIKARP) .starterSpecies(SpeciesId.MAGIKARP)
.ability(AbilityId.QUICK_DRAW) .ability(AbilityId.QUICK_DRAW)
.moveset([MoveId.TACKLE, MoveId.TAIL_WHIP]) .moveset([MoveId.TACKLE, MoveId.TAIL_WHIP])
.enemyLevel(100) .enemyLevel(100)
.enemySpecies(Species.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset([MoveId.TACKLE]); .enemyMoveset([MoveId.TACKLE]);

View File

@ -25,9 +25,9 @@ describe("Abilities - Sand Spit", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.disableCrits() .disableCrits()
.enemySpecies(Species.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.starterSpecies(Species.SILICOBRA) .starterSpecies(SpeciesId.SILICOBRA)
.ability(AbilityId.SAND_SPIT) .ability(AbilityId.SAND_SPIT)
.moveset([MoveId.SPLASH, MoveId.COIL]); .moveset([MoveId.SPLASH, MoveId.COIL]);
}); });

View File

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

View File

@ -25,9 +25,9 @@ describe("Abilities - Seed Sower", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.disableCrits() .disableCrits()
.enemySpecies(Species.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.starterSpecies(Species.ARBOLIVA) .starterSpecies(SpeciesId.ARBOLIVA)
.ability(AbilityId.SEED_SOWER) .ability(AbilityId.SEED_SOWER)
.moveset([MoveId.SPLASH]); .moveset([MoveId.SPLASH]);
}); });

View File

@ -33,7 +33,7 @@ describe("Abilities - Shield Dust", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.ONIX) .enemySpecies(SpeciesId.ONIX)
.enemyAbility(AbilityId.SHIELD_DUST) .enemyAbility(AbilityId.SHIELD_DUST)
.startingLevel(100) .startingLevel(100)
.moveset(MoveId.AIR_SLASH) .moveset(MoveId.AIR_SLASH)

View File

@ -37,7 +37,7 @@ describe("Abilities - SHIELDS DOWN", () => {
const meteorForm = 0, const meteorForm = 0,
coreForm = 7; coreForm = 7;
game.override.startingWave(4).starterForms({ game.override.startingWave(4).starterForms({
[Species.MINIOR]: coreForm, [SpeciesId.MINIOR]: coreForm,
}); });
await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.MINIOR]); 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. // the `NoTransformAbilityAbAttr` attribute is not checked anywhere, so this test cannot pass.
test.todo("ditto should not be immune to status after transforming", async () => { test.todo("ditto should not be immune to status after transforming", async () => {
game.override.enemySpecies(Species.DITTO).enemyAbility(AbilityId.IMPOSTER).moveset([MoveId.SPLASH, MoveId.SPORE]); game.override.enemySpecies(SpeciesId.DITTO).enemyAbility(AbilityId.IMPOSTER).moveset([MoveId.SPLASH, MoveId.SPORE]);
await game.classicMode.startBattle([SpeciesId.MINIOR]); await game.classicMode.startBattle([SpeciesId.MINIOR]);
@ -171,8 +171,8 @@ describe("Abilities - SHIELDS DOWN", () => {
.moveset([MoveId.THUNDERBOLT]) .moveset([MoveId.THUNDERBOLT])
.startingLevel(100) .startingLevel(100)
.startingWave(5) .startingWave(5)
.enemySpecies(Species.MINIOR); .enemySpecies(SpeciesId.MINIOR);
await game.classicMode.startBattle([Species.REGIELEKI]); await game.classicMode.startBattle([SpeciesId.REGIELEKI]);
const minior = game.scene.getEnemyPokemon()!; const minior = game.scene.getEnemyPokemon()!;
game.move.select(MoveId.THUNDERBOLT); game.move.select(MoveId.THUNDERBOLT);

View File

@ -30,7 +30,7 @@ describe("Abilities - Steely Spirit", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("double") .battleStyle("double")
.enemySpecies(Species.SHUCKLE) .enemySpecies(SpeciesId.SHUCKLE)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.moveset([MoveId.IRON_HEAD, MoveId.SPLASH]) .moveset([MoveId.IRON_HEAD, MoveId.SPLASH])
.enemyMoveset(MoveId.SPLASH); .enemyMoveset(MoveId.SPLASH);

View File

@ -25,10 +25,10 @@ describe("Abilities - Sturdy", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.starterSpecies(Species.LUCARIO) .starterSpecies(SpeciesId.LUCARIO)
.startingLevel(100) .startingLevel(100)
.moveset([MoveId.CLOSE_COMBAT, MoveId.FISSURE]) .moveset([MoveId.CLOSE_COMBAT, MoveId.FISSURE])
.enemySpecies(Species.ARON) .enemySpecies(SpeciesId.ARON)
.enemyLevel(5) .enemyLevel(5)
.enemyAbility(AbilityId.STURDY); .enemyAbility(AbilityId.STURDY);
}); });

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 () => { 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(MoveId.SPLASH); game.override.enemySpecies(SpeciesId.PIKACHU).enemyLevel(5).startingLevel(5).enemyMoveset(MoveId.SPLASH);
await game.classicMode.startBattle([SpeciesId.SHUCKLE, SpeciesId.SHUCKLE, SpeciesId.SWIRLIX]); await game.classicMode.startBattle([SpeciesId.SHUCKLE, SpeciesId.SHUCKLE, SpeciesId.SWIRLIX]);

View File

@ -36,7 +36,7 @@ describe("Abilities - Volt Absorb", () => {
.moveset([moveToUse]) .moveset([moveToUse])
.ability(ability) .ability(ability)
.enemyMoveset([MoveId.SPLASH, MoveId.NONE, MoveId.NONE, MoveId.NONE]) .enemyMoveset([MoveId.SPLASH, MoveId.NONE, MoveId.NONE, MoveId.NONE])
.enemySpecies(Species.DUSKULL) .enemySpecies(SpeciesId.DUSKULL)
.enemyAbility(AbilityId.BALL_FETCH); .enemyAbility(AbilityId.BALL_FETCH);
await game.classicMode.startBattle(); await game.classicMode.startBattle();
@ -56,7 +56,7 @@ describe("Abilities - Volt Absorb", () => {
game.override game.override
.moveset(MoveId.THUNDERBOLT) .moveset(MoveId.THUNDERBOLT)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.enemySpecies(Species.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.enemyAbility(AbilityId.VOLT_ABSORB); .enemyAbility(AbilityId.VOLT_ABSORB);
await game.classicMode.startBattle(); await game.classicMode.startBattle();
@ -77,7 +77,7 @@ describe("Abilities - Volt Absorb", () => {
game.override game.override
.moveset(MoveId.THUNDERBOLT) .moveset(MoveId.THUNDERBOLT)
.enemyMoveset(MoveId.DIVE) .enemyMoveset(MoveId.DIVE)
.enemySpecies(Species.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.enemyAbility(AbilityId.VOLT_ABSORB); .enemyAbility(AbilityId.VOLT_ABSORB);
await game.classicMode.startBattle(); await game.classicMode.startBattle();

View File

@ -25,14 +25,14 @@ describe("Abilities - Wind Power", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.SHIFTRY) .enemySpecies(SpeciesId.SHIFTRY)
.enemyAbility(AbilityId.WIND_POWER) .enemyAbility(AbilityId.WIND_POWER)
.moveset([MoveId.TAILWIND, MoveId.SPLASH, MoveId.PETAL_BLIZZARD, MoveId.SANDSTORM]) .moveset([MoveId.TAILWIND, MoveId.SPLASH, MoveId.PETAL_BLIZZARD, MoveId.SANDSTORM])
.enemyMoveset(MoveId.SPLASH); .enemyMoveset(MoveId.SPLASH);
}); });
it("becomes charged when hit by wind moves", async () => { it("becomes charged when hit by wind moves", async () => {
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
const shiftry = game.scene.getEnemyPokemon()!; const shiftry = game.scene.getEnemyPokemon()!;
expect(shiftry.getTag(BattlerTagType.CHARGED)).toBeUndefined(); expect(shiftry.getTag(BattlerTagType.CHARGED)).toBeUndefined();
@ -44,7 +44,7 @@ describe("Abilities - Wind Power", () => {
}); });
it("becomes charged when Tailwind takes effect on its side", async () => { it("becomes charged when Tailwind takes effect on its side", async () => {
game.override.ability(AbilityId.WIND_POWER).enemySpecies(Species.MAGIKARP); game.override.ability(AbilityId.WIND_POWER).enemySpecies(SpeciesId.MAGIKARP);
await game.classicMode.startBattle([SpeciesId.SHIFTRY]); await game.classicMode.startBattle([SpeciesId.SHIFTRY]);
const shiftry = game.scene.getPlayerPokemon()!; 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 () => { it("does not become charged when Tailwind takes effect on opposing side", async () => {
game.override.enemySpecies(Species.MAGIKARP).ability(AbilityId.WIND_POWER); game.override.enemySpecies(SpeciesId.MAGIKARP).ability(AbilityId.WIND_POWER);
await game.classicMode.startBattle([SpeciesId.SHIFTRY]); await game.classicMode.startBattle([SpeciesId.SHIFTRY]);
const magikarp = game.scene.getEnemyPokemon()!; const magikarp = game.scene.getEnemyPokemon()!;

View File

@ -30,7 +30,7 @@ describe("Weather - Fog", () => {
.moveset([MoveId.TACKLE]) .moveset([MoveId.TACKLE])
.ability(AbilityId.BALL_FETCH) .ability(AbilityId.BALL_FETCH)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.enemySpecies(Species.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.enemyMoveset([MoveId.SPLASH]); .enemyMoveset([MoveId.SPLASH]);
}); });

View File

@ -27,7 +27,7 @@ describe("Weather - Strong Winds", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.startingLevel(10) .startingLevel(10)
.enemySpecies(Species.TAILLOW) .enemySpecies(SpeciesId.TAILLOW)
.enemyAbility(AbilityId.DELTA_STREAM) .enemyAbility(AbilityId.DELTA_STREAM)
.moveset([MoveId.THUNDERBOLT, MoveId.ICE_BEAM, MoveId.ROCK_SLIDE]); .moveset([MoveId.THUNDERBOLT, MoveId.ICE_BEAM, MoveId.ROCK_SLIDE]);
}); });

View File

@ -26,7 +26,7 @@ describe("Battle order", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.MEWTWO) .enemySpecies(SpeciesId.MEWTWO)
.enemyAbility(AbilityId.INSOMNIA) .enemyAbility(AbilityId.INSOMNIA)
.ability(AbilityId.INSOMNIA) .ability(AbilityId.INSOMNIA)
.moveset([MoveId.TACKLE]); .moveset([MoveId.TACKLE]);

View File

@ -88,22 +88,22 @@ describe("Test Battle Phase", () => {
}, 20000); }, 20000);
it("do attack wave 3 - single battle - regular - OHKO", async () => { it("do attack wave 3 - single battle - regular - OHKO", async () => {
game.override.enemySpecies(Species.RATTATA).startingLevel(2000).battleStyle("single"); game.override.enemySpecies(SpeciesId.RATTATA).startingLevel(2000).battleStyle("single");
await game.classicMode.startBattle([Species.MEWTWO]); await game.classicMode.startBattle([SpeciesId.MEWTWO]);
game.move.use(MoveId.TACKLE); game.move.use(MoveId.TACKLE);
await game.phaseInterceptor.to("SelectModifierPhase"); await game.phaseInterceptor.to("SelectModifierPhase");
}, 20000); }, 20000);
it("do attack wave 3 - single battle - regular - NO OHKO with opponent using non damage attack", async () => { it("do attack wave 3 - single battle - regular - NO OHKO with opponent using non damage attack", async () => {
game.override game.override
.enemySpecies(Species.RATTATA) .enemySpecies(SpeciesId.RATTATA)
.startingLevel(5) .startingLevel(5)
.startingWave(3) .startingWave(3)
.moveset([MoveId.TACKLE]) .moveset([MoveId.TACKLE])
.enemyAbility(AbilityId.HYDRATION) .enemyAbility(AbilityId.HYDRATION)
.enemyMoveset([MoveId.TAIL_WHIP, MoveId.TAIL_WHIP, MoveId.TAIL_WHIP, MoveId.TAIL_WHIP]) .enemyMoveset([MoveId.TAIL_WHIP, MoveId.TAIL_WHIP, MoveId.TAIL_WHIP, MoveId.TAIL_WHIP])
.battleStyle("single"); .battleStyle("single");
await game.classicMode.startBattle([Species.MEWTWO]); await game.classicMode.startBattle([SpeciesId.MEWTWO]);
game.move.select(MoveId.TACKLE); game.move.select(MoveId.TACKLE);
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase, false); await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase, false);
}, 20000); }, 20000);
@ -239,15 +239,15 @@ describe("Test Battle Phase", () => {
const moveToUse = MoveId.SPLASH; const moveToUse = MoveId.SPLASH;
game.override game.override
.battleStyle("single") .battleStyle("single")
.starterSpecies(Species.MEWTWO) .starterSpecies(SpeciesId.MEWTWO)
.enemySpecies(Species.RATTATA) .enemySpecies(SpeciesId.RATTATA)
.enemyAbility(AbilityId.HYDRATION) .enemyAbility(AbilityId.HYDRATION)
.ability(AbilityId.ZEN_MODE) .ability(AbilityId.ZEN_MODE)
.startingLevel(2000) .startingLevel(2000)
.startingWave(3) .startingWave(3)
.moveset([moveToUse]) .moveset([moveToUse])
.enemyMoveset([MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE]); .enemyMoveset([MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE]);
await game.classicMode.startBattle([Species.DARMANITAN, Species.CHARIZARD]); await game.classicMode.startBattle([SpeciesId.DARMANITAN, SpeciesId.CHARIZARD]);
game.move.select(moveToUse); game.move.select(moveToUse);
await game.phaseInterceptor.to(DamageAnimPhase, false); await game.phaseInterceptor.to(DamageAnimPhase, false);
@ -260,14 +260,14 @@ describe("Test Battle Phase", () => {
const moveToUse = MoveId.SPLASH; const moveToUse = MoveId.SPLASH;
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.RATTATA) .enemySpecies(SpeciesId.RATTATA)
.enemyAbility(AbilityId.HYDRATION) .enemyAbility(AbilityId.HYDRATION)
.ability(AbilityId.ZEN_MODE) .ability(AbilityId.ZEN_MODE)
.startingLevel(2000) .startingLevel(2000)
.startingWave(3) .startingWave(3)
.moveset([moveToUse]) .moveset([moveToUse])
.enemyMoveset([MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE]); .enemyMoveset([MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE]);
await game.classicMode.startBattle([Species.MEWTWO]); await game.classicMode.startBattle([SpeciesId.MEWTWO]);
const turn = game.scene.currentBattle.turn; const turn = game.scene.currentBattle.turn;
game.move.select(moveToUse); game.move.select(moveToUse);
await game.toNextTurn(); await game.toNextTurn();

View File

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

View File

@ -27,7 +27,7 @@ describe("Moves - Baneful Bunker", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.moveset(MoveId.SLASH) .moveset(MoveId.SLASH)
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.enemyAbility(AbilityId.INSOMNIA) .enemyAbility(AbilityId.INSOMNIA)
.enemyMoveset(MoveId.BANEFUL_BUNKER) .enemyMoveset(MoveId.BANEFUL_BUNKER)
.startingLevel(100) .startingLevel(100)

View File

@ -60,7 +60,7 @@ describe("Moves - Baton Pass", () => {
it("passes stat stage buffs when AI uses it", async () => { it("passes stat stage buffs when AI uses it", async () => {
// arrange // arrange
game.override.startingWave(5).enemyMoveset([MoveId.NASTY_PLOT, MoveId.BATON_PASS]); game.override.startingWave(5).enemyMoveset([MoveId.NASTY_PLOT, MoveId.BATON_PASS]);
await game.classicMode.startBattle([Species.RAICHU, Species.SHUCKLE]); await game.classicMode.startBattle([SpeciesId.RAICHU, SpeciesId.SHUCKLE]);
// round 1 - ai buffs // round 1 - ai buffs
game.move.select(MoveId.SPLASH); game.move.select(MoveId.SPLASH);

View File

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

View File

@ -25,7 +25,7 @@ describe("Moves - Beat Up", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.enemyLevel(100) .enemyLevel(100)
.enemyMoveset([MoveId.SPLASH]) .enemyMoveset([MoveId.SPLASH])
.enemyAbility(AbilityId.INSOMNIA) .enemyAbility(AbilityId.INSOMNIA)

View File

@ -28,7 +28,7 @@ describe("Moves - Ceaseless Edge", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.RATTATA) .enemySpecies(SpeciesId.RATTATA)
.enemyAbility(AbilityId.RUN_AWAY) .enemyAbility(AbilityId.RUN_AWAY)
.enemyPassiveAbility(AbilityId.RUN_AWAY) .enemyPassiveAbility(AbilityId.RUN_AWAY)
.startingLevel(100) .startingLevel(100)

View File

@ -28,8 +28,8 @@ describe("Moves - Clangorous Soul", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.starterSpecies(Species.MAGIKARP) .starterSpecies(SpeciesId.MAGIKARP)
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.startingLevel(100) .startingLevel(100)
.enemyLevel(100) .enemyLevel(100)
.moveset([MoveId.CLANGOROUS_SOUL]) .moveset([MoveId.CLANGOROUS_SOUL])

View File

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

View File

@ -32,12 +32,12 @@ describe("Moves - Dragon Rage", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.starterSpecies(Species.SNORLAX) .starterSpecies(SpeciesId.SNORLAX)
.moveset([MoveId.DRAGON_RAGE]) .moveset([MoveId.DRAGON_RAGE])
.ability(AbilityId.BALL_FETCH) .ability(AbilityId.BALL_FETCH)
.passiveAbility(AbilityId.BALL_FETCH) .passiveAbility(AbilityId.BALL_FETCH)
.startingLevel(100) .startingLevel(100)
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.enemyPassiveAbility(AbilityId.BALL_FETCH) .enemyPassiveAbility(AbilityId.BALL_FETCH)

View File

@ -29,8 +29,8 @@ describe("Moves - FILLET AWAY", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.starterSpecies(Species.MAGIKARP) .starterSpecies(SpeciesId.MAGIKARP)
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.startingLevel(100) .startingLevel(100)
.enemyLevel(100) .enemyLevel(100)
.moveset([MoveId.FILLET_AWAY]) .moveset([MoveId.FILLET_AWAY])

View File

@ -30,11 +30,11 @@ describe("Moves - Fissure", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.disableCrits() .disableCrits()
.starterSpecies(Species.SNORLAX) .starterSpecies(SpeciesId.SNORLAX)
.moveset([MoveId.FISSURE]) .moveset([MoveId.FISSURE])
.passiveAbility(AbilityId.BALL_FETCH) .passiveAbility(AbilityId.BALL_FETCH)
.startingLevel(100) .startingLevel(100)
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.enemyPassiveAbility(AbilityId.BALL_FETCH) .enemyPassiveAbility(AbilityId.BALL_FETCH)
.enemyLevel(100); .enemyLevel(100);

View File

@ -41,7 +41,7 @@ describe("Moves - Flame Burst", () => {
.disableCrits() .disableCrits()
.ability(AbilityId.UNNERVE) .ability(AbilityId.UNNERVE)
.startingWave(4) .startingWave(4)
.enemySpecies(Species.SHUCKLE) .enemySpecies(SpeciesId.SHUCKLE)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset([MoveId.SPLASH]); .enemyMoveset([MoveId.SPLASH]);
}); });

View File

@ -26,9 +26,9 @@ describe("Moves - Follow Me", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("double") .battleStyle("double")
.starterSpecies(Species.AMOONGUSS) .starterSpecies(SpeciesId.AMOONGUSS)
.ability(AbilityId.BALL_FETCH) .ability(AbilityId.BALL_FETCH)
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.startingLevel(100) .startingLevel(100)
.enemyLevel(100) .enemyLevel(100)
.moveset([MoveId.FOLLOW_ME, MoveId.RAGE_POWDER, MoveId.SPOTLIGHT, MoveId.QUICK_ATTACK]) .moveset([MoveId.FOLLOW_ME, MoveId.RAGE_POWDER, MoveId.SPOTLIGHT, MoveId.QUICK_ATTACK])

View File

@ -28,7 +28,7 @@ describe("Moves - Gastro Acid", () => {
.enemyLevel(100) .enemyLevel(100)
.ability(AbilityId.NONE) .ability(AbilityId.NONE)
.moveset([MoveId.GASTRO_ACID, MoveId.WATER_GUN, MoveId.SPLASH, MoveId.CORE_ENFORCER]) .moveset([MoveId.GASTRO_ACID, MoveId.WATER_GUN, MoveId.SPLASH, MoveId.CORE_ENFORCER])
.enemySpecies(Species.BIDOOF) .enemySpecies(SpeciesId.BIDOOF)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.enemyAbility(AbilityId.WATER_ABSORB); .enemyAbility(AbilityId.WATER_ABSORB);
}); });

View File

@ -24,7 +24,7 @@ describe("Moves - Glaive Rush", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.disableCrits() .disableCrits()
.enemySpecies(Species.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset([MoveId.GLAIVE_RUSH]) .enemyMoveset([MoveId.GLAIVE_RUSH])
.ability(AbilityId.BALL_FETCH) .ability(AbilityId.BALL_FETCH)
@ -32,7 +32,7 @@ describe("Moves - Glaive Rush", () => {
}); });
it("takes double damage from attacks", async () => { it("takes double damage from attacks", async () => {
await game.classicMode.startBattle([Species.KLINK]); await game.classicMode.startBattle([SpeciesId.KLINK]);
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
enemy.hp = 1000; enemy.hp = 1000;
@ -47,7 +47,7 @@ describe("Moves - Glaive Rush", () => {
}); });
it("always gets hit by attacks", async () => { it("always gets hit by attacks", async () => {
await game.classicMode.startBattle([Species.KLINK]); await game.classicMode.startBattle([SpeciesId.KLINK]);
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
enemy.hp = 1000; enemy.hp = 1000;
@ -60,7 +60,7 @@ describe("Moves - Glaive Rush", () => {
it("interacts properly with multi-lens", async () => { it("interacts properly with multi-lens", async () => {
game.override.startingHeldItems([{ name: "MULTI_LENS", count: 2 }]).enemyMoveset([MoveId.AVALANCHE]); game.override.startingHeldItems([{ name: "MULTI_LENS", count: 2 }]).enemyMoveset([MoveId.AVALANCHE]);
await game.classicMode.startBattle([Species.KLINK]); await game.classicMode.startBattle([SpeciesId.KLINK]);
const player = game.scene.getPlayerPokemon()!; const player = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -80,7 +80,7 @@ describe("Moves - Glaive Rush", () => {
it("secondary effects only last until next move", async () => { it("secondary effects only last until next move", async () => {
game.override.enemyMoveset([MoveId.SHADOW_SNEAK]); game.override.enemyMoveset([MoveId.SHADOW_SNEAK]);
await game.classicMode.startBattle([Species.KLINK]); await game.classicMode.startBattle([SpeciesId.KLINK]);
const player = game.scene.getPlayerPokemon()!; const player = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -105,7 +105,7 @@ describe("Moves - Glaive Rush", () => {
it("secondary effects are removed upon switching", async () => { it("secondary effects are removed upon switching", async () => {
game.override.enemyMoveset([MoveId.SHADOW_SNEAK]); game.override.enemyMoveset([MoveId.SHADOW_SNEAK]);
await game.classicMode.startBattle([Species.KLINK, Species.FEEBAS]); await game.classicMode.startBattle([SpeciesId.KLINK, SpeciesId.FEEBAS]);
const player = game.scene.getPlayerPokemon()!; const player = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;
@ -128,7 +128,7 @@ describe("Moves - Glaive Rush", () => {
game.override game.override
.moveset([MoveId.SHADOW_SNEAK, MoveId.PROTECT, MoveId.SPLASH, MoveId.GLAIVE_RUSH]) .moveset([MoveId.SHADOW_SNEAK, MoveId.PROTECT, MoveId.SPLASH, MoveId.GLAIVE_RUSH])
.enemyMoveset([MoveId.GLAIVE_RUSH, MoveId.SPLASH]); .enemyMoveset([MoveId.GLAIVE_RUSH, MoveId.SPLASH]);
await game.classicMode.startBattle([Species.KLINK]); await game.classicMode.startBattle([SpeciesId.KLINK]);
const player = game.scene.getPlayerPokemon()!; const player = game.scene.getPlayerPokemon()!;
const enemy = game.scene.getEnemyPokemon()!; const enemy = game.scene.getEnemyPokemon()!;

View File

@ -30,7 +30,7 @@ describe("Moves - Hard Press", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.ability(AbilityId.BALL_FETCH) .ability(AbilityId.BALL_FETCH)
.enemySpecies(Species.MUNCHLAX) .enemySpecies(SpeciesId.MUNCHLAX)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.moveset([MoveId.HARD_PRESS]); .moveset([MoveId.HARD_PRESS]);

View File

@ -25,7 +25,7 @@ describe("Moves - Haze", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.RATTATA) .enemySpecies(SpeciesId.RATTATA)
.enemyLevel(100) .enemyLevel(100)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)

View File

@ -29,7 +29,7 @@ describe("Moves - Hyper Beam", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.ability(AbilityId.BALL_FETCH) .ability(AbilityId.BALL_FETCH)
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset([MoveId.SPLASH]) .enemyMoveset([MoveId.SPLASH])
.enemyLevel(100) .enemyLevel(100)

View File

@ -24,7 +24,7 @@ describe("Moves - Lunar Blessing", () => {
game.override game.override
.battleStyle("double") .battleStyle("double")
.enemySpecies(Species.SHUCKLE) .enemySpecies(SpeciesId.SHUCKLE)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.moveset([MoveId.LUNAR_BLESSING, MoveId.SPLASH]) .moveset([MoveId.LUNAR_BLESSING, MoveId.SPLASH])

View File

@ -57,7 +57,7 @@ describe("Moves - Magic Coat", () => {
it("should not reflect moves used on the next turn", async () => { it("should not reflect moves used on the next turn", async () => {
game.override.moveset([MoveId.GROWL, MoveId.SPLASH]).enemyMoveset([MoveId.MAGIC_COAT, MoveId.SPLASH]); game.override.moveset([MoveId.GROWL, MoveId.SPLASH]).enemyMoveset([MoveId.MAGIC_COAT, MoveId.SPLASH]);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
// turn 1 // turn 1
game.move.select(MoveId.SPLASH); game.move.select(MoveId.SPLASH);
@ -82,7 +82,7 @@ describe("Moves - Magic Coat", () => {
it("should individually bounce back multi-target moves when used by both targets in doubles", async () => { it("should individually bounce back multi-target moves when used by both targets in doubles", async () => {
game.override.battleStyle("double").moveset([MoveId.GROWL, MoveId.SPLASH]); game.override.battleStyle("double").moveset([MoveId.GROWL, MoveId.SPLASH]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.MAGIKARP]);
game.move.select(MoveId.GROWL, 0); game.move.select(MoveId.GROWL, 0);
game.move.select(MoveId.SPLASH, 1); game.move.select(MoveId.SPLASH, 1);
@ -97,7 +97,7 @@ describe("Moves - Magic Coat", () => {
.battleStyle("double") .battleStyle("double")
.moveset([MoveId.GROWL, MoveId.SPLASH]) .moveset([MoveId.GROWL, MoveId.SPLASH])
.enemyMoveset([MoveId.SPLASH, MoveId.MAGIC_COAT]); .enemyMoveset([MoveId.SPLASH, MoveId.MAGIC_COAT]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.MAGIKARP]);
game.move.select(MoveId.GROWL, 0); game.move.select(MoveId.GROWL, 0);
game.move.select(MoveId.SPLASH, 1); game.move.select(MoveId.SPLASH, 1);
@ -125,7 +125,7 @@ describe("Moves - Magic Coat", () => {
.ability(AbilityId.MAGIC_BOUNCE) .ability(AbilityId.MAGIC_BOUNCE)
.moveset([MoveId.GROWL, MoveId.MAGIC_COAT]) .moveset([MoveId.GROWL, MoveId.MAGIC_COAT])
.enemyMoveset([MoveId.SPLASH, MoveId.MAGIC_COAT]); .enemyMoveset([MoveId.SPLASH, MoveId.MAGIC_COAT]);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.MAGIKARP]);
game.move.select(MoveId.MAGIC_COAT, 0); game.move.select(MoveId.MAGIC_COAT, 0);
game.move.select(MoveId.GROWL, 1); game.move.select(MoveId.GROWL, 1);
@ -148,7 +148,7 @@ describe("Moves - Magic Coat", () => {
it("should still bounce back a move from a mold breaker user", async () => { it("should still bounce back a move from a mold breaker user", async () => {
game.override.ability(AbilityId.MOLD_BREAKER).moveset([MoveId.GROWL]); game.override.ability(AbilityId.MOLD_BREAKER).moveset([MoveId.GROWL]);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
game.move.select(MoveId.GROWL); game.move.select(MoveId.GROWL);
await game.phaseInterceptor.to("BerryPhase"); await game.phaseInterceptor.to("BerryPhase");
@ -159,7 +159,7 @@ describe("Moves - Magic Coat", () => {
it("should only bounce spikes back once when both targets use magic coat in doubles", async () => { it("should only bounce spikes back once when both targets use magic coat in doubles", async () => {
game.override.battleStyle("double").moveset([MoveId.SPIKES]); game.override.battleStyle("double").moveset([MoveId.SPIKES]);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
game.move.select(MoveId.SPIKES); game.move.select(MoveId.SPIKES);
await game.phaseInterceptor.to("BerryPhase"); await game.phaseInterceptor.to("BerryPhase");
@ -170,7 +170,7 @@ describe("Moves - Magic Coat", () => {
it("should not bounce back curse", async () => { it("should not bounce back curse", async () => {
game.override.moveset([MoveId.CURSE]); game.override.moveset([MoveId.CURSE]);
await game.classicMode.startBattle([Species.GASTLY]); await game.classicMode.startBattle([SpeciesId.GASTLY]);
game.move.select(MoveId.CURSE); game.move.select(MoveId.CURSE);
await game.phaseInterceptor.to("BerryPhase"); await game.phaseInterceptor.to("BerryPhase");
@ -205,7 +205,7 @@ describe("Moves - Magic Coat", () => {
// TODO: stomping tantrum should consider moves that were bounced. // 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 () => { it.todo("should cause stomping tantrum to double in power when the last move was bounced", async () => {
game.override.battleStyle("single").moveset([MoveId.STOMPING_TANTRUM, MoveId.CHARM]); game.override.battleStyle("single").moveset([MoveId.STOMPING_TANTRUM, MoveId.CHARM]);
await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
const stomping_tantrum = allMoves[MoveId.STOMPING_TANTRUM]; const stomping_tantrum = allMoves[MoveId.STOMPING_TANTRUM];
vi.spyOn(stomping_tantrum, "calculateBattlePower"); vi.spyOn(stomping_tantrum, "calculateBattlePower");
@ -247,7 +247,7 @@ describe("Moves - Magic Coat", () => {
it("should respect immunities when bouncing a move", async () => { it("should respect immunities when bouncing a move", async () => {
vi.spyOn(allMoves[MoveId.THUNDER_WAVE], "accuracy", "get").mockReturnValue(100); vi.spyOn(allMoves[MoveId.THUNDER_WAVE], "accuracy", "get").mockReturnValue(100);
game.override.moveset([MoveId.THUNDER_WAVE, MoveId.GROWL]).ability(AbilityId.SOUNDPROOF); game.override.moveset([MoveId.THUNDER_WAVE, MoveId.GROWL]).ability(AbilityId.SOUNDPROOF);
await game.classicMode.startBattle([Species.PHANPY]); await game.classicMode.startBattle([SpeciesId.PHANPY]);
// Turn 1 - thunder wave immunity test // Turn 1 - thunder wave immunity test
game.move.select(MoveId.THUNDER_WAVE); game.move.select(MoveId.THUNDER_WAVE);

View File

@ -27,7 +27,7 @@ describe("Moves - Make It Rain", () => {
game.override game.override
.battleStyle("double") .battleStyle("double")
.moveset([MoveId.MAKE_IT_RAIN, MoveId.SPLASH]) .moveset([MoveId.MAKE_IT_RAIN, MoveId.SPLASH])
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.enemyAbility(AbilityId.INSOMNIA) .enemyAbility(AbilityId.INSOMNIA)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.startingLevel(100) .startingLevel(100)

View File

@ -29,7 +29,7 @@ describe("Moves - Mat Block", () => {
game.override game.override
.battleStyle("double") .battleStyle("double")
.moveset([MoveId.MAT_BLOCK, MoveId.SPLASH]) .moveset([MoveId.MAT_BLOCK, MoveId.SPLASH])
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.enemyMoveset([MoveId.TACKLE]) .enemyMoveset([MoveId.TACKLE])
.enemyAbility(AbilityId.INSOMNIA) .enemyAbility(AbilityId.INSOMNIA)
.startingLevel(100) .startingLevel(100)

View File

@ -30,7 +30,7 @@ describe("Moves - Protect", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.moveset([MoveId.PROTECT]) .moveset([MoveId.PROTECT])
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.enemyAbility(AbilityId.INSOMNIA) .enemyAbility(AbilityId.INSOMNIA)
.enemyMoveset([MoveId.TACKLE]) .enemyMoveset([MoveId.TACKLE])
.startingLevel(100) .startingLevel(100)

View File

@ -26,10 +26,10 @@ describe("Moves - Purify", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.starterSpecies(Species.PYUKUMUKU) .starterSpecies(SpeciesId.PYUKUMUKU)
.startingLevel(10) .startingLevel(10)
.moveset([MoveId.PURIFY, MoveId.SIZZLY_SLIDE]) .moveset([MoveId.PURIFY, MoveId.SIZZLY_SLIDE])
.enemySpecies(Species.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.enemyLevel(10) .enemyLevel(10)
.enemyMoveset([MoveId.SPLASH, MoveId.NONE, MoveId.NONE, MoveId.NONE]); .enemyMoveset([MoveId.SPLASH, MoveId.NONE, MoveId.NONE, MoveId.NONE]);
}); });

View File

@ -28,7 +28,7 @@ describe("Moves - Quick Guard", () => {
game.override game.override
.battleStyle("double") .battleStyle("double")
.moveset([MoveId.QUICK_GUARD, MoveId.SPLASH, MoveId.FOLLOW_ME]) .moveset([MoveId.QUICK_GUARD, MoveId.SPLASH, MoveId.FOLLOW_ME])
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.enemyMoveset([MoveId.QUICK_ATTACK]) .enemyMoveset([MoveId.QUICK_ATTACK])
.enemyAbility(AbilityId.INSOMNIA) .enemyAbility(AbilityId.INSOMNIA)
.startingLevel(100) .startingLevel(100)

View File

@ -24,7 +24,7 @@ describe("Moves - Rage Powder", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("double") .battleStyle("double")
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.startingLevel(100) .startingLevel(100)
.enemyLevel(100) .enemyLevel(100)
.moveset([MoveId.FOLLOW_ME, MoveId.RAGE_POWDER, MoveId.SPOTLIGHT, MoveId.QUICK_ATTACK]) .moveset([MoveId.FOLLOW_ME, MoveId.RAGE_POWDER, MoveId.SPOTLIGHT, MoveId.QUICK_ATTACK])

View File

@ -25,9 +25,9 @@ describe("Moves - Rollout", () => {
game.override game.override
.disableCrits() .disableCrits()
.battleStyle("single") .battleStyle("single")
.starterSpecies(Species.RATTATA) .starterSpecies(SpeciesId.RATTATA)
.ability(AbilityId.BALL_FETCH) .ability(AbilityId.BALL_FETCH)
.enemySpecies(Species.BIDOOF) .enemySpecies(SpeciesId.BIDOOF)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.startingLevel(100) .startingLevel(100)
.enemyLevel(100) .enemyLevel(100)

View File

@ -27,7 +27,7 @@ describe("Moves - Roost", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.RELICANTH) .enemySpecies(SpeciesId.RELICANTH)
.startingLevel(100) .startingLevel(100)
.enemyLevel(100) .enemyLevel(100)
.enemyMoveset(MoveId.EARTHQUAKE) .enemyMoveset(MoveId.EARTHQUAKE)

View File

@ -34,7 +34,7 @@ describe("Moves - Spit Up", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.RATTATA) .enemySpecies(SpeciesId.RATTATA)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.enemyAbility(AbilityId.NONE) .enemyAbility(AbilityId.NONE)
.enemyLevel(2000) .enemyLevel(2000)

View File

@ -24,8 +24,8 @@ describe("Moves - Spotlight", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("double") .battleStyle("double")
.starterSpecies(Species.AMOONGUSS) .starterSpecies(SpeciesId.AMOONGUSS)
.enemySpecies(Species.SNORLAX) .enemySpecies(SpeciesId.SNORLAX)
.startingLevel(100) .startingLevel(100)
.enemyLevel(100) .enemyLevel(100)
.moveset([MoveId.FOLLOW_ME, MoveId.RAGE_POWDER, MoveId.SPOTLIGHT, MoveId.QUICK_ATTACK]) .moveset([MoveId.FOLLOW_ME, MoveId.RAGE_POWDER, MoveId.SPOTLIGHT, MoveId.QUICK_ATTACK])

View File

@ -29,7 +29,7 @@ describe("Moves - Stockpile", () => {
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.RATTATA) .enemySpecies(SpeciesId.RATTATA)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.enemyAbility(AbilityId.NONE) .enemyAbility(AbilityId.NONE)
.startingLevel(2000) .startingLevel(2000)

View File

@ -36,9 +36,9 @@ describe("Moves - Tackle", () => {
it("TACKLE against ghost", async () => { it("TACKLE against ghost", async () => {
const moveToUse = MoveId.TACKLE; const moveToUse = MoveId.TACKLE;
game.override.enemySpecies(Species.GENGAR); game.override.enemySpecies(SpeciesId.GENGAR);
await game.classicMode.startBattle([Species.MIGHTYENA]); await game.classicMode.startBattle([SpeciesId.MIGHTYENA]);
const hpOpponent = game.scene.currentBattle.enemyParty[0].hp; const hpOpponent = game.scene.currentBattle.enemyParty[0].hp;
game.move.select(moveToUse); game.move.select(moveToUse);
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnEndPhase); await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnEndPhase);

View File

@ -27,7 +27,7 @@ describe("Moves - Tail whip", () => {
const moveToUse = MoveId.TAIL_WHIP; const moveToUse = MoveId.TAIL_WHIP;
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.RATTATA) .enemySpecies(SpeciesId.RATTATA)
.enemyAbility(AbilityId.INSOMNIA) .enemyAbility(AbilityId.INSOMNIA)
.ability(AbilityId.INSOMNIA) .ability(AbilityId.INSOMNIA)
.startingLevel(2000) .startingLevel(2000)

View File

@ -26,7 +26,7 @@ describe("Moves - Thousand Arrows", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.TOGETIC) .enemySpecies(SpeciesId.TOGETIC)
.startingLevel(100) .startingLevel(100)
.enemyLevel(100) .enemyLevel(100)
.moveset([MoveId.THOUSAND_ARROWS]) .moveset([MoveId.THOUSAND_ARROWS])
@ -51,7 +51,7 @@ describe("Moves - Thousand Arrows", () => {
}); });
it("move should hit and ground targets with Levitate", async () => { it("move should hit and ground targets with Levitate", async () => {
game.override.enemySpecies(Species.SNORLAX).enemyAbility(AbilityId.LEVITATE); game.override.enemySpecies(SpeciesId.SNORLAX).enemyAbility(AbilityId.LEVITATE);
await game.classicMode.startBattle([SpeciesId.ILLUMISE]); await game.classicMode.startBattle([SpeciesId.ILLUMISE]);

View File

@ -27,10 +27,10 @@ describe("Moves - Tidy Up", () => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.battleStyle("single") .battleStyle("single")
.enemySpecies(Species.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.enemyAbility(AbilityId.BALL_FETCH) .enemyAbility(AbilityId.BALL_FETCH)
.enemyMoveset(MoveId.SPLASH) .enemyMoveset(MoveId.SPLASH)
.starterSpecies(Species.FEEBAS) .starterSpecies(SpeciesId.FEEBAS)
.ability(AbilityId.BALL_FETCH) .ability(AbilityId.BALL_FETCH)
.moveset([MoveId.TIDY_UP]) .moveset([MoveId.TIDY_UP])
.startingLevel(50); .startingLevel(50);

View File

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

View File

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

View File

@ -36,7 +36,7 @@ describe("UI - Transfer Items", () => {
{ name: "BERRY", count: 2, type: BerryType.LUM }, { name: "BERRY", count: 2, type: BerryType.LUM },
]) ])
.moveset([MoveId.DRAGON_CLAW]) .moveset([MoveId.DRAGON_CLAW])
.enemySpecies(Species.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.enemyMoveset([MoveId.SPLASH]); .enemyMoveset([MoveId.SPLASH]);
await game.classicMode.startBattle([SpeciesId.RAYQUAZA, SpeciesId.RAYQUAZA, SpeciesId.RAYQUAZA]); await game.classicMode.startBattle([SpeciesId.RAYQUAZA, SpeciesId.RAYQUAZA, SpeciesId.RAYQUAZA]);