Removed unneeded duplicate entries from movesets

This commit is contained in:
Bertie690 2025-05-04 11:10:23 -04:00 committed by Bertie690
parent 8d78963eec
commit 207fe28147
34 changed files with 107 additions and 125 deletions

View File

@ -54,10 +54,7 @@ describe("Abilities - Contrary", () => {
});
it("should block negative effects", async () => {
game.override
.enemyPassiveAbility(Abilities.CLEAR_BODY)
.enemyMoveset([Moves.HOWL, Moves.HOWL, Moves.HOWL, Moves.HOWL])
.moveset([Moves.SPLASH]);
game.override.enemyPassiveAbility(Abilities.CLEAR_BODY).enemyMoveset(Moves.HOWL).moveset([Moves.SPLASH]);
await game.classicMode.startBattle([Species.SLOWBRO]);
const enemyPokemon = game.scene.getEnemyPokemon()!;

View File

@ -106,7 +106,7 @@ describe("Abilities - Ice Face", () => {
});
it("transforms to Ice Face when Hail or Snow starts", async () => {
game.override.moveset([Moves.QUICK_ATTACK]).enemyMoveset([Moves.HAIL, Moves.HAIL, Moves.HAIL, Moves.HAIL]);
game.override.moveset([Moves.QUICK_ATTACK]).enemyMoveset(Moves.HAIL);
await game.classicMode.startBattle([Species.MAGIKARP]);
@ -127,7 +127,7 @@ describe("Abilities - Ice Face", () => {
});
it("transforms to Ice Face when summoned on arena with active Snow or Hail", async () => {
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]).moveset([Moves.SNOWSCAPE]);
game.override.enemyMoveset(Moves.TACKLE).moveset([Moves.SNOWSCAPE]);
await game.classicMode.startBattle([Species.EISCUE, Species.NINJASK]);
@ -153,7 +153,7 @@ describe("Abilities - Ice Face", () => {
});
it("will not revert to its Ice Face if there is already Hail when it changes into Noice", async () => {
game.override.enemySpecies(Species.SHUCKLE).enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
game.override.enemySpecies(Species.SHUCKLE).enemyMoveset(Moves.TACKLE);
await game.classicMode.startBattle([Species.EISCUE]);
@ -172,7 +172,7 @@ describe("Abilities - Ice Face", () => {
});
it("persists form change when switched out", async () => {
game.override.enemyMoveset([Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK]);
game.override.enemyMoveset(Moves.QUICK_ATTACK);
await game.classicMode.startBattle([Species.EISCUE, Species.MAGIKARP]);

View File

@ -34,7 +34,7 @@ describe("Abilities - Libero", () => {
.ability(Abilities.LIBERO)
.startingLevel(100)
.enemySpecies(Species.RATTATA)
.enemyMoveset([Moves.ENDURE, Moves.ENDURE, Moves.ENDURE, Moves.ENDURE]);
.enemyMoveset(Moves.ENDURE);
});
test("ability applies and changes a pokemon's type", async () => {
@ -172,7 +172,7 @@ describe("Abilities - Libero", () => {
});
test("ability applies correctly even if the pokemon's move is protected against", async () => {
game.override.moveset([Moves.TACKLE]).enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]);
game.override.moveset([Moves.TACKLE]).enemyMoveset(Moves.PROTECT);
await game.classicMode.startBattle([Species.MAGIKARP]);

View File

@ -1,11 +1,12 @@
import { BattlerIndex } from "#app/battle";
import { ArenaTagSide, getArenaTag } from "#app/data/arena-tag";
import { getStatusEffectCatchRateMultiplier } from "#app/data/status-effect";
import { TurnEndPhase } from "#app/phases/turn-end-phase";
import { Abilities } from "#enums/abilities";
import { ArenaTagType } from "#enums/arena-tag-type";
import { BattlerTagType } from "#enums/battler-tag-type";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { Stat } from "#enums/stat";
import { StatusEffect } from "#enums/status-effect";
import { WeatherType } from "#enums/weather-type";
import GameManager from "#test/testUtils/gameManager";
@ -55,7 +56,7 @@ describe("Abilities - Magic Guard", () => {
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -66,31 +67,36 @@ describe("Abilities - Magic Guard", () => {
expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp());
});
it("ability should prevent damage caused by status effects but other non-damage effects still apply", async () => {
//Toxic keeps track of the turn counters -> important that Magic Guard keeps track of post-Toxic turns
game.override.statusEffect(StatusEffect.POISON);
it("should retain catch boost, toxic turn count and burn attack drops", async () => {
game.override.statusEffect(StatusEffect.TOXIC);
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to("TurnEndPhase");
await game.phaseInterceptor.to(TurnEndPhase);
/**
* Expect:
* - The player Pokemon (with Magic Guard) has not taken damage from poison
* - The Pokemon's CatchRateMultiplier should be 1.5
*/
expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp());
expect(leadPokemon.status).toBeTruthy();
expect(leadPokemon.status!.toxicTurnCount).toBeGreaterThan(0);
expect(getStatusEffectCatchRateMultiplier(leadPokemon.status!.effect)).toBe(1.5);
await game.toNextTurn();
// give ourselves burn and ensure our attack indeed dropped
const prevAtk = leadPokemon.getEffectiveStat(Stat.ATK);
leadPokemon.resetStatus();
expect(leadPokemon.status).toBeFalsy();
leadPokemon.trySetStatus(StatusEffect.BURN);
expect(leadPokemon.status).toBeTruthy();
const burntAtk = leadPokemon.getEffectiveStat(Stat.ATK);
expect(burntAtk).toBeCloseTo(prevAtk / 2, 1);
});
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])
.statusEffect(StatusEffect.POISON);
game.override.enemyMoveset(Moves.WORRY_SEED).statusEffect(StatusEffect.POISON);
await game.classicMode.startBattle([Species.MAGIKARP]);
@ -98,7 +104,7 @@ describe("Abilities - Magic Guard", () => {
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -116,7 +122,7 @@ describe("Abilities - Magic Guard", () => {
const enemyPokemon = game.scene.getEnemyPokemon()!;
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -140,7 +146,7 @@ describe("Abilities - Magic Guard", () => {
const toxicStartCounter = enemyPokemon.status!.toxicTurnCount;
//should be 0
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -165,7 +171,7 @@ describe("Abilities - Magic Guard", () => {
const enemyPokemon = game.scene.getEnemyPokemon()!;
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -190,7 +196,7 @@ describe("Abilities - Magic Guard", () => {
const enemyPokemon = game.scene.getEnemyPokemon()!;
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -214,7 +220,7 @@ describe("Abilities - Magic Guard", () => {
const enemyPokemon = game.scene.getEnemyPokemon()!;
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -236,7 +242,7 @@ describe("Abilities - Magic Guard", () => {
game.move.select(Moves.HIGH_JUMP_KICK);
await game.move.forceMiss();
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -253,7 +259,7 @@ describe("Abilities - Magic Guard", () => {
game.move.select(Moves.TAKE_DOWN);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -270,7 +276,7 @@ describe("Abilities - Magic Guard", () => {
game.move.select(Moves.STRUGGLE);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -279,8 +285,7 @@ describe("Abilities - Magic Guard", () => {
expect(leadPokemon.hp).toBeLessThan(leadPokemon.getMaxHp());
});
//This tests different move attributes than the recoil tests above
it("Magic Guard prevents self-damage from attacking moves", async () => {
it("should prevent self-damage from attacking moves", async () => {
game.override.moveset([Moves.STEEL_BEAM]);
await game.classicMode.startBattle([Species.MAGIKARP]);
@ -288,7 +293,7 @@ describe("Abilities - Magic Guard", () => {
game.move.select(Moves.STEEL_BEAM);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -297,17 +302,19 @@ describe("Abilities - Magic Guard", () => {
expect(leadPokemon.hp).toBe(leadPokemon.getMaxHp());
});
/*
it("Magic Guard does not prevent self-damage from confusion", async () => {
it("should not prevent self-damage from confusion", async () => {
game.override.enemyMoveset(Moves.CONFUSE_RAY).confusionActivation(true);
await game.classicMode.startBattle([Species.MAGIKARP]);
game.move.select(Moves.CHARM);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
expect(game.scene.getPlayerPokemon()!.isFullHp()).toBe(false);
});
*/
it("Magic Guard does not prevent self-damage from non-attacking moves", async () => {
it("should not prevent self-damage from non-attacking moves", async () => {
game.override.moveset([Moves.BELLY_DRUM]);
await game.classicMode.startBattle([Species.MAGIKARP]);
@ -315,7 +322,7 @@ describe("Abilities - Magic Guard", () => {
game.move.select(Moves.BELLY_DRUM);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -325,10 +332,7 @@ describe("Abilities - Magic Guard", () => {
});
it("Magic Guard prevents damage from abilities with PostTurnHurtIfSleepingAbAttr", async () => {
//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.statusEffect(StatusEffect.SLEEP).enemyMoveset(Moves.SPORE).enemyAbility(Abilities.BAD_DREAMS);
await game.classicMode.startBattle([Species.MAGIKARP]);
@ -336,7 +340,7 @@ describe("Abilities - Magic Guard", () => {
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -347,8 +351,7 @@ describe("Abilities - Magic Guard", () => {
expect(leadPokemon.status!.effect).toBe(StatusEffect.SLEEP);
});
it("Magic Guard prevents damage from abilities with PostFaintContactDamageAbAttr", async () => {
//Tests the abilities Innards Out/Aftermath
it("should prevent damage from abilities with PostFaintContactDamageAbAttr", async () => {
game.override.moveset([Moves.TACKLE]).enemyAbility(Abilities.AFTERMATH);
await game.classicMode.startBattle([Species.MAGIKARP]);
@ -359,7 +362,7 @@ describe("Abilities - Magic Guard", () => {
enemyPokemon.hp = 1;
game.move.select(Moves.TACKLE);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -381,7 +384,7 @@ describe("Abilities - Magic Guard", () => {
const enemyPokemon = game.scene.getEnemyPokemon()!;
game.move.select(Moves.TACKLE);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -403,7 +406,7 @@ describe("Abilities - Magic Guard", () => {
const enemyPokemon = game.scene.getEnemyPokemon()!;
game.move.select(Moves.ABSORB);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:
@ -420,7 +423,7 @@ describe("Abilities - Magic Guard", () => {
await game.classicMode.startBattle([Species.MAGIKARP]);
const leadPokemon = game.scene.getPlayerPokemon()!;
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to(TurnEndPhase);
await game.phaseInterceptor.to("TurnEndPhase");
/**
* Expect:

View File

@ -30,7 +30,7 @@ describe("Abilities - Mycelium Might", () => {
.enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.CLEAR_BODY)
.enemyMoveset([Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK])
.enemyMoveset(Moves.QUICK_ATTACK)
.ability(Abilities.MYCELIUM_MIGHT)
.moveset([Moves.QUICK_ATTACK, Moves.BABY_DOLL_EYES]);
});
@ -66,7 +66,7 @@ describe("Abilities - Mycelium Might", () => {
});
it("will still go first if a status move that is in a higher priority bracket than the opponent's move is used", async () => {
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
game.override.enemyMoveset(Moves.TACKLE);
await game.classicMode.startBattle([Species.REGIELEKI]);
const enemyPokemon = game.scene.getEnemyPokemon();

View File

@ -29,7 +29,7 @@ describe("Abilities - POWER CONSTRUCT", () => {
.battleStyle("single")
.ability(Abilities.POWER_CONSTRUCT)
.moveset([moveToUse])
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
.enemyMoveset(Moves.TACKLE);
});
test("check if fainted 50% Power Construct Pokemon switches to base form on arena reset", async () => {

View File

@ -34,7 +34,7 @@ describe("Abilities - Protean", () => {
.ability(Abilities.PROTEAN)
.startingLevel(100)
.enemySpecies(Species.RATTATA)
.enemyMoveset([Moves.ENDURE, Moves.ENDURE, Moves.ENDURE, Moves.ENDURE]);
.enemyMoveset(Moves.ENDURE);
});
test("ability applies and changes a pokemon's type", async () => {
@ -172,7 +172,7 @@ describe("Abilities - Protean", () => {
});
test("ability applies correctly even if the pokemon's move is protected against", async () => {
game.override.moveset([Moves.TACKLE]).enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]);
game.override.moveset([Moves.TACKLE]).enemyMoveset(Moves.PROTECT);
await game.classicMode.startBattle([Species.MAGIKARP]);

View File

@ -32,7 +32,7 @@ describe("Abilities - Sand Veil", () => {
.moveset([Moves.SPLASH])
.enemySpecies(Species.MEOWSCARADA)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset([Moves.TWISTER, Moves.TWISTER, Moves.TWISTER, Moves.TWISTER])
.enemyMoveset(Moves.TWISTER)
.startingLevel(100)
.enemyLevel(100)
.weather(WeatherType.SANDSTORM)

View File

@ -25,11 +25,7 @@ describe("Abilities - SCHOOLING", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
const moveToUse = Moves.SPLASH;
game.override
.battleStyle("single")
.ability(Abilities.SCHOOLING)
.moveset([moveToUse])
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
game.override.battleStyle("single").ability(Abilities.SCHOOLING).moveset([moveToUse]).enemyMoveset(Moves.TACKLE);
});
test("check if fainted pokemon switches to base form on arena reset", async () => {

View File

@ -28,9 +28,7 @@ describe("Abilities - Screen Cleaner", () => {
});
it("removes Aurora Veil", async () => {
game.override
.moveset([Moves.HAIL])
.enemyMoveset([Moves.AURORA_VEIL, Moves.AURORA_VEIL, Moves.AURORA_VEIL, Moves.AURORA_VEIL]);
game.override.moveset([Moves.HAIL]).enemyMoveset(Moves.AURORA_VEIL);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
@ -47,7 +45,7 @@ describe("Abilities - Screen Cleaner", () => {
});
it("removes Light Screen", async () => {
game.override.enemyMoveset([Moves.LIGHT_SCREEN, Moves.LIGHT_SCREEN, Moves.LIGHT_SCREEN, Moves.LIGHT_SCREEN]);
game.override.enemyMoveset(Moves.LIGHT_SCREEN);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]);
@ -64,7 +62,7 @@ describe("Abilities - Screen Cleaner", () => {
});
it("removes Reflect", async () => {
game.override.enemyMoveset([Moves.REFLECT, Moves.REFLECT, Moves.REFLECT, Moves.REFLECT]);
game.override.enemyMoveset(Moves.REFLECT);
await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]);

View File

@ -27,7 +27,7 @@ describe("Abilities - Stall", () => {
.disableCrits()
.enemySpecies(Species.REGIELEKI)
.enemyAbility(Abilities.STALL)
.enemyMoveset([Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK])
.enemyMoveset(Moves.QUICK_ATTACK)
.moveset([Moves.QUICK_ATTACK, Moves.TACKLE]);
});

View File

@ -30,7 +30,7 @@ describe("Abilities - Sweet Veil", () => {
.moveset([Moves.SPLASH, Moves.REST, Moves.YAWN])
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset([Moves.POWDER, Moves.POWDER, Moves.POWDER, Moves.POWDER]);
.enemyMoveset(Moves.POWDER);
});
it("prevents the user and its allies from falling asleep", async () => {
@ -57,7 +57,7 @@ describe("Abilities - Sweet Veil", () => {
});
it("causes Yawn to fail if used on the user or its allies", async () => {
game.override.enemyMoveset([Moves.YAWN, Moves.YAWN, Moves.YAWN, Moves.YAWN]);
game.override.enemyMoveset(Moves.YAWN);
await game.classicMode.startBattle([Species.SWIRLIX, Species.MAGIKARP]);
game.move.select(Moves.SPLASH);

View File

@ -28,7 +28,7 @@ describe("Abilities - Unseen Fist", () => {
.battleStyle("single")
.starterSpecies(Species.URSHIFU)
.enemySpecies(Species.SNORLAX)
.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT])
.enemyMoveset(Moves.PROTECT)
.startingLevel(100)
.enemyLevel(100);
});
@ -73,7 +73,7 @@ async function testUnseenFistHitResult(
protectMove: Moves,
shouldSucceed = true,
): Promise<void> {
game.override.moveset([attackMove]).enemyMoveset([protectMove, protectMove, protectMove, protectMove]);
game.override.moveset([attackMove]).enemyMoveset(protectMove);
await game.classicMode.startBattle();

View File

@ -26,7 +26,7 @@ import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { Biome } from "#app/enums/biome";
describe("Test Battle Phase", () => {
describe("Test - Battle Phase", () => {
let phaserGame: Phaser.Game;
let game: GameManager;
@ -95,7 +95,7 @@ describe("Test Battle Phase", () => {
.startingLevel(2000)
.startingWave(3)
.battleStyle("single")
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
.enemyMoveset(Moves.TACKLE);
await game.classicMode.startBattle([Species.MEWTWO]);
game.move.select(Moves.TACKLE);
await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(SelectModifierPhase, false);
@ -108,7 +108,7 @@ describe("Test Battle Phase", () => {
.startingWave(3)
.moveset([Moves.TACKLE])
.enemyAbility(Abilities.HYDRATION)
.enemyMoveset([Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP])
.enemyMoveset(Moves.TAIL_WHIP)
.battleStyle("single");
await game.classicMode.startBattle([Species.MEWTWO]);
game.move.select(Moves.TACKLE);
@ -205,7 +205,7 @@ describe("Test Battle Phase", () => {
{ name: "2v1", double: false, qty: 2 },
{ name: "2v2", double: true, qty: 2 },
{ name: "4v2", double: true, qty: 4 },
])("should not crash when starting $1 battle", async ({ double, qty }) => {
])("should not crash when starting $name battle", async ({ double, qty }) => {
game.override
.battleStyle(double ? "double" : "single")
.enemySpecies(Species.MIGHTYENA)
@ -213,11 +213,11 @@ describe("Test Battle Phase", () => {
.ability(Abilities.HYDRATION);
await game.classicMode.startBattle(
[Species.BLASTOISE, Species.CHARIZARD, Species.DARKRAI, Species.GABITE].slice(qty),
[Species.BLASTOISE, Species.CHARIZARD, Species.DARKRAI, Species.GABITE].slice(0, qty),
);
expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND);
expect(game.scene.getCurrentPhase()).toBeInstanceOf(CommandPhase.name);
expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name);
});
it("kill opponent pokemon", async () => {
@ -231,7 +231,7 @@ describe("Test Battle Phase", () => {
.startingLevel(2000)
.startingWave(3)
.moveset([moveToUse])
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
.enemyMoveset(Moves.TACKLE);
await game.classicMode.startBattle([Species.DARMANITAN, Species.CHARIZARD]);
game.move.select(moveToUse);
@ -250,7 +250,7 @@ describe("Test Battle Phase", () => {
.startingLevel(2000)
.startingWave(3)
.moveset([moveToUse])
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
.enemyMoveset(Moves.TACKLE);
await game.classicMode.startBattle([Species.MEWTWO]);
const turn = game.scene.currentBattle.turn;
game.move.select(moveToUse);
@ -270,7 +270,7 @@ describe("Test Battle Phase", () => {
.startingWave(3)
.startingBiome(Biome.LAKE)
.moveset([moveToUse])
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
.enemyMoveset(Moves.TACKLE);
await game.classicMode.startBattle();
const waveIndex = game.scene.currentBattle.waveIndex;
game.move.select(moveToUse);

View File

@ -188,9 +188,7 @@ describe("Inverse Battle", () => {
});
it("Conversion 2 should change the type to the resistive type - Conversion 2 against Dragonite", async () => {
game.override
.moveset([Moves.CONVERSION_2])
.enemyMoveset([Moves.DRAGON_CLAW, Moves.DRAGON_CLAW, Moves.DRAGON_CLAW, Moves.DRAGON_CLAW]);
game.override.moveset([Moves.CONVERSION_2]).enemyMoveset(Moves.DRAGON_CLAW);
await game.challengeMode.startBattle();

View File

@ -29,7 +29,7 @@ describe("Test Battle Phase", () => {
.moveset([Moves.TACKLE])
.enemyAbility(Abilities.HYDRATION)
.ability(Abilities.HYDRATION)
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
.enemyMoveset(Moves.TACKLE);
});
it("startBattle 2vs1 boss", async () => {

View File

@ -25,7 +25,7 @@ describe("Items - Leek", () => {
game.override
.enemySpecies(Species.MAGIKARP)
.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH])
.enemyMoveset(Moves.SPLASH)
.startingHeldItems([{ name: "LEEK" }])
.moveset([Moves.TACKLE])
.battleStyle("single");

View File

@ -30,7 +30,7 @@ describe("Items - Leftovers", () => {
.moveset([Moves.SPLASH])
.enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.UNNERVE)
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE])
.enemyMoveset(Moves.TACKLE)
.startingHeldItems([{ name: "LEFTOVERS", count: 1 }]);
});

View File

@ -32,7 +32,7 @@ describe("Moves - Astonish", () => {
.moveset([Moves.ASTONISH, Moves.SPLASH])
.enemySpecies(Species.BLASTOISE)
.enemyAbility(Abilities.INSOMNIA)
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE])
.enemyMoveset(Moves.TACKLE)
.startingLevel(100)
.enemyLevel(100);

View File

@ -42,7 +42,7 @@ describe("Moves - Aurora Veil", () => {
.moveset([Moves.ABSORB, Moves.ROCK_SLIDE, Moves.TACKLE])
.enemyLevel(100)
.enemySpecies(Species.MAGIKARP)
.enemyMoveset([Moves.AURORA_VEIL, Moves.AURORA_VEIL, Moves.AURORA_VEIL, Moves.AURORA_VEIL])
.enemyMoveset(Moves.AURORA_VEIL)
.disableCrits()
.weather(WeatherType.HAIL);
});

View File

@ -30,7 +30,7 @@ describe("Moves - Double Team", () => {
.ability(Abilities.BALL_FETCH)
.enemySpecies(Species.SHUCKLE)
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
.enemyMoveset(Moves.TACKLE);
});
it("raises the user's EVA stat stage by 1", async () => {

View File

@ -36,7 +36,7 @@ describe("Moves - Dynamax Cannon", () => {
.battleStyle("single")
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
.enemyMoveset(Moves.SPLASH);
vi.spyOn(allMoves[Moves.DYNAMAX_CANNON], "calculateBattlePower");
});

View File

@ -75,7 +75,7 @@ describe("Moves - Flower Shield", () => {
* See semi-vulnerable state tags. {@linkcode SemiInvulnerableTag}
*/
it("does not raise DEF stat stage for a Pokemon in semi-vulnerable state", async () => {
game.override.enemySpecies(Species.PARAS).enemyMoveset([Moves.DIG, Moves.DIG, Moves.DIG, Moves.DIG]).enemyLevel(50);
game.override.enemySpecies(Species.PARAS).enemyMoveset(Moves.DIG).enemyLevel(50);
await game.classicMode.startBattle([Species.CHERRIM]);
const paras = game.scene.getEnemyPokemon()!;

View File

@ -27,7 +27,7 @@ describe("Moves - Freezy Frost", () => {
.battleStyle("single")
.enemySpecies(Species.RATTATA)
.enemyLevel(100)
.enemyMoveset([Moves.HOWL, Moves.HOWL, Moves.HOWL, Moves.HOWL])
.enemyMoveset(Moves.HOWL)
.enemyAbility(Abilities.BALL_FETCH)
.startingLevel(100)
.moveset([Moves.FREEZY_FROST, Moves.HOWL, Moves.SPLASH])
@ -55,7 +55,7 @@ describe("Moves - Freezy Frost", () => {
});
it("should clear all stat changes even when enemy uses the move", async () => {
game.override.enemyMoveset([Moves.FREEZY_FROST, Moves.FREEZY_FROST, Moves.FREEZY_FROST, Moves.FREEZY_FROST]);
game.override.enemyMoveset(Moves.FREEZY_FROST);
await game.classicMode.startBattle([Species.SHUCKLE]); // Shuckle for slower Howl on first turn so Freezy Frost doesn't affect it.
const user = game.scene.getPlayerPokemon()!;

View File

@ -28,7 +28,7 @@ describe("Moves - Fusion Bolt", () => {
.startingLevel(1)
.enemySpecies(Species.RESHIRAM)
.enemyAbility(Abilities.ROUGH_SKIN)
.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH])
.enemyMoveset(Moves.SPLASH)
.battleStyle("single")
.startingWave(97)
.disableCrits();

View File

@ -28,7 +28,7 @@ describe("Moves - Fusion Flare", () => {
.moveset([fusionFlare])
.startingLevel(1)
.enemySpecies(Species.RATTATA)
.enemyMoveset([Moves.REST, Moves.REST, Moves.REST, Moves.REST])
.enemyMoveset(Moves.REST)
.battleStyle("single")
.startingWave(97)
.disableCrits();

View File

@ -37,7 +37,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
.moveset([fusionFlare.id, fusionBolt.id])
.startingLevel(1)
.enemySpecies(Species.RESHIRAM)
.enemyMoveset([Moves.REST, Moves.REST, Moves.REST, Moves.REST])
.enemyMoveset(Moves.REST)
.battleStyle("double")
.startingWave(97)
.disableCrits();
@ -112,7 +112,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
});
it("FUSION_FLARE should not double power of subsequent FUSION_BOLT if a move succeeded in between", async () => {
game.override.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
game.override.enemyMoveset(Moves.SPLASH);
await game.classicMode.startBattle([Species.ZEKROM, Species.ZEKROM]);
game.move.select(fusionFlare.id, 0, BattlerIndex.ENEMY);
@ -157,7 +157,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
});
it("FUSION_FLARE and FUSION_BOLT alternating throughout turn should double power of subsequent moves", async () => {
game.override.enemyMoveset([fusionFlare.id, fusionFlare.id, fusionFlare.id, fusionFlare.id]);
game.override.enemyMoveset(fusionFlare.id);
await game.classicMode.startBattle([Species.ZEKROM, Species.ZEKROM]);
const party = game.scene.getPlayerParty();
@ -211,7 +211,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => {
});
it("FUSION_FLARE and FUSION_BOLT alternating throughout turn should double power of subsequent moves if moves are aimed at allies", async () => {
game.override.enemyMoveset([fusionFlare.id, fusionFlare.id, fusionFlare.id, fusionFlare.id]);
game.override.enemyMoveset(fusionFlare.id);
await game.classicMode.startBattle([Species.ZEKROM, Species.ZEKROM]);
const party = game.scene.getPlayerParty();

View File

@ -41,7 +41,7 @@ describe("Moves - Light Screen", () => {
.moveset([Moves.ABSORB, Moves.DAZZLING_GLEAM, Moves.TACKLE])
.enemyLevel(100)
.enemySpecies(Species.MAGIKARP)
.enemyMoveset([Moves.LIGHT_SCREEN, Moves.LIGHT_SCREEN, Moves.LIGHT_SCREEN, Moves.LIGHT_SCREEN])
.enemyMoveset(Moves.LIGHT_SCREEN)
.disableCrits();
});

View File

@ -27,7 +27,7 @@ describe("Moves - Magnet Rise", () => {
.battleStyle("single")
.starterSpecies(Species.MAGNEZONE)
.enemySpecies(Species.RATTATA)
.enemyMoveset([Moves.DRILL_RUN, Moves.DRILL_RUN, Moves.DRILL_RUN, Moves.DRILL_RUN])
.enemyMoveset(Moves.DRILL_RUN)
.disableCrits()
.enemyLevel(1)
.moveset([moveToUse, Moves.SPLASH, Moves.GRAVITY, Moves.BATON_PASS]);

View File

@ -41,7 +41,7 @@ describe("Moves - Reflect", () => {
.moveset([Moves.ABSORB, Moves.ROCK_SLIDE, Moves.TACKLE])
.enemyLevel(100)
.enemySpecies(Species.MAGIKARP)
.enemyMoveset([Moves.REFLECT, Moves.REFLECT, Moves.REFLECT, Moves.REFLECT])
.enemyMoveset(Moves.REFLECT)
.disableCrits();
});

View File

@ -28,7 +28,7 @@ describe("Moves - Retaliate", () => {
game.override
.battleStyle("single")
.enemySpecies(Species.SNORLAX)
.enemyMoveset([Moves.RETALIATE, Moves.RETALIATE, Moves.RETALIATE, Moves.RETALIATE])
.enemyMoveset(Moves.RETALIATE)
.enemyLevel(100)
.moveset([Moves.RETALIATE, Moves.SPLASH])
.startingLevel(80)

View File

@ -33,7 +33,7 @@ describe("Moves - Swallow", () => {
.enemyMoveset(Moves.SPLASH)
.enemyAbility(Abilities.NONE)
.enemyLevel(2000)
.moveset([Moves.SWALLOW, Moves.SWALLOW, Moves.SWALLOW, Moves.SWALLOW])
.moveset(Moves.SWALLOW)
.ability(Abilities.NONE);
});

View File

@ -30,7 +30,7 @@ describe("Moves - Tackle", () => {
.startingLevel(1)
.startingWave(97)
.moveset([moveToUse])
.enemyMoveset([Moves.GROWTH, Moves.GROWTH, Moves.GROWTH, Moves.GROWTH])
.enemyMoveset(Moves.GROWTH)
.disableCrits();
});

View File

@ -38,9 +38,7 @@ describe("Moves - Tidy Up", () => {
});
it("spikes are cleared", async () => {
game.override
.moveset([Moves.SPIKES, Moves.TIDY_UP])
.enemyMoveset([Moves.SPIKES, Moves.SPIKES, Moves.SPIKES, Moves.SPIKES]);
game.override.moveset([Moves.SPIKES, Moves.TIDY_UP]).enemyMoveset(Moves.SPIKES);
await game.classicMode.startBattle();
game.move.select(Moves.SPIKES);
@ -51,9 +49,7 @@ describe("Moves - Tidy Up", () => {
});
it("stealth rocks are cleared", async () => {
game.override
.moveset([Moves.STEALTH_ROCK, Moves.TIDY_UP])
.enemyMoveset([Moves.STEALTH_ROCK, Moves.STEALTH_ROCK, Moves.STEALTH_ROCK, Moves.STEALTH_ROCK]);
game.override.moveset([Moves.STEALTH_ROCK, Moves.TIDY_UP]).enemyMoveset(Moves.STEALTH_ROCK);
await game.classicMode.startBattle();
game.move.select(Moves.STEALTH_ROCK);
@ -64,9 +60,7 @@ describe("Moves - Tidy Up", () => {
});
it("toxic spikes are cleared", async () => {
game.override
.moveset([Moves.TOXIC_SPIKES, Moves.TIDY_UP])
.enemyMoveset([Moves.TOXIC_SPIKES, Moves.TOXIC_SPIKES, Moves.TOXIC_SPIKES, Moves.TOXIC_SPIKES]);
game.override.moveset([Moves.TOXIC_SPIKES, Moves.TIDY_UP]).enemyMoveset(Moves.TOXIC_SPIKES);
await game.classicMode.startBattle();
game.move.select(Moves.TOXIC_SPIKES);
@ -77,9 +71,7 @@ describe("Moves - Tidy Up", () => {
});
it("sticky webs are cleared", async () => {
game.override
.moveset([Moves.STICKY_WEB, Moves.TIDY_UP])
.enemyMoveset([Moves.STICKY_WEB, Moves.STICKY_WEB, Moves.STICKY_WEB, Moves.STICKY_WEB]);
game.override.moveset([Moves.STICKY_WEB, Moves.TIDY_UP]).enemyMoveset(Moves.STICKY_WEB);
await game.classicMode.startBattle();
@ -91,9 +83,7 @@ describe("Moves - Tidy Up", () => {
});
it("substitutes are cleared", async () => {
game.override
.moveset([Moves.SUBSTITUTE, Moves.TIDY_UP])
.enemyMoveset([Moves.SUBSTITUTE, Moves.SUBSTITUTE, Moves.SUBSTITUTE, Moves.SUBSTITUTE]);
game.override.moveset([Moves.SUBSTITUTE, Moves.TIDY_UP]).enemyMoveset(Moves.SUBSTITUTE);
await game.classicMode.startBattle();