From 8fcb33d11aab3586e452ed02a668774677f65239 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Thu, 29 May 2025 19:11:53 -0500 Subject: [PATCH 01/15] [Bug] Fix improperly named sprite key for enemy boss' battle UI (#5888) --- src/ui/battle-info/battle-info.ts | 2 +- src/ui/battle-info/enemy-battle-info.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/battle-info/battle-info.ts b/src/ui/battle-info/battle-info.ts index 71596bf0f43..7e6cc12bd3d 100644 --- a/src/ui/battle-info/battle-info.ts +++ b/src/ui/battle-info/battle-info.ts @@ -230,7 +230,7 @@ export default abstract class BattleInfo extends Phaser.GameObjects.Container { this.box = globalScene.add.sprite(0, 0, this.getTextureName()).setName("box").setOrigin(1, 0.5); this.add(this.box); - this.nameText = addTextObject(player ? -115 : -124, player ? -15.2 : -11.2, "", TextStyle.BATTLE_INFO) + this.nameText = addTextObject(posParams.nameTextX, posParams.nameTextY, "", TextStyle.BATTLE_INFO) .setName("text_name") .setOrigin(0); this.add(this.nameText); diff --git a/src/ui/battle-info/enemy-battle-info.ts b/src/ui/battle-info/enemy-battle-info.ts index e8f5434dcf2..7c16f01ac38 100644 --- a/src/ui/battle-info/enemy-battle-info.ts +++ b/src/ui/battle-info/enemy-battle-info.ts @@ -29,7 +29,7 @@ export class EnemyBattleInfo extends BattleInfo { } override getTextureName(): string { - return this.boss ? "pbinfo_enemy_boss_mini" : "pbinfo_enemy_mini"; + return this.boss ? "pbinfo_enemy_boss" : "pbinfo_enemy_mini"; } override constructTypeIcons(): void { From 14e01c3da12e1fa6cabdb87259eaef0bec9c8cbb Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Thu, 29 May 2025 22:27:39 -0500 Subject: [PATCH 02/15] [Test] Add missing methods to many mocks (#5891) --- test/testUtils/mocks/mockGameObject.ts | 3 +++ test/testUtils/mocks/mockVideoGameObject.ts | 17 +++++++++++++---- .../mocks/mocksContainer/mockContainer.ts | 6 ++++++ .../mocks/mocksContainer/mockGraphics.ts | 6 ++++++ .../mocks/mocksContainer/mockRectangle.ts | 6 ++++++ .../mocks/mocksContainer/mockSprite.ts | 6 ++++++ test/testUtils/mocks/mocksContainer/mockText.ts | 5 +++++ .../mocks/mocksContainer/mockTexture.ts | 11 +++++++++++ 8 files changed, 56 insertions(+), 4 deletions(-) diff --git a/test/testUtils/mocks/mockGameObject.ts b/test/testUtils/mocks/mockGameObject.ts index 0dff7c48c73..1e156b99d21 100644 --- a/test/testUtils/mocks/mockGameObject.ts +++ b/test/testUtils/mocks/mockGameObject.ts @@ -1,4 +1,7 @@ export interface MockGameObject { name: string; + active: boolean; destroy?(): void; + setActive(active: boolean): this; + setName(name: string): this; } diff --git a/test/testUtils/mocks/mockVideoGameObject.ts b/test/testUtils/mocks/mockVideoGameObject.ts index 65a5c37b244..1789229b1c7 100644 --- a/test/testUtils/mocks/mockVideoGameObject.ts +++ b/test/testUtils/mocks/mockVideoGameObject.ts @@ -3,11 +3,20 @@ import type { MockGameObject } from "./mockGameObject"; /** Mocks video-related stuff */ export class MockVideoGameObject implements MockGameObject { public name: string; + public active = true; public play = () => null; public stop = () => this; - public setOrigin = () => null; - public setScale = () => null; - public setVisible = () => null; - public setLoop = () => null; + public setOrigin = () => this; + public setScale = () => this; + public setVisible = () => this; + public setLoop = () => this; + public setName = (name: string) => { + this.name = name; + return this; + }; + public setActive = (active: boolean) => { + this.active = active; + return this; + }; } diff --git a/test/testUtils/mocks/mocksContainer/mockContainer.ts b/test/testUtils/mocks/mocksContainer/mockContainer.ts index 883c3856c26..f1371643ce3 100644 --- a/test/testUtils/mocks/mocksContainer/mockContainer.ts +++ b/test/testUtils/mocks/mocksContainer/mockContainer.ts @@ -14,6 +14,7 @@ export default class MockContainer implements MockGameObject { protected textureManager; public list: MockGameObject[] = []; public name: string; + public active = true; constructor(textureManager: MockTextureManager, x: number, y: number) { this.x = x; @@ -306,4 +307,9 @@ export default class MockContainer implements MockGameObject { } return this; } + + setActive(active: boolean): this { + this.active = active; + return this; + } } diff --git a/test/testUtils/mocks/mocksContainer/mockGraphics.ts b/test/testUtils/mocks/mocksContainer/mockGraphics.ts index 1650d2f9f60..cd43bb3a877 100644 --- a/test/testUtils/mocks/mocksContainer/mockGraphics.ts +++ b/test/testUtils/mocks/mocksContainer/mockGraphics.ts @@ -4,6 +4,7 @@ export default class MockGraphics implements MockGameObject { private scene; public list: MockGameObject[] = []; public name: string; + public active = true; constructor(textureManager, _config) { this.scene = textureManager.scene; } @@ -113,4 +114,9 @@ export default class MockGraphics implements MockGameObject { copyPosition(_source): this { return this; } + + setActive(active: boolean): this { + this.active = active; + return this; + } } diff --git a/test/testUtils/mocks/mocksContainer/mockRectangle.ts b/test/testUtils/mocks/mocksContainer/mockRectangle.ts index c11af824c56..7f54a0e255f 100644 --- a/test/testUtils/mocks/mocksContainer/mockRectangle.ts +++ b/test/testUtils/mocks/mocksContainer/mockRectangle.ts @@ -5,6 +5,7 @@ export default class MockRectangle implements MockGameObject { private scene; public list: MockGameObject[] = []; public name: string; + public active = true; constructor(textureManager, _x, _y, _width, _height, fillColor) { this.fillColor = fillColor; @@ -96,4 +97,9 @@ export default class MockRectangle implements MockGameObject { off(): this { return this; } + + setActive(active: boolean): this { + this.active = active; + return this; + } } diff --git a/test/testUtils/mocks/mocksContainer/mockSprite.ts b/test/testUtils/mocks/mocksContainer/mockSprite.ts index ad70b6ced07..df36b3a29fd 100644 --- a/test/testUtils/mocks/mocksContainer/mockSprite.ts +++ b/test/testUtils/mocks/mocksContainer/mockSprite.ts @@ -13,6 +13,7 @@ export default class MockSprite implements MockGameObject { public anims; public list: MockGameObject[] = []; public name: string; + public active = true; constructor(textureManager, x, y, texture) { this.textureManager = textureManager; this.scene = textureManager.scene; @@ -247,4 +248,9 @@ export default class MockSprite implements MockGameObject { this.phaserSprite.copyPosition(obj); return this; } + + setActive(active: boolean): this { + this.phaserSprite.setActive(active); + return this; + } } diff --git a/test/testUtils/mocks/mocksContainer/mockText.ts b/test/testUtils/mocks/mocksContainer/mockText.ts index 8f72cd0d34f..2345ff70c0d 100644 --- a/test/testUtils/mocks/mocksContainer/mockText.ts +++ b/test/testUtils/mocks/mocksContainer/mockText.ts @@ -12,6 +12,7 @@ export default class MockText implements MockGameObject { public text = ""; public name: string; public color?: string; + public active = true; constructor(textureManager, _x, _y, _content, _styleOptions) { this.scene = textureManager.scene; @@ -354,4 +355,8 @@ export default class MockText implements MockGameObject { // biome-ignore lint/complexity/noBannedTypes: This matches the signature of the class this mocks on(_event: string | symbol, _fn: Function, _context?: any) {} + + setActive(_active: boolean): this { + return this; + } } diff --git a/test/testUtils/mocks/mocksContainer/mockTexture.ts b/test/testUtils/mocks/mocksContainer/mockTexture.ts index eb8b70902fa..3b01f9ab4ea 100644 --- a/test/testUtils/mocks/mocksContainer/mockTexture.ts +++ b/test/testUtils/mocks/mocksContainer/mockTexture.ts @@ -12,6 +12,7 @@ export default class MockTexture implements MockGameObject { public frames: object; public firstFrame: string; public name: string; + public active: boolean; constructor(manager, key: string, source) { this.manager = manager; @@ -39,4 +40,14 @@ export default class MockTexture implements MockGameObject { getSourceImage() { return null; } + + setActive(active: boolean): this { + this.active = active; + return this; + } + + setName(name: string): this { + this.name = name; + return this; + } } From ff6f9131ae50da6002a7114a721bea1d727a8dde Mon Sep 17 00:00:00 2001 From: Jimmybald1 <122436263+Jimmybald1@users.noreply.github.com> Date: Fri, 30 May 2025 05:39:55 +0200 Subject: [PATCH 03/15] [Dev] Fixed biome override not working for Daily Mode (#5776) --- src/game-mode.ts | 10 +++++++--- src/overrides.ts | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/game-mode.ts b/src/game-mode.ts index ec7171b0024..97398d2b0a9 100644 --- a/src/game-mode.ts +++ b/src/game-mode.ts @@ -7,7 +7,7 @@ import type PokemonSpecies from "./data/pokemon-species"; import { allSpecies } from "./data/pokemon-species"; import type { Arena } from "./field/arena"; import Overrides from "#app/overrides"; -import { randSeedInt, randSeedItem } from "#app/utils/common"; +import { isNullOrUndefined, randSeedInt, randSeedItem } from "#app/utils/common"; import { Biome } from "#enums/biome"; import { Species } from "#enums/species"; import { Challenges } from "./enums/challenges"; @@ -124,16 +124,20 @@ export class GameMode implements GameModeConfig { /** * @returns either: - * - random biome for Daily mode * - override from overrides.ts + * - random biome for Daily mode * - Town */ getStartingBiome(): Biome { + if (!isNullOrUndefined(Overrides.STARTING_BIOME_OVERRIDE)) { + return Overrides.STARTING_BIOME_OVERRIDE; + } + switch (this.modeId) { case GameModes.DAILY: return getDailyStartingBiome(); default: - return Overrides.STARTING_BIOME_OVERRIDE || Biome.TOWN; + return Biome.TOWN; } } diff --git a/src/overrides.ts b/src/overrides.ts index 5bbd29b355f..95c758d7c43 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -73,7 +73,7 @@ class DefaultOverrides { */ readonly BATTLE_STYLE_OVERRIDE: BattleStyle | null = null; readonly STARTING_WAVE_OVERRIDE: number = 0; - readonly STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN; + readonly STARTING_BIOME_OVERRIDE: Biome | null = null; readonly ARENA_TINT_OVERRIDE: TimeOfDay | null = null; /** Multiplies XP gained by this value including 0. Set to null to ignore the override. */ readonly XP_MULTIPLIER_OVERRIDE: number | null = null; From 901ed7324770e7a8d94cd13f78b5d20796b36ed4 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Thu, 29 May 2025 22:51:36 -0500 Subject: [PATCH 04/15] Cleanup evolution scene handler --- src/ui/evolution-scene-handler.ts | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/ui/evolution-scene-handler.ts b/src/ui/evolution-scene-handler.ts index cea91ce4e2c..7372fc6f2b5 100644 --- a/src/ui/evolution-scene-handler.ts +++ b/src/ui/evolution-scene-handler.ts @@ -22,18 +22,12 @@ export default class EvolutionSceneHandler extends MessageUiHandler { const ui = this.getUi(); this.evolutionContainer = globalScene.add.container(0, -globalScene.game.canvas.height / 6); - ui.add(this.evolutionContainer); - const messageBg = globalScene.add.sprite(0, 0, "bg", globalScene.windowType); - messageBg.setOrigin(0, 1); - messageBg.setVisible(false); - ui.add(messageBg); + const messageBg = globalScene.add.sprite(0, 0, "bg", globalScene.windowType).setOrigin(0, 1).setVisible(false); this.messageBg = messageBg; - this.messageContainer = globalScene.add.container(12, -39); - this.messageContainer.setVisible(false); - ui.add(this.messageContainer); + this.messageContainer = globalScene.add.container(12, -39).setVisible(false); const message = addTextObject(0, 0, "", TextStyle.MESSAGE, { maxLines: 2, @@ -43,6 +37,8 @@ export default class EvolutionSceneHandler extends MessageUiHandler { }); this.messageContainer.add(message); + ui.add([this.evolutionContainer, this.messageBg, this.messageContainer]); + this.message = message; this.initPromptSprite(this.messageContainer); @@ -52,10 +48,8 @@ export default class EvolutionSceneHandler extends MessageUiHandler { super.show(_args); globalScene.ui.bringToTop(this.evolutionContainer); - globalScene.ui.bringToTop(this.messageBg); - globalScene.ui.bringToTop(this.messageContainer); - this.messageBg.setVisible(true); - this.messageContainer.setVisible(true); + globalScene.ui.bringToTop(this.messageBg.setVisible(true)); + globalScene.ui.bringToTop(this.messageContainer.setVisible(true)); return true; } From d5f7665b15ef923d102b18c2e812edd73604c372 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Fri, 30 May 2025 12:24:05 -0700 Subject: [PATCH 05/15] [Test] Update test utils (#5848) * [Test] Add/update test utils - Add `FieldHelper` which has methods to mock a pokemon's ability or force a pokemon to be Terastallized - Add `MoveHelper#use` which can be used to remove the need for setting pokemon move overrides by modifying the moveset of the pokemon - Add `MoveHelper#selectEnemyMove` to make an enemy pokemon select a specific move - Add `MoveHelper#forceEnemyMove` which modifies the pokemon's moveset and then uses `selectEnemyMove` - Fix `GameManager#toNextTurn` to work correctly in double battles - Add `GameManager#toEndOfTurn` which advances to the end of the turn * Update some tests - Disable broken Good As Gold test and add `.edgeCase` to Good As Gold - Fix Powder test - Update some tests to demonstrate new methods --- src/data/abilities/ability.ts | 7 +- test/abilities/good_as_gold.test.ts | 32 ++++---- test/moves/alluring_voice.test.ts | 10 +-- test/moves/chloroblast.test.ts | 15 ++-- test/moves/powder.test.ts | 17 ++-- test/testUtils/gameManager.ts | 30 ++++--- test/testUtils/helpers/field-helper.ts | 87 +++++++++++++++++++++ test/testUtils/helpers/moveHelper.ts | 104 ++++++++++++++++++++++++- 8 files changed, 252 insertions(+), 50 deletions(-) create mode 100644 test/testUtils/helpers/field-helper.ts diff --git a/src/data/abilities/ability.ts b/src/data/abilities/ability.ts index b677dd2bd11..f49863639f0 100644 --- a/src/data/abilities/ability.ts +++ b/src/data/abilities/ability.ts @@ -7425,7 +7425,12 @@ export function initAbilities() { .uncopiable() .attr(NoTransformAbilityAbAttr), new Ability(Abilities.GOOD_AS_GOLD, 9) - .attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon !== attacker && move.category === MoveCategory.STATUS && ![ MoveTarget.ENEMY_SIDE, MoveTarget.BOTH_SIDES, MoveTarget.USER_SIDE ].includes(move.moveTarget)) + .attr(MoveImmunityAbAttr, (pokemon, attacker, move) => + pokemon !== attacker + && move.category === MoveCategory.STATUS + && ![ MoveTarget.ENEMY_SIDE, MoveTarget.BOTH_SIDES, MoveTarget.USER_SIDE ].includes(move.moveTarget) + ) + .edgeCase() // Heal Bell should not cure the status of a Pokemon with Good As Gold .ignorable(), new Ability(Abilities.VESSEL_OF_RUIN, 9) .attr(FieldMultiplyStatAbAttr, Stat.SPATK, 0.75) diff --git a/test/abilities/good_as_gold.test.ts b/test/abilities/good_as_gold.test.ts index 09bdaafb11f..9b1d582f64c 100644 --- a/test/abilities/good_as_gold.test.ts +++ b/test/abilities/good_as_gold.test.ts @@ -1,6 +1,6 @@ import { BattlerIndex } from "#app/battle"; -import { allAbilities } from "#app/data/data-lists"; import { ArenaTagSide } from "#app/data/arena-tag"; +import { allAbilities } from "#app/data/data-lists"; import { ArenaTagType } from "#app/enums/arena-tag-type"; import { BattlerTagType } from "#app/enums/battler-tag-type"; import { Stat } from "#app/enums/stat"; @@ -107,35 +107,33 @@ describe("Abilities - Good As Gold", () => { expect(game.scene.getPlayerField()[1].getTag(BattlerTagType.HELPING_HAND)).toBeUndefined(); }); - it("should block the ally's heal bell, but only if the good as gold user is on the field", async () => { - game.override.battleStyle("double"); - game.override.moveset([Moves.HEAL_BELL, Moves.SPLASH]); - game.override.statusEffect(StatusEffect.BURN); - await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS, Species.ABRA]); - const [good_as_gold, ball_fetch] = game.scene.getPlayerField(); - - // Force second pokemon to have ball fetch to isolate to a single mon. - vi.spyOn(ball_fetch, "getAbility").mockReturnValue(allAbilities[Abilities.BALL_FETCH]); + // TODO: re-enable when heal bell is fixed + it.todo("should block the ally's heal bell, but only if the good as gold user is on the field", async () => { + game.override.battleStyle("double").statusEffect(StatusEffect.BURN); + await game.classicMode.startBattle([Species.MILOTIC, Species.FEEBAS, Species.ABRA]); + const [milotic, feebas, abra] = game.scene.getPlayerParty(); + game.field.mockAbility(milotic, Abilities.GOOD_AS_GOLD); + game.field.mockAbility(feebas, Abilities.BALL_FETCH); + game.field.mockAbility(abra, Abilities.BALL_FETCH); // turn 1 - game.move.select(Moves.SPLASH, 0); - game.move.select(Moves.HEAL_BELL, 1); + game.move.use(Moves.SPLASH, 0); + game.move.use(Moves.HEAL_BELL, 1); await game.toNextTurn(); - expect(good_as_gold.status?.effect).toBe(StatusEffect.BURN); + expect(milotic.status?.effect).toBe(StatusEffect.BURN); game.doSwitchPokemon(2); - game.move.select(Moves.HEAL_BELL, 0); + game.move.use(Moves.HEAL_BELL, 1); await game.toNextTurn(); - expect(good_as_gold.status?.effect).toBeUndefined(); + expect(milotic.status?.effect).toBeUndefined(); }); it("should not block field targeted effects like rain dance", async () => { game.override.battleStyle("single"); game.override.enemyMoveset([Moves.RAIN_DANCE]); - game.override.weather(WeatherType.NONE); await game.classicMode.startBattle([Species.MAGIKARP]); - game.move.select(Moves.SPLASH, 0); + game.move.use(Moves.SPLASH, 0); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.RAIN); diff --git a/test/moves/alluring_voice.test.ts b/test/moves/alluring_voice.test.ts index 240e008f311..9265c5f970d 100644 --- a/test/moves/alluring_voice.test.ts +++ b/test/moves/alluring_voice.test.ts @@ -29,20 +29,18 @@ describe("Moves - Alluring Voice", () => { .disableCrits() .enemySpecies(Species.MAGIKARP) .enemyAbility(Abilities.ICE_SCALES) - .enemyMoveset([Moves.HOWL]) + .enemyMoveset(Moves.HOWL) .startingLevel(10) .enemyLevel(10) - .starterSpecies(Species.FEEBAS) - .ability(Abilities.BALL_FETCH) - .moveset([Moves.ALLURING_VOICE]); + .ability(Abilities.BALL_FETCH); }); it("should confuse the opponent if their stat stages were raised", async () => { - await game.classicMode.startBattle(); + await game.classicMode.startBattle([Species.FEEBAS]); const enemy = game.scene.getEnemyPokemon()!; - game.move.select(Moves.ALLURING_VOICE); + game.move.use(Moves.ALLURING_VOICE); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to(BerryPhase); diff --git a/test/moves/chloroblast.test.ts b/test/moves/chloroblast.test.ts index 175227bbd5e..b2130da83eb 100644 --- a/test/moves/chloroblast.test.ts +++ b/test/moves/chloroblast.test.ts @@ -1,3 +1,4 @@ +import { MoveResult } from "#app/field/pokemon"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; @@ -22,21 +23,23 @@ describe("Moves - Chloroblast", () => { beforeEach(() => { game = new GameManager(phaserGame); game.override - .moveset([Moves.CHLOROBLAST]) .ability(Abilities.BALL_FETCH) .battleStyle("single") .disableCrits() .enemySpecies(Species.MAGIKARP) - .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(Moves.PROTECT); + .enemyAbility(Abilities.BALL_FETCH); }); it("should not deal recoil damage if the opponent uses protect", async () => { await game.classicMode.startBattle([Species.FEEBAS]); - game.move.select(Moves.CHLOROBLAST); - await game.phaseInterceptor.to("BerryPhase"); + game.move.use(Moves.CHLOROBLAST); + await game.move.forceEnemyMove(Moves.PROTECT); + await game.toEndOfTurn(); - expect(game.scene.getPlayerPokemon()!.isFullHp()).toBe(true); + const player = game.field.getPlayerPokemon(); + + expect(player.isFullHp()).toBe(true); + expect(player.getLastXMoves()[0]).toMatchObject({ result: MoveResult.MISS, move: Moves.CHLOROBLAST }); }); }); diff --git a/test/moves/powder.test.ts b/test/moves/powder.test.ts index 457beb60f91..c6114db3ff1 100644 --- a/test/moves/powder.test.ts +++ b/test/moves/powder.test.ts @@ -1,15 +1,15 @@ -import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import Phaser from "phaser"; -import GameManager from "#test/testUtils/gameManager"; +import { BattlerIndex } from "#app/battle"; +import { MoveResult, PokemonMove } from "#app/field/pokemon"; +import { BerryPhase } from "#app/phases/berry-phase"; +import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; -import { Species } from "#enums/species"; -import { BerryPhase } from "#app/phases/berry-phase"; -import { MoveResult, PokemonMove } from "#app/field/pokemon"; import { PokemonType } from "#enums/pokemon-type"; -import { MoveEffectPhase } from "#app/phases/move-effect-phase"; +import { Species } from "#enums/species"; import { StatusEffect } from "#enums/status-effect"; -import { BattlerIndex } from "#app/battle"; +import GameManager from "#test/testUtils/gameManager"; +import Phaser from "phaser"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("Moves - Powder", () => { let phaserGame: Phaser.Game; @@ -161,7 +161,6 @@ describe("Moves - Powder", () => { game.move.select(Moves.ROAR, 0, BattlerIndex.ENEMY_2); game.move.select(Moves.SPLASH, 1); await game.toNextTurn(); - await game.toNextTurn(); // Requires game.toNextTurn() twice due to double battle // Turn 2: Enemy should activate Powder twice: From using Ember, and from copying Fiery Dance via Dancer playerPokemon.hp = playerPokemon.getMaxHp(); diff --git a/test/testUtils/gameManager.ts b/test/testUtils/gameManager.ts index 8dd90decf1a..07cea3b1328 100644 --- a/test/testUtils/gameManager.ts +++ b/test/testUtils/gameManager.ts @@ -5,6 +5,7 @@ import { getMoveTargets } from "#app/data/moves/move"; import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; import Trainer from "#app/field/trainer"; import { GameModes, getGameMode } from "#app/game-mode"; +import { globalScene } from "#app/global-scene"; import { ModifierTypeOption, modifierTypes } from "#app/modifier/modifier-type"; import overrides from "#app/overrides"; import { CheckSwitchPhase } from "#app/phases/check-switch-phase"; @@ -22,15 +23,13 @@ import { TitlePhase } from "#app/phases/title-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { TurnInitPhase } from "#app/phases/turn-init-phase"; import { TurnStartPhase } from "#app/phases/turn-start-phase"; -import ErrorInterceptor from "#test/testUtils/errorInterceptor"; -import type InputsHandler from "#test/testUtils/inputsHandler"; import type BallUiHandler from "#app/ui/ball-ui-handler"; import type BattleMessageUiHandler from "#app/ui/battle-message-ui-handler"; import type CommandUiHandler from "#app/ui/command-ui-handler"; import type ModifierSelectUiHandler from "#app/ui/modifier-select-ui-handler"; import type PartyUiHandler from "#app/ui/party-ui-handler"; +import type StarterSelectUiHandler from "#app/ui/starter-select-ui-handler"; import type TargetSelectUiHandler from "#app/ui/target-select-ui-handler"; -import { UiMode } from "#enums/ui-mode"; import { isNullOrUndefined } from "#app/utils/common"; import { BattleStyle } from "#enums/battle-style"; import { Button } from "#enums/buttons"; @@ -40,24 +39,26 @@ import type { Moves } from "#enums/moves"; import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { PlayerGender } from "#enums/player-gender"; import type { Species } from "#enums/species"; +import { UiMode } from "#enums/ui-mode"; +import ErrorInterceptor from "#test/testUtils/errorInterceptor"; import { generateStarter, waitUntil } from "#test/testUtils/gameManagerUtils"; import GameWrapper from "#test/testUtils/gameWrapper"; import { ChallengeModeHelper } from "#test/testUtils/helpers/challengeModeHelper"; import { ClassicModeHelper } from "#test/testUtils/helpers/classicModeHelper"; import { DailyModeHelper } from "#test/testUtils/helpers/dailyModeHelper"; +import { FieldHelper } from "#test/testUtils/helpers/field-helper"; import { ModifierHelper } from "#test/testUtils/helpers/modifiersHelper"; import { MoveHelper } from "#test/testUtils/helpers/moveHelper"; import { OverridesHelper } from "#test/testUtils/helpers/overridesHelper"; import { ReloadHelper } from "#test/testUtils/helpers/reloadHelper"; import { SettingsHelper } from "#test/testUtils/helpers/settingsHelper"; +import type InputsHandler from "#test/testUtils/inputsHandler"; +import { MockFetch } from "#test/testUtils/mocks/mockFetch"; import PhaseInterceptor from "#test/testUtils/phaseInterceptor"; import TextInterceptor from "#test/testUtils/TextInterceptor"; import { AES, enc } from "crypto-js"; import fs from "node:fs"; import { expect, vi } from "vitest"; -import { globalScene } from "#app/global-scene"; -import type StarterSelectUiHandler from "#app/ui/starter-select-ui-handler"; -import { MockFetch } from "#test/testUtils/mocks/mockFetch"; /** * Class to manage the game state and transitions between phases. @@ -76,6 +77,7 @@ export default class GameManager { public readonly settings: SettingsHelper; public readonly reload: ReloadHelper; public readonly modifiers: ModifierHelper; + public readonly field: FieldHelper; /** * Creates an instance of GameManager. @@ -123,6 +125,7 @@ export default class GameManager { this.settings = new SettingsHelper(this); this.reload = new ReloadHelper(this); this.modifiers = new ModifierHelper(this); + this.field = new FieldHelper(this); this.override.sanitizeOverrides(); // Disables Mystery Encounters on all tests (can be overridden at test level) @@ -383,6 +386,7 @@ export default class GameManager { * @param moveId - The {@linkcode Moves | move} the enemy will use * @param target - The {@linkcode BattlerIndex} of the target against which the enemy will use the given move; * will use normal target selection priorities if omitted. + * @deprecated Use {@linkcode MoveHelper.forceEnemyMove} or {@linkcode MoveHelper.selectEnemyMove} */ async forceEnemyMove(moveId: Moves, target?: BattlerIndex) { // Wait for the next EnemyCommandPhase to start @@ -417,9 +421,15 @@ export default class GameManager { }; } - /** Transition to the next upcoming {@linkcode CommandPhase} */ + /** Transition to the first {@linkcode CommandPhase} of the next turn. */ async toNextTurn() { - await this.phaseInterceptor.to(CommandPhase); + await this.phaseInterceptor.to("TurnInitPhase"); + await this.phaseInterceptor.to("CommandPhase"); + } + + /** Transition to the {@linkcode TurnEndPhase | end of the current turn}. */ + async toEndOfTurn() { + await this.phaseInterceptor.to("TurnEndPhase"); } /** @@ -541,8 +551,8 @@ export default class GameManager { } /** - * Select a pokemon from the party menu during the given phase. - * Only really handles the basic case of "navigate to party slot and press Action twice" - + * Select a pokemon from the party menu during the given phase. + * Only really handles the basic case of "navigate to party slot and press Action twice" - * any menus that come up afterwards are ignored and must be handled separately by the caller. * @param slot - The 0-indexed position of the pokemon in your party to switch to * @param inPhase - Which phase to expect the selection to occur in. Defaults to `SwitchPhase` diff --git a/test/testUtils/helpers/field-helper.ts b/test/testUtils/helpers/field-helper.ts new file mode 100644 index 00000000000..6d762853cad --- /dev/null +++ b/test/testUtils/helpers/field-helper.ts @@ -0,0 +1,87 @@ +// -- start tsdoc imports -- +// biome-ignore lint/correctness/noUnusedImports: TSDoc import +import type { globalScene } from "#app/global-scene"; +// -- end tsdoc imports -- + +import type { BattlerIndex } from "#app/battle"; +import type { Ability } from "#app/data/abilities/ability-class"; +import { allAbilities } from "#app/data/data-lists"; +import type Pokemon from "#app/field/pokemon"; +import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; +import type { Abilities } from "#enums/abilities"; +import type { PokemonType } from "#enums/pokemon-type"; +import { Stat } from "#enums/stat"; +import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; +import { expect, type MockInstance, vi } from "vitest"; + +/** Helper to manage pokemon */ +export class FieldHelper extends GameManagerHelper { + /** + * Passthrough for {@linkcode globalScene.getPlayerPokemon} that adds an `undefined` check for + * the Pokemon so that the return type for the function doesn't have `undefined`. + * This removes the need to add a `!` like when calling `game.scene.getPlayerPokemon()!`. + * @param includeSwitching Whether a pokemon that is currently switching out is valid, default `true` + * @returns The first {@linkcode PlayerPokemon} that is {@linkcode globalScene.getPlayerField on the field} + * and {@linkcode PlayerPokemon.isActive is active} + * (aka {@linkcode PlayerPokemon.isAllowedInBattle is allowed in battle}). + */ + public getPlayerPokemon(includeSwitching = true): PlayerPokemon { + const pokemon = this.game.scene.getPlayerPokemon(includeSwitching); + expect(pokemon).toBeDefined(); + return pokemon!; + } + + /** + * Passthrough for {@linkcode globalScene.getEnemyPokemon} that adds an `undefined` check for + * the Pokemon so that the return type for the function doesn't have `undefined`. + * This removes the need to add a `!` like when calling `game.scene.getEnemyPokemon()!`. + * @param includeSwitching Whether a pokemon that is currently switching out is valid, default `true` + * @returns The first {@linkcode EnemyPokemon} that is {@linkcode globalScene.getEnemyField on the field} + * and {@linkcode EnemyPokemon.isActive is active} + * (aka {@linkcode EnemyPokemon.isAllowedInBattle is allowed in battle}). + */ + public getEnemyPokemon(includeSwitching = true): EnemyPokemon { + const pokemon = this.game.scene.getEnemyPokemon(includeSwitching); + expect(pokemon).toBeDefined(); + return pokemon!; + } + + /** + * @returns The {@linkcode BattlerIndex | indexes} of Pokemon on the field in order of decreasing Speed. + * Speed ties are returned in increasing order of index. + * + * Note: Trick Room does not modify the speed of Pokemon on the field. + */ + public getSpeedOrder(): BattlerIndex[] { + return this.game.scene + .getField(true) + .sort((pA, pB) => pB.getEffectiveStat(Stat.SPD) - pA.getEffectiveStat(Stat.SPD)) + .map(p => p.getBattlerIndex()); + } + + /** + * Mocks a pokemon's ability, overriding its existing ability (takes precedence over global overrides) + * @param pokemon - The pokemon to mock the ability of + * @param ability - The ability to be mocked + * @returns A {@linkcode MockInstance} object + * @see {@linkcode vi.spyOn} + * @see https://vitest.dev/api/mock#mockreturnvalue + */ + public mockAbility(pokemon: Pokemon, ability: Abilities): MockInstance<(baseOnly?: boolean) => Ability> { + return vi.spyOn(pokemon, "getAbility").mockReturnValue(allAbilities[ability]); + } + + /** + * Forces a pokemon to be terastallized. Defaults to the pokemon's primary type if not specified. + * + * This function only mocks the Pokemon's tera-related variables; it does NOT activate any tera-related abilities. + * + * @param pokemon - The pokemon to terastallize. + * @param teraType - (optional) The {@linkcode PokemonType} to terastallize it as. + */ + public forceTera(pokemon: Pokemon, teraType?: PokemonType): void { + vi.spyOn(pokemon, "isTerastallized", "get").mockReturnValue(true); + teraType ??= pokemon.getSpeciesForm(true).type1; + vi.spyOn(pokemon, "teraType", "get").mockReturnValue(teraType); + } +} diff --git a/test/testUtils/helpers/moveHelper.ts b/test/testUtils/helpers/moveHelper.ts index 269cf65ea56..ab10486867d 100644 --- a/test/testUtils/helpers/moveHelper.ts +++ b/test/testUtils/helpers/moveHelper.ts @@ -1,14 +1,16 @@ import type { BattlerIndex } from "#app/battle"; +import { getMoveTargets } from "#app/data/moves/move"; import { Button } from "#app/enums/buttons"; import type Pokemon from "#app/field/pokemon"; import { PokemonMove } from "#app/field/pokemon"; import Overrides from "#app/overrides"; import type { CommandPhase } from "#app/phases/command-phase"; +import type { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { LearnMovePhase } from "#app/phases/learn-move-phase"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { Command } from "#app/ui/command-ui-handler"; -import { UiMode } from "#enums/ui-mode"; import { Moves } from "#enums/moves"; +import { UiMode } from "#enums/ui-mode"; import { getMovePosition } from "#test/testUtils/gameManagerUtils"; import { GameManagerHelper } from "#test/testUtils/helpers/gameManagerHelper"; import { vi } from "vitest"; @@ -92,6 +94,35 @@ export class MoveHelper extends GameManagerHelper { } } + /** + * Modifies a player pokemon's moveset to contain only the selected move and then + * selects it to be used during the next {@linkcode CommandPhase}. + * + * Warning: Will disable the player moveset override if it is enabled! + * + * Note: If you need to check for changes in the player's moveset as part of the test, it may be + * best to use {@linkcode changeMoveset} and {@linkcode select} instead. + * @param moveId - the move to use + * @param pkmIndex - the pokemon index. Relevant for double-battles only (defaults to 0) + * @param targetIndex - (optional) The {@linkcode BattlerIndex} of the Pokemon to target for single-target moves, or `null` if a manual call to `selectTarget()` is required + * @param useTera - If `true`, the Pokemon also chooses to Terastallize. This does not require a Tera Orb. Default: `false`. + */ + public use(moveId: Moves, pkmIndex: 0 | 1 = 0, targetIndex?: BattlerIndex | null, useTera = false): void { + if ([Overrides.MOVESET_OVERRIDE].flat().length > 0) { + vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([]); + console.warn("Warning: `use` overwrites the Pokemon's moveset and disables the player moveset override!"); + } + + const pokemon = this.game.scene.getPlayerField()[pkmIndex]; + pokemon.moveset = [new PokemonMove(moveId)]; + + if (useTera) { + this.selectWithTera(moveId, pkmIndex, targetIndex); + return; + } + this.select(moveId, pkmIndex, targetIndex); + } + /** * Forces the Paralysis or Freeze status to activate on the next move by temporarily mocking {@linkcode Overrides.STATUS_ACTIVATION_OVERRIDE}, * advancing to the next `MovePhase`, and then resetting the override to `null` @@ -132,6 +163,77 @@ export class MoveHelper extends GameManagerHelper { console.log(`Pokemon ${pokemon.species.name}'s moveset manually set to ${movesetStr} (=[${moveset.join(", ")}])!`); } + /** + * Forces the next enemy selecting a move to use the given move in its moveset + * against the given target (if applicable). + * @param moveId The {@linkcode MoveId | move} the enemy will use + * @param target (Optional) the {@linkcode BattlerIndex | target} which the enemy will use the given move against + */ + public async selectEnemyMove(moveId: Moves, target?: BattlerIndex) { + // Wait for the next EnemyCommandPhase to start + await this.game.phaseInterceptor.to("EnemyCommandPhase", false); + const enemy = + this.game.scene.getEnemyField()[(this.game.scene.getCurrentPhase() as EnemyCommandPhase).getFieldIndex()]; + const legalTargets = getMoveTargets(enemy, moveId); + + vi.spyOn(enemy, "getNextMove").mockReturnValueOnce({ + move: moveId, + targets: + target !== undefined && !legalTargets.multiple && legalTargets.targets.includes(target) + ? [target] + : enemy.getNextTargets(moveId), + }); + + /** + * Run the EnemyCommandPhase to completion. + * This allows this function to be called consecutively to + * force a move for each enemy in a double battle. + */ + await this.game.phaseInterceptor.to("EnemyCommandPhase"); + } + + /** + * Forces the next enemy selecting a move to use the given move against the given target (if applicable). + * + * Warning: Overwrites the pokemon's moveset and disables the moveset override! + * + * Note: If you need to check for changes in the enemy's moveset as part of the test, it may be + * best to use {@linkcode changeMoveset} and {@linkcode selectEnemyMove} instead. + * @param moveId The {@linkcode MoveId | move} the enemy will use + * @param target (Optional) the {@linkcode BattlerIndex | target} which the enemy will use the given move against + */ + public async forceEnemyMove(moveId: Moves, target?: BattlerIndex) { + // Wait for the next EnemyCommandPhase to start + await this.game.phaseInterceptor.to("EnemyCommandPhase", false); + + const enemy = + this.game.scene.getEnemyField()[(this.game.scene.getCurrentPhase() as EnemyCommandPhase).getFieldIndex()]; + + if ([Overrides.OPP_MOVESET_OVERRIDE].flat().length > 0) { + vi.spyOn(Overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([]); + console.warn( + "Warning: `forceEnemyMove` overwrites the Pokemon's moveset and disables the enemy moveset override!", + ); + } + enemy.moveset = [new PokemonMove(moveId)]; + const legalTargets = getMoveTargets(enemy, moveId); + + vi.spyOn(enemy, "getNextMove").mockReturnValueOnce({ + move: moveId, + targets: + target !== undefined && !legalTargets.multiple && legalTargets.targets.includes(target) + ? [target] + : enemy.getNextTargets(moveId), + }); + + /** + * Run the EnemyCommandPhase to completion. + * This allows this function to be called consecutively to + * force a move for each enemy in a double battle. + */ + await this.game.phaseInterceptor.to("EnemyCommandPhase"); + } + /** * Simulates learning a move for a player pokemon. * @param move The {@linkcode Moves} being learnt From 5eeff184071cd28bc522355e6c330c9ffe116a22 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Fri, 30 May 2025 14:35:38 -0500 Subject: [PATCH 06/15] [GitHub] Fix gh action path filter (#5904) * Fix test workflow syntax to use negation properly * Add missing id and comparison check in tests.yml * Fix missing curly brace --- .github/test-filters.yml | 14 +++++--------- .github/workflows/tests.yml | 3 ++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/test-filters.yml b/.github/test-filters.yml index 89f4322adea..fc52e85082c 100644 --- a/.github/test-filters.yml +++ b/.github/test-filters.yml @@ -1,7 +1,8 @@ all: - - "src/**" - - "test/**" - - "public/**" + # Negations syntax from https://github.com/dorny/paths-filter/issues/184#issuecomment-2786521554 + - "src/**/!(*.{md,py,sh,gitkeep,gitignore})" + - "test/**/!(*.{md,py,sh,gitkeep,gitignore})" + - "public/**/!(*.{md,py,sh,gitkeep,gitignore})" # Workflows that can impact tests - ".github/workflows/test*.yml" - ".github/test-filters.yml" @@ -11,9 +12,4 @@ all: - "vite*" # vite.config.ts, vite.vitest.config.ts, vitest.workspace.ts - "tsconfig*.json" # tsconfig.json tweaking can impact compilation - "global.d.ts" - - ".env*" - # Blanket negations for files that cannot impact tests - - "!**/*.py" # No .py files - - "!**/*.sh" # No .sh files - - "!**/*.md" # No .md files - - "!**/.git*" # .gitkeep and family + - ".env*" \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f04a1987eff..f9d26b5568a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,6 +25,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 + id: filter with: filters: .github/test-filters.yml @@ -39,4 +40,4 @@ jobs: project: main shard: ${{ matrix.shard }} totalShards: 10 - skip: ${{ needs.check-path-change-filter.outputs.all == 'false'}} + skip: ${{ needs.check-path-change-filter.outputs.all != 'true'}} From e1be360e74467fa3ec7804580228891fb8c16b25 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Fri, 30 May 2025 16:42:12 -0500 Subject: [PATCH 07/15] [GitHub] Change total shard numbers and change job name (#5905) --- .github/workflows/test-shard-template.yml | 9 +++++---- .github/workflows/tests.yml | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-shard-template.yml b/.github/workflows/test-shard-template.yml index a1146cb3497..98836bd335a 100644 --- a/.github/workflows/test-shard-template.yml +++ b/.github/workflows/test-shard-template.yml @@ -19,19 +19,20 @@ on: jobs: test: - name: Shard ${{ inputs.shard }} of ${{ inputs.totalShards }} + # We can't use dynmically named jobs until https://github.com/orgs/community/discussions/13261 is implemented + name: Shard runs-on: ubuntu-latest if: ${{ !inputs.skip }} steps: - name: Check out Git repository uses: actions/checkout@v4.2.2 with: - submodules: 'recursive' + submodules: "recursive" - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' - cache: 'npm' + node-version-file: ".nvmrc" + cache: "npm" - name: Install Node.js dependencies run: npm ci - name: Run tests diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f9d26b5568a..c3b9666caa9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,10 +34,10 @@ jobs: needs: check-path-change-filter strategy: matrix: - shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + shard: [1, 2, 3, 4, 5] uses: ./.github/workflows/test-shard-template.yml with: project: main shard: ${{ matrix.shard }} - totalShards: 10 + totalShards: 5 skip: ${{ needs.check-path-change-filter.outputs.all != 'true'}} From ed0251ea9055cd0c321cbe2d1865cc22f6993100 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Fri, 30 May 2025 18:08:52 -0500 Subject: [PATCH 08/15] [Refactor] Cleanup egg-counter-container (#5892) --- src/ui/egg-counter-container.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ui/egg-counter-container.ts b/src/ui/egg-counter-container.ts index 7bec7c97480..7bb32189681 100644 --- a/src/ui/egg-counter-container.ts +++ b/src/ui/egg-counter-container.ts @@ -43,14 +43,13 @@ export default class EggCounterContainer extends Phaser.GameObjects.Container { this.add(this.eggCountWindow); - const eggSprite = globalScene.add.sprite(19, 18, "egg", "egg_0"); - eggSprite.setScale(0.32); + const eggSprite = globalScene.add.sprite(19, 18, "egg", "egg_0").setScale(0.32); - this.eggCountText = addTextObject(28, 13, `${this.eggCount}`, TextStyle.MESSAGE, { fontSize: "66px" }); - this.eggCountText.setName("text-egg-count"); + this.eggCountText = addTextObject(28, 13, `${this.eggCount}`, TextStyle.MESSAGE, { fontSize: "66px" }).setName( + "text-egg-count", + ); - this.add(eggSprite); - this.add(this.eggCountText); + this.add([eggSprite, this.eggCountText]); } /** From 9a60cc9c716b043764270f6b160d5302663f521e Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Fri, 30 May 2025 18:12:35 -0500 Subject: [PATCH 09/15] [Refactor] Cleanup filter bar (#5896) * Cleanup filter bar * Move DropDownColumn to its own file --------- Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com> --- src/enums/drop-down-column.ts | 9 +++++++++ src/ui/filter-bar.ts | 19 +++---------------- src/ui/pokedex-ui-handler.ts | 3 ++- src/ui/starter-select-ui-handler.ts | 3 ++- test/ui/pokedex.test.ts | 2 +- 5 files changed, 17 insertions(+), 19 deletions(-) create mode 100644 src/enums/drop-down-column.ts diff --git a/src/enums/drop-down-column.ts b/src/enums/drop-down-column.ts new file mode 100644 index 00000000000..b413d1f0bf4 --- /dev/null +++ b/src/enums/drop-down-column.ts @@ -0,0 +1,9 @@ +export enum DropDownColumn { + GEN, + TYPES, + BIOME, + CAUGHT, + UNLOCKS, + MISC, + SORT +} diff --git a/src/ui/filter-bar.ts b/src/ui/filter-bar.ts index 2aade130ed1..622488c04cd 100644 --- a/src/ui/filter-bar.ts +++ b/src/ui/filter-bar.ts @@ -5,16 +5,7 @@ import { addTextObject, getTextColor, TextStyle } from "./text"; import type { UiTheme } from "#enums/ui-theme"; import { addWindow, WindowVariant } from "./ui-theme"; import { globalScene } from "#app/global-scene"; - -export enum DropDownColumn { - GEN, - TYPES, - BIOME, - CAUGHT, - UNLOCKS, - MISC, - SORT, -} +import type { DropDownColumn } from "#enums/drop-down-column"; export class FilterBar extends Phaser.GameObjects.Container { private window: Phaser.GameObjects.NineSlice; @@ -49,13 +40,9 @@ export class FilterBar extends Phaser.GameObjects.Container { this.cursorOffset = cursorOffset; this.window = addWindow(0, 0, width, height, false, false, undefined, undefined, WindowVariant.THIN); - this.add(this.window); - this.cursorObj = globalScene.add.image(1, 1, "cursor"); - this.cursorObj.setScale(0.5); - this.cursorObj.setVisible(false); - this.cursorObj.setOrigin(0, 0); - this.add(this.cursorObj); + this.cursorObj = globalScene.add.image(1, 1, "cursor").setScale(0.5).setVisible(false).setOrigin(0); + this.add([this.window, this.cursorObj]); } /** diff --git a/src/ui/pokedex-ui-handler.ts b/src/ui/pokedex-ui-handler.ts index 08fe5d7442f..179d5b4664b 100644 --- a/src/ui/pokedex-ui-handler.ts +++ b/src/ui/pokedex-ui-handler.ts @@ -23,7 +23,8 @@ import type { Species } from "#enums/species"; import { Button } from "#enums/buttons"; import { DropDown, DropDownLabel, DropDownOption, DropDownState, DropDownType, SortCriteria } from "#app/ui/dropdown"; import { PokedexMonContainer } from "#app/ui/pokedex-mon-container"; -import { DropDownColumn, FilterBar } from "#app/ui/filter-bar"; +import { FilterBar } from "#app/ui/filter-bar"; +import { DropDownColumn } from "#enums/drop-down-column"; import { ScrollBar } from "#app/ui/scroll-bar"; import { Abilities } from "#enums/abilities"; import { diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index a971ba86479..ff2298f268d 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -53,7 +53,8 @@ import { Button } from "#enums/buttons"; import { EggSourceType } from "#enums/egg-source-types"; import { DropDown, DropDownLabel, DropDownOption, DropDownState, DropDownType, SortCriteria } from "#app/ui/dropdown"; import { StarterContainer } from "#app/ui/starter-container"; -import { DropDownColumn, FilterBar } from "#app/ui/filter-bar"; +import { FilterBar } from "#app/ui/filter-bar"; +import { DropDownColumn } from "#enums/drop-down-column"; import { ScrollBar } from "#app/ui/scroll-bar"; import { SelectChallengePhase } from "#app/phases/select-challenge-phase"; import { EncounterPhase } from "#app/phases/encounter-phase"; diff --git a/test/ui/pokedex.test.ts b/test/ui/pokedex.test.ts index ff5ca116ba8..007fc43c3b9 100644 --- a/test/ui/pokedex.test.ts +++ b/test/ui/pokedex.test.ts @@ -8,7 +8,7 @@ import { Abilities } from "#enums/abilities"; import { Species } from "#enums/species"; import { allSpecies, getPokemonSpecies, type PokemonForm } from "#app/data/pokemon-species"; import { Button } from "#enums/buttons"; -import { DropDownColumn } from "#app/ui/filter-bar"; +import { DropDownColumn } from "#enums/drop-down-column"; import type PokemonSpecies from "#app/data/pokemon-species"; import { PokemonType } from "#enums/pokemon-type"; import { UiMode } from "#enums/ui-mode"; From a33638a7a36b01935e40ea876532c770b53f0994 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Fri, 30 May 2025 19:50:25 -0400 Subject: [PATCH 10/15] [Test] Remove deprecated test funcs (#5906) * Removed `game.startBattle` * Removed `game.forceEnemyMove` * Removed near-unused learn move macro --- test/abilities/aroma_veil.test.ts | 6 +-- test/abilities/battery.test.ts | 6 +-- test/abilities/commander.test.ts | 12 ++--- test/abilities/costar.test.ts | 4 +- test/abilities/cud_chew.test.ts | 4 +- test/abilities/dancer.test.ts | 4 +- test/abilities/desolate-land.test.ts | 12 ++--- test/abilities/flower_gift.test.ts | 8 +-- test/abilities/flower_veil.test.ts | 14 ++--- test/abilities/forecast.test.ts | 14 ++--- test/abilities/friend_guard.test.ts | 24 ++++----- test/abilities/good_as_gold.test.ts | 4 +- test/abilities/gorilla_tactics.test.ts | 6 +-- test/abilities/gulp_missile.test.ts | 4 +- test/abilities/harvest.test.ts | 24 ++++----- test/abilities/heatproof.test.ts | 4 +- test/abilities/hyper_cutter.test.ts | 2 +- test/abilities/libero.test.ts | 30 +++++------ test/abilities/magic_bounce.test.ts | 12 ++--- test/abilities/magic_guard.test.ts | 38 +++++++------- test/abilities/mimicry.test.ts | 8 +-- test/abilities/mirror_armor.test.ts | 42 +++++++-------- test/abilities/moxie.test.ts | 4 +- test/abilities/mycelium_might.test.ts | 6 +-- test/abilities/neutralizing_gas.test.ts | 8 +-- test/abilities/pastel_veil.test.ts | 4 +- test/abilities/perish_body.test.ts | 10 ++-- test/abilities/power_spot.test.ts | 6 +-- test/abilities/protean.test.ts | 30 +++++------ test/abilities/quick_draw.test.ts | 6 +-- test/abilities/sand_veil.test.ts | 2 +- test/abilities/schooling.test.ts | 2 +- test/abilities/screen_cleaner.test.ts | 6 +-- test/abilities/shields_down.test.ts | 12 ++--- test/abilities/simple.test.ts | 2 +- test/abilities/stakeout.test.ts | 8 +-- test/abilities/stall.test.ts | 6 +-- test/abilities/sturdy.test.ts | 8 +-- test/abilities/supreme_overlord.test.ts | 2 +- test/abilities/sweet_veil.test.ts | 8 +-- test/abilities/unburden.test.ts | 16 +++--- test/abilities/wimp_out.test.ts | 4 +- test/abilities/wind_power.test.ts | 8 +-- test/abilities/wonder_skin.test.ts | 4 +- test/abilities/zero_to_hero.test.ts | 8 +-- test/arena/weather_fog.test.ts | 2 +- test/battle/battle-order.test.ts | 10 ++-- test/battle/battle.test.ts | 22 ++++---- test/battle/double_battle.test.ts | 2 +- test/battle/special_battle.test.ts | 18 +++---- test/daily_mode.test.ts | 2 +- test/evolution.test.ts | 6 +-- test/items/dire_hit.test.ts | 4 +- test/items/exp_booster.test.ts | 2 +- test/items/leek.test.ts | 12 ++--- test/items/leftovers.test.ts | 2 +- test/items/light_ball.test.ts | 4 +- test/items/metal_powder.test.ts | 8 +-- test/items/scope_lens.test.ts | 2 +- test/moves/astonish.test.ts | 2 +- test/moves/beat_up.test.ts | 4 +- test/moves/belly_drum.test.ts | 8 +-- test/moves/chilly_reception.test.ts | 2 +- test/moves/clangorous_soul.test.ts | 8 +-- test/moves/crafty_shield.test.ts | 8 +-- test/moves/defog.test.ts | 6 +-- test/moves/disable.test.ts | 4 +- test/moves/double_team.test.ts | 2 +- test/moves/dragon_tail.test.ts | 10 ++-- test/moves/dynamax_cannon.test.ts | 16 +++--- test/moves/encore.test.ts | 2 +- test/moves/fairy_lock.test.ts | 32 +++++------ test/moves/fillet_away.test.ts | 8 +-- test/moves/flame_burst.test.ts | 8 +-- test/moves/flower_shield.test.ts | 8 +-- test/moves/fly.test.ts | 4 +- test/moves/follow_me.test.ts | 16 +++--- test/moves/foresight.test.ts | 4 +- test/moves/fusion_bolt.test.ts | 2 +- test/moves/fusion_flare.test.ts | 2 +- test/moves/fusion_flare_bolt.test.ts | 2 +- test/moves/growth.test.ts | 2 +- test/moves/grudge.test.ts | 8 +-- test/moves/guard_split.test.ts | 4 +- test/moves/hard_press.test.ts | 8 +-- test/moves/haze.test.ts | 2 +- test/moves/hyper_beam.test.ts | 2 +- test/moves/imprison.test.ts | 12 ++--- test/moves/instruct.test.ts | 60 ++++++++++----------- test/moves/jaw_lock.test.ts | 10 ++-- test/moves/last-resort.test.ts | 8 +-- test/moves/lucky_chant.test.ts | 6 +-- test/moves/lunar_blessing.test.ts | 4 +- test/moves/magic_coat.test.ts | 18 +++---- test/moves/magnet_rise.test.ts | 4 +- test/moves/make_it_rain.test.ts | 8 +-- test/moves/mat_block.test.ts | 6 +-- test/moves/metal_burst.test.ts | 8 +-- test/moves/mirror_move.test.ts | 4 +- test/moves/multi_target.test.ts | 4 +- test/moves/parting_shot.test.ts | 20 ++++--- test/moves/plasma_fists.test.ts | 4 +- test/moves/pledge_moves.test.ts | 8 +-- test/moves/powder.test.ts | 12 ++--- test/moves/power_split.test.ts | 4 +- test/moves/purify.test.ts | 4 +- test/moves/quash.test.ts | 16 +++--- test/moves/rage_fist.test.ts | 8 +-- test/moves/rage_powder.test.ts | 8 +-- test/moves/reflect_type.test.ts | 6 +-- test/moves/retaliate.test.ts | 2 +- test/moves/revival_blessing.test.ts | 4 +- test/moves/rollout.test.ts | 2 +- test/moves/round.test.ts | 4 +- test/moves/secret_power.test.ts | 4 +- test/moves/shell_trap.test.ts | 10 ++-- test/moves/speed_swap.test.ts | 2 +- test/moves/spikes.test.ts | 6 +-- test/moves/spit_up.test.ts | 12 ++--- test/moves/spotlight.test.ts | 8 +-- test/moves/stockpile.test.ts | 4 +- test/moves/swallow.test.ts | 12 ++--- test/moves/tackle.test.ts | 4 +- test/moves/tail_whip.test.ts | 2 +- test/moves/taunt.test.ts | 4 +- test/moves/telekinesis.test.ts | 4 +- test/moves/thousand_arrows.test.ts | 6 +-- test/moves/thunder_wave.test.ts | 10 ++-- test/moves/torment.test.ts | 6 +-- test/moves/whirlwind.test.ts | 26 ++++----- test/moves/wide_guard.test.ts | 8 +-- test/phases/learn-move-phase.test.ts | 68 +----------------------- test/testUtils/gameManager.ts | 70 ------------------------- test/testUtils/helpers/moveHelper.ts | 37 ------------- test/ui/type-hints.test.ts | 4 +- 135 files changed, 563 insertions(+), 730 deletions(-) diff --git a/test/abilities/aroma_veil.test.ts b/test/abilities/aroma_veil.test.ts index 38683bcb1e3..aeec33eccf7 100644 --- a/test/abilities/aroma_veil.test.ts +++ b/test/abilities/aroma_veil.test.ts @@ -40,7 +40,7 @@ describe("Moves - Aroma Veil", () => { game.move.select(Moves.GROWL); game.move.select(Moves.GROWL); - await game.forceEnemyMove(Moves.HEAL_BLOCK); + await game.move.selectEnemyMove(Moves.HEAL_BLOCK); await game.toNextTurn(); party.forEach(p => { expect(p.getTag(BattlerTagType.HEAL_BLOCK)).toBeUndefined(); @@ -54,8 +54,8 @@ describe("Moves - Aroma Veil", () => { game.move.select(Moves.GROWL); game.move.select(Moves.GROWL, 1); - await game.forceEnemyMove(Moves.IMPRISON, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.IMPRISON, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); expect(game.scene.arena.getTag(ArenaTagType.IMPRISON)).toBeDefined(); party.forEach(p => { diff --git a/test/abilities/battery.test.ts b/test/abilities/battery.test.ts index 251ca6ccf16..123889c24af 100644 --- a/test/abilities/battery.test.ts +++ b/test/abilities/battery.test.ts @@ -39,7 +39,7 @@ describe("Abilities - Battery", () => { vi.spyOn(moveToCheck, "calculateBattlePower"); - await game.startBattle([Species.PIKACHU, Species.CHARJABUG]); + await game.classicMode.startBattle([Species.PIKACHU, Species.CHARJABUG]); game.move.select(Moves.DAZZLING_GLEAM); game.move.select(Moves.SPLASH, 1); @@ -54,7 +54,7 @@ describe("Abilities - Battery", () => { vi.spyOn(moveToCheck, "calculateBattlePower"); - await game.startBattle([Species.PIKACHU, Species.CHARJABUG]); + await game.classicMode.startBattle([Species.PIKACHU, Species.CHARJABUG]); game.move.select(Moves.BREAKING_SWIPE); game.move.select(Moves.SPLASH, 1); @@ -69,7 +69,7 @@ describe("Abilities - Battery", () => { vi.spyOn(moveToCheck, "calculateBattlePower"); - await game.startBattle([Species.CHARJABUG, Species.PIKACHU]); + await game.classicMode.startBattle([Species.CHARJABUG, Species.PIKACHU]); game.move.select(Moves.DAZZLING_GLEAM); game.move.select(Moves.SPLASH, 1); diff --git a/test/abilities/commander.test.ts b/test/abilities/commander.test.ts index 0e6cb1b9208..0fddb8e9bf6 100644 --- a/test/abilities/commander.test.ts +++ b/test/abilities/commander.test.ts @@ -59,8 +59,8 @@ describe("Abilities - Commander", () => { expect(game.scene.currentBattle.turnCommands[0]?.skip).toBeTruthy(); // Force both enemies to target the Tatsugiri - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); await game.phaseInterceptor.to("BerryPhase", false); game.scene.getEnemyField().forEach(enemy => expect(enemy.getLastXMoves(1)[0].result).toBe(MoveResult.MISS)); @@ -100,8 +100,8 @@ describe("Abilities - Commander", () => { expect(game.scene.currentBattle.turnCommands[0]?.skip).toBeTruthy(); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); await game.setTurnOrder([BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER]); @@ -183,8 +183,8 @@ describe("Abilities - Commander", () => { expect(game.scene.currentBattle.turnCommands[0]?.skip).toBeTruthy(); - await game.forceEnemyMove(Moves.WHIRLWIND, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.WHIRLWIND, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH); // Test may time out here if Whirlwind forced out a Pokemon await game.phaseInterceptor.to("TurnEndPhase"); diff --git a/test/abilities/costar.test.ts b/test/abilities/costar.test.ts index 7b1e362689d..02d607c2e9f 100644 --- a/test/abilities/costar.test.ts +++ b/test/abilities/costar.test.ts @@ -33,7 +33,7 @@ describe("Abilities - COSTAR", () => { test("ability copies positive stat stages", async () => { game.override.enemyAbility(Abilities.BALL_FETCH); - await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]); let [leftPokemon, rightPokemon] = game.scene.getPlayerField(); @@ -58,7 +58,7 @@ describe("Abilities - COSTAR", () => { test("ability copies negative stat stages", async () => { game.override.enemyAbility(Abilities.INTIMIDATE); - await game.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP, Species.FLAMIGO]); let [leftPokemon, rightPokemon] = game.scene.getPlayerField(); diff --git a/test/abilities/cud_chew.test.ts b/test/abilities/cud_chew.test.ts index 2f65ac5fd97..60205b62b70 100644 --- a/test/abilities/cud_chew.test.ts +++ b/test/abilities/cud_chew.test.ts @@ -76,7 +76,7 @@ describe("Abilities - Cud Chew", () => { farigiraf.hp = farigiraf.getMaxHp() / 2 - 1; game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("TurnEndPhase"); // doesn't trigger since cud chew hasn't eaten berry yet @@ -86,7 +86,7 @@ describe("Abilities - Cud Chew", () => { // get heal pulsed back to full before the cud chew proc game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.HEAL_PULSE); + await game.move.selectEnemyMove(Moves.HEAL_PULSE); await game.phaseInterceptor.to("TurnEndPhase"); // globalScene.queueAbilityDisplay should be called twice: diff --git a/test/abilities/dancer.test.ts b/test/abilities/dancer.test.ts index cdd1e3221e9..b85fc7bdcd4 100644 --- a/test/abilities/dancer.test.ts +++ b/test/abilities/dancer.test.ts @@ -77,8 +77,8 @@ describe("Abilities - Dancer", () => { game.move.select(Moves.REVELATION_DANCE, BattlerIndex.PLAYER, BattlerIndex.ENEMY_2); game.move.select(Moves.FIERY_DANCE, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY_2); - await game.forceEnemyMove(Moves.INSTRUCT, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.MIRROR_MOVE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.INSTRUCT, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.MIRROR_MOVE, BattlerIndex.PLAYER); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY_2, BattlerIndex.ENEMY]); await game.phaseInterceptor.to("MovePhase"); // Oricorio rev dance await game.phaseInterceptor.to("MovePhase"); // Feebas fiery dance diff --git a/test/abilities/desolate-land.test.ts b/test/abilities/desolate-land.test.ts index 697bd0a4c48..da2c285e38f 100644 --- a/test/abilities/desolate-land.test.ts +++ b/test/abilities/desolate-land.test.ts @@ -50,8 +50,8 @@ describe("Abilities - Desolate Land", () => { game.move.select(Moves.SPLASH, 0, 2); game.move.select(Moves.SPLASH, 1, 2); - await game.forceEnemyMove(Moves.ROAR, 0); - await game.forceEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.ROAR, 0); + await game.move.selectEnemyMove(Moves.SPLASH, 1); await game.phaseInterceptor.to("TurnEndPhase"); @@ -66,8 +66,8 @@ describe("Abilities - Desolate Land", () => { game.move.select(Moves.SPLASH, 0, 2); game.move.select(Moves.SPLASH, 1, 2); - await game.forceEnemyMove(Moves.ROAR, 1); - await game.forceEnemyMove(Moves.SPLASH, 0); + await game.move.selectEnemyMove(Moves.ROAR, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 0); await game.phaseInterceptor.to("TurnEndPhase"); @@ -103,8 +103,8 @@ describe("Abilities - Desolate Land", () => { game.move.select(Moves.SPLASH, 0, 2); game.move.select(Moves.SPLASH, 1, 2); - await game.forceEnemyMove(Moves.MEMENTO, 0); - await game.forceEnemyMove(Moves.MEMENTO, 1); + await game.move.selectEnemyMove(Moves.MEMENTO, 0); + await game.move.selectEnemyMove(Moves.MEMENTO, 1); await game.phaseInterceptor.to("TurnEndPhase"); diff --git a/test/abilities/flower_gift.test.ts b/test/abilities/flower_gift.test.ts index f2b32dc4c80..df8830bca6d 100644 --- a/test/abilities/flower_gift.test.ts +++ b/test/abilities/flower_gift.test.ts @@ -67,8 +67,8 @@ describe("Abilities - Flower Gift", () => { // turn 1 game.move.select(Moves.SUNNY_DAY, 0); game.move.select(ally_move, 1, ally_target); - await game.forceEnemyMove(enemy_move, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(enemy_move, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH); // Ensure sunny day is used last. await game.setTurnOrder([attacker_index, target_index, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER]); await game.phaseInterceptor.to(TurnEndPhase); @@ -79,8 +79,8 @@ describe("Abilities - Flower Gift", () => { // turn 2. Make target use recover to reset hp calculation. game.move.select(Moves.SPLASH, 0, target_index); game.move.select(ally_move, 1, ally_target); - await game.forceEnemyMove(enemy_move, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(enemy_move, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY_2, target_index, attacker_index]); await game.phaseInterceptor.to(TurnEndPhase); const damageWithGift = initialHp - target.hp; diff --git a/test/abilities/flower_veil.test.ts b/test/abilities/flower_veil.test.ts index ce45906c4a9..7f51414d8a5 100644 --- a/test/abilities/flower_veil.test.ts +++ b/test/abilities/flower_veil.test.ts @@ -49,7 +49,7 @@ describe("Abilities - Flower Veil", () => { await game.classicMode.startBattle([Species.BULBASAUR]); const user = game.scene.getPlayerPokemon()!; game.move.select(Moves.REST); - await game.forceEnemyMove(Moves.TACKLE); + await game.move.selectEnemyMove(Moves.TACKLE); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextTurn(); expect(user.status?.effect).toBe(StatusEffect.SLEEP); @@ -57,7 +57,7 @@ describe("Abilities - Flower Veil", () => { // remove sleep status so we can get burn from the orb user.resetStatus(); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); expect(user.status?.effect).toBe(StatusEffect.BURN); }); @@ -71,8 +71,8 @@ describe("Abilities - Flower Veil", () => { vi.spyOn(ally, "getAbility").mockReturnValue(allAbilities[Abilities.BALL_FETCH]); game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.YAWN, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.YAWN, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.YAWN, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.YAWN, BattlerIndex.PLAYER_2); await game.phaseInterceptor.to("BerryPhase"); const user = game.scene.getPlayerPokemon()!; @@ -86,7 +86,7 @@ describe("Abilities - Flower Veil", () => { await game.classicMode.startBattle([Species.BULBASAUR]); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.THUNDER_WAVE); + await game.move.selectEnemyMove(Moves.THUNDER_WAVE); await game.toNextTurn(); expect(game.scene.getPlayerPokemon()!.status).toBeUndefined(); vi.spyOn(allMoves[Moves.THUNDER_WAVE], "accuracy", "get").mockClear(); @@ -101,8 +101,8 @@ describe("Abilities - Flower Veil", () => { vi.spyOn(ally, "getAbility").mockReturnValue(allAbilities[Abilities.BALL_FETCH]); game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.THUNDER_WAVE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.THUNDER_WAVE, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.THUNDER_WAVE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.THUNDER_WAVE, BattlerIndex.PLAYER_2); await game.phaseInterceptor.to("BerryPhase"); expect(user.status?.effect).toBe(StatusEffect.PARALYSIS); expect(ally.status?.effect).toBe(StatusEffect.PARALYSIS); diff --git a/test/abilities/forecast.test.ts b/test/abilities/forecast.test.ts index 03b5d993a54..f2aa350ef37 100644 --- a/test/abilities/forecast.test.ts +++ b/test/abilities/forecast.test.ts @@ -30,7 +30,7 @@ describe("Abilities - Forecast", () => { */ const testWeatherFormChange = async (game: GameManager, weather: WeatherType, form: number, initialForm?: number) => { game.override.weather(weather).starterForms({ [Species.CASTFORM]: initialForm }); - await game.startBattle([Species.CASTFORM]); + await game.classicMode.startBattle([Species.CASTFORM]); game.move.select(Moves.SPLASH); @@ -44,7 +44,7 @@ describe("Abilities - Forecast", () => { */ const testRevertFormAgainstAbility = async (game: GameManager, ability: Abilities) => { game.override.starterForms({ [Species.CASTFORM]: SUNNY_FORM }).enemyAbility(ability); - await game.startBattle([Species.CASTFORM]); + await game.classicMode.startBattle([Species.CASTFORM]); game.move.select(Moves.SPLASH); @@ -81,7 +81,7 @@ describe("Abilities - Forecast", () => { [Species.GROUDON]: 1, [Species.RAYQUAZA]: 1, }); - await game.startBattle([ + await game.classicMode.startBattle([ Species.CASTFORM, Species.FEEBAS, Species.KYOGRE, @@ -201,7 +201,7 @@ describe("Abilities - Forecast", () => { it("has no effect on Pokémon other than Castform", async () => { game.override.enemyAbility(Abilities.FORECAST).enemySpecies(Species.SHUCKLE); - await game.startBattle([Species.CASTFORM]); + await game.classicMode.startBattle([Species.CASTFORM]); game.move.select(Moves.RAIN_DANCE); await game.phaseInterceptor.to(TurnEndPhase); @@ -212,7 +212,7 @@ describe("Abilities - Forecast", () => { it("reverts to Normal Form when Forecast is suppressed, changes form to match the weather when it regains it", async () => { game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.RAIN); - await game.startBattle([Species.CASTFORM, Species.PIKACHU]); + await game.classicMode.startBattle([Species.CASTFORM, Species.PIKACHU]); const castform = game.scene.getPlayerPokemon()!; expect(castform.formIndex).toBe(RAINY_FORM); @@ -243,7 +243,7 @@ describe("Abilities - Forecast", () => { it("does not change Castform's form until after Stealth Rock deals damage", async () => { game.override.weather(WeatherType.RAIN).enemyMoveset([Moves.STEALTH_ROCK]); - await game.startBattle([Species.PIKACHU, Species.CASTFORM]); + await game.classicMode.startBattle([Species.PIKACHU, Species.CASTFORM]); // First turn - set up stealth rock game.move.select(Moves.SPLASH); @@ -267,7 +267,7 @@ describe("Abilities - Forecast", () => { it("should be in Normal Form after the user is switched out", async () => { game.override.weather(WeatherType.RAIN); - await game.startBattle([Species.CASTFORM, Species.MAGIKARP]); + await game.classicMode.startBattle([Species.CASTFORM, Species.MAGIKARP]); const castform = game.scene.getPlayerPokemon()!; expect(castform.formIndex).toBe(RAINY_FORM); diff --git a/test/abilities/friend_guard.test.ts b/test/abilities/friend_guard.test.ts index 0afe678b175..350ff737c58 100644 --- a/test/abilities/friend_guard.test.ts +++ b/test/abilities/friend_guard.test.ts @@ -43,8 +43,8 @@ describe("Moves - Friend Guard", () => { game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); // Get the last return value from `getAttackDamage` @@ -60,8 +60,8 @@ describe("Moves - Friend Guard", () => { game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); // Get the last return value from `getAttackDamage` @@ -83,8 +83,8 @@ describe("Moves - Friend Guard", () => { game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); const turn1Damage = spy.mock.results[spy.mock.results.length - 1].value.damage; @@ -93,8 +93,8 @@ describe("Moves - Friend Guard", () => { game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); const turn2Damage = spy.mock.results[spy.mock.results.length - 1].value.damage; @@ -109,8 +109,8 @@ describe("Moves - Friend Guard", () => { game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.DRAGON_RAGE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.DRAGON_RAGE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); const turn1Damage = spy.mock.results[spy.mock.results.length - 1].value.damage; @@ -120,8 +120,8 @@ describe("Moves - Friend Guard", () => { game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.DRAGON_RAGE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.DRAGON_RAGE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); const turn2Damage = spy.mock.results[spy.mock.results.length - 1].value.damage; diff --git a/test/abilities/good_as_gold.test.ts b/test/abilities/good_as_gold.test.ts index 9b1d582f64c..adb54810381 100644 --- a/test/abilities/good_as_gold.test.ts +++ b/test/abilities/good_as_gold.test.ts @@ -74,8 +74,8 @@ describe("Abilities - Good As Gold", () => { game.move.select(Moves.SWORDS_DANCE, 0); game.move.select(Moves.SAFEGUARD, 1); - await game.forceEnemyMove(Moves.STEALTH_ROCK); - await game.forceEnemyMove(Moves.HAZE); + await game.move.selectEnemyMove(Moves.STEALTH_ROCK); + await game.move.selectEnemyMove(Moves.HAZE); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); await game.phaseInterceptor.to("BerryPhase"); expect(good_as_gold.getAbility().id).toBe(Abilities.GOOD_AS_GOLD); diff --git a/test/abilities/gorilla_tactics.test.ts b/test/abilities/gorilla_tactics.test.ts index edaf1669809..06f0c1d0e3d 100644 --- a/test/abilities/gorilla_tactics.test.ts +++ b/test/abilities/gorilla_tactics.test.ts @@ -39,7 +39,7 @@ describe("Abilities - Gorilla Tactics", () => { const initialAtkStat = darmanitan.getStat(Stat.ATK); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("TurnEndPhase"); @@ -57,13 +57,13 @@ describe("Abilities - Gorilla Tactics", () => { // First turn, lock move to Growl game.move.select(Moves.GROWL); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); // Second turn, Growl is interrupted by Disable await game.toNextTurn(); game.move.select(Moves.GROWL); - await game.forceEnemyMove(Moves.DISABLE); + await game.move.selectEnemyMove(Moves.DISABLE); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("TurnEndPhase"); diff --git a/test/abilities/gulp_missile.test.ts b/test/abilities/gulp_missile.test.ts index 4db2ae4190d..64cd106cc5e 100644 --- a/test/abilities/gulp_missile.test.ts +++ b/test/abilities/gulp_missile.test.ts @@ -241,13 +241,13 @@ describe("Abilities - Gulp Missile", () => { await game.classicMode.startBattle([Species.CRAMORANT]); game.move.select(Moves.SURF); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); expect(game.scene.getPlayerPokemon()!.formIndex).toBe(GULPING_FORM); game.move.select(Moves.SUBSTITUTE); - await game.forceEnemyMove(Moves.POWER_TRIP); + await game.move.selectEnemyMove(Moves.POWER_TRIP); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.toNextTurn(); diff --git a/test/abilities/harvest.test.ts b/test/abilities/harvest.test.ts index 23c0ed9088c..36b1b879598 100644 --- a/test/abilities/harvest.test.ts +++ b/test/abilities/harvest.test.ts @@ -61,7 +61,7 @@ describe("Abilities - Harvest", () => { await game.classicMode.startBattle([Species.FEEBAS]); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.NUZZLE); + await game.move.selectEnemyMove(Moves.NUZZLE); await game.phaseInterceptor.to("BerryPhase"); expect(getPlayerBerries()).toHaveLength(0); expect(game.scene.getPlayerPokemon()?.battleData.berriesEaten).toHaveLength(1); @@ -87,7 +87,7 @@ describe("Abilities - Harvest", () => { // Chug a few berries without harvest (should get tracked) game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.NUZZLE); + await game.move.selectEnemyMove(Moves.NUZZLE); await game.toNextTurn(); expect(milotic.battleData.berriesEaten).toEqual(expect.arrayContaining([BerryType.ENIGMA, BerryType.LUM])); @@ -98,7 +98,7 @@ describe("Abilities - Harvest", () => { vi.spyOn(PostTurnRestoreBerryAbAttr.prototype, "canApplyPostTurn").mockReturnValueOnce(false); game.override.ability(Abilities.HARVEST); game.move.select(Moves.GASTRO_ACID); - await game.forceEnemyMove(Moves.NUZZLE); + await game.move.selectEnemyMove(Moves.NUZZLE); await game.toNextTurn(); @@ -109,7 +109,7 @@ describe("Abilities - Harvest", () => { // proc a high roll and we _should_ get a berry back! game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); expect(milotic.battleData.berriesEaten).toHaveLength(3); @@ -126,7 +126,7 @@ describe("Abilities - Harvest", () => { regieleki.hp = 1; game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.doKillOpponents(); await game.phaseInterceptor.to("TurnEndPhase"); @@ -154,7 +154,7 @@ describe("Abilities - Harvest", () => { regieleki.hp = regieleki.getMaxHp() / 4 + 1; game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SUPER_FANG); + await game.move.selectEnemyMove(Moves.SUPER_FANG); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextTurn(); @@ -165,7 +165,7 @@ describe("Abilities - Harvest", () => { // heal up so harvest doesn't proc and kill enemy game.move.select(Moves.EARTHQUAKE); - await game.forceEnemyMove(Moves.HEAL_PULSE); + await game.move.selectEnemyMove(Moves.HEAL_PULSE); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextWave(); @@ -191,7 +191,7 @@ describe("Abilities - Harvest", () => { feebas.battleData.berriesEaten = [BerryType.LUM, BerryType.STARF]; game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("BerryPhase"); // Force RNG roll to hit the first berry we find that matches. @@ -219,7 +219,7 @@ describe("Abilities - Harvest", () => { player.battleData.berriesEaten = [BerryType.LUM, BerryType.STARF]; game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("TurnEndPhase"); expectBerriesContaining(...initBerries); @@ -231,7 +231,7 @@ describe("Abilities - Harvest", () => { await game.classicMode.startBattle([Species.FEEBAS]); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.INCINERATE); + await game.move.selectEnemyMove(Moves.INCINERATE); await game.phaseInterceptor.to("TurnEndPhase"); expect(game.scene.getPlayerPokemon()?.battleData.berriesEaten).toEqual([]); @@ -242,7 +242,7 @@ describe("Abilities - Harvest", () => { await game.classicMode.startBattle([Species.FEEBAS]); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.KNOCK_OFF); + await game.move.selectEnemyMove(Moves.KNOCK_OFF); await game.phaseInterceptor.to("TurnEndPhase"); expect(game.scene.getPlayerPokemon()?.battleData.berriesEaten).toEqual([]); @@ -308,7 +308,7 @@ describe("Abilities - Harvest", () => { // steal a sitrus and immediately consume it game.move.select(Moves.FALSE_SWIPE); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("BerryPhase"); expect(player.battleData.berriesEaten).toEqual([BerryType.SITRUS]); diff --git a/test/abilities/heatproof.test.ts b/test/abilities/heatproof.test.ts index 016237bb02f..0bec7e4a3db 100644 --- a/test/abilities/heatproof.test.ts +++ b/test/abilities/heatproof.test.ts @@ -38,7 +38,7 @@ describe("Abilities - Heatproof", () => { }); it("reduces Fire type damage by half", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; const initialHP = 1000; @@ -61,7 +61,7 @@ describe("Abilities - Heatproof", () => { it("reduces Burn damage by half", async () => { game.override.enemyStatusEffect(StatusEffect.BURN).enemySpecies(Species.ABRA); - await game.startBattle(); + await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; diff --git a/test/abilities/hyper_cutter.test.ts b/test/abilities/hyper_cutter.test.ts index 99a9db28025..76b66c2990e 100644 --- a/test/abilities/hyper_cutter.test.ts +++ b/test/abilities/hyper_cutter.test.ts @@ -34,7 +34,7 @@ describe("Abilities - Hyper Cutter", () => { // Reference Link: https://bulbapedia.bulbagarden.net/wiki/Hyper_Cutter_(Ability) it("only prevents ATK drops", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; diff --git a/test/abilities/libero.test.ts b/test/abilities/libero.test.ts index a6942b18aad..ea4e288bdb0 100644 --- a/test/abilities/libero.test.ts +++ b/test/abilities/libero.test.ts @@ -39,7 +39,7 @@ describe("Abilities - Libero", () => { test("ability applies and changes a pokemon's type", async () => { game.override.moveset([Moves.SPLASH]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -54,7 +54,7 @@ describe("Abilities - Libero", () => { test.skip("ability applies only once per switch in", async () => { game.override.moveset([Moves.SPLASH, Moves.AGILITY]); - await game.startBattle([Species.MAGIKARP, Species.BULBASAUR]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.BULBASAUR]); let leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -90,7 +90,7 @@ describe("Abilities - Libero", () => { test("ability applies correctly even if the pokemon's move has a variable type", async () => { game.override.moveset([Moves.WEATHER_BALL]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -110,7 +110,7 @@ describe("Abilities - Libero", () => { game.override.moveset([Moves.TACKLE]); game.override.passiveAbility(Abilities.REFRIGERATE); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -128,7 +128,7 @@ describe("Abilities - Libero", () => { test("ability applies correctly even if the pokemon's move calls another move", async () => { game.override.moveset([Moves.NATURE_POWER]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -143,7 +143,7 @@ describe("Abilities - Libero", () => { test("ability applies correctly even if the pokemon's move is delayed / charging", async () => { game.override.moveset([Moves.DIG]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -158,7 +158,7 @@ describe("Abilities - Libero", () => { game.override.moveset([Moves.TACKLE]); game.override.enemyMoveset(Moves.SPLASH); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -176,7 +176,7 @@ describe("Abilities - Libero", () => { game.override.moveset([Moves.TACKLE]); game.override.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -191,7 +191,7 @@ describe("Abilities - Libero", () => { game.override.moveset([Moves.TACKLE]); game.override.enemySpecies(Species.GASTLY); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -205,7 +205,7 @@ describe("Abilities - Libero", () => { test("ability is not applied if pokemon's type is the same as the move's type", async () => { game.override.moveset([Moves.SPLASH]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -220,7 +220,7 @@ describe("Abilities - Libero", () => { test("ability is not applied if pokemon is terastallized", async () => { game.override.moveset([Moves.SPLASH]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -236,7 +236,7 @@ describe("Abilities - Libero", () => { test("ability is not applied if pokemon uses struggle", async () => { game.override.moveset([Moves.STRUGGLE]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -250,7 +250,7 @@ describe("Abilities - Libero", () => { test("ability is not applied if the pokemon's move fails", async () => { game.override.moveset([Moves.BURN_UP]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -265,7 +265,7 @@ describe("Abilities - Libero", () => { game.override.moveset([Moves.TRICK_OR_TREAT]); game.override.enemySpecies(Species.GASTLY); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -279,7 +279,7 @@ describe("Abilities - Libero", () => { test("ability applies correctly and the pokemon curses itself", async () => { game.override.moveset([Moves.CURSE]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); diff --git a/test/abilities/magic_bounce.test.ts b/test/abilities/magic_bounce.test.ts index 78e4114724c..be1ad2b413a 100644 --- a/test/abilities/magic_bounce.test.ts +++ b/test/abilities/magic_bounce.test.ts @@ -52,7 +52,7 @@ describe("Abilities - Magic Bounce", () => { game.override.enemyMoveset([Moves.FLY]); game.move.select(Moves.GROWL); - await game.forceEnemyMove(Moves.FLY); + await game.move.selectEnemyMove(Moves.FLY); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("BerryPhase"); @@ -183,7 +183,7 @@ describe("Abilities - Magic Bounce", () => { // turn 1 game.move.select(Moves.ENCORE); - await game.forceEnemyMove(Moves.TACKLE); + await game.move.selectEnemyMove(Moves.TACKLE); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextTurn(); expect(enemyPokemon.getTag(BattlerTagType.ENCORE)!["moveId"]).toBe(Moves.TACKLE); @@ -209,7 +209,7 @@ describe("Abilities - Magic Bounce", () => { // turn 1 game.move.select(Moves.GROWL); - await game.forceEnemyMove(Moves.TACKLE); + await game.move.selectEnemyMove(Moves.TACKLE); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextTurn(); @@ -218,7 +218,7 @@ describe("Abilities - Magic Bounce", () => { // turn 2 game.move.select(Moves.ENCORE); - await game.forceEnemyMove(Moves.TACKLE); + await game.move.selectEnemyMove(Moves.TACKLE); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to("BerryPhase"); expect(enemyPokemon.getTag(BattlerTagType.ENCORE)!["moveId"]).toBe(Moves.TACKLE); @@ -254,7 +254,7 @@ describe("Abilities - Magic Bounce", () => { vi.spyOn(stomping_tantrum, "calculateBattlePower"); game.move.select(Moves.SPORE); - await game.forceEnemyMove(Moves.CHARM); + await game.move.selectEnemyMove(Moves.CHARM); await game.phaseInterceptor.to("TurnEndPhase"); expect(enemy.getLastXMoves(1)[0].result).toBe("success"); @@ -346,7 +346,7 @@ describe("Abilities - Magic Bounce", () => { game.override.moveset([Moves.TOXIC, Moves.CHARM]); await game.classicMode.startBattle([Species.BULBASAUR]); game.move.select(Moves.TOXIC); - await game.forceEnemyMove(Moves.FLY); + await game.move.selectEnemyMove(Moves.FLY); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.getEnemyPokemon()!.status?.effect).toBe(StatusEffect.TOXIC); diff --git a/test/abilities/magic_guard.test.ts b/test/abilities/magic_guard.test.ts index 96a9f4dab74..61d06a74c58 100644 --- a/test/abilities/magic_guard.test.ts +++ b/test/abilities/magic_guard.test.ts @@ -46,7 +46,7 @@ describe("Abilities - Magic Guard", () => { it("ability should prevent damage caused by weather", async () => { game.override.weather(WeatherType.SANDSTORM); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -70,7 +70,7 @@ describe("Abilities - Magic Guard", () => { //Toxic keeps track of the turn counters -> important that Magic Guard keeps track of post-Toxic turns game.override.statusEffect(StatusEffect.POISON); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -91,7 +91,7 @@ describe("Abilities - Magic Guard", () => { game.override.enemyMoveset([Moves.WORRY_SEED, Moves.WORRY_SEED, Moves.WORRY_SEED, Moves.WORRY_SEED]); game.override.statusEffect(StatusEffect.POISON); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -110,7 +110,7 @@ describe("Abilities - Magic Guard", () => { game.override.enemyStatusEffect(StatusEffect.BURN); game.override.enemyAbility(Abilities.MAGIC_GUARD); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); game.move.select(Moves.SPLASH); @@ -132,7 +132,7 @@ describe("Abilities - Magic Guard", () => { game.override.enemyStatusEffect(StatusEffect.TOXIC); game.override.enemyAbility(Abilities.MAGIC_GUARD); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); game.move.select(Moves.SPLASH); @@ -159,7 +159,7 @@ describe("Abilities - Magic Guard", () => { const newTag = getArenaTag(ArenaTagType.SPIKES, 5, Moves.SPIKES, 0, 0, ArenaTagSide.BOTH)!; game.scene.arena.tags.push(newTag); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.SPLASH); @@ -184,7 +184,7 @@ describe("Abilities - Magic Guard", () => { game.scene.arena.tags.push(playerTag); game.scene.arena.tags.push(enemyTag); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.SPLASH); @@ -206,7 +206,7 @@ describe("Abilities - Magic Guard", () => { }); it("Magic Guard prevents against damage from volatile status effects", async () => { - await game.startBattle([Species.DUSKULL]); + await game.classicMode.startBattle([Species.DUSKULL]); game.override.moveset([Moves.CURSE]); game.override.enemyAbility(Abilities.MAGIC_GUARD); @@ -231,7 +231,7 @@ describe("Abilities - Magic Guard", () => { it("Magic Guard prevents crash damage", async () => { game.override.moveset([Moves.HIGH_JUMP_KICK]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -249,7 +249,7 @@ describe("Abilities - Magic Guard", () => { it("Magic Guard prevents damage from recoil", async () => { game.override.moveset([Moves.TAKE_DOWN]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -266,7 +266,7 @@ describe("Abilities - Magic Guard", () => { it("Magic Guard does not prevent damage from Struggle's recoil", async () => { game.override.moveset([Moves.STRUGGLE]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -284,7 +284,7 @@ describe("Abilities - Magic Guard", () => { //This tests different move attributes than the recoil tests above it("Magic Guard prevents self-damage from attacking moves", async () => { game.override.moveset([Moves.STEEL_BEAM]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -301,7 +301,7 @@ describe("Abilities - Magic Guard", () => { /* it("Magic Guard does not prevent self-damage from confusion", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); game.move.select(Moves.CHARM); @@ -311,7 +311,7 @@ describe("Abilities - Magic Guard", () => { it("Magic Guard does not prevent self-damage from non-attacking moves", async () => { game.override.moveset([Moves.BELLY_DRUM]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -333,7 +333,7 @@ describe("Abilities - Magic Guard", () => { game.override.enemyMoveset([Moves.SPORE, Moves.SPORE, Moves.SPORE, Moves.SPORE]); game.override.enemyAbility(Abilities.BAD_DREAMS); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -355,7 +355,7 @@ describe("Abilities - Magic Guard", () => { game.override.moveset([Moves.TACKLE]); game.override.enemyAbility(Abilities.AFTERMATH); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -379,7 +379,7 @@ describe("Abilities - Magic Guard", () => { game.override.moveset([Moves.TACKLE]); game.override.enemyAbility(Abilities.IRON_BARBS); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -402,7 +402,7 @@ describe("Abilities - Magic Guard", () => { game.override.moveset([Moves.ABSORB]); game.override.enemyAbility(Abilities.LIQUID_OOZE); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -425,7 +425,7 @@ describe("Abilities - Magic Guard", () => { game.override.passiveAbility(Abilities.SOLAR_POWER); game.override.weather(WeatherType.SUNNY); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.SPLASH); await game.phaseInterceptor.to(TurnEndPhase); diff --git a/test/abilities/mimicry.test.ts b/test/abilities/mimicry.test.ts index 598f5790aa8..de196ffc939 100644 --- a/test/abilities/mimicry.test.ts +++ b/test/abilities/mimicry.test.ts @@ -55,7 +55,7 @@ describe("Abilities - Mimicry", () => { const playerPokemon = game.scene.getPlayerPokemon(); game.move.select(Moves.TRANSFORM); - await game.forceEnemyMove(Moves.PSYCHIC_TERRAIN); + await game.move.selectEnemyMove(Moves.PSYCHIC_TERRAIN); await game.toNextTurn(); expect(playerPokemon?.getTypes().includes(PokemonType.PSYCHIC)).toBe(true); @@ -64,7 +64,7 @@ describe("Abilities - Mimicry", () => { } game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); expect(playerPokemon?.getTypes().includes(PokemonType.ELECTRIC)).toBe(true); }); @@ -75,13 +75,13 @@ describe("Abilities - Mimicry", () => { const playerPokemon = game.scene.getPlayerPokemon(); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.FORESTS_CURSE); + await game.move.selectEnemyMove(Moves.FORESTS_CURSE); await game.toNextTurn(); expect(playerPokemon?.summonData.addedType).toBe(PokemonType.GRASS); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.GRASSY_TERRAIN); + await game.move.selectEnemyMove(Moves.GRASSY_TERRAIN); await game.phaseInterceptor.to("TurnEndPhase"); expect(playerPokemon?.summonData.addedType).toBeNull(); diff --git a/test/abilities/mirror_armor.test.ts b/test/abilities/mirror_armor.test.ts index bd61f39ba75..5f9c63531d4 100644 --- a/test/abilities/mirror_armor.test.ts +++ b/test/abilities/mirror_armor.test.ts @@ -46,7 +46,7 @@ describe("Ability - Mirror Armor", () => { // Enemy has intimidate, enemy should lose -1 atk game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); await game.toNextTurn(); expect(enemyPokemon.getStatStage(Stat.ATK)).toBe(-1); @@ -63,7 +63,7 @@ describe("Ability - Mirror Armor", () => { // Enemy has intimidate, enemy should lose -1 atk game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); await game.toNextTurn(); expect(userPokemon.getStatStage(Stat.ATK)).toBe(-1); @@ -82,8 +82,8 @@ describe("Ability - Mirror Armor", () => { // Enemy has intimidate, enemy should lose -2 atk each game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2); await game.toNextTurn(); expect(enemy1.getStatStage(Stat.ATK)).toBe(-2); @@ -104,8 +104,8 @@ describe("Ability - Mirror Armor", () => { // Enemy has intimidate, enemy should lose -1 atk game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2); await game.toNextTurn(); expect(enemy1.getStatStage(Stat.ATK)).toBe(0); @@ -124,7 +124,7 @@ describe("Ability - Mirror Armor", () => { // Enemy has intimidate and uses tickle, enemy receives -2 atk and -1 defense game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER); await game.toNextTurn(); expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(-1); @@ -144,8 +144,8 @@ describe("Ability - Mirror Armor", () => { game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER_2); await game.toNextTurn(); expect(player1.getStatStage(Stat.ATK)).toBe(0); @@ -168,7 +168,7 @@ describe("Ability - Mirror Armor", () => { // Enemy has intimidate and uses tickle, enemy receives -2 atk and -1 defense game.move.select(Moves.TICKLE); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); await game.toNextTurn(); expect(userPokemon.getStatStage(Stat.DEF)).toBe(-1); @@ -187,7 +187,7 @@ describe("Ability - Mirror Armor", () => { // Enemy has intimidate and uses tickle, enemy has white smoke, no one loses stats game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.TICKLE, BattlerIndex.PLAYER); await game.toNextTurn(); expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(0); @@ -206,7 +206,7 @@ describe("Ability - Mirror Armor", () => { // Enemy has intimidate and uses tickle, enemy has white smoke, no one loses stats game.move.select(Moves.TICKLE); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); await game.toNextTurn(); expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(0); @@ -224,7 +224,7 @@ describe("Ability - Mirror Armor", () => { // Enemy uses octolock, player loses stats at end of turn game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.OCTOLOCK, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.OCTOLOCK, BattlerIndex.PLAYER); await game.toNextTurn(); expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(0); @@ -242,7 +242,7 @@ describe("Ability - Mirror Armor", () => { // Player uses octolock, enemy loses stats at end of turn game.move.select(Moves.OCTOLOCK); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); await game.toNextTurn(); expect(userPokemon.getStatStage(Stat.DEF)).toBe(0); @@ -261,7 +261,7 @@ describe("Ability - Mirror Armor", () => { const userPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); await game.toNextTurn(); expect(userPokemon.getStatStage(Stat.ATK)).toBe(-1); @@ -276,11 +276,11 @@ describe("Ability - Mirror Armor", () => { const userPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.STICKY_WEB, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.STICKY_WEB, BattlerIndex.PLAYER); await game.toNextTurn(); game.doSwitchPokemon(1); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); await game.toNextTurn(); expect(userPokemon.getStatStage(Stat.SPD)).toBe(0); @@ -297,14 +297,14 @@ describe("Ability - Mirror Armor", () => { game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.STICKY_WEB, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.STICKY_WEB, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2); await game.toNextTurn(); game.doSwitchPokemon(2); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER_2); await game.toNextTurn(); expect(enemy1.getStatStage(Stat.SPD)).toBe(-1); diff --git a/test/abilities/moxie.test.ts b/test/abilities/moxie.test.ts index bccdeda2b93..d4e1927e077 100644 --- a/test/abilities/moxie.test.ts +++ b/test/abilities/moxie.test.ts @@ -38,7 +38,7 @@ describe("Abilities - Moxie", () => { it("should raise ATK stat stage by 1 when winning a battle", async () => { const moveToUse = Moves.AERIAL_ACE; - await game.startBattle([Species.MIGHTYENA, Species.MIGHTYENA]); + await game.classicMode.startBattle([Species.MIGHTYENA, Species.MIGHTYENA]); const playerPokemon = game.scene.getPlayerPokemon()!; @@ -56,7 +56,7 @@ describe("Abilities - Moxie", () => { async () => { game.override.battleStyle("double"); const moveToUse = Moves.AERIAL_ACE; - await game.startBattle([Species.MIGHTYENA, Species.MIGHTYENA]); + await game.classicMode.startBattle([Species.MIGHTYENA, Species.MIGHTYENA]); const [firstPokemon, secondPokemon] = game.scene.getPlayerField(); diff --git a/test/abilities/mycelium_might.test.ts b/test/abilities/mycelium_might.test.ts index 4a5700045fa..18465f9b64e 100644 --- a/test/abilities/mycelium_might.test.ts +++ b/test/abilities/mycelium_might.test.ts @@ -41,7 +41,7 @@ describe("Abilities - Mycelium Might", () => { **/ it("will move last in its priority bracket and ignore protective abilities", async () => { - await game.startBattle([Species.REGIELEKI]); + await game.classicMode.startBattle([Species.REGIELEKI]); const enemyPokemon = game.scene.getEnemyPokemon(); const playerIndex = game.scene.getPlayerPokemon()?.getBattlerIndex(); @@ -65,7 +65,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]); - await game.startBattle([Species.REGIELEKI]); + await game.classicMode.startBattle([Species.REGIELEKI]); const enemyPokemon = game.scene.getEnemyPokemon(); const playerIndex = game.scene.getPlayerPokemon()?.getBattlerIndex(); @@ -87,7 +87,7 @@ describe("Abilities - Mycelium Might", () => { }, 20000); it("will not affect non-status moves", async () => { - await game.startBattle([Species.REGIELEKI]); + await game.classicMode.startBattle([Species.REGIELEKI]); const playerIndex = game.scene.getPlayerPokemon()!.getBattlerIndex(); const enemyIndex = game.scene.getEnemyPokemon()!.getBattlerIndex(); diff --git a/test/abilities/neutralizing_gas.test.ts b/test/abilities/neutralizing_gas.test.ts index 979583b7d97..cf19f36c9d0 100644 --- a/test/abilities/neutralizing_gas.test.ts +++ b/test/abilities/neutralizing_gas.test.ts @@ -110,16 +110,16 @@ describe("Abilities - Neutralizing Gas", () => { await game.classicMode.startBattle([Species.ACCELGOR, Species.ACCELGOR]); game.move.select(Moves.SPLASH, 0); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.ENTRAINMENT, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.ENTRAINMENT, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeDefined(); // Now one neut gas user is left game.move.select(Moves.SPLASH, 0); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.ENTRAINMENT, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.ENTRAINMENT, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeUndefined(); // No neut gas users are left diff --git a/test/abilities/pastel_veil.test.ts b/test/abilities/pastel_veil.test.ts index 4ae9763c4a6..21da1d1353d 100644 --- a/test/abilities/pastel_veil.test.ts +++ b/test/abilities/pastel_veil.test.ts @@ -34,7 +34,7 @@ describe("Abilities - Pastel Veil", () => { }); it("prevents the user and its allies from being afflicted by poison", async () => { - await game.startBattle([Species.MAGIKARP, Species.GALAR_PONYTA]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.GALAR_PONYTA]); const ponyta = game.scene.getPlayerField()[1]; const magikarp = game.scene.getPlayerField()[0]; ponyta.abilityIndex = 1; @@ -50,7 +50,7 @@ describe("Abilities - Pastel Veil", () => { }); it("it heals the poisoned status condition of allies if user is sent out into battle", async () => { - await game.startBattle([Species.MAGIKARP, Species.FEEBAS, Species.GALAR_PONYTA]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS, Species.GALAR_PONYTA]); const ponyta = game.scene.getPlayerParty()[2]; const magikarp = game.scene.getPlayerField()[0]; ponyta.abilityIndex = 1; diff --git a/test/abilities/perish_body.test.ts b/test/abilities/perish_body.test.ts index 27e76cb52ad..140e087843c 100644 --- a/test/abilities/perish_body.test.ts +++ b/test/abilities/perish_body.test.ts @@ -64,14 +64,14 @@ describe("Abilities - Perish Song", () => { const magikarp = game.scene.getEnemyPokemon(); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.PERISH_SONG); + await game.move.selectEnemyMove(Moves.PERISH_SONG); await game.toNextTurn(); expect(feebas?.summonData.tags[0].turnCount).toBe(3); expect(magikarp?.summonData.tags[0].turnCount).toBe(3); game.doSwitchPokemon(1); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); const cursola = game.scene.getPlayerPokemon(); @@ -79,7 +79,7 @@ describe("Abilities - Perish Song", () => { expect(magikarp?.summonData.tags[0].turnCount).toBe(2); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.AQUA_JET); + await game.move.selectEnemyMove(Moves.AQUA_JET); await game.toNextTurn(); expect(cursola?.summonData.tags.length).toBe(0); @@ -94,7 +94,7 @@ describe("Abilities - Perish Song", () => { const cursola = game.scene.getPlayerPokemon(); game.move.select(Moves.WHIRLWIND); - await game.forceEnemyMove(Moves.PERISH_SONG); + await game.move.selectEnemyMove(Moves.PERISH_SONG); await game.toNextTurn(); const magikarp = game.scene.getEnemyPokemon(); @@ -102,7 +102,7 @@ describe("Abilities - Perish Song", () => { expect(magikarp?.summonData.tags.length).toBe(0); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.AQUA_JET); + await game.move.selectEnemyMove(Moves.AQUA_JET); await game.toNextTurn(); expect(cursola?.summonData.tags[0].turnCount).toBe(2); diff --git a/test/abilities/power_spot.test.ts b/test/abilities/power_spot.test.ts index c3accdb04f8..0a062537202 100644 --- a/test/abilities/power_spot.test.ts +++ b/test/abilities/power_spot.test.ts @@ -39,7 +39,7 @@ describe("Abilities - Power Spot", () => { vi.spyOn(moveToCheck, "calculateBattlePower"); - await game.startBattle([Species.REGIELEKI, Species.STONJOURNER]); + await game.classicMode.startBattle([Species.REGIELEKI, Species.STONJOURNER]); game.move.select(Moves.DAZZLING_GLEAM); game.move.select(Moves.SPLASH, 1); await game.phaseInterceptor.to(MoveEffectPhase); @@ -53,7 +53,7 @@ describe("Abilities - Power Spot", () => { vi.spyOn(moveToCheck, "calculateBattlePower"); - await game.startBattle([Species.REGIELEKI, Species.STONJOURNER]); + await game.classicMode.startBattle([Species.REGIELEKI, Species.STONJOURNER]); game.move.select(Moves.BREAKING_SWIPE); game.move.select(Moves.SPLASH, 1); await game.phaseInterceptor.to(MoveEffectPhase); @@ -67,7 +67,7 @@ describe("Abilities - Power Spot", () => { vi.spyOn(moveToCheck, "calculateBattlePower"); - await game.startBattle([Species.STONJOURNER, Species.REGIELEKI]); + await game.classicMode.startBattle([Species.STONJOURNER, Species.REGIELEKI]); game.move.select(Moves.BREAKING_SWIPE); game.move.select(Moves.SPLASH, 1); await game.phaseInterceptor.to(TurnEndPhase); diff --git a/test/abilities/protean.test.ts b/test/abilities/protean.test.ts index 8e6b69dabd6..bfe6dd32282 100644 --- a/test/abilities/protean.test.ts +++ b/test/abilities/protean.test.ts @@ -39,7 +39,7 @@ describe("Abilities - Protean", () => { test("ability applies and changes a pokemon's type", async () => { game.override.moveset([Moves.SPLASH]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -54,7 +54,7 @@ describe("Abilities - Protean", () => { test.skip("ability applies only once per switch in", async () => { game.override.moveset([Moves.SPLASH, Moves.AGILITY]); - await game.startBattle([Species.MAGIKARP, Species.BULBASAUR]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.BULBASAUR]); let leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -90,7 +90,7 @@ describe("Abilities - Protean", () => { test("ability applies correctly even if the pokemon's move has a variable type", async () => { game.override.moveset([Moves.WEATHER_BALL]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -110,7 +110,7 @@ describe("Abilities - Protean", () => { game.override.moveset([Moves.TACKLE]); game.override.passiveAbility(Abilities.REFRIGERATE); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -128,7 +128,7 @@ describe("Abilities - Protean", () => { test("ability applies correctly even if the pokemon's move calls another move", async () => { game.override.moveset([Moves.NATURE_POWER]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -143,7 +143,7 @@ describe("Abilities - Protean", () => { test("ability applies correctly even if the pokemon's move is delayed / charging", async () => { game.override.moveset([Moves.DIG]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -158,7 +158,7 @@ describe("Abilities - Protean", () => { game.override.moveset([Moves.TACKLE]); game.override.enemyMoveset(Moves.SPLASH); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -176,7 +176,7 @@ describe("Abilities - Protean", () => { game.override.moveset([Moves.TACKLE]); game.override.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -191,7 +191,7 @@ describe("Abilities - Protean", () => { game.override.moveset([Moves.TACKLE]); game.override.enemySpecies(Species.GASTLY); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -205,7 +205,7 @@ describe("Abilities - Protean", () => { test("ability is not applied if pokemon's type is the same as the move's type", async () => { game.override.moveset([Moves.SPLASH]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -220,7 +220,7 @@ describe("Abilities - Protean", () => { test("ability is not applied if pokemon is terastallized", async () => { game.override.moveset([Moves.SPLASH]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -236,7 +236,7 @@ describe("Abilities - Protean", () => { test("ability is not applied if pokemon uses struggle", async () => { game.override.moveset([Moves.STRUGGLE]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -250,7 +250,7 @@ describe("Abilities - Protean", () => { test("ability is not applied if the pokemon's move fails", async () => { game.override.moveset([Moves.BURN_UP]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -265,7 +265,7 @@ describe("Abilities - Protean", () => { game.override.moveset([Moves.TRICK_OR_TREAT]); game.override.enemySpecies(Species.GASTLY); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); @@ -279,7 +279,7 @@ describe("Abilities - Protean", () => { test("ability applies correctly and the pokemon curses itself", async () => { game.override.moveset([Moves.CURSE]); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; expect(leadPokemon).not.toBe(undefined); diff --git a/test/abilities/quick_draw.test.ts b/test/abilities/quick_draw.test.ts index 79a29b0ce77..e761d236a93 100644 --- a/test/abilities/quick_draw.test.ts +++ b/test/abilities/quick_draw.test.ts @@ -41,7 +41,7 @@ describe("Abilities - Quick Draw", () => { }); test("makes pokemon going first in its priority bracket", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const pokemon = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; @@ -63,7 +63,7 @@ describe("Abilities - Quick Draw", () => { retry: 5, }, async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const pokemon = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; @@ -83,7 +83,7 @@ describe("Abilities - Quick Draw", () => { test("does not increase priority", async () => { game.override.enemyMoveset([Moves.EXTREME_SPEED]); - await game.startBattle(); + await game.classicMode.startBattle(); const pokemon = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; diff --git a/test/abilities/sand_veil.test.ts b/test/abilities/sand_veil.test.ts index b82c79c681b..116850e1e5a 100644 --- a/test/abilities/sand_veil.test.ts +++ b/test/abilities/sand_veil.test.ts @@ -38,7 +38,7 @@ describe("Abilities - Sand Veil", () => { }); test("ability should increase the evasiveness of the source", async () => { - await game.startBattle([Species.SNORLAX, Species.BLISSEY]); + await game.classicMode.startBattle([Species.SNORLAX, Species.BLISSEY]); const leadPokemon = game.scene.getPlayerField(); diff --git a/test/abilities/schooling.test.ts b/test/abilities/schooling.test.ts index 803b4d2062a..ac4e3c837c5 100644 --- a/test/abilities/schooling.test.ts +++ b/test/abilities/schooling.test.ts @@ -39,7 +39,7 @@ describe("Abilities - SCHOOLING", () => { [Species.WISHIWASHI]: schoolForm, }); - await game.startBattle([Species.MAGIKARP, Species.WISHIWASHI]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.WISHIWASHI]); const wishiwashi = game.scene.getPlayerParty().find(p => p.species.speciesId === Species.WISHIWASHI)!; expect(wishiwashi).not.toBe(undefined); diff --git a/test/abilities/screen_cleaner.test.ts b/test/abilities/screen_cleaner.test.ts index 840291f6420..ea99ba00f87 100644 --- a/test/abilities/screen_cleaner.test.ts +++ b/test/abilities/screen_cleaner.test.ts @@ -33,7 +33,7 @@ describe("Abilities - Screen Cleaner", () => { game.override.moveset([Moves.HAIL]); game.override.enemyMoveset([Moves.AURORA_VEIL, Moves.AURORA_VEIL, Moves.AURORA_VEIL, Moves.AURORA_VEIL]); - await game.startBattle([Species.MAGIKARP, Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); game.move.select(Moves.HAIL); await game.phaseInterceptor.to(TurnEndPhase); @@ -50,7 +50,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]); - await game.startBattle([Species.MAGIKARP, Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); game.move.select(Moves.SPLASH); await game.phaseInterceptor.to(TurnEndPhase); @@ -67,7 +67,7 @@ describe("Abilities - Screen Cleaner", () => { it("removes Reflect", async () => { game.override.enemyMoveset([Moves.REFLECT, Moves.REFLECT, Moves.REFLECT, Moves.REFLECT]); - await game.startBattle([Species.MAGIKARP, Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); game.move.select(Moves.SPLASH); await game.phaseInterceptor.to(TurnEndPhase); diff --git a/test/abilities/shields_down.test.ts b/test/abilities/shields_down.test.ts index 2f9d2fb1f97..444b1fabf73 100644 --- a/test/abilities/shields_down.test.ts +++ b/test/abilities/shields_down.test.ts @@ -76,7 +76,7 @@ describe("Abilities - SHIELDS DOWN", () => { await game.classicMode.startBattle([Species.MINIOR]); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPORE); + await game.move.selectEnemyMove(Moves.SPORE); await game.phaseInterceptor.to(TurnEndPhase); expect(game.scene.getPlayerPokemon()!.status).toBe(undefined); @@ -115,12 +115,12 @@ describe("Abilities - SHIELDS DOWN", () => { // turn 1 game.move.select(Moves.GRAVITY); - await game.forceEnemyMove(Moves.TOXIC_SPIKES); + await game.move.selectEnemyMove(Moves.TOXIC_SPIKES); await game.toNextTurn(); // turn 2 game.doSwitchPokemon(1); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); expect(game.scene.getPlayerPokemon()!.species.speciesId).toBe(Species.MINIOR); @@ -134,7 +134,7 @@ describe("Abilities - SHIELDS DOWN", () => { await game.classicMode.startBattle([Species.MAGIKARP, Species.MINIOR]); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.YAWN); + await game.move.selectEnemyMove(Moves.YAWN); await game.phaseInterceptor.to(TurnEndPhase); expect(game.scene.getPlayerPokemon()!.findTag(tag => tag.tagType === BattlerTagType.DROWSY)).toBe(undefined); @@ -146,7 +146,7 @@ describe("Abilities - SHIELDS DOWN", () => { await game.classicMode.startBattle([Species.MINIOR]); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.CONFUSE_RAY); + await game.move.selectEnemyMove(Moves.CONFUSE_RAY); await game.phaseInterceptor.to(TurnEndPhase); @@ -162,7 +162,7 @@ describe("Abilities - SHIELDS DOWN", () => { await game.classicMode.startBattle([Species.MINIOR]); game.move.select(Moves.SPORE); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to(TurnEndPhase); expect(game.scene.getEnemyPokemon()!.status?.effect).toBe(StatusEffect.SLEEP); diff --git a/test/abilities/simple.test.ts b/test/abilities/simple.test.ts index 1f084b1bf4c..cf3a692a7b0 100644 --- a/test/abilities/simple.test.ts +++ b/test/abilities/simple.test.ts @@ -31,7 +31,7 @@ describe("Abilities - Simple", () => { }); it("should double stat changes when applied", async () => { - await game.startBattle([Species.SLOWBRO]); + await game.classicMode.startBattle([Species.SLOWBRO]); const enemyPokemon = game.scene.getEnemyPokemon()!; diff --git a/test/abilities/stakeout.test.ts b/test/abilities/stakeout.test.ts index 8a2231bba0b..d986046a7e1 100644 --- a/test/abilities/stakeout.test.ts +++ b/test/abilities/stakeout.test.ts @@ -42,7 +42,7 @@ describe("Abilities - Stakeout", () => { const [enemy1] = game.scene.getEnemyParty(); game.move.select(Moves.SURF); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); const damage1 = enemy1.getInverseHp(); enemy1.hp = enemy1.getMaxHp(); @@ -65,17 +65,17 @@ describe("Abilities - Stakeout", () => { const [enemy1] = game.scene.getEnemyParty(); game.move.select(Moves.SURF); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); const damage1 = enemy1.getInverseHp(); enemy1.hp = enemy1.getMaxHp(); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.FLIP_TURN); + await game.move.selectEnemyMove(Moves.FLIP_TURN); await game.toNextTurn(); game.move.select(Moves.SURF); - await game.forceEnemyMove(Moves.FLIP_TURN); + await game.move.selectEnemyMove(Moves.FLIP_TURN); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextTurn(); diff --git a/test/abilities/stall.test.ts b/test/abilities/stall.test.ts index 68b3fdedcd8..5c17f71c48d 100644 --- a/test/abilities/stall.test.ts +++ b/test/abilities/stall.test.ts @@ -37,7 +37,7 @@ describe("Abilities - Stall", () => { **/ it("Pokemon with Stall should move last in its priority bracket regardless of speed", async () => { - await game.startBattle([Species.SHUCKLE]); + await game.classicMode.startBattle([Species.SHUCKLE]); const playerIndex = game.scene.getPlayerPokemon()!.getBattlerIndex(); const enemyIndex = game.scene.getEnemyPokemon()!.getBattlerIndex(); @@ -55,7 +55,7 @@ describe("Abilities - Stall", () => { }, 20000); it("Pokemon with Stall will go first if a move that is in a higher priority bracket than the opponent's move is used", async () => { - await game.startBattle([Species.SHUCKLE]); + await game.classicMode.startBattle([Species.SHUCKLE]); const playerIndex = game.scene.getPlayerPokemon()!.getBattlerIndex(); const enemyIndex = game.scene.getEnemyPokemon()!.getBattlerIndex(); @@ -74,7 +74,7 @@ describe("Abilities - Stall", () => { it("If both Pokemon have stall and use the same move, speed is used to determine who goes first.", async () => { game.override.ability(Abilities.STALL); - await game.startBattle([Species.SHUCKLE]); + await game.classicMode.startBattle([Species.SHUCKLE]); const playerIndex = game.scene.getPlayerPokemon()!.getBattlerIndex(); const enemyIndex = game.scene.getEnemyPokemon()!.getBattlerIndex(); diff --git a/test/abilities/sturdy.test.ts b/test/abilities/sturdy.test.ts index bda8c6d1e35..dbdd1b4570e 100644 --- a/test/abilities/sturdy.test.ts +++ b/test/abilities/sturdy.test.ts @@ -36,14 +36,14 @@ describe("Abilities - Sturdy", () => { }); test("Sturdy activates when user is at full HP", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); game.move.select(Moves.CLOSE_COMBAT); await game.phaseInterceptor.to(MoveEndPhase); expect(game.scene.getEnemyParty()[0].hp).toBe(1); }); test("Sturdy doesn't activate when user is not at full HP", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon: EnemyPokemon = game.scene.getEnemyParty()[0]; enemyPokemon.hp = enemyPokemon.getMaxHp() - 1; @@ -56,7 +56,7 @@ describe("Abilities - Sturdy", () => { }); test("Sturdy pokemon should be immune to OHKO moves", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); game.move.select(Moves.FISSURE); await game.phaseInterceptor.to(MoveEndPhase); @@ -67,7 +67,7 @@ describe("Abilities - Sturdy", () => { test("Sturdy is ignored by pokemon with `Abilities.MOLD_BREAKER`", async () => { game.override.ability(Abilities.MOLD_BREAKER); - await game.startBattle(); + await game.classicMode.startBattle(); game.move.select(Moves.CLOSE_COMBAT); await game.phaseInterceptor.to(DamageAnimPhase); diff --git a/test/abilities/supreme_overlord.test.ts b/test/abilities/supreme_overlord.test.ts index 6cc52de64bf..4c0be80daea 100644 --- a/test/abilities/supreme_overlord.test.ts +++ b/test/abilities/supreme_overlord.test.ts @@ -44,7 +44,7 @@ describe("Abilities - Supreme Overlord", () => { }); it("should increase Power by 20% if 2 Pokemon are fainted in the party", async () => { - await game.startBattle([Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE]); + await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE]); game.move.select(Moves.EXPLOSION); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); diff --git a/test/abilities/sweet_veil.test.ts b/test/abilities/sweet_veil.test.ts index e609aa6e7d2..80d7165619f 100644 --- a/test/abilities/sweet_veil.test.ts +++ b/test/abilities/sweet_veil.test.ts @@ -33,7 +33,7 @@ describe("Abilities - Sweet Veil", () => { }); it("prevents the user and its allies from falling asleep", async () => { - await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]); + await game.classicMode.startBattle([Species.SWIRLIX, Species.MAGIKARP]); game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); @@ -45,7 +45,7 @@ describe("Abilities - Sweet Veil", () => { it("causes Rest to fail when used by the user or its allies", async () => { game.override.enemyMoveset(Moves.SPLASH); - await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]); + await game.classicMode.startBattle([Species.SWIRLIX, Species.MAGIKARP]); game.move.select(Moves.SPLASH); game.move.select(Moves.REST, 1); @@ -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]); - await game.startBattle([Species.SWIRLIX, Species.MAGIKARP]); + await game.classicMode.startBattle([Species.SWIRLIX, Species.MAGIKARP]); game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); @@ -73,7 +73,7 @@ describe("Abilities - Sweet Veil", () => { game.override.startingLevel(5); game.override.enemyMoveset(Moves.SPLASH); - await game.startBattle([Species.SHUCKLE, Species.SHUCKLE, Species.SWIRLIX]); + await game.classicMode.startBattle([Species.SHUCKLE, Species.SHUCKLE, Species.SWIRLIX]); game.move.select(Moves.SPLASH); game.move.select(Moves.YAWN, 1, BattlerIndex.PLAYER); diff --git a/test/abilities/unburden.test.ts b/test/abilities/unburden.test.ts index ff28c3b6a09..ea4f84545aa 100644 --- a/test/abilities/unburden.test.ts +++ b/test/abilities/unburden.test.ts @@ -244,8 +244,8 @@ describe("Abilities - Unburden", () => { // Turn 1: Treecko gets hit by False Swipe and eats Sitrus Berry, activating Unburden game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.FALSE_SWIPE, 0); - await game.forceEnemyMove(Moves.FALSE_SWIPE, 0); + await game.move.selectEnemyMove(Moves.FALSE_SWIPE, 0); + await game.move.selectEnemyMove(Moves.FALSE_SWIPE, 0); await game.phaseInterceptor.to("TurnEndPhase"); expect(getHeldItemCount(treecko)).toBeLessThan(playerHeldItems); @@ -302,7 +302,7 @@ describe("Abilities - Unburden", () => { // Turn 1: Get hit by False Swipe and eat Sitrus Berry, activating Unburden game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.FALSE_SWIPE); + await game.move.selectEnemyMove(Moves.FALSE_SWIPE); await game.toNextTurn(); expect(getHeldItemCount(playerPokemon)).toBeLessThan(playerHeldItems); @@ -310,7 +310,7 @@ describe("Abilities - Unburden", () => { // Turn 2: Get hit by Worry Seed, deactivating Unburden game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.WORRY_SEED); + await game.move.selectEnemyMove(Moves.WORRY_SEED); await game.toNextTurn(); expect(getHeldItemCount(playerPokemon)).toBeLessThan(playerHeldItems); @@ -343,13 +343,13 @@ describe("Abilities - Unburden", () => { const initialSpeed = treecko.getStat(Stat.SPD); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.THIEF); + await game.move.selectEnemyMove(Moves.THIEF); game.doSelectPartyPokemon(1); await game.toNextTurn(); game.doRevivePokemon(1); game.doSwitchPokemon(1); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); expect(game.scene.getPlayerPokemon()!).toBe(treecko); @@ -372,8 +372,8 @@ describe("Abilities - Unburden", () => { game.move.select(Moves.SPLASH); game.move.select(Moves.REVIVAL_BLESSING, 1); - await game.forceEnemyMove(Moves.THIEF, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.THIEF, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER_2]); game.doSelectPartyPokemon(0, "RevivalBlessingPhase"); await game.toNextTurn(); diff --git a/test/abilities/wimp_out.test.ts b/test/abilities/wimp_out.test.ts index 67885a82163..32a627f20f9 100644 --- a/test/abilities/wimp_out.test.ts +++ b/test/abilities/wimp_out.test.ts @@ -544,8 +544,8 @@ describe("Abilities - Wimp Out", () => { // turn 1 game.move.select(Moves.DRAGON_ENERGY, 0); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH); - await game.forceEnemyMove(Moves.ENDURE); + await game.move.selectEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.ENDURE); await game.phaseInterceptor.to("SelectModifierPhase"); expect(game.scene.currentBattle.waveIndex).toBe(wave + 1); diff --git a/test/abilities/wind_power.test.ts b/test/abilities/wind_power.test.ts index 66c72d454ab..11585520c73 100644 --- a/test/abilities/wind_power.test.ts +++ b/test/abilities/wind_power.test.ts @@ -31,7 +31,7 @@ describe("Abilities - Wind Power", () => { }); it("it becomes charged when hit by wind moves", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const shiftry = game.scene.getEnemyPokemon()!; expect(shiftry.getTag(BattlerTagType.CHARGED)).toBeUndefined(); @@ -46,7 +46,7 @@ describe("Abilities - Wind Power", () => { game.override.ability(Abilities.WIND_POWER); game.override.enemySpecies(Species.MAGIKARP); - await game.startBattle([Species.SHIFTRY]); + await game.classicMode.startBattle([Species.SHIFTRY]); const shiftry = game.scene.getPlayerPokemon()!; expect(shiftry.getTag(BattlerTagType.CHARGED)).toBeUndefined(); @@ -61,7 +61,7 @@ describe("Abilities - Wind Power", () => { game.override.enemySpecies(Species.MAGIKARP); game.override.ability(Abilities.WIND_POWER); - await game.startBattle([Species.SHIFTRY]); + await game.classicMode.startBattle([Species.SHIFTRY]); const magikarp = game.scene.getEnemyPokemon()!; const shiftry = game.scene.getPlayerPokemon()!; @@ -79,7 +79,7 @@ describe("Abilities - Wind Power", () => { it("does not interact with Sandstorm", async () => { game.override.enemySpecies(Species.MAGIKARP); - await game.startBattle([Species.SHIFTRY]); + await game.classicMode.startBattle([Species.SHIFTRY]); const shiftry = game.scene.getPlayerPokemon()!; expect(shiftry.getTag(BattlerTagType.CHARGED)).toBeUndefined(); diff --git a/test/abilities/wonder_skin.test.ts b/test/abilities/wonder_skin.test.ts index fd4cc77bd1c..cb5dd4e117f 100644 --- a/test/abilities/wonder_skin.test.ts +++ b/test/abilities/wonder_skin.test.ts @@ -36,7 +36,7 @@ describe("Abilities - Wonder Skin", () => { vi.spyOn(moveToCheck, "calculateBattleAccuracy"); - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); game.move.select(Moves.CHARM); await game.phaseInterceptor.to(MoveEffectPhase); @@ -48,7 +48,7 @@ describe("Abilities - Wonder Skin", () => { vi.spyOn(moveToCheck, "calculateBattleAccuracy"); - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); game.move.select(Moves.TACKLE); await game.phaseInterceptor.to(MoveEffectPhase); diff --git a/test/abilities/zero_to_hero.test.ts b/test/abilities/zero_to_hero.test.ts index 2cdc516dc6b..c159d007765 100644 --- a/test/abilities/zero_to_hero.test.ts +++ b/test/abilities/zero_to_hero.test.ts @@ -39,7 +39,7 @@ describe("Abilities - ZERO TO HERO", () => { [Species.PALAFIN]: heroForm, }); - await game.startBattle([Species.FEEBAS, Species.PALAFIN, Species.PALAFIN]); + await game.classicMode.startBattle([Species.FEEBAS, Species.PALAFIN, Species.PALAFIN]); const palafin1 = game.scene.getPlayerParty()[1]; const palafin2 = game.scene.getPlayerParty()[2]; @@ -61,7 +61,7 @@ describe("Abilities - ZERO TO HERO", () => { }); it("should swap to Hero form when switching out during a battle", async () => { - await game.startBattle([Species.PALAFIN, Species.FEEBAS]); + await game.classicMode.startBattle([Species.PALAFIN, Species.FEEBAS]); const palafin = game.scene.getPlayerPokemon()!; expect(palafin.formIndex).toBe(baseForm); @@ -72,7 +72,7 @@ describe("Abilities - ZERO TO HERO", () => { }); it("should not swap to Hero form if switching due to faint", async () => { - await game.startBattle([Species.PALAFIN, Species.FEEBAS]); + await game.classicMode.startBattle([Species.PALAFIN, Species.FEEBAS]); const palafin = game.scene.getPlayerPokemon()!; expect(palafin.formIndex).toBe(baseForm); @@ -89,7 +89,7 @@ describe("Abilities - ZERO TO HERO", () => { [Species.PALAFIN]: heroForm, }); - await game.startBattle([Species.PALAFIN, Species.FEEBAS]); + await game.classicMode.startBattle([Species.PALAFIN, Species.FEEBAS]); const palafin = game.scene.getPlayerPokemon()!; expect(palafin.formIndex).toBe(heroForm); diff --git a/test/arena/weather_fog.test.ts b/test/arena/weather_fog.test.ts index ae41c9d14e8..69f167b8cf1 100644 --- a/test/arena/weather_fog.test.ts +++ b/test/arena/weather_fog.test.ts @@ -37,7 +37,7 @@ describe("Weather - Fog", () => { vi.spyOn(moveToCheck, "calculateBattleAccuracy"); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); game.move.select(Moves.TACKLE); await game.phaseInterceptor.to(MoveEffectPhase); diff --git a/test/battle/battle-order.test.ts b/test/battle/battle-order.test.ts index 43fa1e59c14..876730169f9 100644 --- a/test/battle/battle-order.test.ts +++ b/test/battle/battle-order.test.ts @@ -32,7 +32,7 @@ describe("Battle order", () => { }); it("opponent faster than player 50 vs 150", async () => { - await game.startBattle([Species.BULBASAUR]); + await game.classicMode.startBattle([Species.BULBASAUR]); const playerPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -51,7 +51,7 @@ describe("Battle order", () => { }, 20000); it("Player faster than opponent 150 vs 50", async () => { - await game.startBattle([Species.BULBASAUR]); + await game.classicMode.startBattle([Species.BULBASAUR]); const playerPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -71,7 +71,7 @@ describe("Battle order", () => { it("double - both opponents faster than player 50/50 vs 150/150", async () => { game.override.battleStyle("double"); - await game.startBattle([Species.BULBASAUR, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.BULBASAUR, Species.BLASTOISE]); const playerPokemon = game.scene.getPlayerField(); const enemyPokemon = game.scene.getEnemyField(); @@ -95,7 +95,7 @@ describe("Battle order", () => { it("double - speed tie except 1 - 100/100 vs 100/150", async () => { game.override.battleStyle("double"); - await game.startBattle([Species.BULBASAUR, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.BULBASAUR, Species.BLASTOISE]); const playerPokemon = game.scene.getPlayerField(); const enemyPokemon = game.scene.getEnemyField(); @@ -119,7 +119,7 @@ describe("Battle order", () => { it("double - speed tie 100/150 vs 100/150", async () => { game.override.battleStyle("double"); - await game.startBattle([Species.BULBASAUR, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.BULBASAUR, Species.BLASTOISE]); const playerPokemon = game.scene.getPlayerField(); const enemyPokemon = game.scene.getEnemyField(); diff --git a/test/battle/battle.test.ts b/test/battle/battle.test.ts index e980984580e..8c4315dcabc 100644 --- a/test/battle/battle.test.ts +++ b/test/battle/battle.test.ts @@ -85,7 +85,7 @@ describe("Test Battle Phase", () => { }, 20000); it("newGame one-liner", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); @@ -98,7 +98,7 @@ describe("Test Battle Phase", () => { game.override.moveset([Moves.TACKLE]); game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); - await game.startBattle(); + await game.classicMode.startBattle(); game.move.select(Moves.TACKLE); await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(SelectModifierPhase, false); }, 20000); @@ -112,7 +112,7 @@ describe("Test Battle Phase", () => { game.override.enemyAbility(Abilities.HYDRATION); game.override.enemyMoveset([Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP]); game.override.battleStyle("single"); - await game.startBattle(); + await game.classicMode.startBattle(); game.move.select(Moves.TACKLE); await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase, false); }, 20000); @@ -127,7 +127,7 @@ describe("Test Battle Phase", () => { }, 20000); it("start battle with selected team", async () => { - await game.startBattle([Species.CHARIZARD, Species.CHANSEY, Species.MEW]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.CHANSEY, Species.MEW]); expect(game.scene.getPlayerParty()[0].species.speciesId).toBe(Species.CHARIZARD); expect(game.scene.getPlayerParty()[1].species.speciesId).toBe(Species.CHANSEY); expect(game.scene.getPlayerParty()[2].species.speciesId).toBe(Species.MEW); @@ -207,7 +207,7 @@ describe("Test Battle Phase", () => { game.override.enemySpecies(Species.MIGHTYENA); game.override.enemyAbility(Abilities.HYDRATION); game.override.ability(Abilities.HYDRATION); - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); @@ -217,7 +217,7 @@ describe("Test Battle Phase", () => { game.override.enemySpecies(Species.MIGHTYENA); game.override.enemyAbility(Abilities.HYDRATION); game.override.ability(Abilities.HYDRATION); - await game.startBattle([Species.BLASTOISE]); + await game.classicMode.startBattle([Species.BLASTOISE]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); @@ -228,7 +228,7 @@ describe("Test Battle Phase", () => { game.override.enemyAbility(Abilities.HYDRATION); game.override.ability(Abilities.HYDRATION); game.override.startingWave(3); - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); @@ -239,7 +239,7 @@ describe("Test Battle Phase", () => { game.override.enemyAbility(Abilities.HYDRATION); game.override.ability(Abilities.HYDRATION); game.override.startingWave(3); - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD, Species.DARKRAI, Species.GABITE]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD, Species.DARKRAI, Species.GABITE]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); @@ -255,7 +255,7 @@ describe("Test Battle Phase", () => { game.override.startingWave(3); game.override.moveset([moveToUse]); game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); - await game.startBattle([Species.DARMANITAN, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.DARMANITAN, Species.CHARIZARD]); game.move.select(moveToUse); await game.phaseInterceptor.to(DamageAnimPhase, false); @@ -275,7 +275,7 @@ describe("Test Battle Phase", () => { game.override.startingWave(3); game.override.moveset([moveToUse]); game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); - await game.startBattle(); + await game.classicMode.startBattle(); const turn = game.scene.currentBattle.turn; game.move.select(moveToUse); await game.toNextTurn(); @@ -318,7 +318,7 @@ describe("Test Battle Phase", () => { .enemyMoveset(Moves.SPLASH) .startingHeldItems([{ name: "TEMP_STAT_STAGE_BOOSTER", type: Stat.ACC }]); - await game.startBattle(); + await game.classicMode.startBattle(); game.scene.getPlayerPokemon()!.hp = 1; game.move.select(moveToUse); diff --git a/test/battle/double_battle.test.ts b/test/battle/double_battle.test.ts index a30d55aac3d..99c52ea5add 100644 --- a/test/battle/double_battle.test.ts +++ b/test/battle/double_battle.test.ts @@ -34,7 +34,7 @@ describe("Double Battles", () => { // (There were bugs that either only summon one when can summon two, player stuck in switchPhase etc) it("3v2 edge case: player summons 2 pokemon on the next battle after being fainted and revived", async () => { game.override.battleStyle("double").enemyMoveset(Moves.SPLASH).moveset(Moves.SPLASH); - await game.startBattle([Species.BULBASAUR, Species.CHARIZARD, Species.SQUIRTLE]); + await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARIZARD, Species.SQUIRTLE]); game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH, 1); diff --git a/test/battle/special_battle.test.ts b/test/battle/special_battle.test.ts index 163f23e488d..6f4034cd8cd 100644 --- a/test/battle/special_battle.test.ts +++ b/test/battle/special_battle.test.ts @@ -33,63 +33,63 @@ describe("Test Battle Phase", () => { it("startBattle 2vs1 boss", async () => { game.override.battleStyle("single").startingWave(10); - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); it("startBattle 2vs2 boss", async () => { game.override.battleStyle("double").startingWave(10); - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); it("startBattle 2vs2 trainer", async () => { game.override.battleStyle("double").startingWave(5); - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); it("startBattle 2vs1 trainer", async () => { game.override.battleStyle("single").startingWave(5); - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); it("startBattle 2vs1 rival", async () => { game.override.battleStyle("single").startingWave(8); - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); it("startBattle 2vs2 rival", async () => { game.override.battleStyle("double").startingWave(8); - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); it("startBattle 1vs1 trainer", async () => { game.override.battleStyle("single").startingWave(5); - await game.startBattle([Species.BLASTOISE]); + await game.classicMode.startBattle([Species.BLASTOISE]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); it("startBattle 2vs2 trainer", async () => { game.override.battleStyle("double").startingWave(5); - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); it("startBattle 4vs2 trainer", async () => { game.override.battleStyle("double").startingWave(5); - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD, Species.DARKRAI, Species.GABITE]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD, Species.DARKRAI, Species.GABITE]); expect(game.scene.ui?.getMode()).toBe(UiMode.COMMAND); expect(game.scene.getCurrentPhase()!.constructor.name).toBe(CommandPhase.name); }, 20000); diff --git a/test/daily_mode.test.ts b/test/daily_mode.test.ts index a7f5784087a..a5901da4821 100644 --- a/test/daily_mode.test.ts +++ b/test/daily_mode.test.ts @@ -30,7 +30,7 @@ describe("Daily Mode", () => { }); it("should initialize properly", async () => { - await game.dailyMode.runToSummon(); + await game.dailyMode.startBattle(); const party = game.scene.getPlayerParty(); expect(party).toHaveLength(3); diff --git a/test/evolution.test.ts b/test/evolution.test.ts index 4f91cd99382..a453d744da8 100644 --- a/test/evolution.test.ts +++ b/test/evolution.test.ts @@ -110,7 +110,7 @@ describe("Evolution", () => { .startingLevel(16) .enemyLevel(50); - await game.startBattle([Species.TOTODILE]); + await game.classicMode.startBattle([Species.TOTODILE]); const totodile = game.scene.getPlayerPokemon()!; const hpBefore = totodile.hp; @@ -138,7 +138,7 @@ describe("Evolution", () => { .startingLevel(13) .enemyLevel(30); - await game.startBattle([Species.CYNDAQUIL]); + await game.classicMode.startBattle([Species.CYNDAQUIL]); const cyndaquil = game.scene.getPlayerPokemon()!; cyndaquil.hp = Math.floor(cyndaquil.getMaxHp() / 2); @@ -171,7 +171,7 @@ describe("Evolution", () => { * If the value is 0, it's a 3 family maushold, whereas if the value is * 1, 2 or 3, it's a 4 family maushold */ - await game.startBattle([Species.TANDEMAUS]); // starts us off with a tandemaus + await game.classicMode.startBattle([Species.TANDEMAUS]); // starts us off with a tandemaus const playerPokemon = game.scene.getPlayerPokemon()!; playerPokemon.level = 25; // tandemaus evolves at level 25 vi.spyOn(Utils, "randSeedInt").mockReturnValue(0); // setting the random generator to be 0 to force a three family maushold diff --git a/test/items/dire_hit.test.ts b/test/items/dire_hit.test.ts index 6e20bc723e5..e848bceb514 100644 --- a/test/items/dire_hit.test.ts +++ b/test/items/dire_hit.test.ts @@ -40,7 +40,7 @@ describe("Items - Dire Hit", () => { }, 20000); it("should raise CRIT stage by 1", async () => { - await game.startBattle([Species.GASTLY]); + await game.classicMode.startBattle([Species.GASTLY]); const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -56,7 +56,7 @@ describe("Items - Dire Hit", () => { it("should renew how many battles are left of existing DIRE_HIT when picking up new DIRE_HIT", async () => { game.override.itemRewards([{ name: "DIRE_HIT" }]); - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); game.move.select(Moves.SPLASH); diff --git a/test/items/exp_booster.test.ts b/test/items/exp_booster.test.ts index ec7528c3b23..106574b6849 100644 --- a/test/items/exp_booster.test.ts +++ b/test/items/exp_booster.test.ts @@ -29,7 +29,7 @@ describe("EXP Modifier Items", () => { it("EXP booster items stack multiplicatively", async () => { game.override.startingHeldItems([{ name: "LUCKY_EGG", count: 3 }, { name: "GOLDEN_EGG" }]); - await game.startBattle(); + await game.classicMode.startBattle(); const partyMember = game.scene.getPlayerPokemon()!; partyMember.exp = 100; diff --git a/test/items/leek.test.ts b/test/items/leek.test.ts index 9bde2c86339..7a6975f6dae 100644 --- a/test/items/leek.test.ts +++ b/test/items/leek.test.ts @@ -32,7 +32,7 @@ describe("Items - Leek", () => { }); it("should raise CRIT stage by 2 when held by FARFETCHD", async () => { - await game.startBattle([Species.FARFETCHD]); + await game.classicMode.startBattle([Species.FARFETCHD]); const enemyMember = game.scene.getEnemyPokemon()!; @@ -46,7 +46,7 @@ describe("Items - Leek", () => { }, 20000); it("should raise CRIT stage by 2 when held by GALAR_FARFETCHD", async () => { - await game.startBattle([Species.GALAR_FARFETCHD]); + await game.classicMode.startBattle([Species.GALAR_FARFETCHD]); const enemyMember = game.scene.getEnemyPokemon()!; @@ -60,7 +60,7 @@ describe("Items - Leek", () => { }, 20000); it("should raise CRIT stage by 2 when held by SIRFETCHD", async () => { - await game.startBattle([Species.SIRFETCHD]); + await game.classicMode.startBattle([Species.SIRFETCHD]); const enemyMember = game.scene.getEnemyPokemon()!; @@ -77,7 +77,7 @@ describe("Items - Leek", () => { // Randomly choose from the Farfetch'd line const species = [Species.FARFETCHD, Species.GALAR_FARFETCHD, Species.SIRFETCHD]; - await game.startBattle([species[randInt(species.length)], Species.PIKACHU]); + await game.classicMode.startBattle([species[randInt(species.length)], Species.PIKACHU]); const [partyMember, ally] = game.scene.getPlayerParty(); @@ -105,7 +105,7 @@ describe("Items - Leek", () => { // Randomly choose from the Farfetch'd line const species = [Species.FARFETCHD, Species.GALAR_FARFETCHD, Species.SIRFETCHD]; - await game.startBattle([Species.PIKACHU, species[randInt(species.length)]]); + await game.classicMode.startBattle([Species.PIKACHU, species[randInt(species.length)]]); const [partyMember, ally] = game.scene.getPlayerParty(); @@ -130,7 +130,7 @@ describe("Items - Leek", () => { }, 20000); it("should not raise CRIT stage when held by a Pokemon outside of FARFETCHD line", async () => { - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); const enemyMember = game.scene.getEnemyPokemon()!; diff --git a/test/items/leftovers.test.ts b/test/items/leftovers.test.ts index 19739703f19..f4825c2b721 100644 --- a/test/items/leftovers.test.ts +++ b/test/items/leftovers.test.ts @@ -34,7 +34,7 @@ describe("Items - Leftovers", () => { }); it("leftovers works", async () => { - await game.startBattle([Species.ARCANINE]); + await game.classicMode.startBattle([Species.ARCANINE]); // Make sure leftovers are there expect(game.scene.modifiers[0].type.id).toBe("LEFTOVERS"); diff --git a/test/items/light_ball.test.ts b/test/items/light_ball.test.ts index cdcffe810fa..214f6f624e6 100644 --- a/test/items/light_ball.test.ts +++ b/test/items/light_ball.test.ts @@ -150,7 +150,7 @@ describe("Items - Light Ball", () => { }, 20000); it("LIGHT_BALL held by fused PIKACHU (part)", async () => { - await game.startBattle([Species.MAROWAK, Species.PIKACHU]); + await game.classicMode.startBattle([Species.MAROWAK, Species.PIKACHU]); const partyMember = game.scene.getPlayerParty()[0]; const ally = game.scene.getPlayerParty()[1]; @@ -189,7 +189,7 @@ describe("Items - Light Ball", () => { }, 20000); it("LIGHT_BALL not held by PIKACHU", async () => { - await game.startBattle([Species.MAROWAK]); + await game.classicMode.startBattle([Species.MAROWAK]); const partyMember = game.scene.getPlayerParty()[0]; diff --git a/test/items/metal_powder.test.ts b/test/items/metal_powder.test.ts index e924d75fce9..a9a81072622 100644 --- a/test/items/metal_powder.test.ts +++ b/test/items/metal_powder.test.ts @@ -82,7 +82,7 @@ describe("Items - Metal Powder", () => { }); it("METAL_POWDER held by DITTO", async () => { - await game.startBattle([Species.DITTO]); + await game.classicMode.startBattle([Species.DITTO]); const partyMember = game.scene.getPlayerParty()[0]; @@ -105,7 +105,7 @@ describe("Items - Metal Powder", () => { }, 20000); it("METAL_POWDER held by fused DITTO (base)", async () => { - await game.startBattle([Species.DITTO, Species.MAROWAK]); + await game.classicMode.startBattle([Species.DITTO, Species.MAROWAK]); const partyMember = game.scene.getPlayerParty()[0]; const ally = game.scene.getPlayerParty()[1]; @@ -138,7 +138,7 @@ describe("Items - Metal Powder", () => { }, 20000); it("METAL_POWDER held by fused DITTO (part)", async () => { - await game.startBattle([Species.MAROWAK, Species.DITTO]); + await game.classicMode.startBattle([Species.MAROWAK, Species.DITTO]); const partyMember = game.scene.getPlayerParty()[0]; const ally = game.scene.getPlayerParty()[1]; @@ -171,7 +171,7 @@ describe("Items - Metal Powder", () => { }, 20000); it("METAL_POWDER not held by DITTO", async () => { - await game.startBattle([Species.MAROWAK]); + await game.classicMode.startBattle([Species.MAROWAK]); const partyMember = game.scene.getPlayerParty()[0]; diff --git a/test/items/scope_lens.test.ts b/test/items/scope_lens.test.ts index f67966ea3c9..c8061ea3696 100644 --- a/test/items/scope_lens.test.ts +++ b/test/items/scope_lens.test.ts @@ -31,7 +31,7 @@ describe("Items - Scope Lens", () => { }, 20000); it("should raise CRIT stage by 1", async () => { - await game.startBattle([Species.GASTLY]); + await game.classicMode.startBattle([Species.GASTLY]); const enemyPokemon = game.scene.getEnemyPokemon()!; diff --git a/test/moves/astonish.test.ts b/test/moves/astonish.test.ts index accddcd545d..daa9b0bb878 100644 --- a/test/moves/astonish.test.ts +++ b/test/moves/astonish.test.ts @@ -39,7 +39,7 @@ describe("Moves - Astonish", () => { }); test("move effect should cancel the target's move on the turn it applies", async () => { - await game.startBattle([Species.MEOWSCARADA]); + await game.classicMode.startBattle([Species.MEOWSCARADA]); const leadPokemon = game.scene.getPlayerPokemon()!; diff --git a/test/moves/beat_up.test.ts b/test/moves/beat_up.test.ts index ad6cad40d32..09166dafb9d 100644 --- a/test/moves/beat_up.test.ts +++ b/test/moves/beat_up.test.ts @@ -35,7 +35,7 @@ describe("Moves - Beat Up", () => { }); it("should hit once for each healthy player Pokemon", async () => { - await game.startBattle([ + await game.classicMode.startBattle([ Species.MAGIKARP, Species.BULBASAUR, Species.CHARMANDER, @@ -63,7 +63,7 @@ describe("Moves - Beat Up", () => { }); it("should not count player Pokemon with status effects towards hit count", async () => { - await game.startBattle([ + await game.classicMode.startBattle([ Species.MAGIKARP, Species.BULBASAUR, Species.CHARMANDER, diff --git a/test/moves/belly_drum.test.ts b/test/moves/belly_drum.test.ts index 8ee1026bf20..9deff207446 100644 --- a/test/moves/belly_drum.test.ts +++ b/test/moves/belly_drum.test.ts @@ -42,7 +42,7 @@ describe("Moves - BELLY DRUM", () => { // Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Belly_Drum_(move) test("raises the user's ATK stat stage to its max, at the cost of 1/2 of its maximum HP", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; const hpLost = toDmgValue(leadPokemon.getMaxHp() / RATIO); @@ -55,7 +55,7 @@ describe("Moves - BELLY DRUM", () => { }); test("will still take effect if an uninvolved stat stage is at max", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; const hpLost = toDmgValue(leadPokemon.getMaxHp() / RATIO); @@ -73,7 +73,7 @@ describe("Moves - BELLY DRUM", () => { }); test("fails if the pokemon's ATK stat stage is at its maximum", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -87,7 +87,7 @@ describe("Moves - BELLY DRUM", () => { }); test("fails if the user's health is less than 1/2", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; const hpLost = toDmgValue(leadPokemon.getMaxHp() / RATIO); diff --git a/test/moves/chilly_reception.test.ts b/test/moves/chilly_reception.test.ts index 56da5dd400c..1c6c5ce127e 100644 --- a/test/moves/chilly_reception.test.ts +++ b/test/moves/chilly_reception.test.ts @@ -77,7 +77,7 @@ describe("Moves - Chilly Reception", () => { await game.classicMode.startBattle([Species.SLOWKING, Species.MEOWTH]); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.TACKLE); + await game.move.selectEnemyMove(Moves.TACKLE); await game.phaseInterceptor.to("BerryPhase", false); expect(game.scene.arena.weather?.weatherType).toBe(undefined); diff --git a/test/moves/clangorous_soul.test.ts b/test/moves/clangorous_soul.test.ts index 56f19a0e088..c7165a0a881 100644 --- a/test/moves/clangorous_soul.test.ts +++ b/test/moves/clangorous_soul.test.ts @@ -38,7 +38,7 @@ describe("Moves - Clangorous Soul", () => { //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Clangorous_Soul_(move) it("raises the user's ATK, DEF, SPATK, SPDEF, and SPD stat stages by 1 each at the cost of 1/3 of its maximum HP", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); @@ -55,7 +55,7 @@ describe("Moves - Clangorous Soul", () => { }); it("will still take effect if one or more of the involved stat stages are not at max", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); @@ -78,7 +78,7 @@ describe("Moves - Clangorous Soul", () => { }); it("fails if all stat stages involved are at max", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -100,7 +100,7 @@ describe("Moves - Clangorous Soul", () => { }); it("fails if the user's health is less than 1/3", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; const hpLost = Math.floor(leadPokemon.getMaxHp() / RATIO); diff --git a/test/moves/crafty_shield.test.ts b/test/moves/crafty_shield.test.ts index c61e6d3848a..ec4c87fa060 100644 --- a/test/moves/crafty_shield.test.ts +++ b/test/moves/crafty_shield.test.ts @@ -39,7 +39,7 @@ describe("Moves - Crafty Shield", () => { }); test("should protect the user and allies from status moves", async () => { - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const leadPokemon = game.scene.getPlayerField(); @@ -57,7 +57,7 @@ describe("Moves - Crafty Shield", () => { test("should not protect the user and allies from attack moves", async () => { game.override.enemyMoveset([Moves.TACKLE]); - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const leadPokemon = game.scene.getPlayerField(); @@ -76,7 +76,7 @@ describe("Moves - Crafty Shield", () => { game.override.enemySpecies(Species.DUSCLOPS); game.override.enemyMoveset([Moves.CURSE]); - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const leadPokemon = game.scene.getPlayerField(); @@ -92,7 +92,7 @@ describe("Moves - Crafty Shield", () => { }); test("should not block allies' self-targeted moves", async () => { - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const leadPokemon = game.scene.getPlayerField(); diff --git a/test/moves/defog.test.ts b/test/moves/defog.test.ts index 58631150b6f..87c3845d55c 100644 --- a/test/moves/defog.test.ts +++ b/test/moves/defog.test.ts @@ -39,7 +39,7 @@ describe("Moves - Defog", () => { const enemyPokemon = game.scene.getEnemyField(); game.move.select(Moves.SAFEGUARD); - await game.forceEnemyMove(Moves.DEFOG); + await game.move.selectEnemyMove(Moves.DEFOG); await game.phaseInterceptor.to("BerryPhase"); expect(playerPokemon[0].isSafeguarded(enemyPokemon[0])).toBe(false); @@ -53,12 +53,12 @@ describe("Moves - Defog", () => { const playerPokemon = game.scene.getPlayerField(); game.move.select(Moves.MIST); - await game.forceEnemyMove(Moves.DEFOG); + await game.move.selectEnemyMove(Moves.DEFOG); await game.toNextTurn(); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.GROWL); + await game.move.selectEnemyMove(Moves.GROWL); await game.phaseInterceptor.to("BerryPhase"); diff --git a/test/moves/disable.test.ts b/test/moves/disable.test.ts index d21716145a4..5b2b687bd5d 100644 --- a/test/moves/disable.test.ts +++ b/test/moves/disable.test.ts @@ -139,12 +139,12 @@ describe("Moves - Disable", () => { const enemyMon = game.scene.getEnemyPokemon()!; game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH, BattlerIndex.PLAYER); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextTurn(); game.move.select(Moves.DISABLE); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextTurn(); diff --git a/test/moves/double_team.test.ts b/test/moves/double_team.test.ts index 8eac6be11f4..b97fb1a338e 100644 --- a/test/moves/double_team.test.ts +++ b/test/moves/double_team.test.ts @@ -33,7 +33,7 @@ describe("Moves - Double Team", () => { }); it("raises the user's EVA stat stage by 1", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const ally = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; diff --git a/test/moves/dragon_tail.test.ts b/test/moves/dragon_tail.test.ts index 0e7cd04d078..409ce7e28f8 100644 --- a/test/moves/dragon_tail.test.ts +++ b/test/moves/dragon_tail.test.ts @@ -206,7 +206,7 @@ describe("Moves - Dragon Tail", () => { return min; }); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.DRAGON_TAIL); + await game.move.selectEnemyMove(Moves.DRAGON_TAIL); await game.toNextTurn(); expect(bulbasaur.isOnField()).toBe(false); @@ -260,7 +260,7 @@ describe("Moves - Dragon Tail", () => { eevee.status = new Status(StatusEffect.FAINT); expect(eevee.isFainted()).toBe(true); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); // Turn 2: Mock an RNG call that would normally call for switching to Eevee, but it is fainted @@ -268,7 +268,7 @@ describe("Moves - Dragon Tail", () => { return min; }); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.DRAGON_TAIL); + await game.move.selectEnemyMove(Moves.DRAGON_TAIL); await game.toNextTurn(); expect(lapras.isOnField()).toBe(false); @@ -289,7 +289,7 @@ describe("Moves - Dragon Tail", () => { eevee.status = new Status(StatusEffect.FAINT); expect(eevee.isFainted()).toBe(true); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); // Turn 2: Mock an RNG call that would normally call for switching to Eevee, but it is fainted @@ -297,7 +297,7 @@ describe("Moves - Dragon Tail", () => { return min; }); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.DRAGON_TAIL); + await game.move.selectEnemyMove(Moves.DRAGON_TAIL); await game.toNextTurn(); expect(lapras.isOnField()).toBe(true); diff --git a/test/moves/dynamax_cannon.test.ts b/test/moves/dynamax_cannon.test.ts index 6c4f1a321e3..62004e62778 100644 --- a/test/moves/dynamax_cannon.test.ts +++ b/test/moves/dynamax_cannon.test.ts @@ -45,7 +45,7 @@ describe("Moves - Dynamax Cannon", () => { it("should return 100 power against an enemy below level cap", async () => { game.override.enemyLevel(1); - await game.startBattle([Species.ETERNATUS]); + await game.classicMode.startBattle([Species.ETERNATUS]); game.move.select(dynamaxCannon.id); @@ -57,7 +57,7 @@ describe("Moves - Dynamax Cannon", () => { it("should return 100 power against an enemy at level cap", async () => { game.override.enemyLevel(10); - await game.startBattle([Species.ETERNATUS]); + await game.classicMode.startBattle([Species.ETERNATUS]); game.move.select(dynamaxCannon.id); @@ -69,7 +69,7 @@ describe("Moves - Dynamax Cannon", () => { it("should return 120 power against an enemy 1% above level cap", async () => { game.override.enemyLevel(101); - await game.startBattle([Species.ETERNATUS]); + await game.classicMode.startBattle([Species.ETERNATUS]); game.move.select(dynamaxCannon.id); @@ -84,7 +84,7 @@ describe("Moves - Dynamax Cannon", () => { it("should return 140 power against an enemy 2% above level capp", async () => { game.override.enemyLevel(102); - await game.startBattle([Species.ETERNATUS]); + await game.classicMode.startBattle([Species.ETERNATUS]); game.move.select(dynamaxCannon.id); @@ -99,7 +99,7 @@ describe("Moves - Dynamax Cannon", () => { it("should return 160 power against an enemy 3% above level cap", async () => { game.override.enemyLevel(103); - await game.startBattle([Species.ETERNATUS]); + await game.classicMode.startBattle([Species.ETERNATUS]); game.move.select(dynamaxCannon.id); @@ -114,7 +114,7 @@ describe("Moves - Dynamax Cannon", () => { it("should return 180 power against an enemy 4% above level cap", async () => { game.override.enemyLevel(104); - await game.startBattle([Species.ETERNATUS]); + await game.classicMode.startBattle([Species.ETERNATUS]); game.move.select(dynamaxCannon.id); @@ -129,7 +129,7 @@ describe("Moves - Dynamax Cannon", () => { it("should return 200 power against an enemy 5% above level cap", async () => { game.override.enemyLevel(105); - await game.startBattle([Species.ETERNATUS]); + await game.classicMode.startBattle([Species.ETERNATUS]); game.move.select(dynamaxCannon.id); @@ -144,7 +144,7 @@ describe("Moves - Dynamax Cannon", () => { it("should return 200 power against an enemy way above level cap", async () => { game.override.enemyLevel(999); - await game.startBattle([Species.ETERNATUS]); + await game.classicMode.startBattle([Species.ETERNATUS]); game.move.select(dynamaxCannon.id); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); diff --git a/test/moves/encore.test.ts b/test/moves/encore.test.ts index 519e7860c04..f941328fc90 100644 --- a/test/moves/encore.test.ts +++ b/test/moves/encore.test.ts @@ -42,7 +42,7 @@ describe("Moves - Encore", () => { const enemyPokemon = game.scene.getEnemyPokemon()!; game.move.select(Moves.ENCORE); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); expect(enemyPokemon.getTag(BattlerTagType.ENCORE)).toBeDefined(); diff --git a/test/moves/fairy_lock.test.ts b/test/moves/fairy_lock.test.ts index e967221bcae..faffdee2304 100644 --- a/test/moves/fairy_lock.test.ts +++ b/test/moves/fairy_lock.test.ts @@ -40,8 +40,8 @@ describe("Moves - Fairy Lock", () => { game.move.select(Moves.FAIRY_LOCK); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.PLAYER)).toBeDefined(); expect(game.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.ENEMY)).toBeDefined(); @@ -50,8 +50,8 @@ describe("Moves - Fairy Lock", () => { game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); await game.phaseInterceptor.to("BerryPhase"); expect(playerPokemon[0].isTrapped()).toEqual(true); expect(playerPokemon[1].isTrapped()).toEqual(true); @@ -70,8 +70,8 @@ describe("Moves - Fairy Lock", () => { game.move.select(Moves.FAIRY_LOCK); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.PLAYER)).toBeDefined(); @@ -84,8 +84,8 @@ describe("Moves - Fairy Lock", () => { game.move.select(Moves.SPLASH); game.doSwitchPokemon(2); - await game.forceEnemyMove(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); await game.phaseInterceptor.to("BerryPhase"); await game.toNextTurn(); @@ -98,8 +98,8 @@ describe("Moves - Fairy Lock", () => { game.move.select(Moves.FAIRY_LOCK); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.PLAYER)).toBeDefined(); @@ -108,9 +108,9 @@ describe("Moves - Fairy Lock", () => { await game.toNextTurn(); game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.WHIRLWIND, 0); + await game.move.selectEnemyMove(Moves.WHIRLWIND, 0); game.doSelectPartyPokemon(2); - await game.forceEnemyMove(Moves.WHIRLWIND, 1); + await game.move.selectEnemyMove(Moves.WHIRLWIND, 1); game.doSelectPartyPokemon(2); await game.phaseInterceptor.to("BerryPhase"); await game.toNextTurn(); @@ -126,8 +126,8 @@ describe("Moves - Fairy Lock", () => { game.move.select(Moves.FAIRY_LOCK); game.move.select(Moves.MEMENTO, 1); game.doSelectPartyPokemon(2); - await game.forceEnemyMove(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.PLAYER)).toBeDefined(); expect(game.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.ENEMY)).toBeDefined(); @@ -135,8 +135,8 @@ describe("Moves - Fairy Lock", () => { await game.toNextTurn(); game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); + await game.move.selectEnemyMove(Moves.SPLASH, 1); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.getPlayerField()[0].isTrapped()).toEqual(true); expect(game.scene.getPlayerField()[1].isTrapped()).toEqual(true); diff --git a/test/moves/fillet_away.test.ts b/test/moves/fillet_away.test.ts index 477cdf76fc7..9de237b28a1 100644 --- a/test/moves/fillet_away.test.ts +++ b/test/moves/fillet_away.test.ts @@ -39,7 +39,7 @@ describe("Moves - FILLET AWAY", () => { //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/fillet_away_(move) test("raises the user's ATK, SPATK, and SPD stat stages by 2 each, at the cost of 1/2 of its maximum HP", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; const hpLost = toDmgValue(leadPokemon.getMaxHp() / RATIO); @@ -54,7 +54,7 @@ describe("Moves - FILLET AWAY", () => { }); test("still takes effect if one or more of the involved stat stages are not at max", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; const hpLost = toDmgValue(leadPokemon.getMaxHp() / RATIO); @@ -73,7 +73,7 @@ describe("Moves - FILLET AWAY", () => { }); test("fails if all stat stages involved are at max", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -91,7 +91,7 @@ describe("Moves - FILLET AWAY", () => { }); test("fails if the user's health is less than 1/2", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; const hpLost = toDmgValue(leadPokemon.getMaxHp() / RATIO); diff --git a/test/moves/flame_burst.test.ts b/test/moves/flame_burst.test.ts index fb92537a238..963b0f04a9a 100644 --- a/test/moves/flame_burst.test.ts +++ b/test/moves/flame_burst.test.ts @@ -46,7 +46,7 @@ describe("Moves - Flame Burst", () => { }); it("inflicts damage to the target's ally equal to 1/16 of its max HP", async () => { - await game.startBattle([Species.PIKACHU, Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU, Species.PIKACHU]); const [leftEnemy, rightEnemy] = game.scene.getEnemyField(); game.move.select(Moves.FLAME_BURST, 0, leftEnemy.getBattlerIndex()); @@ -60,7 +60,7 @@ describe("Moves - Flame Burst", () => { it("does not inflict damage to the target's ally if the target was not affected by Flame Burst", async () => { game.override.enemyAbility(Abilities.FLASH_FIRE); - await game.startBattle([Species.PIKACHU, Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU, Species.PIKACHU]); const [leftEnemy, rightEnemy] = game.scene.getEnemyField(); game.move.select(Moves.FLAME_BURST, 0, leftEnemy.getBattlerIndex()); @@ -72,7 +72,7 @@ describe("Moves - Flame Burst", () => { }); it("does not interact with the target ally's abilities", async () => { - await game.startBattle([Species.PIKACHU, Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU, Species.PIKACHU]); const [leftEnemy, rightEnemy] = game.scene.getEnemyField(); vi.spyOn(rightEnemy, "getAbility").mockReturnValue(allAbilities[Abilities.FLASH_FIRE]); @@ -86,7 +86,7 @@ describe("Moves - Flame Burst", () => { }); it("effect damage is prevented by Magic Guard", async () => { - await game.startBattle([Species.PIKACHU, Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU, Species.PIKACHU]); const [leftEnemy, rightEnemy] = game.scene.getEnemyField(); vi.spyOn(rightEnemy, "getAbility").mockReturnValue(allAbilities[Abilities.MAGIC_GUARD]); diff --git a/test/moves/flower_shield.test.ts b/test/moves/flower_shield.test.ts index 4840c6f018f..d95ef6299b7 100644 --- a/test/moves/flower_shield.test.ts +++ b/test/moves/flower_shield.test.ts @@ -36,7 +36,7 @@ describe("Moves - Flower Shield", () => { it("raises DEF stat stage by 1 for all Grass-type Pokemon on the field by one stage - single battle", async () => { game.override.enemySpecies(Species.CHERRIM); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const cherrim = game.scene.getEnemyPokemon()!; const magikarp = game.scene.getPlayerPokemon()!; @@ -53,7 +53,7 @@ describe("Moves - Flower Shield", () => { it("raises DEF stat stage by 1 for all Grass-type Pokemon on the field by one stage - double battle", async () => { game.override.enemySpecies(Species.MAGIKARP).startingBiome(Biome.GRASS).battleStyle("double"); - await game.startBattle([Species.CHERRIM, Species.MAGIKARP]); + await game.classicMode.startBattle([Species.CHERRIM, Species.MAGIKARP]); const field = game.scene.getField(true); const grassPokemons = field.filter(p => p.getTypes().includes(PokemonType.GRASS)); @@ -78,7 +78,7 @@ describe("Moves - Flower Shield", () => { game.override.enemyMoveset([Moves.DIG, Moves.DIG, Moves.DIG, Moves.DIG]); game.override.enemyLevel(50); - await game.startBattle([Species.CHERRIM]); + await game.classicMode.startBattle([Species.CHERRIM]); const paras = game.scene.getEnemyPokemon()!; const cherrim = game.scene.getPlayerPokemon()!; @@ -97,7 +97,7 @@ describe("Moves - Flower Shield", () => { it("does nothing if there are no Grass-type Pokemon on the field", async () => { game.override.enemySpecies(Species.MAGIKARP); - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const enemy = game.scene.getEnemyPokemon()!; const ally = game.scene.getPlayerPokemon()!; diff --git a/test/moves/fly.test.ts b/test/moves/fly.test.ts index 74f8bc4a770..81d04f53ff8 100644 --- a/test/moves/fly.test.ts +++ b/test/moves/fly.test.ts @@ -104,10 +104,10 @@ describe("Moves - Fly", () => { game.move.select(Moves.FLY); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); - await game.forceEnemyMove(Moves.GRAVITY); + await game.move.selectEnemyMove(Moves.GRAVITY); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("TurnEndPhase"); diff --git a/test/moves/follow_me.test.ts b/test/moves/follow_me.test.ts index 68c4f111bb1..228a835b17d 100644 --- a/test/moves/follow_me.test.ts +++ b/test/moves/follow_me.test.ts @@ -43,8 +43,8 @@ describe("Moves - Follow Me", () => { game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY); // Force both enemies to target the player Pokemon that did not use Follow Me - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); await game.phaseInterceptor.to(TurnEndPhase, false); @@ -61,8 +61,8 @@ describe("Moves - Follow Me", () => { game.move.select(Moves.FOLLOW_ME, 1); // Each player is targeted by an enemy - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); await game.phaseInterceptor.to(TurnEndPhase, false); @@ -84,8 +84,8 @@ describe("Moves - Follow Me", () => { game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY_2); // Target doesn't need to be specified if the move is self-targeted - await game.forceEnemyMove(Moves.FOLLOW_ME); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.FOLLOW_ME); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to(TurnEndPhase, false); @@ -104,8 +104,8 @@ describe("Moves - Follow Me", () => { game.move.select(Moves.SNIPE_SHOT, 0, BattlerIndex.ENEMY); game.move.select(Moves.SNIPE_SHOT, 1, BattlerIndex.ENEMY_2); - await game.forceEnemyMove(Moves.FOLLOW_ME); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.FOLLOW_ME); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to(TurnEndPhase, false); diff --git a/test/moves/foresight.test.ts b/test/moves/foresight.test.ts index d33a00bf136..82a39eceae5 100644 --- a/test/moves/foresight.test.ts +++ b/test/moves/foresight.test.ts @@ -31,7 +31,7 @@ describe("Moves - Foresight", () => { }); it("should allow Normal and Fighting moves to hit Ghost types", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const enemy = game.scene.getEnemyPokemon()!; @@ -55,7 +55,7 @@ describe("Moves - Foresight", () => { it("should ignore target's evasiveness boosts", async () => { game.override.enemyMoveset([Moves.MINIMIZE]); - await game.startBattle(); + await game.classicMode.startBattle(); const pokemon = game.scene.getPlayerPokemon()!; vi.spyOn(pokemon, "getAccuracyMultiplier"); diff --git a/test/moves/fusion_bolt.test.ts b/test/moves/fusion_bolt.test.ts index 33498a857a9..5e515a3bc47 100644 --- a/test/moves/fusion_bolt.test.ts +++ b/test/moves/fusion_bolt.test.ts @@ -36,7 +36,7 @@ describe("Moves - Fusion Bolt", () => { }); it("should not make contact", async () => { - await game.startBattle([Species.ZEKROM]); + await game.classicMode.startBattle([Species.ZEKROM]); const partyMember = game.scene.getPlayerPokemon()!; const initialHp = partyMember.hp; diff --git a/test/moves/fusion_flare.test.ts b/test/moves/fusion_flare.test.ts index 61bb126a75a..b947b9e7f7e 100644 --- a/test/moves/fusion_flare.test.ts +++ b/test/moves/fusion_flare.test.ts @@ -36,7 +36,7 @@ describe("Moves - Fusion Flare", () => { }); it("should thaw freeze status condition", async () => { - await game.startBattle([Species.RESHIRAM]); + await game.classicMode.startBattle([Species.RESHIRAM]); const partyMember = game.scene.getPlayerPokemon()!; diff --git a/test/moves/fusion_flare_bolt.test.ts b/test/moves/fusion_flare_bolt.test.ts index da2d48a7cdb..1d248e09510 100644 --- a/test/moves/fusion_flare_bolt.test.ts +++ b/test/moves/fusion_flare_bolt.test.ts @@ -138,7 +138,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => { }, 20000); it("FUSION_FLARE should double power of subsequent FUSION_BOLT if moves are aimed at allies", async () => { - await game.startBattle([Species.ZEKROM, Species.RESHIRAM]); + await game.classicMode.startBattle([Species.ZEKROM, Species.RESHIRAM]); game.move.select(fusionBolt.id, 0, BattlerIndex.PLAYER_2); game.move.select(fusionFlare.id, 1, BattlerIndex.PLAYER); diff --git a/test/moves/growth.test.ts b/test/moves/growth.test.ts index 37cd84638ba..2e3ebfcde52 100644 --- a/test/moves/growth.test.ts +++ b/test/moves/growth.test.ts @@ -32,7 +32,7 @@ describe("Moves - Growth", () => { }); it("should raise SPATK stat stage by 1", async () => { - await game.startBattle([Species.MIGHTYENA]); + await game.classicMode.startBattle([Species.MIGHTYENA]); const playerPokemon = game.scene.getPlayerPokemon()!; diff --git a/test/moves/grudge.test.ts b/test/moves/grudge.test.ts index ecde5351d6d..48bb79c5f02 100644 --- a/test/moves/grudge.test.ts +++ b/test/moves/grudge.test.ts @@ -37,7 +37,7 @@ describe("Moves - Grudge", () => { const playerPokemon = game.scene.getPlayerPokemon(); game.move.select(Moves.EMBER); - await game.forceEnemyMove(Moves.GRUDGE); + await game.move.selectEnemyMove(Moves.GRUDGE); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("BerryPhase"); @@ -51,12 +51,12 @@ describe("Moves - Grudge", () => { const playerPokemon = game.scene.getPlayerPokemon(); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.GRUDGE); + await game.move.selectEnemyMove(Moves.GRUDGE); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.toNextTurn(); game.move.select(Moves.EMBER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to("BerryPhase"); @@ -78,7 +78,7 @@ describe("Moves - Grudge", () => { const playerPokemon = game.scene.getPlayerPokemon(); game.move.select(Moves.FALSE_SWIPE); - await game.forceEnemyMove(Moves.GRUDGE); + await game.move.selectEnemyMove(Moves.GRUDGE); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("BerryPhase"); diff --git a/test/moves/guard_split.test.ts b/test/moves/guard_split.test.ts index d182e94b203..0f5c69c7d85 100644 --- a/test/moves/guard_split.test.ts +++ b/test/moves/guard_split.test.ts @@ -34,7 +34,7 @@ describe("Moves - Guard Split", () => { it("should average the user's DEF and SPDEF stats with those of the target", async () => { game.override.enemyMoveset(Moves.SPLASH); - await game.startBattle([Species.INDEEDEE]); + await game.classicMode.startBattle([Species.INDEEDEE]); const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; @@ -54,7 +54,7 @@ describe("Moves - Guard Split", () => { it("should be idempotent", async () => { game.override.enemyMoveset([Moves.GUARD_SPLIT]); - await game.startBattle([Species.INDEEDEE]); + await game.classicMode.startBattle([Species.INDEEDEE]); const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; diff --git a/test/moves/hard_press.test.ts b/test/moves/hard_press.test.ts index e1a01c0109d..12cf049a022 100644 --- a/test/moves/hard_press.test.ts +++ b/test/moves/hard_press.test.ts @@ -37,7 +37,7 @@ describe("Moves - Hard Press", () => { }); it("should return 100 power if target HP ratio is at 100%", async () => { - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); game.move.select(Moves.HARD_PRESS); await game.phaseInterceptor.to(MoveEffectPhase); @@ -46,7 +46,7 @@ describe("Moves - Hard Press", () => { }); it("should return 50 power if target HP ratio is at 50%", async () => { - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); const targetHpRatio = 0.5; const enemy = game.scene.getEnemyPokemon()!; @@ -59,7 +59,7 @@ describe("Moves - Hard Press", () => { }); it("should return 1 power if target HP ratio is at 1%", async () => { - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); const targetHpRatio = 0.01; const enemy = game.scene.getEnemyPokemon()!; @@ -72,7 +72,7 @@ describe("Moves - Hard Press", () => { }); it("should return 1 power if target HP ratio is less than 1%", async () => { - await game.startBattle([Species.PIKACHU]); + await game.classicMode.startBattle([Species.PIKACHU]); const targetHpRatio = 0.005; const enemy = game.scene.getEnemyPokemon()!; diff --git a/test/moves/haze.test.ts b/test/moves/haze.test.ts index 4ddb6d1c7c5..33d4fe2dfda 100644 --- a/test/moves/haze.test.ts +++ b/test/moves/haze.test.ts @@ -36,7 +36,7 @@ describe("Moves - Haze", () => { }); it("should reset all stat changes of all Pokemon on field", async () => { - await game.startBattle([Species.RATTATA]); + await game.classicMode.startBattle([Species.RATTATA]); const user = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; diff --git a/test/moves/hyper_beam.test.ts b/test/moves/hyper_beam.test.ts index e6b3955ef0d..a4cbf7d9245 100644 --- a/test/moves/hyper_beam.test.ts +++ b/test/moves/hyper_beam.test.ts @@ -38,7 +38,7 @@ describe("Moves - Hyper Beam", () => { }); it("should force the user to recharge on the next turn (and only that turn)", async () => { - await game.startBattle([Species.MAGIKARP]); + await game.classicMode.startBattle([Species.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; diff --git a/test/moves/imprison.test.ts b/test/moves/imprison.test.ts index cefbaa52cad..dfa3b3ad757 100644 --- a/test/moves/imprison.test.ts +++ b/test/moves/imprison.test.ts @@ -36,7 +36,7 @@ describe("Moves - Imprison", () => { const playerPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.TRANSFORM); - await game.forceEnemyMove(Moves.IMPRISON); + await game.move.selectEnemyMove(Moves.IMPRISON); await game.toNextTurn(); const playerMoveset = playerPokemon.getMoveset().map(x => x?.moveId); const enemyMoveset = game.scene @@ -51,7 +51,7 @@ describe("Moves - Imprison", () => { // Second turn, Imprison forces Struggle to occur game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); const move1 = playerPokemon.getLastXMoves(1)[0]!; expect(move1.move).toBe(Moves.STRUGGLE); @@ -63,7 +63,7 @@ describe("Moves - Imprison", () => { const playerPokemon1 = game.scene.getPlayerPokemon()!; game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.IMPRISON); + await game.move.selectEnemyMove(Moves.IMPRISON); await game.toNextTurn(); const imprisonArenaTag = game.scene.arena.getTag(ArenaTagType.IMPRISON); const imprisonBattlerTag1 = playerPokemon1.getTag(BattlerTagType.IMPRISON); @@ -72,7 +72,7 @@ describe("Moves - Imprison", () => { // Second turn, Imprison forces Struggle to occur game.doSwitchPokemon(1); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); const playerPokemon2 = game.scene.getPlayerPokemon()!; const imprisonBattlerTag2 = playerPokemon2.getTag(BattlerTagType.IMPRISON); @@ -87,12 +87,12 @@ describe("Moves - Imprison", () => { const playerPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; game.move.select(Moves.IMPRISON); - await game.forceEnemyMove(Moves.GROWL); + await game.move.selectEnemyMove(Moves.GROWL); await game.toNextTurn(); expect(game.scene.arena.getTag(ArenaTagType.IMPRISON)).toBeDefined(); expect(enemyPokemon.getTag(BattlerTagType.IMPRISON)).toBeDefined(); game.doSwitchPokemon(1); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); expect(playerPokemon.isActive(true)).toBeFalsy(); expect(game.scene.arena.getTag(ArenaTagType.IMPRISON)).toBeUndefined(); diff --git a/test/moves/instruct.test.ts b/test/moves/instruct.test.ts index dd25db4ec90..719349760dc 100644 --- a/test/moves/instruct.test.ts +++ b/test/moves/instruct.test.ts @@ -48,7 +48,7 @@ describe("Moves - Instruct", () => { game.move.changeMoveset(enemy, Moves.SONIC_BOOM); game.move.select(Moves.INSTRUCT); - await game.forceEnemyMove(Moves.SONIC_BOOM); + await game.move.selectEnemyMove(Moves.SONIC_BOOM); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("MovePhase"); // enemy attacks us @@ -75,12 +75,12 @@ describe("Moves - Instruct", () => { game.move.changeMoveset(enemy, [Moves.SONIC_BOOM, Moves.SUBSTITUTE]); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SUBSTITUTE); + await game.move.selectEnemyMove(Moves.SUBSTITUTE); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.toNextTurn(); game.move.select(Moves.INSTRUCT); - await game.forceEnemyMove(Moves.SONIC_BOOM); + await game.move.selectEnemyMove(Moves.SONIC_BOOM); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("TurnEndPhase", false); @@ -169,7 +169,7 @@ describe("Moves - Instruct", () => { moveUsed.ppUsed = moveUsed.getMovePp() - 1; game.move.select(Moves.INSTRUCT); - await game.forceEnemyMove(Moves.HIDDEN_POWER); + await game.move.selectEnemyMove(Moves.HIDDEN_POWER); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("TurnEndPhase", false); @@ -210,8 +210,8 @@ describe("Moves - Instruct", () => { game.move.select(Moves.SPLASH, BattlerIndex.PLAYER); game.move.select(Moves.FIERY_DANCE, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY); - await game.forceEnemyMove(Moves.INSTRUCT, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.INSTRUCT, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); await game.phaseInterceptor.to("BerryPhase"); @@ -248,7 +248,7 @@ describe("Moves - Instruct", () => { await game.classicMode.startBattle([Species.AMOONGUSS]); game.move.select(Moves.INSTRUCT); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to("TurnEndPhase", false); @@ -265,7 +265,7 @@ describe("Moves - Instruct", () => { game.move.select(Moves.INSTRUCT, BattlerIndex.PLAYER, BattlerIndex.ENEMY); game.move.select(Moves.DISABLE, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY); - await game.forceEnemyMove(Moves.SONIC_BOOM, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SONIC_BOOM, BattlerIndex.PLAYER); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER_2, BattlerIndex.PLAYER, BattlerIndex.ENEMY_2]); await game.phaseInterceptor.to("TurnEndPhase", false); @@ -311,7 +311,7 @@ describe("Moves - Instruct", () => { ]; game.move.select(Moves.INSTRUCT); - await game.forceEnemyMove(Moves.HYPER_BEAM); + await game.move.selectEnemyMove(Moves.HYPER_BEAM); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.toNextTurn(); @@ -326,23 +326,21 @@ describe("Moves - Instruct", () => { }); it("should not repeat move since forgotten by target", async () => { - game.override.enemyLevel(5).xpMultiplier(0).enemySpecies(Species.WURMPLE).enemyMoveset(Moves.INSTRUCT); + game.override.enemyMoveset(Moves.INSTRUCT); await game.classicMode.startBattle([Species.REGIELEKI]); const regieleki = game.scene.getPlayerPokemon()!; - // fill out moveset with random moves - game.move.changeMoveset(regieleki, [Moves.ELECTRO_DRIFT, Moves.SPLASH, Moves.ICE_BEAM, Moves.ANCIENT_POWER]); - - game.move.select(Moves.ELECTRO_DRIFT); - await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); - await game.phaseInterceptor.to("FaintPhase"); - await game.move.learnMove(Moves.ELECTROWEB); - await game.toNextWave(); + regieleki.pushMoveHistory({ + move: Moves.ELECTRO_DRIFT, + targets: [BattlerIndex.PLAYER], + result: MoveResult.SUCCESS, + virtual: false, + }); game.move.select(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); - await game.phaseInterceptor.to("TurnEndPhase", false); - expect(game.scene.getEnemyField()[0].getLastXMoves()[0].result).toBe(MoveResult.FAIL); + await game.toEndOfTurn(); + expect(game.field.getEnemyPokemon().getLastXMoves()[0].result).toBe(MoveResult.FAIL); }); it("should disregard priority of instructed move on use", async () => { @@ -360,7 +358,7 @@ describe("Moves - Instruct", () => { ]; game.move.select(Moves.INSTRUCT); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("TurnEndPhase", false); // lucario instructed enemy whirlwind at 0 priority to switch itself out @@ -379,8 +377,8 @@ describe("Moves - Instruct", () => { game.move.select(Moves.QUICK_ATTACK, BattlerIndex.PLAYER, BattlerIndex.ENEMY); // succeeds due to terrain no game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); - await game.forceEnemyMove(Moves.PSYCHIC_TERRAIN); + await game.move.selectEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.PSYCHIC_TERRAIN); await game.toNextTurn(); game.move.select(Moves.SPLASH, BattlerIndex.PLAYER); @@ -404,8 +402,8 @@ describe("Moves - Instruct", () => { game.move.select(Moves.VINE_WHIP, BattlerIndex.PLAYER, BattlerIndex.ENEMY); game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); - await game.forceEnemyMove(Moves.PSYCHIC_TERRAIN); + await game.move.selectEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.PSYCHIC_TERRAIN); await game.toNextTurn(); game.move.select(Moves.SPLASH, BattlerIndex.PLAYER); @@ -515,14 +513,14 @@ describe("Moves - Instruct", () => { game.move.select(Moves.SPLASH, BattlerIndex.PLAYER); game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.BULLET_SEED, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.BULLET_SEED, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); game.move.select(Moves.INSTRUCT, BattlerIndex.PLAYER, BattlerIndex.ENEMY); game.move.select(Moves.INSTRUCT, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY); - await game.forceEnemyMove(Moves.BULLET_SEED, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.BULLET_SEED, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); await game.phaseInterceptor.to("BerryPhase"); @@ -531,8 +529,8 @@ describe("Moves - Instruct", () => { await game.toNextTurn(); game.move.select(Moves.INSTRUCT, BattlerIndex.PLAYER, BattlerIndex.ENEMY); game.move.select(Moves.INSTRUCT, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY); - await game.forceEnemyMove(Moves.BULLET_SEED, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.BULLET_SEED, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER, BattlerIndex.PLAYER_2]); await game.phaseInterceptor.to("BerryPhase"); diff --git a/test/moves/jaw_lock.test.ts b/test/moves/jaw_lock.test.ts index 71896dc3b62..85750b6efda 100644 --- a/test/moves/jaw_lock.test.ts +++ b/test/moves/jaw_lock.test.ts @@ -40,7 +40,7 @@ describe("Moves - Jaw Lock", () => { }); it("should trap the move's user and target", async () => { - await game.startBattle([Species.BULBASAUR]); + await game.classicMode.startBattle([Species.BULBASAUR]); const leadPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -61,7 +61,7 @@ describe("Moves - Jaw Lock", () => { it("should not trap either pokemon if the target faints", async () => { game.override.enemyLevel(1); - await game.startBattle([Species.BULBASAUR]); + await game.classicMode.startBattle([Species.BULBASAUR]); const leadPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -86,7 +86,7 @@ describe("Moves - Jaw Lock", () => { }); it("should only trap the user until the target faints", async () => { - await game.startBattle([Species.BULBASAUR]); + await game.classicMode.startBattle([Species.BULBASAUR]); const leadPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -109,7 +109,7 @@ describe("Moves - Jaw Lock", () => { it("should not trap other targets after the first target is trapped", async () => { game.override.battleStyle("double"); - await game.startBattle([Species.CHARMANDER, Species.BULBASAUR]); + await game.classicMode.startBattle([Species.CHARMANDER, Species.BULBASAUR]); const playerPokemon = game.scene.getPlayerField(); const enemyPokemon = game.scene.getEnemyField(); @@ -138,7 +138,7 @@ describe("Moves - Jaw Lock", () => { it("should not trap either pokemon if the target is protected", async () => { game.override.enemyMoveset([Moves.PROTECT]); - await game.startBattle([Species.BULBASAUR]); + await game.classicMode.startBattle([Species.BULBASAUR]); const playerPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; diff --git a/test/moves/last-resort.test.ts b/test/moves/last-resort.test.ts index a7b462f3ca4..65b50bc4e89 100644 --- a/test/moves/last-resort.test.ts +++ b/test/moves/last-resort.test.ts @@ -86,11 +86,11 @@ describe("Moves - Last Resort", () => { // use mirror move normally to trigger absorb virtually game.move.select(Moves.MIRROR_MOVE); - await game.forceEnemyMove(Moves.ABSORB); + await game.move.selectEnemyMove(Moves.ABSORB); await game.toNextTurn(); game.move.select(Moves.LAST_RESORT); - await game.forceEnemyMove(Moves.SWORDS_DANCE); // goes first to proc dancer ahead of time + await game.move.selectEnemyMove(Moves.SWORDS_DANCE); // goes first to proc dancer ahead of time await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("TurnEndPhase"); expectLastResortFail(); @@ -154,10 +154,10 @@ describe("Moves - Last Resort", () => { // ensure enemy last resort succeeds game.move.select(Moves.MIRROR_MOVE); - await game.forceEnemyMove(Moves.ABSORB); + await game.move.selectEnemyMove(Moves.ABSORB); await game.phaseInterceptor.to("TurnEndPhase"); game.move.select(Moves.MIRROR_MOVE); - await game.forceEnemyMove(Moves.LAST_RESORT); + await game.move.selectEnemyMove(Moves.LAST_RESORT); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("TurnEndPhase"); diff --git a/test/moves/lucky_chant.test.ts b/test/moves/lucky_chant.test.ts index e2a28a7bbe3..9fa6ff43eab 100644 --- a/test/moves/lucky_chant.test.ts +++ b/test/moves/lucky_chant.test.ts @@ -35,7 +35,7 @@ describe("Moves - Lucky Chant", () => { }); it("should prevent critical hits from moves", async () => { - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.CHARIZARD]); const playerPokemon = game.scene.getPlayerPokemon()!; @@ -56,7 +56,7 @@ describe("Moves - Lucky Chant", () => { it("should prevent critical hits against the user's ally", async () => { game.override.battleStyle("double"); - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const playerPokemon = game.scene.getPlayerField(); @@ -79,7 +79,7 @@ describe("Moves - Lucky Chant", () => { it("should prevent critical hits from field effects", async () => { game.override.enemyMoveset([Moves.TACKLE]); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.CHARIZARD]); const playerPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; diff --git a/test/moves/lunar_blessing.test.ts b/test/moves/lunar_blessing.test.ts index ee35107fccd..5021a47ff7f 100644 --- a/test/moves/lunar_blessing.test.ts +++ b/test/moves/lunar_blessing.test.ts @@ -33,7 +33,7 @@ describe("Moves - Lunar Blessing", () => { }); it("should restore 25% HP of the user and its ally", async () => { - await game.startBattle([Species.RATTATA, Species.RATTATA]); + await game.classicMode.startBattle([Species.RATTATA, Species.RATTATA]); const [leftPlayer, rightPlayer] = game.scene.getPlayerField(); vi.spyOn(leftPlayer, "getMaxHp").mockReturnValue(100); @@ -61,7 +61,7 @@ describe("Moves - Lunar Blessing", () => { it("should cure status effect of the user and its ally", async () => { game.override.statusEffect(StatusEffect.BURN); - await game.startBattle([Species.RATTATA, Species.RATTATA]); + await game.classicMode.startBattle([Species.RATTATA, Species.RATTATA]); const [leftPlayer, rightPlayer] = game.scene.getPlayerField(); vi.spyOn(leftPlayer, "resetStatus"); diff --git a/test/moves/magic_coat.test.ts b/test/moves/magic_coat.test.ts index 4e0bd7f0a98..ad0bd47d7cf 100644 --- a/test/moves/magic_coat.test.ts +++ b/test/moves/magic_coat.test.ts @@ -62,12 +62,12 @@ describe("Moves - Magic Coat", () => { // turn 1 game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.MAGIC_COAT); + await game.move.selectEnemyMove(Moves.MAGIC_COAT); await game.toNextTurn(); // turn 2 game.move.select(Moves.GROWL); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.getEnemyPokemon()!.getStatStage(Stat.ATK)).toBe(-1); }); @@ -102,8 +102,8 @@ describe("Moves - Magic Coat", () => { game.move.select(Moves.GROWL, 0); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH); - await game.forceEnemyMove(Moves.MAGIC_COAT); + await game.move.selectEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.MAGIC_COAT); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.getPlayerField().every(p => p.getStatStage(Stat.ATK) === -1)).toBeTruthy(); @@ -129,8 +129,8 @@ describe("Moves - Magic Coat", () => { game.move.select(Moves.MAGIC_COAT, 0); game.move.select(Moves.GROWL, 1); - await game.forceEnemyMove(Moves.MAGIC_COAT); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.MAGIC_COAT); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.getEnemyField()[0].getStatStage(Stat.ATK)).toBe(0); @@ -192,12 +192,12 @@ describe("Moves - Magic Coat", () => { // turn 1 game.move.select(Moves.GROWL); - await game.forceEnemyMove(Moves.MAGIC_COAT); + await game.move.selectEnemyMove(Moves.MAGIC_COAT); await game.toNextTurn(); // turn 2 game.move.select(Moves.ENCORE); - await game.forceEnemyMove(Moves.TACKLE); + await game.move.selectEnemyMove(Moves.TACKLE); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to("BerryPhase"); expect(enemyPokemon.getTag(BattlerTagType.ENCORE)!["moveId"]).toBe(Moves.TACKLE); @@ -233,7 +233,7 @@ describe("Moves - Magic Coat", () => { vi.spyOn(stomping_tantrum, "calculateBattlePower"); game.move.select(Moves.SPORE); - await game.forceEnemyMove(Moves.CHARM); + await game.move.selectEnemyMove(Moves.CHARM); await game.phaseInterceptor.to("TurnEndPhase"); expect(enemy.getLastXMoves(1)[0].result).toBe("success"); diff --git a/test/moves/magnet_rise.test.ts b/test/moves/magnet_rise.test.ts index 62ad0c88091..3f15a109f11 100644 --- a/test/moves/magnet_rise.test.ts +++ b/test/moves/magnet_rise.test.ts @@ -33,7 +33,7 @@ describe("Moves - Magnet Rise", () => { }); it("MAGNET RISE", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const startingHp = game.scene.getPlayerParty()[0].hp; game.move.select(moveToUse); @@ -44,7 +44,7 @@ describe("Moves - Magnet Rise", () => { }, 20000); it("MAGNET RISE - Gravity", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const startingHp = game.scene.getPlayerParty()[0].hp; game.move.select(moveToUse); diff --git a/test/moves/make_it_rain.test.ts b/test/moves/make_it_rain.test.ts index 4d94537bcec..b897304662d 100644 --- a/test/moves/make_it_rain.test.ts +++ b/test/moves/make_it_rain.test.ts @@ -34,7 +34,7 @@ describe("Moves - Make It Rain", () => { }); it("should only lower SPATK stat stage by 1 once in a double battle", async () => { - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const playerPokemon = game.scene.getPlayerPokemon()!; @@ -50,7 +50,7 @@ describe("Moves - Make It Rain", () => { game.override.enemyLevel(1); // ensures the enemy will faint game.override.battleStyle("single"); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.CHARIZARD]); const playerPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -66,7 +66,7 @@ describe("Moves - Make It Rain", () => { it("should reduce Sp. Atk. once after KOing two enemies", async () => { game.override.enemyLevel(1); // ensures the enemy will faint - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const playerPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyField(); @@ -81,7 +81,7 @@ describe("Moves - Make It Rain", () => { }); it("should lower SPATK stat stage by 1 if it only hits the second target", async () => { - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const playerPokemon = game.scene.getPlayerPokemon()!; diff --git a/test/moves/mat_block.test.ts b/test/moves/mat_block.test.ts index 9ed0f497af9..3e7958d665b 100644 --- a/test/moves/mat_block.test.ts +++ b/test/moves/mat_block.test.ts @@ -39,7 +39,7 @@ describe("Moves - Mat Block", () => { }); test("should protect the user and allies from attack moves", async () => { - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const leadPokemon = game.scene.getPlayerField(); @@ -57,7 +57,7 @@ describe("Moves - Mat Block", () => { test("should not protect the user and allies from status moves", async () => { game.override.enemyMoveset([Moves.GROWL]); - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const leadPokemon = game.scene.getPlayerField(); @@ -73,7 +73,7 @@ describe("Moves - Mat Block", () => { }); test("should fail when used after the first turn", async () => { - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]); const leadPokemon = game.scene.getPlayerField(); diff --git a/test/moves/metal_burst.test.ts b/test/moves/metal_burst.test.ts index 7fa5434dc58..cadcbe07a0d 100644 --- a/test/moves/metal_burst.test.ts +++ b/test/moves/metal_burst.test.ts @@ -42,8 +42,8 @@ describe("Moves - Metal Burst", () => { game.move.select(Moves.METAL_BURST); game.move.select(Moves.FISSURE, 1, BattlerIndex.ENEMY); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER_2, BattlerIndex.PLAYER, BattlerIndex.ENEMY_2]); @@ -63,8 +63,8 @@ describe("Moves - Metal Burst", () => { game.move.select(Moves.METAL_BURST); game.move.select(Moves.PRECIPICE_BLADES, 1); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER_2, BattlerIndex.PLAYER, BattlerIndex.ENEMY_2]); diff --git a/test/moves/mirror_move.test.ts b/test/moves/mirror_move.test.ts index 438c594d839..6a73e3a1f05 100644 --- a/test/moves/mirror_move.test.ts +++ b/test/moves/mirror_move.test.ts @@ -40,8 +40,8 @@ describe("Moves - Mirror Move", () => { game.move.select(Moves.MIRROR_MOVE, 0, BattlerIndex.ENEMY); // target's last move is Tackle, enemy should receive damage from Mirror Move copying Tackle game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.GROWL, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.GROWL, BattlerIndex.PLAYER_2); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER_2, BattlerIndex.PLAYER]); await game.toNextTurn(); diff --git a/test/moves/multi_target.test.ts b/test/moves/multi_target.test.ts index ad47d540a14..af98c9a89f4 100644 --- a/test/moves/multi_target.test.ts +++ b/test/moves/multi_target.test.ts @@ -36,7 +36,7 @@ describe("Multi-target damage reduction", () => { }); it("should reduce d.gleam damage when multiple enemies but not tackle", async () => { - await game.startBattle([Species.MAGIKARP, Species.FEEBAS]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]); const [enemy1, enemy2] = game.scene.getEnemyField(); @@ -76,7 +76,7 @@ describe("Multi-target damage reduction", () => { }); it("should reduce earthquake when more than one pokemon other than user is not fainted", async () => { - await game.startBattle([Species.MAGIKARP, Species.FEEBAS]); + await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]); const player2 = game.scene.getPlayerParty()[1]; const [enemy1, enemy2] = game.scene.getEnemyField(); diff --git a/test/moves/parting_shot.test.ts b/test/moves/parting_shot.test.ts index a65c1a5b3a5..26f8790d3b9 100644 --- a/test/moves/parting_shot.test.ts +++ b/test/moves/parting_shot.test.ts @@ -35,7 +35,7 @@ describe("Moves - Parting Shot", () => { test("Parting Shot when buffed by prankster should fail against dark types", async () => { game.override.enemySpecies(Species.POOCHYENA).ability(Abilities.PRANKSTER); - await game.startBattle([Species.MURKROW, Species.MEOWTH]); + await game.classicMode.startBattle([Species.MURKROW, Species.MEOWTH]); const enemyPokemon = game.scene.getEnemyPokemon()!; expect(enemyPokemon).toBeDefined(); @@ -50,7 +50,7 @@ describe("Moves - Parting Shot", () => { test("Parting shot should fail against good as gold ability", async () => { game.override.enemySpecies(Species.GHOLDENGO).enemyAbility(Abilities.GOOD_AS_GOLD); - await game.startBattle([Species.MURKROW, Species.MEOWTH]); + await game.classicMode.startBattle([Species.MURKROW, Species.MEOWTH]); const enemyPokemon = game.scene.getEnemyPokemon()!; expect(enemyPokemon).toBeDefined(); @@ -68,7 +68,13 @@ describe("Moves - Parting Shot", () => { "Parting shot should fail if target is -6/-6 de-buffed", async () => { game.override.moveset([Moves.PARTING_SHOT, Moves.MEMENTO, Moves.SPLASH]); - await game.startBattle([Species.MEOWTH, Species.MEOWTH, Species.MEOWTH, Species.MURKROW, Species.ABRA]); + await game.classicMode.startBattle([ + Species.MEOWTH, + Species.MEOWTH, + Species.MEOWTH, + Species.MURKROW, + Species.ABRA, + ]); // use Memento 3 times to debuff enemy game.move.select(Moves.MEMENTO); @@ -111,7 +117,7 @@ describe("Moves - Parting Shot", () => { "Parting shot shouldn't allow switch out when mist is active", async () => { game.override.enemySpecies(Species.ALTARIA).enemyAbility(Abilities.NONE).enemyMoveset([Moves.MIST]); - await game.startBattle([Species.SNORLAX, Species.MEOWTH]); + await game.classicMode.startBattle([Species.SNORLAX, Species.MEOWTH]); const enemyPokemon = game.scene.getEnemyPokemon()!; expect(enemyPokemon).toBeDefined(); @@ -130,7 +136,7 @@ describe("Moves - Parting Shot", () => { "Parting shot shouldn't allow switch out against clear body ability", async () => { game.override.enemySpecies(Species.TENTACOOL).enemyAbility(Abilities.CLEAR_BODY); - await game.startBattle([Species.SNORLAX, Species.MEOWTH]); + await game.classicMode.startBattle([Species.SNORLAX, Species.MEOWTH]); const enemyPokemon = game.scene.getEnemyPokemon()!; expect(enemyPokemon).toBeDefined(); @@ -148,7 +154,7 @@ describe("Moves - Parting Shot", () => { // TODO: fix this bug to pass the test! "Parting shot should de-buff and not fail if no party available to switch - party size 1", async () => { - await game.startBattle([Species.MURKROW]); + await game.classicMode.startBattle([Species.MURKROW]); const enemyPokemon = game.scene.getEnemyPokemon()!; expect(enemyPokemon).toBeDefined(); @@ -166,7 +172,7 @@ describe("Moves - Parting Shot", () => { // TODO: fix this bug to pass the test! "Parting shot regularly not fail if no party available to switch - party fainted", async () => { - await game.startBattle([Species.MURKROW, Species.MEOWTH]); + await game.classicMode.startBattle([Species.MURKROW, Species.MEOWTH]); game.move.select(Moves.SPLASH); // intentionally kill party pokemon, switch to second slot (now 1 party mon is fainted) diff --git a/test/moves/plasma_fists.test.ts b/test/moves/plasma_fists.test.ts index b6a5ceaed68..0c3412d8e60 100644 --- a/test/moves/plasma_fists.test.ts +++ b/test/moves/plasma_fists.test.ts @@ -42,8 +42,8 @@ describe("Moves - Plasma Fists", () => { game.move.select(Moves.PLASMA_FISTS, 0, BattlerIndex.ENEMY); game.move.select(Moves.TACKLE, 1, BattlerIndex.ENEMY_2); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.TACKLE, BattlerIndex.PLAYER_2); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); diff --git a/test/moves/pledge_moves.test.ts b/test/moves/pledge_moves.test.ts index 9dbf2b4cb02..6c66c4bbe2d 100644 --- a/test/moves/pledge_moves.test.ts +++ b/test/moves/pledge_moves.test.ts @@ -256,8 +256,8 @@ describe("Moves - Pledge Moves", () => { game.move.select(Moves.FIRE_PLEDGE, 0, BattlerIndex.ENEMY); game.move.select(Moves.GRASS_PLEDGE, 1, BattlerIndex.ENEMY_2); - await game.forceEnemyMove(Moves.SPORE, BattlerIndex.PLAYER_2); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPORE, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY_2]); @@ -290,8 +290,8 @@ describe("Moves - Pledge Moves", () => { game.move.select(Moves.WATER_PLEDGE, 0, BattlerIndex.ENEMY); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH); - await game.forceEnemyMove(Moves.FOLLOW_ME); + await game.move.selectEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.FOLLOW_ME); await game.phaseInterceptor.to("BerryPhase", false); diff --git a/test/moves/powder.test.ts b/test/moves/powder.test.ts index c6114db3ff1..b65525109ad 100644 --- a/test/moves/powder.test.ts +++ b/test/moves/powder.test.ts @@ -233,8 +233,8 @@ describe("Moves - Powder", () => { game.move.select(Moves.POWDER, 0, BattlerIndex.ENEMY); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.GRASS_PLEDGE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.FIRE_PLEDGE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.GRASS_PLEDGE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.FIRE_PLEDGE, BattlerIndex.PLAYER); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY_2, BattlerIndex.ENEMY]); await game.phaseInterceptor.to(BerryPhase, false); @@ -250,8 +250,8 @@ describe("Moves - Powder", () => { game.move.select(Moves.POWDER, 0, BattlerIndex.ENEMY); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.FIRE_PLEDGE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.WATER_PLEDGE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.FIRE_PLEDGE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.WATER_PLEDGE, BattlerIndex.PLAYER); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]); await game.phaseInterceptor.to(BerryPhase, false); @@ -267,8 +267,8 @@ describe("Moves - Powder", () => { game.move.select(Moves.POWDER, 0, BattlerIndex.ENEMY); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.FIRE_PLEDGE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.WATER_PLEDGE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.FIRE_PLEDGE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.WATER_PLEDGE, BattlerIndex.PLAYER); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY_2, BattlerIndex.ENEMY]); await game.phaseInterceptor.to(BerryPhase, false); diff --git a/test/moves/power_split.test.ts b/test/moves/power_split.test.ts index f15275fce9e..ca712f0a64e 100644 --- a/test/moves/power_split.test.ts +++ b/test/moves/power_split.test.ts @@ -34,7 +34,7 @@ describe("Moves - Power Split", () => { it("should average the user's ATK and SPATK stats with those of the target", async () => { game.override.enemyMoveset(Moves.SPLASH); - await game.startBattle([Species.INDEEDEE]); + await game.classicMode.startBattle([Species.INDEEDEE]); const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; @@ -54,7 +54,7 @@ describe("Moves - Power Split", () => { it("should be idempotent", async () => { game.override.enemyMoveset([Moves.POWER_SPLIT]); - await game.startBattle([Species.INDEEDEE]); + await game.classicMode.startBattle([Species.INDEEDEE]); const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; diff --git a/test/moves/purify.test.ts b/test/moves/purify.test.ts index 191539d8cec..0439ba39108 100644 --- a/test/moves/purify.test.ts +++ b/test/moves/purify.test.ts @@ -37,7 +37,7 @@ describe("Moves - Purify", () => { }); test("Purify heals opponent status effect and restores user hp", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon: EnemyPokemon = game.scene.getEnemyPokemon()!; const playerPokemon: PlayerPokemon = game.scene.getPlayerPokemon()!; @@ -54,7 +54,7 @@ describe("Moves - Purify", () => { }); test("Purify does not heal if opponent doesnt have any status effect", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const playerPokemon: PlayerPokemon = game.scene.getPlayerPokemon()!; diff --git a/test/moves/quash.test.ts b/test/moves/quash.test.ts index 5bf8271320b..f242dafe365 100644 --- a/test/moves/quash.test.ts +++ b/test/moves/quash.test.ts @@ -39,8 +39,8 @@ describe("Moves - Quash", () => { game.move.select(Moves.QUASH, 0, BattlerIndex.PLAYER_2); game.move.select(Moves.SUNNY_DAY, 1); - await game.forceEnemyMove(Moves.SPLASH); - await game.forceEnemyMove(Moves.RAIN_DANCE); + await game.move.selectEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.RAIN_DANCE); await game.phaseInterceptor.to("TurnEndPhase", false); // will be sunny if player_2 moved last because of quash, rainy otherwise @@ -67,8 +67,8 @@ describe("Moves - Quash", () => { game.move.select(Moves.RAIN_DANCE, 0); game.move.select(Moves.SUNNY_DAY, 1); - await game.forceEnemyMove(Moves.QUASH, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.QUASH, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.QUASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.QUASH, BattlerIndex.PLAYER_2); await game.phaseInterceptor.to("TurnEndPhase", false); expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.SUNNY); @@ -81,15 +81,15 @@ describe("Moves - Quash", () => { game.move.select(Moves.SPLASH, 0); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.TRICK_ROOM); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.TRICK_ROOM); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("TurnInitPhase"); // both users are quashed - accelgor should move last w/ TR so rain should be up at end of turn game.move.select(Moves.RAIN_DANCE, 0); game.move.select(Moves.SUNNY_DAY, 1); - await game.forceEnemyMove(Moves.QUASH, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.QUASH, BattlerIndex.PLAYER_2); + await game.move.selectEnemyMove(Moves.QUASH, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.QUASH, BattlerIndex.PLAYER_2); await game.phaseInterceptor.to("TurnEndPhase", false); expect(game.scene.arena.weather?.weatherType).toBe(WeatherType.RAIN); diff --git a/test/moves/rage_fist.test.ts b/test/moves/rage_fist.test.ts index 0aabb717f1b..9e5810039a8 100644 --- a/test/moves/rage_fist.test.ts +++ b/test/moves/rage_fist.test.ts @@ -75,7 +75,7 @@ describe("Moves - Rage Fist", () => { await game.classicMode.startBattle([Species.REGIROCK]); game.move.select(Moves.SUBSTITUTE); - await game.forceEnemyMove(Moves.DOUBLE_KICK); + await game.move.selectEnemyMove(Moves.DOUBLE_KICK); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.toNextTurn(); @@ -84,12 +84,12 @@ describe("Moves - Rage Fist", () => { // remove substitute and get confused game.move.select(Moves.TIDY_UP); - await game.forceEnemyMove(Moves.CONFUSE_RAY); + await game.move.selectEnemyMove(Moves.CONFUSE_RAY); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.toNextTurn(); game.move.select(Moves.RAGE_FIST); - await game.forceEnemyMove(Moves.CONFUSE_RAY); + await game.move.selectEnemyMove(Moves.CONFUSE_RAY); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.move.forceConfusionActivation(true); await game.toNextTurn(); @@ -123,7 +123,7 @@ describe("Moves - Rage Fist", () => { // beat up a magikarp game.move.select(Moves.RAGE_FIST); - await game.forceEnemyMove(Moves.DOUBLE_KICK); + await game.move.selectEnemyMove(Moves.DOUBLE_KICK); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("TurnEndPhase"); diff --git a/test/moves/rage_powder.test.ts b/test/moves/rage_powder.test.ts index 284b558f842..206fd590896 100644 --- a/test/moves/rage_powder.test.ts +++ b/test/moves/rage_powder.test.ts @@ -38,8 +38,8 @@ describe("Moves - Rage Powder", () => { game.move.select(Moves.QUICK_ATTACK, 0, BattlerIndex.ENEMY); game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY_2); - await game.forceEnemyMove(Moves.RAGE_POWDER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.RAGE_POWDER); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("BerryPhase", false); @@ -61,8 +61,8 @@ describe("Moves - Rage Powder", () => { game.move.select(Moves.QUICK_ATTACK, 0, BattlerIndex.ENEMY); game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY_2); - await game.forceEnemyMove(Moves.RAGE_POWDER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.RAGE_POWDER); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("BerryPhase", false); diff --git a/test/moves/reflect_type.test.ts b/test/moves/reflect_type.test.ts index efd58bfeadf..63772aa746f 100644 --- a/test/moves/reflect_type.test.ts +++ b/test/moves/reflect_type.test.ts @@ -37,17 +37,17 @@ describe("Moves - Reflect Type", () => { const enemyPokemon = game.scene.getEnemyPokemon(); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.BURN_UP); + await game.move.selectEnemyMove(Moves.BURN_UP); await game.toNextTurn(); game.move.select(Moves.FORESTS_CURSE); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); expect(enemyPokemon?.getTypes().includes(PokemonType.UNKNOWN)).toBe(true); expect(enemyPokemon?.getTypes().includes(PokemonType.GRASS)).toBe(true); game.move.select(Moves.REFLECT_TYPE); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("TurnEndPhase"); expect(playerPokemon?.getTypes()[0]).toBe(PokemonType.NORMAL); expect(playerPokemon?.getTypes().includes(PokemonType.GRASS)).toBe(true); diff --git a/test/moves/retaliate.test.ts b/test/moves/retaliate.test.ts index 81ea353a120..40f31635d9b 100644 --- a/test/moves/retaliate.test.ts +++ b/test/moves/retaliate.test.ts @@ -37,7 +37,7 @@ describe("Moves - Retaliate", () => { it("increases power if ally died previous turn", async () => { vi.spyOn(retaliate, "calculateBattlePower"); - await game.startBattle([Species.ABRA, Species.COBALION]); + await game.classicMode.startBattle([Species.ABRA, Species.COBALION]); game.move.select(Moves.RETALIATE); await game.phaseInterceptor.to("TurnEndPhase"); expect(retaliate.calculateBattlePower).toHaveLastReturnedWith(70); diff --git a/test/moves/revival_blessing.test.ts b/test/moves/revival_blessing.test.ts index b36cd43eb83..ded18e3ffb8 100644 --- a/test/moves/revival_blessing.test.ts +++ b/test/moves/revival_blessing.test.ts @@ -98,8 +98,8 @@ describe("Moves - Revival Blessing", () => { game.move.select(Moves.SPLASH); game.move.select(Moves.REVIVAL_BLESSING, 1); - await game.forceEnemyMove(Moves.FISSURE, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.FISSURE, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER_2]); await game.phaseInterceptor.to("MoveEndPhase"); diff --git a/test/moves/rollout.test.ts b/test/moves/rollout.test.ts index dab9ef67596..dafa72dd5fa 100644 --- a/test/moves/rollout.test.ts +++ b/test/moves/rollout.test.ts @@ -42,7 +42,7 @@ describe("Moves - Rollout", () => { const turns = 6; const dmgHistory: number[] = []; - await game.startBattle(); + await game.classicMode.startBattle(); const playerPkm = game.scene.getPlayerParty()[0]; vi.spyOn(playerPkm, "stats", "get").mockReturnValue([500000, 1, 1, 1, 1, 1]); // HP, ATK, DEF, SPATK, SPDEF, SPD diff --git a/test/moves/round.test.ts b/test/moves/round.test.ts index 43e505705ae..ccdf4cbf089 100644 --- a/test/moves/round.test.ts +++ b/test/moves/round.test.ts @@ -45,8 +45,8 @@ describe("Moves - Round", () => { game.move.select(Moves.ROUND, 0, BattlerIndex.ENEMY); game.move.select(Moves.ROUND, 1, BattlerIndex.ENEMY_2); - await game.forceEnemyMove(Moves.ROUND, BattlerIndex.PLAYER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.ROUND, BattlerIndex.PLAYER); + await game.move.selectEnemyMove(Moves.SPLASH); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY]); diff --git a/test/moves/secret_power.test.ts b/test/moves/secret_power.test.ts index f6870c5ed1d..99945002b8d 100644 --- a/test/moves/secret_power.test.ts +++ b/test/moves/secret_power.test.ts @@ -49,13 +49,13 @@ describe("Moves - Secret Power", () => { // No Terrain + Biome.VOLCANO --> Burn game.move.select(Moves.SECRET_POWER); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("TurnEndPhase"); expect(enemyPokemon.status?.effect).toBe(StatusEffect.BURN); // Misty Terrain --> SpAtk -1 game.move.select(Moves.SECRET_POWER); - await game.forceEnemyMove(Moves.MISTY_TERRAIN); + await game.move.selectEnemyMove(Moves.MISTY_TERRAIN); await game.phaseInterceptor.to("TurnEndPhase"); expect(enemyPokemon.getStatStage(Stat.SPATK)).toBe(-1); }); diff --git a/test/moves/shell_trap.test.ts b/test/moves/shell_trap.test.ts index 313d02b4d73..2aa4712152d 100644 --- a/test/moves/shell_trap.test.ts +++ b/test/moves/shell_trap.test.ts @@ -38,7 +38,7 @@ describe("Moves - Shell Trap", () => { }); it("should activate after the user is hit by a physical attack", async () => { - await game.startBattle([Species.CHARIZARD, Species.TURTONATOR]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.TURTONATOR]); const playerPokemon = game.scene.getPlayerField(); const enemyPokemon = game.scene.getEnemyField(); @@ -61,7 +61,7 @@ describe("Moves - Shell Trap", () => { it("should fail if the user is only hit by special attacks", async () => { game.override.enemyMoveset([Moves.SWIFT]); - await game.startBattle([Species.CHARIZARD, Species.TURTONATOR]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.TURTONATOR]); const playerPokemon = game.scene.getPlayerField(); const enemyPokemon = game.scene.getEnemyField(); @@ -84,7 +84,7 @@ describe("Moves - Shell Trap", () => { it("should fail if the user isn't hit with any attack", async () => { game.override.enemyMoveset(Moves.SPLASH); - await game.startBattle([Species.CHARIZARD, Species.TURTONATOR]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.TURTONATOR]); const playerPokemon = game.scene.getPlayerField(); const enemyPokemon = game.scene.getEnemyField(); @@ -107,7 +107,7 @@ describe("Moves - Shell Trap", () => { it("should not activate from an ally's attack", async () => { game.override.enemyMoveset(Moves.SPLASH); - await game.startBattle([Species.BLASTOISE, Species.CHARIZARD]); + await game.classicMode.startBattle([Species.BLASTOISE, Species.CHARIZARD]); const playerPokemon = game.scene.getPlayerField(); const enemyPokemon = game.scene.getEnemyField(); @@ -131,7 +131,7 @@ describe("Moves - Shell Trap", () => { game.override.battleStyle("single"); vi.spyOn(allMoves[Moves.RAZOR_LEAF], "priority", "get").mockReturnValue(-4); - await game.startBattle([Species.CHARIZARD]); + await game.classicMode.startBattle([Species.CHARIZARD]); const playerPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; diff --git a/test/moves/speed_swap.test.ts b/test/moves/speed_swap.test.ts index 2b010885e34..f2be761b64e 100644 --- a/test/moves/speed_swap.test.ts +++ b/test/moves/speed_swap.test.ts @@ -34,7 +34,7 @@ describe("Moves - Speed Swap", () => { }); it("should swap the user's SPD and the target's SPD stats", async () => { - await game.startBattle([Species.INDEEDEE]); + await game.classicMode.startBattle([Species.INDEEDEE]); const player = game.scene.getPlayerPokemon()!; const enemy = game.scene.getEnemyPokemon()!; diff --git a/test/moves/spikes.test.ts b/test/moves/spikes.test.ts index 3dfa398d7d6..f37b54a2904 100644 --- a/test/moves/spikes.test.ts +++ b/test/moves/spikes.test.ts @@ -32,7 +32,7 @@ describe("Moves - Spikes", () => { }); it("should not damage the team that set them", async () => { - await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); + await game.classicMode.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); game.move.select(Moves.SPIKES); await game.toNextTurn(); @@ -52,7 +52,7 @@ describe("Moves - Spikes", () => { it("should damage opposing pokemon that are forced to switch in", async () => { game.override.startingWave(5); - await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); + await game.classicMode.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); game.move.select(Moves.SPIKES); await game.toNextTurn(); @@ -66,7 +66,7 @@ describe("Moves - Spikes", () => { it("should damage opposing pokemon that choose to switch in", async () => { game.override.startingWave(5); - await game.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); + await game.classicMode.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); game.move.select(Moves.SPIKES); await game.toNextTurn(); diff --git a/test/moves/spit_up.test.ts b/test/moves/spit_up.test.ts index 7197d9b75c3..b11d74da64a 100644 --- a/test/moves/spit_up.test.ts +++ b/test/moves/spit_up.test.ts @@ -50,7 +50,7 @@ describe("Moves - Spit Up", () => { const stacksToSetup = 1; const expectedPower = 100; - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; pokemon.addTag(BattlerTagType.STOCKPILING); @@ -72,7 +72,7 @@ describe("Moves - Spit Up", () => { const stacksToSetup = 2; const expectedPower = 200; - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; pokemon.addTag(BattlerTagType.STOCKPILING); @@ -95,7 +95,7 @@ describe("Moves - Spit Up", () => { const stacksToSetup = 3; const expectedPower = 300; - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; pokemon.addTag(BattlerTagType.STOCKPILING); @@ -117,7 +117,7 @@ describe("Moves - Spit Up", () => { }); it("fails without stacks", async () => { - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; @@ -138,7 +138,7 @@ describe("Moves - Spit Up", () => { describe("restores stat boosts granted by stacks", () => { it("decreases stats based on stored values (both boosts equal)", async () => { - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; pokemon.addTag(BattlerTagType.STOCKPILING); @@ -169,7 +169,7 @@ describe("Moves - Spit Up", () => { }); it("decreases stats based on stored values (different boosts)", async () => { - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; pokemon.addTag(BattlerTagType.STOCKPILING); diff --git a/test/moves/spotlight.test.ts b/test/moves/spotlight.test.ts index 2c4f652e408..e617682bdd5 100644 --- a/test/moves/spotlight.test.ts +++ b/test/moves/spotlight.test.ts @@ -39,8 +39,8 @@ describe("Moves - Spotlight", () => { game.move.select(Moves.SPOTLIGHT, 0, BattlerIndex.ENEMY); game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY_2); - await game.forceEnemyMove(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to(TurnEndPhase, false); @@ -56,8 +56,8 @@ describe("Moves - Spotlight", () => { game.move.select(Moves.SPOTLIGHT, 0, BattlerIndex.ENEMY); game.move.select(Moves.QUICK_ATTACK, 1, BattlerIndex.ENEMY_2); - await game.forceEnemyMove(Moves.SPLASH); - await game.forceEnemyMove(Moves.FOLLOW_ME); + await game.move.selectEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.FOLLOW_ME); await game.phaseInterceptor.to("BerryPhase", false); diff --git a/test/moves/stockpile.test.ts b/test/moves/stockpile.test.ts index 4b8f51c32b2..196a1d8ca9a 100644 --- a/test/moves/stockpile.test.ts +++ b/test/moves/stockpile.test.ts @@ -39,7 +39,7 @@ describe("Moves - Stockpile", () => { }); it("gains a stockpile stack and raises user's DEF and SPDEF stat stages by 1 on each use, fails at max stacks (3)", async () => { - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const user = game.scene.getPlayerPokemon()!; @@ -83,7 +83,7 @@ describe("Moves - Stockpile", () => { }); it("gains a stockpile stack even if user's DEF and SPDEF stat stages are at +6", async () => { - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const user = game.scene.getPlayerPokemon()!; diff --git a/test/moves/swallow.test.ts b/test/moves/swallow.test.ts index d548522068b..cff9daaf97a 100644 --- a/test/moves/swallow.test.ts +++ b/test/moves/swallow.test.ts @@ -43,7 +43,7 @@ describe("Moves - Swallow", () => { const stacksToSetup = 1; const expectedHeal = 25; - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; vi.spyOn(pokemon, "getMaxHp").mockReturnValue(100); @@ -70,7 +70,7 @@ describe("Moves - Swallow", () => { const stacksToSetup = 2; const expectedHeal = 50; - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; vi.spyOn(pokemon, "getMaxHp").mockReturnValue(100); @@ -98,7 +98,7 @@ describe("Moves - Swallow", () => { const stacksToSetup = 3; const expectedHeal = 100; - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; vi.spyOn(pokemon, "getMaxHp").mockReturnValue(100); @@ -125,7 +125,7 @@ describe("Moves - Swallow", () => { }); it("fails without stacks", async () => { - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; @@ -144,7 +144,7 @@ describe("Moves - Swallow", () => { describe("restores stat stage boosts granted by stacks", () => { it("decreases stats based on stored values (both boosts equal)", async () => { - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; pokemon.addTag(BattlerTagType.STOCKPILING); @@ -173,7 +173,7 @@ describe("Moves - Swallow", () => { }); it("lower stat stages based on stored values (different boosts)", async () => { - await game.startBattle([Species.ABOMASNOW]); + await game.classicMode.startBattle([Species.ABOMASNOW]); const pokemon = game.scene.getPlayerPokemon()!; pokemon.addTag(BattlerTagType.STOCKPILING); diff --git a/test/moves/tackle.test.ts b/test/moves/tackle.test.ts index 162836cd181..5fd8ba589fc 100644 --- a/test/moves/tackle.test.ts +++ b/test/moves/tackle.test.ts @@ -36,7 +36,7 @@ describe("Moves - Tackle", () => { it("TACKLE against ghost", async () => { const moveToUse = Moves.TACKLE; game.override.enemySpecies(Species.GENGAR); - await game.startBattle([Species.MIGHTYENA]); + await game.classicMode.startBattle([Species.MIGHTYENA]); const hpOpponent = game.scene.currentBattle.enemyParty[0].hp; game.move.select(moveToUse); await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnEndPhase); @@ -46,7 +46,7 @@ describe("Moves - Tackle", () => { it("TACKLE against not resistant", async () => { const moveToUse = Moves.TACKLE; - await game.startBattle([Species.MIGHTYENA]); + await game.classicMode.startBattle([Species.MIGHTYENA]); game.scene.currentBattle.enemyParty[0].stats[Stat.DEF] = 50; game.scene.getPlayerParty()[0].stats[Stat.ATK] = 50; diff --git a/test/moves/tail_whip.test.ts b/test/moves/tail_whip.test.ts index 2d3ade2691d..d15864dd671 100644 --- a/test/moves/tail_whip.test.ts +++ b/test/moves/tail_whip.test.ts @@ -36,7 +36,7 @@ describe("Moves - Tail whip", () => { it("should lower DEF stat stage by 1", async () => { const moveToUse = Moves.TAIL_WHIP; - await game.startBattle([Species.MIGHTYENA, Species.MIGHTYENA]); + await game.classicMode.startBattle([Species.MIGHTYENA, Species.MIGHTYENA]); const enemyPokemon = game.scene.getEnemyPokemon()!; expect(enemyPokemon.getStatStage(Stat.DEF)).toBe(0); diff --git a/test/moves/taunt.test.ts b/test/moves/taunt.test.ts index e0bb13c61fb..bcb4789f888 100644 --- a/test/moves/taunt.test.ts +++ b/test/moves/taunt.test.ts @@ -37,7 +37,7 @@ describe("Moves - Taunt", () => { // First turn, Player Pokemon succeeds using Growl without Taunt game.move.select(Moves.GROWL); - await game.forceEnemyMove(Moves.TAUNT); + await game.move.selectEnemyMove(Moves.TAUNT); await game.toNextTurn(); const move1 = playerPokemon.getLastXMoves(1)[0]!; expect(move1.move).toBe(Moves.GROWL); @@ -46,7 +46,7 @@ describe("Moves - Taunt", () => { // Second turn, Taunt forces Struggle to occur game.move.select(Moves.GROWL); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); const move2 = playerPokemon.getLastXMoves(1)[0]!; expect(move2.move).toBe(Moves.STRUGGLE); diff --git a/test/moves/telekinesis.test.ts b/test/moves/telekinesis.test.ts index e889926b5c8..e5a21e915fa 100644 --- a/test/moves/telekinesis.test.ts +++ b/test/moves/telekinesis.test.ts @@ -106,7 +106,7 @@ describe("Moves - Telekinesis", () => { const enemyOpponent = game.scene.getEnemyPokemon()!; game.move.select(Moves.TELEKINESIS); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to("TurnEndPhase"); expect(enemyOpponent.getTag(BattlerTagType.TELEKINESIS)).toBeDefined(); expect(enemyOpponent.getTag(BattlerTagType.FLOATING)).toBeDefined(); @@ -114,7 +114,7 @@ describe("Moves - Telekinesis", () => { await game.toNextTurn(); vi.spyOn(allMoves[Moves.MUD_SHOT], "accuracy", "get").mockReturnValue(0); game.move.select(Moves.MUD_SHOT); - await game.forceEnemyMove(Moves.INGRAIN); + await game.move.selectEnemyMove(Moves.INGRAIN); await game.phaseInterceptor.to("TurnEndPhase"); expect(enemyOpponent.getTag(BattlerTagType.TELEKINESIS)).toBeDefined(); expect(enemyOpponent.getTag(BattlerTagType.INGRAIN)).toBeDefined(); diff --git a/test/moves/thousand_arrows.test.ts b/test/moves/thousand_arrows.test.ts index 7259fda8560..39bc8617767 100644 --- a/test/moves/thousand_arrows.test.ts +++ b/test/moves/thousand_arrows.test.ts @@ -33,7 +33,7 @@ describe("Moves - Thousand Arrows", () => { }); it("move should hit and ground Flying-type targets", async () => { - await game.startBattle([Species.ILLUMISE]); + await game.classicMode.startBattle([Species.ILLUMISE]); const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -53,7 +53,7 @@ describe("Moves - Thousand Arrows", () => { game.override.enemySpecies(Species.SNORLAX); game.override.enemyAbility(Abilities.LEVITATE); - await game.startBattle([Species.ILLUMISE]); + await game.classicMode.startBattle([Species.ILLUMISE]); const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -72,7 +72,7 @@ describe("Moves - Thousand Arrows", () => { it("move should hit and ground targets under the effects of Magnet Rise", async () => { game.override.enemySpecies(Species.SNORLAX); - await game.startBattle([Species.ILLUMISE]); + await game.classicMode.startBattle([Species.ILLUMISE]); const enemyPokemon = game.scene.getEnemyPokemon()!; diff --git a/test/moves/thunder_wave.test.ts b/test/moves/thunder_wave.test.ts index abfb5828d3b..326d7ecbdc0 100644 --- a/test/moves/thunder_wave.test.ts +++ b/test/moves/thunder_wave.test.ts @@ -34,7 +34,7 @@ describe("Moves - Thunder Wave", () => { it("paralyzes non-statused Pokemon that are not Ground types", async () => { game.override.enemySpecies(Species.MAGIKARP); - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon: EnemyPokemon = game.scene.getEnemyPokemon()!; @@ -47,7 +47,7 @@ describe("Moves - Thunder Wave", () => { it("does not paralyze if the Pokemon is a Ground-type", async () => { game.override.enemySpecies(Species.DIGLETT); - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon: EnemyPokemon = game.scene.getEnemyPokemon()!; @@ -60,7 +60,7 @@ describe("Moves - Thunder Wave", () => { it("does not paralyze if the Pokemon already has a status effect", async () => { game.override.enemySpecies(Species.MAGIKARP).enemyStatusEffect(StatusEffect.BURN); - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon: EnemyPokemon = game.scene.getEnemyPokemon()!; @@ -73,7 +73,7 @@ describe("Moves - Thunder Wave", () => { it("affects Ground types if the user has Normalize", async () => { game.override.ability(Abilities.NORMALIZE).enemySpecies(Species.DIGLETT); - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon: EnemyPokemon = game.scene.getEnemyPokemon()!; @@ -86,7 +86,7 @@ describe("Moves - Thunder Wave", () => { it("does not affect Ghost types if the user has Normalize", async () => { game.override.ability(Abilities.NORMALIZE).enemySpecies(Species.HAUNTER); - await game.startBattle(); + await game.classicMode.startBattle(); const enemyPokemon: EnemyPokemon = game.scene.getEnemyPokemon()!; diff --git a/test/moves/torment.test.ts b/test/moves/torment.test.ts index d06837d2806..d11de46bf10 100644 --- a/test/moves/torment.test.ts +++ b/test/moves/torment.test.ts @@ -40,7 +40,7 @@ describe("Moves - Torment", () => { // First turn, Player Pokemon uses Tackle successfully game.move.select(Moves.TACKLE); - await game.forceEnemyMove(Moves.TORMENT); + await game.move.selectEnemyMove(Moves.TORMENT); await game.toNextTurn(); const move1 = playerPokemon.getLastXMoves(1)[0]!; expect(move1.move).toBe(Moves.TACKLE); @@ -49,14 +49,14 @@ describe("Moves - Torment", () => { // Second turn, Torment forces Struggle to occur game.move.select(Moves.TACKLE); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); const move2 = playerPokemon.getLastXMoves(1)[0]!; expect(move2.move).toBe(Moves.STRUGGLE); // Third turn, Tackle can be used. game.move.select(Moves.TACKLE); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.phaseInterceptor.to(TurnEndPhase); const move3 = playerPokemon.getLastXMoves(1)[0]!; expect(move3.move).toBe(Moves.TACKLE); diff --git a/test/moves/whirlwind.test.ts b/test/moves/whirlwind.test.ts index 67ffb77612c..3558f968c66 100644 --- a/test/moves/whirlwind.test.ts +++ b/test/moves/whirlwind.test.ts @@ -51,7 +51,7 @@ describe("Moves - Whirlwind", () => { const staraptor = game.scene.getPlayerPokemon()!; game.move.select(move); - await game.forceEnemyMove(Moves.WHIRLWIND); + await game.move.selectEnemyMove(Moves.WHIRLWIND); await game.phaseInterceptor.to("BerryPhase", false); @@ -69,7 +69,7 @@ describe("Moves - Whirlwind", () => { return min; }); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.WHIRLWIND); + await game.move.selectEnemyMove(Moves.WHIRLWIND); await game.toNextTurn(); expect(bulbasaur.isOnField()).toBe(false); @@ -81,7 +81,7 @@ describe("Moves - Whirlwind", () => { return min + 1; }); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.WHIRLWIND); + await game.move.selectEnemyMove(Moves.WHIRLWIND); await game.toNextTurn(); expect(bulbasaur.isOnField()).toBe(false); @@ -101,7 +101,7 @@ describe("Moves - Whirlwind", () => { return min; }); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.WHIRLWIND); + await game.move.selectEnemyMove(Moves.WHIRLWIND); await game.toNextTurn(); expect(lapras.isOnField()).toBe(false); @@ -120,7 +120,7 @@ describe("Moves - Whirlwind", () => { eevee.status = new Status(StatusEffect.FAINT); expect(eevee.isFainted()).toBe(true); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); // Turn 2: Mock an RNG call that would normally call for switching to Eevee, but it is fainted @@ -128,7 +128,7 @@ describe("Moves - Whirlwind", () => { return min; }); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.WHIRLWIND); + await game.move.selectEnemyMove(Moves.WHIRLWIND); await game.toNextTurn(); expect(lapras.isOnField()).toBe(false); @@ -147,7 +147,7 @@ describe("Moves - Whirlwind", () => { eevee.status = new Status(StatusEffect.FAINT); expect(eevee.isFainted()).toBe(true); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); // Turn 2: Mock an RNG call that would normally call for switching to Eevee, but it is fainted @@ -155,7 +155,7 @@ describe("Moves - Whirlwind", () => { return min; }); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.WHIRLWIND); + await game.move.selectEnemyMove(Moves.WHIRLWIND); await game.toNextTurn(); expect(lapras.isOnField()).toBe(true); @@ -184,7 +184,7 @@ describe("Moves - Whirlwind", () => { // Player uses Whirlwind; opponent uses Splash game.move.select(Moves.WHIRLWIND); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); // Verify that the failure message is displayed for Whirlwind @@ -214,8 +214,8 @@ describe("Moves - Whirlwind", () => { game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH); - await game.forceEnemyMove(Moves.MEMENTO); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.MEMENTO); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); // Get the enemy pokemon id so we can check if is the same after switch. @@ -225,8 +225,8 @@ describe("Moves - Whirlwind", () => { game.move.select(Moves.WHIRLWIND, 0, BattlerIndex.ENEMY); game.move.select(Moves.SPLASH, 1); - await game.forceEnemyMove(Moves.SPLASH); - await game.forceEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.SPLASH); await game.toNextTurn(); diff --git a/test/moves/wide_guard.test.ts b/test/moves/wide_guard.test.ts index 85ebad806d7..08357476e5e 100644 --- a/test/moves/wide_guard.test.ts +++ b/test/moves/wide_guard.test.ts @@ -38,7 +38,7 @@ describe("Moves - Wide Guard", () => { }); test("should protect the user and allies from multi-target attack moves", async () => { - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const leadPokemon = game.scene.getPlayerField(); @@ -56,7 +56,7 @@ describe("Moves - Wide Guard", () => { test("should protect the user and allies from multi-target status moves", async () => { game.override.enemyMoveset([Moves.GROWL]); - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const leadPokemon = game.scene.getPlayerField(); @@ -74,7 +74,7 @@ describe("Moves - Wide Guard", () => { test("should not protect the user and allies from single-target moves", async () => { game.override.enemyMoveset([Moves.TACKLE]); - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const leadPokemon = game.scene.getPlayerField(); @@ -92,7 +92,7 @@ describe("Moves - Wide Guard", () => { test("should protect the user from its ally's multi-target move", async () => { game.override.enemyMoveset([Moves.SPLASH]); - await game.startBattle([Species.CHARIZARD, Species.BLASTOISE]); + await game.classicMode.startBattle([Species.CHARIZARD, Species.BLASTOISE]); const leadPokemon = game.scene.getPlayerField(); const enemyPokemon = game.scene.getEnemyField(); diff --git a/test/phases/learn-move-phase.test.ts b/test/phases/learn-move-phase.test.ts index 019b833d386..b8b718a9669 100644 --- a/test/phases/learn-move-phase.test.ts +++ b/test/phases/learn-move-phase.test.ts @@ -56,9 +56,7 @@ describe("Learn Move Phase", () => { game.scene.ui.processInput(Button.ACTION); }); game.onNextPrompt("LearnMovePhase", UiMode.SUMMARY, () => { - for (let x = 0; x < moveSlotNum; x++) { - game.scene.ui.processInput(Button.DOWN); - } + game.scene.ui.setCursor(moveSlotNum); game.scene.ui.processInput(Button.ACTION); }); await game.phaseInterceptor.to(LearnMovePhase); @@ -88,9 +86,7 @@ describe("Learn Move Phase", () => { game.scene.ui.processInput(Button.ACTION); }); game.onNextPrompt("LearnMovePhase", UiMode.SUMMARY, () => { - for (let x = 0; x < 4; x++) { - game.scene.ui.processInput(Button.DOWN); // moves down 4 times to the 5th move slot - } + game.scene.ui.setCursor(4); game.scene.ui.processInput(Button.ACTION); }); game.onNextPrompt("LearnMovePhase", UiMode.CONFIRM, () => { @@ -102,64 +98,4 @@ describe("Learn Move Phase", () => { expect(bulbasaur.level).toBeGreaterThanOrEqual(levelReq); expect(bulbasaur.getMoveset().map(m => m?.moveId)).toEqual(prevMoveset); }); - - it("macro should add moves in free slots normally", async () => { - await game.classicMode.startBattle([Species.BULBASAUR]); - const bulbasaur = game.scene.getPlayerPokemon()!; - - game.move.changeMoveset(bulbasaur, [Moves.SPLASH, Moves.ABSORB, Moves.ACID]); - game.move.select(Moves.SPLASH); - await game.move.learnMove(Moves.SACRED_FIRE, 0, 1); - expect(bulbasaur.getMoveset().map(m => m?.moveId)).toEqual([ - Moves.SPLASH, - Moves.ABSORB, - Moves.ACID, - Moves.SACRED_FIRE, - ]); - }); - - it("macro should replace moves", async () => { - await game.classicMode.startBattle([Species.BULBASAUR]); - const bulbasaur = game.scene.getPlayerPokemon()!; - - game.move.changeMoveset(bulbasaur, [Moves.SPLASH, Moves.ABSORB, Moves.ACID, Moves.VINE_WHIP]); - game.move.select(Moves.SPLASH); - await game.move.learnMove(Moves.SACRED_FIRE, 0, 1); - expect(bulbasaur.getMoveset().map(m => m?.moveId)).toEqual([ - Moves.SPLASH, - Moves.SACRED_FIRE, - Moves.ACID, - Moves.VINE_WHIP, - ]); - }); - - it("macro should allow for cancelling move learning", async () => { - await game.classicMode.startBattle([Species.BULBASAUR]); - const bulbasaur = game.scene.getPlayerPokemon()!; - - game.move.changeMoveset(bulbasaur, [Moves.SPLASH, Moves.ABSORB, Moves.ACID, Moves.VINE_WHIP]); - game.move.select(Moves.SPLASH); - await game.move.learnMove(Moves.SACRED_FIRE, 0, 4); - expect(bulbasaur.getMoveset().map(m => m?.moveId)).toEqual([ - Moves.SPLASH, - Moves.ABSORB, - Moves.ACID, - Moves.VINE_WHIP, - ]); - }); - - it("macro works on off-field party members", async () => { - await game.classicMode.startBattle([Species.BULBASAUR, Species.SQUIRTLE]); - const squirtle = game.scene.getPlayerParty()[1]!; - - game.move.changeMoveset(squirtle, [Moves.SPLASH, Moves.WATER_GUN, Moves.FREEZE_DRY, Moves.GROWL]); - game.move.select(Moves.TACKLE); - await game.move.learnMove(Moves.SHELL_SMASH, 1, 0); - expect(squirtle.getMoveset().map(m => m?.moveId)).toEqual([ - Moves.SHELL_SMASH, - Moves.WATER_GUN, - Moves.FREEZE_DRY, - Moves.GROWL, - ]); - }); }); diff --git a/test/testUtils/gameManager.ts b/test/testUtils/gameManager.ts index 07cea3b1328..39b6000e308 100644 --- a/test/testUtils/gameManager.ts +++ b/test/testUtils/gameManager.ts @@ -1,7 +1,6 @@ import { updateUserInfo } from "#app/account"; import { BattlerIndex } from "#app/battle"; import BattleScene from "#app/battle-scene"; -import { getMoveTargets } from "#app/data/moves/move"; import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; import Trainer from "#app/field/trainer"; import { GameModes, getGameMode } from "#app/game-mode"; @@ -11,7 +10,6 @@ import overrides from "#app/overrides"; import { CheckSwitchPhase } from "#app/phases/check-switch-phase"; import { CommandPhase } from "#app/phases/command-phase"; import { EncounterPhase } from "#app/phases/encounter-phase"; -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { FaintPhase } from "#app/phases/faint-phase"; import { LoginPhase } from "#app/phases/login-phase"; import { MovePhase } from "#app/phases/move-phase"; @@ -31,11 +29,9 @@ import type PartyUiHandler from "#app/ui/party-ui-handler"; import type StarterSelectUiHandler from "#app/ui/starter-select-ui-handler"; import type TargetSelectUiHandler from "#app/ui/target-select-ui-handler"; import { isNullOrUndefined } from "#app/utils/common"; -import { BattleStyle } from "#enums/battle-style"; import { Button } from "#enums/buttons"; import { ExpGainsSpeed } from "#enums/exp-gains-speed"; import { ExpNotification } from "#enums/exp-notification"; -import type { Moves } from "#enums/moves"; import type { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { PlayerGender } from "#enums/player-gender"; import type { Species } from "#enums/species"; @@ -274,42 +270,6 @@ export default class GameManager { } } - /** - * @deprecated Use `game.classicMode.startBattle()` or `game.dailyMode.startBattle()` instead - * - * Transitions to the start of a battle. - * @param species - Optional array of species to start the battle with. - * @returns A promise that resolves when the battle is started. - */ - async startBattle(species?: Species[]) { - await this.classicMode.runToSummon(species); - - if (this.scene.battleStyle === BattleStyle.SWITCH) { - this.onNextPrompt( - "CheckSwitchPhase", - UiMode.CONFIRM, - () => { - this.setMode(UiMode.MESSAGE); - this.endPhase(); - }, - () => this.isCurrentPhase(CommandPhase) || this.isCurrentPhase(TurnInitPhase), - ); - - this.onNextPrompt( - "CheckSwitchPhase", - UiMode.CONFIRM, - () => { - this.setMode(UiMode.MESSAGE); - this.endPhase(); - }, - () => this.isCurrentPhase(CommandPhase) || this.isCurrentPhase(TurnInitPhase), - ); - } - - await this.phaseInterceptor.to(CommandPhase); - console.log("==================[New Turn]=================="); - } - /** * Emulate a player's target selection after a move is chosen, usually called automatically by {@linkcode MoveHelper.select}. * Will trigger during the next {@linkcode SelectTargetPhase} @@ -380,36 +340,6 @@ export default class GameManager { ); } - /** - * Forces the next enemy selecting a move to use the given move in its moveset against the - * given target (if applicable). - * @param moveId - The {@linkcode Moves | move} the enemy will use - * @param target - The {@linkcode BattlerIndex} of the target against which the enemy will use the given move; - * will use normal target selection priorities if omitted. - * @deprecated Use {@linkcode MoveHelper.forceEnemyMove} or {@linkcode MoveHelper.selectEnemyMove} - */ - async forceEnemyMove(moveId: Moves, target?: BattlerIndex) { - // Wait for the next EnemyCommandPhase to start - await this.phaseInterceptor.to(EnemyCommandPhase, false); - const enemy = this.scene.getEnemyField()[(this.scene.getCurrentPhase() as EnemyCommandPhase).getFieldIndex()]; - const legalTargets = getMoveTargets(enemy, moveId); - - vi.spyOn(enemy, "getNextMove").mockReturnValueOnce({ - move: moveId, - targets: - target !== undefined && !legalTargets.multiple && legalTargets.targets.includes(target) - ? [target] - : enemy.getNextTargets(moveId), - }); - - /** - * Run the EnemyCommandPhase to completion. - * This allows this function to be called consecutively to - * force a move for each enemy in a double battle. - */ - await this.phaseInterceptor.to(EnemyCommandPhase); - } - forceEnemyToSwitch() { const originalMatchupScore = Trainer.prototype.getPartyMemberMatchupScores; Trainer.prototype.getPartyMemberMatchupScores = () => { diff --git a/test/testUtils/helpers/moveHelper.ts b/test/testUtils/helpers/moveHelper.ts index ab10486867d..b3cdffeb636 100644 --- a/test/testUtils/helpers/moveHelper.ts +++ b/test/testUtils/helpers/moveHelper.ts @@ -1,12 +1,10 @@ import type { BattlerIndex } from "#app/battle"; import { getMoveTargets } from "#app/data/moves/move"; -import { Button } from "#app/enums/buttons"; import type Pokemon from "#app/field/pokemon"; import { PokemonMove } from "#app/field/pokemon"; import Overrides from "#app/overrides"; import type { CommandPhase } from "#app/phases/command-phase"; import type { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { LearnMovePhase } from "#app/phases/learn-move-phase"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { Command } from "#app/ui/command-ui-handler"; import { Moves } from "#enums/moves"; @@ -233,39 +231,4 @@ export class MoveHelper extends GameManagerHelper { */ await this.game.phaseInterceptor.to("EnemyCommandPhase"); } - - /** - * Simulates learning a move for a player pokemon. - * @param move The {@linkcode Moves} being learnt - * @param partyIndex The party position of the {@linkcode PlayerPokemon} learning the move (defaults to 0) - * @param moveSlotIndex The INDEX (0-4) of the move slot to replace if existent move slots are full; - * defaults to 0 (first slot) and 4 aborts the procedure - * @returns a promise that resolves once the move has been successfully learnt - */ - public async learnMove(move: Moves | number, partyIndex = 0, moveSlotIndex = 0) { - return new Promise(async (resolve, reject) => { - this.game.scene.pushPhase(new LearnMovePhase(partyIndex, move)); - - // if slots are full, queue up inputs to replace existing moves - if (this.game.scene.getPlayerParty()[partyIndex].moveset.filter(m => m).length === 4) { - this.game.onNextPrompt("LearnMovePhase", UiMode.CONFIRM, () => { - this.game.scene.ui.processInput(Button.ACTION); // "Should a move be forgotten and replaced with XXX?" - }); - this.game.onNextPrompt("LearnMovePhase", UiMode.SUMMARY, () => { - for (let x = 0; x < (moveSlotIndex ?? 0); x++) { - this.game.scene.ui.processInput(Button.DOWN); // Scrolling in summary pane to move position - } - this.game.scene.ui.processInput(Button.ACTION); - if (moveSlotIndex === 4) { - this.game.onNextPrompt("LearnMovePhase", UiMode.CONFIRM, () => { - this.game.scene.ui.processInput(Button.ACTION); // "Give up on learning XXX?" - }); - } - }); - } - - await this.game.phaseInterceptor.to(LearnMovePhase).catch(e => reject(e)); - resolve(); - }); - } } diff --git a/test/ui/type-hints.test.ts b/test/ui/type-hints.test.ts index 2051af76754..b32f5ed9b88 100644 --- a/test/ui/type-hints.test.ts +++ b/test/ui/type-hints.test.ts @@ -99,8 +99,8 @@ describe("UI - Type Hints", () => { // Use soak to change type of remaining abra to water game.move.select(Moves.SOAK, 1); - await game.forceEnemyMove(Moves.SPLASH); - await game.forceEnemyMove(Moves.TELEPORT); + await game.move.selectEnemyMove(Moves.SPLASH); + await game.move.selectEnemyMove(Moves.TELEPORT); await game.toNextTurn(); game.onNextPrompt("CommandPhase", UiMode.COMMAND, () => { From ccd9480240ea26285683fb997fcb1af67e3d4a9b Mon Sep 17 00:00:00 2001 From: Lugiad <2070109+Adri1@users.noreply.github.com> Date: Sat, 31 May 2025 01:54:17 +0200 Subject: [PATCH 11/15] [Localization] Secondary pending languages inclusion (#5903) * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Update mysterious-chest-dialogue.json * Update mysterious-chest-dialogue.json * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Update i18n.ts * Update settings.ts * Update settings-display-ui-handler.ts * Update starter-select-ui-handler.ts * Update i18n.ts * Update i18n.ts * Update settings.ts * Update settings-display-ui-handler.ts * Update i18n.ts * Update starter-select-ui-handler.ts * Update utils.ts * Update utils.ts * Add files via upload * Rename statuses_dk.json to statuses_da.json * Update statuses_da.json * Update and rename types_dk.json to types_da.json * Rename statuses_dk.png to statuses_da.png * Rename types_dk.png to types_da.png * Delete src/locales/dk directory * Add files via upload * Apply suggestions from code review * Delete src/locales/da directory * Delete src/locales/tr directory * Update i18n.ts * Update i18n.ts * Update utils.ts * Main -> Beta (1.1.6) (#4751) * Comment out startGame call on manifest fetch failure * [Hotfix] Fix status damage triggering before berry usage (#4732) * [Hotfix] Fix Eternatus egg tier (#4734) * [Hotfix] Fix manifest getting loaded before the game is initialized (#4739) * fix locales path for offline builds (#4739) * [Sprite] Hotfix cut off Binacle sprite (#4741) * [Sprite][hotfix] Fixed cropping on 658 static greninja and ash greninja (#4743) * [Sprite][hotfix] Fixed cropping on static greninja and ash greninja * [Hotfix] Fix crash when Mist would block a stat drop (#4746) --------- Co-authored-by: Frederico Santos Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com> Co-authored-by: chaosgrimmon <31082757+chaosgrimmon@users.noreply.github.com> Co-authored-by: pom-eranian * Update settings-display-ui-handler.ts * Delete src/utils.ts * Update common.ts * Delete src/utils.ts * Update common.ts * Romanian workspace (#25) * Russian workspace (#26) * Update settings-display-ui-handler.ts * Update settings-display-ui-handler.ts * Update settings.ts * Update settings-display-ui-handler.ts * Update i18n.ts * Update settings.ts * Update settings-display-ui-handler.ts * Update common.ts * Update and rename statuses_ca-ES.json to statuses_ca.json * Update and rename types_ca-ES.json to types_ca.json * Add files via upload * Delete public/images/statuses_ca-ES.png * Delete public/images/types_ca-ES.png * Update locales submodule --------- Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com> Co-authored-by: Frederico Santos Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com> Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com> Co-authored-by: chaosgrimmon <31082757+chaosgrimmon@users.noreply.github.com> Co-authored-by: pom-eranian Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- .../{statuses_ca-ES.json => statuses_ca.json} | 2 +- .../{statuses_ca-ES.png => statuses_ca.png} | Bin public/images/statuses_da.json | 188 ++++++++ public/images/statuses_da.png | Bin 0 -> 2355 bytes public/images/statuses_ro.json | 188 ++++++++ public/images/statuses_ro.png | Bin 0 -> 2111 bytes public/images/statuses_ru.json | 188 ++++++++ public/images/statuses_ru.png | Bin 0 -> 2091 bytes public/images/statuses_tr.json | 188 ++++++++ public/images/statuses_tr.png | Bin 0 -> 441 bytes .../{types_ca-ES.json => types_ca.json} | 2 +- .../images/{types_ca-ES.png => types_ca.png} | Bin public/images/types_da.json | 440 ++++++++++++++++++ public/images/types_da.png | Bin 0 -> 6247 bytes public/images/types_ro.json | 440 ++++++++++++++++++ public/images/types_ro.png | Bin 0 -> 6536 bytes public/images/types_ru.json | 440 ++++++++++++++++++ public/images/types_ru.png | Bin 0 -> 7570 bytes public/images/types_tr.json | 440 ++++++++++++++++++ public/images/types_tr.png | Bin 0 -> 4467 bytes public/locales | 2 +- src/plugins/i18n.ts | 6 +- src/system/settings/settings.ts | 44 +- .../settings/settings-display-ui-handler.ts | 64 ++- src/ui/starter-select-ui-handler.ts | 18 + src/utils/common.ts | 6 +- 26 files changed, 2615 insertions(+), 41 deletions(-) rename public/images/{statuses_ca-ES.json => statuses_ca.json} (98%) rename public/images/{statuses_ca-ES.png => statuses_ca.png} (100%) create mode 100644 public/images/statuses_da.json create mode 100644 public/images/statuses_da.png create mode 100644 public/images/statuses_ro.json create mode 100644 public/images/statuses_ro.png create mode 100644 public/images/statuses_ru.json create mode 100644 public/images/statuses_ru.png create mode 100644 public/images/statuses_tr.json create mode 100644 public/images/statuses_tr.png rename public/images/{types_ca-ES.json => types_ca.json} (99%) rename public/images/{types_ca-ES.png => types_ca.png} (100%) create mode 100644 public/images/types_da.json create mode 100644 public/images/types_da.png create mode 100644 public/images/types_ro.json create mode 100644 public/images/types_ro.png create mode 100644 public/images/types_ru.json create mode 100644 public/images/types_ru.png create mode 100644 public/images/types_tr.json create mode 100644 public/images/types_tr.png diff --git a/public/images/statuses_ca-ES.json b/public/images/statuses_ca.json similarity index 98% rename from public/images/statuses_ca-ES.json rename to public/images/statuses_ca.json index be1b78e0e41..6ff0f74a73b 100644 --- a/public/images/statuses_ca-ES.json +++ b/public/images/statuses_ca.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "statuses_ca_ES.png", + "image": "statuses_ca.png", "format": "RGBA8888", "size": { "w": 22, diff --git a/public/images/statuses_ca-ES.png b/public/images/statuses_ca.png similarity index 100% rename from public/images/statuses_ca-ES.png rename to public/images/statuses_ca.png diff --git a/public/images/statuses_da.json b/public/images/statuses_da.json new file mode 100644 index 00000000000..b9bf56324de --- /dev/null +++ b/public/images/statuses_da.json @@ -0,0 +1,188 @@ +{ + "textures": [ + { + "image": "statuses_da.png", + "format": "RGBA8888", + "size": { + "w": 22, + "h": 64 + }, + "scale": 1, + "frames": [ + { + "filename": "pokerus", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 22, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 22, + "h": 8 + }, + "frame": { + "x": 0, + "y": 0, + "w": 22, + "h": 8 + } + }, + { + "filename": "burn", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 8, + "w": 20, + "h": 8 + } + }, + { + "filename": "faint", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 16, + "w": 20, + "h": 8 + } + }, + { + "filename": "freeze", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 24, + "w": 20, + "h": 8 + } + }, + { + "filename": "paralysis", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 32, + "w": 20, + "h": 8 + } + }, + { + "filename": "poison", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 40, + "w": 20, + "h": 8 + } + }, + { + "filename": "sleep", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 48, + "w": 20, + "h": 8 + } + }, + { + "filename": "toxic", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 56, + "w": 20, + "h": 8 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:37686e85605d17b806f22d43081c1139:70535ffee63ba61b3397d8470c2c8982:e6649238c018d3630e55681417c698ca$" + } +} diff --git a/public/images/statuses_da.png b/public/images/statuses_da.png new file mode 100644 index 0000000000000000000000000000000000000000..02780bddd98699e74c276fb44903db9426131710 GIT binary patch literal 2355 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 BAo>6R literal 0 HcmV?d00001 diff --git a/public/images/statuses_ru.json b/public/images/statuses_ru.json new file mode 100644 index 00000000000..5e4790b2874 --- /dev/null +++ b/public/images/statuses_ru.json @@ -0,0 +1,188 @@ +{ + "textures": [ + { + "image": "statuses_ru.png", + "format": "RGBA8888", + "size": { + "w": 22, + "h": 64 + }, + "scale": 1, + "frames": [ + { + "filename": "pokerus", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 22, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 22, + "h": 8 + }, + "frame": { + "x": 0, + "y": 0, + "w": 22, + "h": 8 + } + }, + { + "filename": "burn", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 8, + "w": 20, + "h": 8 + } + }, + { + "filename": "faint", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 16, + "w": 20, + "h": 8 + } + }, + { + "filename": "freeze", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 24, + "w": 20, + "h": 8 + } + }, + { + "filename": "paralysis", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 32, + "w": 20, + "h": 8 + } + }, + { + "filename": "poison", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 40, + "w": 20, + "h": 8 + } + }, + { + "filename": "sleep", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 48, + "w": 20, + "h": 8 + } + }, + { + "filename": "toxic", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 56, + "w": 20, + "h": 8 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:37686e85605d17b806f22d43081c1139:70535ffee63ba61b3397d8470c2c8982:e6649238c018d3630e55681417c698ca$" + } +} diff --git a/public/images/statuses_ru.png b/public/images/statuses_ru.png new file mode 100644 index 0000000000000000000000000000000000000000..1da8b66a4f8be4867fe00ade4eed9bbd67e0e449 GIT binary patch literal 2091 zcmbVN2~ZPP7~ZHwjp7L6fmU5Z#RHPv4G_peB1c4UNI;GOkE+XNlkAW^OcoNninfX( z$XF1m7ebL*McYE7RjgPnU=g)C7AjD+BI1p8s@PiFZa6a9(Q)dVdHb&KegFM-V~l2w zvv9l+008I62vsaUj^TUo5GVdS3D3O14@23A`DOqZHp<=w!1kTv0ANr%8K1-@siRPw zp(L1=NhTy#isjJ&5H!omVt5L{fysoPq!psBs%jBPY89eHKQ*jo!w3TzvD`$&E!V{3 z%TsW}%xg3I}kW?z>5n^*X&0$tCZT9GAP!VR_M6w*o(4d_WOJ-6zg^1U* z*93}n(9-5UH}MXGtQZR+64-814^WFcaBQl{*dttvLxho_2%0nVSj2&44GhPa4a{q( z9mg*T;9aX$J7m047m9L-Fmtohcr*GO@=CNhKAk0?Si;Ptns8!v8n32@-5M4RGZ7fa znBp16*dM5vewD$nFmQSzNoyI4dBzKHLWOaJLL`NyzG7G|M*QPpDT*Lo{1=9MacV|O z>e63@llr56@JmoWTeKL5y%DU%Q5|EVFy2;@!t?~h(s~i-@E{t-7#R~Um{-lGM+>zY zjik*SM&m@JN+IISm5`(s^_O7;=I;lK310*kYcXFRu^dMN#ByCgKyorJ*JX)OkVCw*P4dogB4$5}8F5u)c^^@cQpc)cNe_4S$n{nxslvllA0AI_J* zed>63_=V%;B53}(GV$-yG(liC01S8#sS1ftT6eZ^3ioO7$n_ssH*EFVa{BoGxvF03qP;Oii?^mEN;9sIKOL0$yZ-;MU!feg=MnBnz83y zqGxWm)l^>oJWs8Q0!I|%(UcG@Z%3-p<;4Obl;T z6|DElY9AN3`I@c6Z|h`lc%`+JscdBv3rE~x-N(%hJhi9wuRCWuKXbmdf6|kN%K6Bo z<^!WIJ?OrM5A{oT%G0M6L!N8W8k6)#L)VsZ6O;ve3u8+Yy%tVbJO@1tg{RJHvDyZ} zi;6zXUFTD56W z33t11H3wz1E6+C{$$9K)8g=f^`IDb<`>!q>uKX!DeC9k2wbHiB>q?We@Tkp`wIb(kbvSJLmK4Z=-oxl+~les_s^V{&~YJjfp_P! zWlj5XJ4(#9)AS>iGDjC=W6RwZZE0#~TCcAtb!&4M01_x7%KzeP1y+B2_I7G_xHE-s8-)5{aFy1?zvW;$NS#fE(5J*QH>;TO# zqj-;m3y@V^jDKUiXB4T~am+que5?h|bD2QvJlYc8%_G~aG}z~@!Q2dSmt873PQXLU zg+O|T!QM`p^A|K=@Suc&?b@)04> jC;!H^NCF;OJ`4N>xriuwM360I00000NkvXXu0mjf67avU literal 0 HcmV?d00001 diff --git a/public/images/types_ca-ES.json b/public/images/types_ca.json similarity index 99% rename from public/images/types_ca-ES.json rename to public/images/types_ca.json index fa3abaaf259..aaa04fbad36 100644 --- a/public/images/types_ca-ES.json +++ b/public/images/types_ca.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "types_ca-ES.png", + "image": "types_ca.png", "format": "RGBA8888", "size": { "w": 32, diff --git a/public/images/types_ca-ES.png b/public/images/types_ca.png similarity index 100% rename from public/images/types_ca-ES.png rename to public/images/types_ca.png diff --git a/public/images/types_da.json b/public/images/types_da.json new file mode 100644 index 00000000000..d1c01de1e0e --- /dev/null +++ b/public/images/types_da.json @@ -0,0 +1,440 @@ +{ + "textures": [ + { + "image": "types_da.png", + "format": "RGBA8888", + "size": { + "w": 32, + "h": 280 + }, + "scale": 1, + "frames": [ + { + "filename": "unknown", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + } + }, + { + "filename": "bug", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 14, + "w": 32, + "h": 14 + } + }, + { + "filename": "dark", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 28, + "w": 32, + "h": 14 + } + }, + { + "filename": "dragon", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 42, + "w": 32, + "h": 14 + } + }, + { + "filename": "electric", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 56, + "w": 32, + "h": 14 + } + }, + { + "filename": "fairy", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 70, + "w": 32, + "h": 14 + } + }, + { + "filename": "fighting", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 84, + "w": 32, + "h": 14 + } + }, + { + "filename": "fire", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 98, + "w": 32, + "h": 14 + } + }, + { + "filename": "flying", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 112, + "w": 32, + "h": 14 + } + }, + { + "filename": "ghost", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 126, + "w": 32, + "h": 14 + } + }, + { + "filename": "grass", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 140, + "w": 32, + "h": 14 + } + }, + { + "filename": "ground", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 154, + "w": 32, + "h": 14 + } + }, + { + "filename": "ice", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 168, + "w": 32, + "h": 14 + } + }, + { + "filename": "normal", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 182, + "w": 32, + "h": 14 + } + }, + { + "filename": "poison", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 196, + "w": 32, + "h": 14 + } + }, + { + "filename": "psychic", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 210, + "w": 32, + "h": 14 + } + }, + { + "filename": "rock", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 224, + "w": 32, + "h": 14 + } + }, + { + "filename": "steel", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 238, + "w": 32, + "h": 14 + } + }, + { + "filename": "water", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 252, + "w": 32, + "h": 14 + } + }, + { + "filename": "stellar", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 266, + "w": 32, + "h": 14 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:f14cf47d9a8f1d40c8e03aa6ba00fff3:6fc4227b57a95d429a1faad4280f7ec8:5961efbfbf4c56b8745347e7a663a32f$" + } +} diff --git a/public/images/types_da.png b/public/images/types_da.png new file mode 100644 index 0000000000000000000000000000000000000000..f2b7af8967aef2e29fa68d2dd0cecfaf99562458 GIT binary patch literal 6247 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 literal 0 HcmV?d00001 diff --git a/public/images/types_ro.json b/public/images/types_ro.json new file mode 100644 index 00000000000..efdbeba38a0 --- /dev/null +++ b/public/images/types_ro.json @@ -0,0 +1,440 @@ +{ + "textures": [ + { + "image": "types_ro.png", + "format": "RGBA8888", + "size": { + "w": 32, + "h": 280 + }, + "scale": 1, + "frames": [ + { + "filename": "unknown", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + } + }, + { + "filename": "bug", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 14, + "w": 32, + "h": 14 + } + }, + { + "filename": "dark", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 28, + "w": 32, + "h": 14 + } + }, + { + "filename": "dragon", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 42, + "w": 32, + "h": 14 + } + }, + { + "filename": "electric", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 56, + "w": 32, + "h": 14 + } + }, + { + "filename": "fairy", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 70, + "w": 32, + "h": 14 + } + }, + { + "filename": "fighting", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 84, + "w": 32, + "h": 14 + } + }, + { + "filename": "fire", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 98, + "w": 32, + "h": 14 + } + }, + { + "filename": "flying", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 112, + "w": 32, + "h": 14 + } + }, + { + "filename": "ghost", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 126, + "w": 32, + "h": 14 + } + }, + { + "filename": "grass", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 140, + "w": 32, + "h": 14 + } + }, + { + "filename": "ground", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 154, + "w": 32, + "h": 14 + } + }, + { + "filename": "ice", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 168, + "w": 32, + "h": 14 + } + }, + { + "filename": "normal", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 182, + "w": 32, + "h": 14 + } + }, + { + "filename": "poison", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 196, + "w": 32, + "h": 14 + } + }, + { + "filename": "psychic", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 210, + "w": 32, + "h": 14 + } + }, + { + "filename": "rock", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 224, + "w": 32, + "h": 14 + } + }, + { + "filename": "steel", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 238, + "w": 32, + "h": 14 + } + }, + { + "filename": "water", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 252, + "w": 32, + "h": 14 + } + }, + { + "filename": "stellar", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 266, + "w": 32, + "h": 14 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:f14cf47d9a8f1d40c8e03aa6ba00fff3:6fc4227b57a95d429a1faad4280f7ec8:5961efbfbf4c56b8745347e7a663a32f$" + } +} diff --git a/public/images/types_ro.png b/public/images/types_ro.png new file mode 100644 index 0000000000000000000000000000000000000000..35b09a37035c42476115e2bbf166650358cc5a92 GIT binary patch literal 6536 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 LBtrK7-_HFH=U70Y literal 0 HcmV?d00001 diff --git a/public/images/types_ru.json b/public/images/types_ru.json new file mode 100644 index 00000000000..536a0e31929 --- /dev/null +++ b/public/images/types_ru.json @@ -0,0 +1,440 @@ +{ + "textures": [ + { + "image": "types_ru.png", + "format": "RGBA8888", + "size": { + "w": 32, + "h": 280 + }, + "scale": 1, + "frames": [ + { + "filename": "unknown", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + } + }, + { + "filename": "bug", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 14, + "w": 32, + "h": 14 + } + }, + { + "filename": "dark", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 28, + "w": 32, + "h": 14 + } + }, + { + "filename": "dragon", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 42, + "w": 32, + "h": 14 + } + }, + { + "filename": "electric", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 56, + "w": 32, + "h": 14 + } + }, + { + "filename": "fairy", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 70, + "w": 32, + "h": 14 + } + }, + { + "filename": "fighting", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 84, + "w": 32, + "h": 14 + } + }, + { + "filename": "fire", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 98, + "w": 32, + "h": 14 + } + }, + { + "filename": "flying", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 112, + "w": 32, + "h": 14 + } + }, + { + "filename": "ghost", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 126, + "w": 32, + "h": 14 + } + }, + { + "filename": "grass", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 140, + "w": 32, + "h": 14 + } + }, + { + "filename": "ground", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 154, + "w": 32, + "h": 14 + } + }, + { + "filename": "ice", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 168, + "w": 32, + "h": 14 + } + }, + { + "filename": "normal", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 182, + "w": 32, + "h": 14 + } + }, + { + "filename": "poison", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 196, + "w": 32, + "h": 14 + } + }, + { + "filename": "psychic", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 210, + "w": 32, + "h": 14 + } + }, + { + "filename": "rock", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 224, + "w": 32, + "h": 14 + } + }, + { + "filename": "steel", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 238, + "w": 32, + "h": 14 + } + }, + { + "filename": "water", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 252, + "w": 32, + "h": 14 + } + }, + { + "filename": "stellar", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 266, + "w": 32, + "h": 14 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:f14cf47d9a8f1d40c8e03aa6ba00fff3:6fc4227b57a95d429a1faad4280f7ec8:5961efbfbf4c56b8745347e7a663a32f$" + } +} diff --git a/public/images/types_ru.png b/public/images/types_ru.png new file mode 100644 index 0000000000000000000000000000000000000000..571e162e8dc9f3da298566982b2634402f9ff570 GIT binary patch literal 7570 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

4oN6_d$h(=No=`(HwA?WO-Ub)vY~UtQ(D G`@aB6|Ab5c literal 0 HcmV?d00001 diff --git a/public/images/types_tr.json b/public/images/types_tr.json new file mode 100644 index 00000000000..ee82cce3fb4 --- /dev/null +++ b/public/images/types_tr.json @@ -0,0 +1,440 @@ +{ + "textures": [ + { + "image": "types_tr.png", + "format": "RGBA8888", + "size": { + "w": 32, + "h": 280 + }, + "scale": 1, + "frames": [ + { + "filename": "unknown", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + } + }, + { + "filename": "bug", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 14, + "w": 32, + "h": 14 + } + }, + { + "filename": "dark", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 28, + "w": 32, + "h": 14 + } + }, + { + "filename": "dragon", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 42, + "w": 32, + "h": 14 + } + }, + { + "filename": "electric", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 56, + "w": 32, + "h": 14 + } + }, + { + "filename": "fairy", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 70, + "w": 32, + "h": 14 + } + }, + { + "filename": "fighting", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 84, + "w": 32, + "h": 14 + } + }, + { + "filename": "fire", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 98, + "w": 32, + "h": 14 + } + }, + { + "filename": "flying", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 112, + "w": 32, + "h": 14 + } + }, + { + "filename": "ghost", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 126, + "w": 32, + "h": 14 + } + }, + { + "filename": "grass", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 140, + "w": 32, + "h": 14 + } + }, + { + "filename": "ground", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 154, + "w": 32, + "h": 14 + } + }, + { + "filename": "ice", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 168, + "w": 32, + "h": 14 + } + }, + { + "filename": "normal", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 182, + "w": 32, + "h": 14 + } + }, + { + "filename": "poison", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 196, + "w": 32, + "h": 14 + } + }, + { + "filename": "psychic", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 210, + "w": 32, + "h": 14 + } + }, + { + "filename": "rock", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 224, + "w": 32, + "h": 14 + } + }, + { + "filename": "steel", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 238, + "w": 32, + "h": 14 + } + }, + { + "filename": "water", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 252, + "w": 32, + "h": 14 + } + }, + { + "filename": "stellar", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 266, + "w": 32, + "h": 14 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:f14cf47d9a8f1d40c8e03aa6ba00fff3:6fc4227b57a95d429a1faad4280f7ec8:5961efbfbf4c56b8745347e7a663a32f$" + } +} diff --git a/public/images/types_tr.png b/public/images/types_tr.png new file mode 100644 index 0000000000000000000000000000000000000000..8b644f1041c4236c9e729b30c529149e209a286c GIT binary patch literal 4467 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 = [ unicodeRange: rangesByLanguage.chinese, }), extraOptions: { sizeAdjust: "70%", format: "woff2" }, - only: ["en", "es", "fr", "it", "de", "zh", "pt", "ko", "ca"], + only: ["en", "es", "fr", "it", "de", "zh", "pt", "ko", "ca", "da", "tr", "ro", "ru"], }, { face: new FontFace("pkmnems", "url(./fonts/unifont-15.1.05.subset.woff2)", { unicodeRange: rangesByLanguage.chinese, }), extraOptions: { format: "woff2" }, - only: ["en", "es", "fr", "it", "de", "zh", "pt", "ko", "ca"], + only: ["en", "es", "fr", "it", "de", "zh", "pt", "ko", "ca", "da", "tr", "ro", "ru"], }, // japanese { @@ -174,7 +174,7 @@ export async function initI18n(): Promise { "es-MX": ["es-ES", "en"], default: ["en"], }, - supportedLngs: ["en", "es-ES", "es-MX", "fr", "it", "de", "zh-CN", "zh-TW", "pt-BR", "ko", "ja", "ca-ES"], + supportedLngs: ["en", "es-ES", "es-MX", "fr", "it", "de", "zh-CN", "zh-TW", "pt-BR", "ko", "ja", "ca", "da", "tr", "ro", "ru"], backend: { loadPath(lng: string, [ns]: string[]) { let fileName: string; diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index 8bbba267bd6..8a0e4f8cdc0 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -921,10 +921,6 @@ export function setSetting(setting: string, value: number): boolean { label: "Español (LATAM)", handler: () => changeLocaleHandler("es-MX"), }, - { - label: "Italiano", - handler: () => changeLocaleHandler("it"), - }, { label: "Français", handler: () => changeLocaleHandler("fr"), @@ -933,18 +929,14 @@ export function setSetting(setting: string, value: number): boolean { label: "Deutsch", handler: () => changeLocaleHandler("de"), }, + { + label: "Italiano", + handler: () => changeLocaleHandler("it"), + }, { label: "Português (BR)", handler: () => changeLocaleHandler("pt-BR"), }, - { - label: "简体中文", - handler: () => changeLocaleHandler("zh-CN"), - }, - { - label: "繁體中文", - handler: () => changeLocaleHandler("zh-TW"), - }, { label: "한국어", handler: () => changeLocaleHandler("ko"), @@ -954,8 +946,32 @@ export function setSetting(setting: string, value: number): boolean { handler: () => changeLocaleHandler("ja"), }, { - label: "Català", - handler: () => changeLocaleHandler("ca-ES"), + label: "简体中文", + handler: () => changeLocaleHandler("zh-CN"), + }, + { + label: "繁體中文", + handler: () => changeLocaleHandler("zh-TW"), + }, + { + label: "Català (Needs Help)", + handler: () => changeLocaleHandler("ca"), + }, + { + label: "Türkçe (Needs Help)", + handler: () => changeLocaleHandler("tr") + }, + { + label: "Русский (Needs Help)", + handler: () => changeLocaleHandler("ru"), + }, + { + label: "Dansk (Needs Help)", + handler: () => changeLocaleHandler("da") + }, + { + label: "Română (Needs Help)", + handler: () => changeLocaleHandler("ro") }, { label: i18next.t("settings:back"), diff --git a/src/ui/settings/settings-display-ui-handler.ts b/src/ui/settings/settings-display-ui-handler.ts index 4878bae72cb..0636bd25567 100644 --- a/src/ui/settings/settings-display-ui-handler.ts +++ b/src/ui/settings/settings-display-ui-handler.ts @@ -39,12 +39,6 @@ export default class SettingsDisplayUiHandler extends AbstractSettingsUiHandler label: "Español (LATAM)", }; break; - case "it": - this.settings[languageIndex].options[0] = { - value: "Italiano", - label: "Italiano", - }; - break; case "fr": this.settings[languageIndex].options[0] = { value: "Français", @@ -57,24 +51,18 @@ export default class SettingsDisplayUiHandler extends AbstractSettingsUiHandler label: "Deutsch", }; break; + case "it": + this.settings[languageIndex].options[0] = { + value: "Italiano", + label: "Italiano", + }; + break; case "pt-BR": this.settings[languageIndex].options[0] = { value: "Português (BR)", label: "Português (BR)", }; break; - case "zh-CN": - this.settings[languageIndex].options[0] = { - value: "简体中文", - label: "简体中文", - }; - break; - case "zh-TW": - this.settings[languageIndex].options[0] = { - value: "繁體中文", - label: "繁體中文", - }; - break; case "ko": case "ko-KR": this.settings[languageIndex].options[0] = { @@ -88,10 +76,46 @@ export default class SettingsDisplayUiHandler extends AbstractSettingsUiHandler label: "日本語", }; break; - case "ca-ES": + case "zh-CN": + this.settings[languageIndex].options[0] = { + value: "简体中文", + label: "简体中文", + }; + break; + case "zh-TW": + this.settings[languageIndex].options[0] = { + value: "繁體中文", + label: "繁體中文", + }; + break; + case "ca": this.settings[languageIndex].options[0] = { value: "Català", - label: "Català", + label: "Català (Needs Help)", + }; + break; + case "tr": + this.settings[languageIndex].options[0] = { + value: "Türkçe", + label: "Türkçe (Needs Help)", + }; + break; + case "ru": + this.settings[languageIndex].options[0] = { + value: "Русский", + label: "Русский (Needs Help)", + }; + break; + case "da": + this.settings[languageIndex].options[0] = { + value: "Dansk", + label: "Dansk (Needs Help)", + }; + break; + case "ro": + this.settings[languageIndex].options[0] = { + value: "Română", + label: "Română (Needs Help)", }; break; default: diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index ff2298f268d..945ddaa6ed4 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -162,6 +162,24 @@ const languageSettings: { [key: string]: LanguageSetting } = { starterInfoYOffset: 0.5, starterInfoXPos: 29, }, + da:{ + starterInfoTextSize: "56px", + instructionTextSize: "38px", + }, + tr:{ + starterInfoTextSize: "56px", + instructionTextSize: "38px", + }, + ro:{ + starterInfoTextSize: "56px", + instructionTextSize: "38px", + }, + ru: { + starterInfoTextSize: "46px", + instructionTextSize: "38px", + starterInfoYOffset: 0.5, + starterInfoXPos: 26, + }, }; const valueReductionMax = 2; diff --git a/src/utils/common.ts b/src/utils/common.ts index a018b49da3c..1c7ea60da16 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -435,14 +435,18 @@ export function hasAllLocalizedSprites(lang?: string): boolean { case "es-ES": case "es-MX": case "fr": + case "da": case "de": case "it": case "zh-CN": case "zh-TW": case "pt-BR": + case "ro": + case "tr": case "ko": case "ja": - case "ca-ES": + case "ca": + case "ru": return true; default: return false; From 831381e4ce7adf712cb6cf5b0854893e5775fc1d Mon Sep 17 00:00:00 2001 From: SmhMyHead <191356399+SmhMyHead@users.noreply.github.com> Date: Sat, 31 May 2025 17:54:02 +0200 Subject: [PATCH 12/15] [UI/UIX] Default cursor to new move when learning a move (#5908) --- src/ui/summary-ui-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index 24e790f7c61..a6f640b436f 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -1239,7 +1239,7 @@ export default class SummaryUiHandler extends UiHandler { this.moveSelect = true; this.extraMoveRowContainer.setVisible(true); this.selectedMoveIndex = -1; - this.setCursor(0); + this.setCursor(this.summaryUiMode === SummaryUiMode.LEARN_MOVE ? 4 : 0); this.showMoveEffect(); } From 7859fea26b77cc9e93ffbc879da3439928c4367c Mon Sep 17 00:00:00 2001 From: Lugiad <2070109+Adri1@users.noreply.github.com> Date: Sun, 1 Jun 2025 21:37:47 +0200 Subject: [PATCH 13/15] [i18n] Translatable Game Speed values (#5916) --- public/locales | 2 +- src/system/settings/settings.ts | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/locales b/public/locales index 88c60b6f8d5..4dab23d6a78 160000 --- a/public/locales +++ b/public/locales @@ -1 +1 @@ -Subproject commit 88c60b6f8d5babfb0c157b31ceff22486712295c +Subproject commit 4dab23d6a78b6cf32db43c9953e3c2000f448007 diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index 8a0e4f8cdc0..69abc669870 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -193,35 +193,35 @@ export const Setting: Array = [ options: [ { value: "1", - label: "1x", + label: i18next.t("settings:gameSpeed1x"), }, { value: "1.25", - label: "1.25x", + label: i18next.t("settings:gameSpeed1_25x"), }, { value: "1.5", - label: "1.5x", + label: i18next.t("settings:gameSpeed1_5x"), }, { value: "2", - label: "2x", + label: i18next.t("settings:gameSpeed2x"), }, { value: "2.5", - label: "2.5x", + label: i18next.t("settings:gameSpeed2_5x"), }, { value: "3", - label: "3x", + label: i18next.t("settings:gameSpeed3x"), }, { value: "4", - label: "4x", + label: i18next.t("settings:gameSpeed4x"), }, { value: "5", - label: "5x", + label: i18next.t("settings:gameSpeed5x"), }, ], default: 3, From 369b3307cdc46317a65a4ad1707399090a29ed2c Mon Sep 17 00:00:00 2001 From: Lugiad <2070109+Adri1@users.noreply.github.com> Date: Mon, 2 Jun 2025 00:40:57 +0200 Subject: [PATCH 14/15] [UI/UX] Moves menu position adjustments (#5917) --- src/ui/fight-ui-handler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 6dbbcd47300..208e627023b 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -292,7 +292,7 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { this.accuracyText.setVisible(hasMove); this.moveCategoryIcon.setVisible(hasMove); - this.cursorObj.setPosition(13 + (cursor % 2 === 1 ? 100 : 0), -31 + (cursor >= 2 ? 15 : 0)); + this.cursorObj.setPosition(13 + (cursor % 2 === 1 ? 114 : 0), -31 + (cursor >= 2 ? 15 : 0)); return changed; } @@ -322,7 +322,7 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { const moveset = pokemon.getMoveset(); for (let moveIndex = 0; moveIndex < 4; moveIndex++) { - const moveText = addTextObject(moveIndex % 2 === 0 ? 0 : 100, moveIndex < 2 ? 0 : 16, "-", TextStyle.WINDOW); + const moveText = addTextObject(moveIndex % 2 === 0 ? 0 : 114, moveIndex < 2 ? 0 : 16, "-", TextStyle.WINDOW); moveText.setName("text-empty-move"); if (moveIndex < moveset.length) { From cdda539ac5609c1f0fa5da0114ee51d5bff82bf5 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Sun, 1 Jun 2025 18:45:30 -0400 Subject: [PATCH 15/15] [Test] Remove redundant entries and `Array.fill()` in moveset overrides (#5907) * Removed unneeded duplicate entries from movesets * Removed `array.fill` in moveset overrides * Reverted accidental changes --- test/abilities/aura_break.test.ts | 11 ++++++----- test/abilities/contrary.test.ts | 5 +---- test/abilities/ice_face.test.ts | 11 ++++------- test/abilities/libero.test.ts | 14 +++++++------- test/abilities/mycelium_might.test.ts | 18 ++++++++++-------- test/abilities/power_construct.test.ts | 9 +++++---- test/abilities/protean.test.ts | 14 +++++++------- test/abilities/sand_veil.test.ts | 16 +++++++++------- test/abilities/schooling.test.ts | 5 +---- test/abilities/screen_cleaner.test.ts | 7 +++---- test/abilities/stall.test.ts | 13 +++++++------ test/abilities/sweet_veil.test.ts | 13 +++++++------ test/abilities/synchronize.test.ts | 5 +---- test/abilities/unseen_fist.test.ts | 16 ++++++++-------- test/battle/inverse_battle.test.ts | 4 +--- test/battle/special_battle.test.ts | 13 +++++++------ test/items/leek.test.ts | 2 +- test/items/leftovers.test.ts | 17 +++++++++-------- test/moves/astonish.test.ts | 15 ++++++++------- test/moves/aurora_veil.test.ts | 17 +++++++++-------- test/moves/chilly_reception.test.ts | 9 +++------ test/moves/double_team.test.ts | 15 ++++++++------- test/moves/dynamax_cannon.test.ts | 10 ++++++++-- test/moves/flower_shield.test.ts | 4 +--- test/moves/freezy_frost.test.ts | 4 ++-- test/moves/fusion_bolt.test.ts | 19 +++++++++---------- test/moves/fusion_flare.test.ts | 17 ++++++++--------- test/moves/fusion_flare_bolt.test.ts | 23 +++++++++++------------ test/moves/light_screen.test.ts | 15 ++++++++------- test/moves/magnet_rise.test.ts | 15 ++++++++------- test/moves/powder.test.ts | 6 +++--- test/moves/reflect.test.ts | 15 ++++++++------- test/moves/retaliate.test.ts | 2 +- test/moves/swallow.test.ts | 17 ++++++++--------- test/moves/tackle.test.ts | 15 ++++++++------- test/moves/throat_chop.test.ts | 4 ++-- test/moves/tidy_up.test.ts | 15 +++++---------- 37 files changed, 212 insertions(+), 218 deletions(-) diff --git a/test/abilities/aura_break.test.ts b/test/abilities/aura_break.test.ts index f88d7d875bf..5b2211d7b3c 100644 --- a/test/abilities/aura_break.test.ts +++ b/test/abilities/aura_break.test.ts @@ -24,11 +24,12 @@ describe("Abilities - Aura Break", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("single"); - game.override.moveset([Moves.MOONBLAST, Moves.DARK_PULSE, Moves.MOONBLAST, Moves.DARK_PULSE]); - game.override.enemyMoveset(Moves.SPLASH); - game.override.enemyAbility(Abilities.AURA_BREAK); - game.override.enemySpecies(Species.SHUCKLE); + game.override + .battleStyle("single") + .moveset([Moves.MOONBLAST, Moves.DARK_PULSE]) + .enemyMoveset(Moves.SPLASH) + .enemyAbility(Abilities.AURA_BREAK) + .enemySpecies(Species.SHUCKLE); }); it("reverses the effect of Fairy Aura", async () => { diff --git a/test/abilities/contrary.test.ts b/test/abilities/contrary.test.ts index 929d620c232..99c5208f561 100644 --- a/test/abilities/contrary.test.ts +++ b/test/abilities/contrary.test.ts @@ -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()!; diff --git a/test/abilities/ice_face.test.ts b/test/abilities/ice_face.test.ts index 38269c29af1..cb9530fe355 100644 --- a/test/abilities/ice_face.test.ts +++ b/test/abilities/ice_face.test.ts @@ -106,8 +106,7 @@ describe("Abilities - Ice Face", () => { }); it("transforms to Ice Face when Hail or Snow starts", async () => { - game.override.moveset([Moves.QUICK_ATTACK]); - game.override.enemyMoveset([Moves.HAIL, Moves.HAIL, Moves.HAIL, Moves.HAIL]); + game.override.moveset([Moves.QUICK_ATTACK]).enemyMoveset(Moves.HAIL); await game.classicMode.startBattle([Species.MAGIKARP]); @@ -128,8 +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]); - game.override.moveset([Moves.SNOWSCAPE]); + game.override.enemyMoveset(Moves.TACKLE).moveset([Moves.SNOWSCAPE]); await game.classicMode.startBattle([Species.EISCUE, Species.NINJASK]); @@ -155,8 +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); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + game.override.enemySpecies(Species.SHUCKLE).enemyMoveset(Moves.TACKLE); await game.classicMode.startBattle([Species.EISCUE]); @@ -175,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]); diff --git a/test/abilities/libero.test.ts b/test/abilities/libero.test.ts index ea4e288bdb0..a099e6ff047 100644 --- a/test/abilities/libero.test.ts +++ b/test/abilities/libero.test.ts @@ -29,11 +29,12 @@ describe("Abilities - Libero", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("single"); - game.override.ability(Abilities.LIBERO); - game.override.startingLevel(100); - game.override.enemySpecies(Species.RATTATA); - game.override.enemyMoveset([Moves.ENDURE, Moves.ENDURE, Moves.ENDURE, Moves.ENDURE]); + game.override + .battleStyle("single") + .ability(Abilities.LIBERO) + .startingLevel(100) + .enemySpecies(Species.RATTATA) + .enemyMoveset(Moves.ENDURE); }); test("ability applies and changes a pokemon's type", async () => { @@ -173,8 +174,7 @@ describe("Abilities - Libero", () => { }); test("ability applies correctly even if the pokemon's move is protected against", async () => { - game.override.moveset([Moves.TACKLE]); - game.override.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]); + game.override.moveset([Moves.TACKLE]).enemyMoveset(Moves.PROTECT); await game.classicMode.startBattle([Species.MAGIKARP]); diff --git a/test/abilities/mycelium_might.test.ts b/test/abilities/mycelium_might.test.ts index 18465f9b64e..9c898063201 100644 --- a/test/abilities/mycelium_might.test.ts +++ b/test/abilities/mycelium_might.test.ts @@ -24,13 +24,15 @@ describe("Abilities - Mycelium Might", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("single"); - game.override.disableCrits(); - game.override.enemySpecies(Species.SHUCKLE); - game.override.enemyAbility(Abilities.CLEAR_BODY); - game.override.enemyMoveset([Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK]); - game.override.ability(Abilities.MYCELIUM_MIGHT); - game.override.moveset([Moves.QUICK_ATTACK, Moves.BABY_DOLL_EYES]); + game.override + .battleStyle("single") + .disableCrits() + .enemySpecies(Species.SHUCKLE) + .enemyAbility(Abilities.CLEAR_BODY) + + .enemyMoveset(Moves.QUICK_ATTACK) + .ability(Abilities.MYCELIUM_MIGHT) + .moveset([Moves.QUICK_ATTACK, Moves.BABY_DOLL_EYES]); }); /** @@ -64,7 +66,7 @@ describe("Abilities - Mycelium Might", () => { }, 20000); 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(); diff --git a/test/abilities/power_construct.test.ts b/test/abilities/power_construct.test.ts index 0ff90a2c0df..67005f5c87e 100644 --- a/test/abilities/power_construct.test.ts +++ b/test/abilities/power_construct.test.ts @@ -25,10 +25,11 @@ describe("Abilities - POWER CONSTRUCT", () => { beforeEach(() => { game = new GameManager(phaserGame); const moveToUse = Moves.SPLASH; - game.override.battleStyle("single"); - game.override.ability(Abilities.POWER_CONSTRUCT); - game.override.moveset([moveToUse]); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + game.override + .battleStyle("single") + .ability(Abilities.POWER_CONSTRUCT) + .moveset([moveToUse]) + .enemyMoveset(Moves.TACKLE); }); test("check if fainted 50% Power Construct Pokemon switches to base form on arena reset", async () => { diff --git a/test/abilities/protean.test.ts b/test/abilities/protean.test.ts index bfe6dd32282..e868be8e231 100644 --- a/test/abilities/protean.test.ts +++ b/test/abilities/protean.test.ts @@ -29,11 +29,12 @@ describe("Abilities - Protean", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("single"); - game.override.ability(Abilities.PROTEAN); - game.override.startingLevel(100); - game.override.enemySpecies(Species.RATTATA); - game.override.enemyMoveset([Moves.ENDURE, Moves.ENDURE, Moves.ENDURE, Moves.ENDURE]); + game.override + .battleStyle("single") + .ability(Abilities.PROTEAN) + .startingLevel(100) + .enemySpecies(Species.RATTATA) + .enemyMoveset(Moves.ENDURE); }); test("ability applies and changes a pokemon's type", async () => { @@ -173,8 +174,7 @@ describe("Abilities - Protean", () => { }); test("ability applies correctly even if the pokemon's move is protected against", async () => { - game.override.moveset([Moves.TACKLE]); - game.override.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]); + game.override.moveset([Moves.TACKLE]).enemyMoveset(Moves.PROTECT); await game.classicMode.startBattle([Species.MAGIKARP]); diff --git a/test/abilities/sand_veil.test.ts b/test/abilities/sand_veil.test.ts index 116850e1e5a..a74538fef16 100644 --- a/test/abilities/sand_veil.test.ts +++ b/test/abilities/sand_veil.test.ts @@ -28,13 +28,15 @@ describe("Abilities - Sand Veil", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.moveset([Moves.SPLASH]); - game.override.enemySpecies(Species.MEOWSCARADA); - game.override.enemyAbility(Abilities.INSOMNIA); - game.override.enemyMoveset([Moves.TWISTER, Moves.TWISTER, Moves.TWISTER, Moves.TWISTER]); - game.override.startingLevel(100); - game.override.enemyLevel(100); - game.override.weather(WeatherType.SANDSTORM).battleStyle("double"); + game.override + .moveset([Moves.SPLASH]) + .enemySpecies(Species.MEOWSCARADA) + .enemyAbility(Abilities.INSOMNIA) + .enemyMoveset(Moves.TWISTER) + .startingLevel(100) + .enemyLevel(100) + .weather(WeatherType.SANDSTORM) + .battleStyle("double"); }); test("ability should increase the evasiveness of the source", async () => { diff --git a/test/abilities/schooling.test.ts b/test/abilities/schooling.test.ts index ac4e3c837c5..a94b76e38ff 100644 --- a/test/abilities/schooling.test.ts +++ b/test/abilities/schooling.test.ts @@ -25,10 +25,7 @@ describe("Abilities - SCHOOLING", () => { beforeEach(() => { game = new GameManager(phaserGame); const moveToUse = Moves.SPLASH; - game.override.battleStyle("single"); - game.override.ability(Abilities.SCHOOLING); - game.override.moveset([moveToUse]); - game.override.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 () => { diff --git a/test/abilities/screen_cleaner.test.ts b/test/abilities/screen_cleaner.test.ts index ea99ba00f87..f96f7bf99e2 100644 --- a/test/abilities/screen_cleaner.test.ts +++ b/test/abilities/screen_cleaner.test.ts @@ -30,8 +30,7 @@ describe("Abilities - Screen Cleaner", () => { }); it("removes Aurora Veil", async () => { - game.override.moveset([Moves.HAIL]); - game.override.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]); @@ -48,7 +47,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]); @@ -65,7 +64,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]); diff --git a/test/abilities/stall.test.ts b/test/abilities/stall.test.ts index 5c17f71c48d..6e6fe04a183 100644 --- a/test/abilities/stall.test.ts +++ b/test/abilities/stall.test.ts @@ -22,12 +22,13 @@ describe("Abilities - Stall", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("single"); - game.override.disableCrits(); - game.override.enemySpecies(Species.REGIELEKI); - game.override.enemyAbility(Abilities.STALL); - game.override.enemyMoveset([Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK, Moves.QUICK_ATTACK]); - game.override.moveset([Moves.QUICK_ATTACK, Moves.TACKLE]); + game.override + .battleStyle("single") + .disableCrits() + .enemySpecies(Species.REGIELEKI) + .enemyAbility(Abilities.STALL) + .enemyMoveset(Moves.QUICK_ATTACK) + .moveset([Moves.QUICK_ATTACK, Moves.TACKLE]); }); /** diff --git a/test/abilities/sweet_veil.test.ts b/test/abilities/sweet_veil.test.ts index 80d7165619f..e294938acd4 100644 --- a/test/abilities/sweet_veil.test.ts +++ b/test/abilities/sweet_veil.test.ts @@ -25,11 +25,12 @@ describe("Abilities - Sweet Veil", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("double"); - game.override.moveset([Moves.SPLASH, Moves.REST, Moves.YAWN]); - game.override.enemySpecies(Species.MAGIKARP); - game.override.enemyAbility(Abilities.BALL_FETCH); - game.override.enemyMoveset([Moves.POWDER, Moves.POWDER, Moves.POWDER, Moves.POWDER]); + game.override + .battleStyle("double") + .moveset([Moves.SPLASH, Moves.REST, Moves.YAWN]) + .enemySpecies(Species.MAGIKARP) + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(Moves.POWDER); }); it("prevents the user and its allies from falling asleep", async () => { @@ -56,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); diff --git a/test/abilities/synchronize.test.ts b/test/abilities/synchronize.test.ts index 783201d7a5b..e781d55fe10 100644 --- a/test/abilities/synchronize.test.ts +++ b/test/abilities/synchronize.test.ts @@ -66,10 +66,7 @@ describe("Abilities - Synchronize", () => { }); it("does not trigger when Pokemon is statused by Toxic Spikes", async () => { - game.override - .ability(Abilities.SYNCHRONIZE) - .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(Array(4).fill(Moves.TOXIC_SPIKES)); + game.override.ability(Abilities.SYNCHRONIZE).enemyAbility(Abilities.BALL_FETCH).enemyMoveset(Moves.TOXIC_SPIKES); await game.classicMode.startBattle([Species.FEEBAS, Species.MILOTIC]); diff --git a/test/abilities/unseen_fist.test.ts b/test/abilities/unseen_fist.test.ts index 6c14e82fc39..d78ce8c5bbf 100644 --- a/test/abilities/unseen_fist.test.ts +++ b/test/abilities/unseen_fist.test.ts @@ -24,12 +24,13 @@ describe("Abilities - Unseen Fist", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("single"); - game.override.starterSpecies(Species.URSHIFU); - game.override.enemySpecies(Species.SNORLAX); - game.override.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]); - game.override.startingLevel(100); - game.override.enemyLevel(100); + game.override + .battleStyle("single") + .starterSpecies(Species.URSHIFU) + .enemySpecies(Species.SNORLAX) + .enemyMoveset(Moves.PROTECT) + .startingLevel(100) + .enemyLevel(100); }); it("should cause a contact move to ignore Protect", async () => @@ -73,8 +74,7 @@ async function testUnseenFistHitResult( protectMove: Moves, shouldSucceed = true, ): Promise { - game.override.moveset([attackMove]); - game.override.enemyMoveset([protectMove, protectMove, protectMove, protectMove]); + game.override.moveset([attackMove]).enemyMoveset(protectMove); await game.classicMode.startBattle(); diff --git a/test/battle/inverse_battle.test.ts b/test/battle/inverse_battle.test.ts index 799442bb603..168df0b9505 100644 --- a/test/battle/inverse_battle.test.ts +++ b/test/battle/inverse_battle.test.ts @@ -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(); diff --git a/test/battle/special_battle.test.ts b/test/battle/special_battle.test.ts index 6f4034cd8cd..8d75e530ca6 100644 --- a/test/battle/special_battle.test.ts +++ b/test/battle/special_battle.test.ts @@ -23,12 +23,13 @@ describe("Test Battle Phase", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.enemySpecies(Species.RATTATA); - game.override.startingLevel(2000); - game.override.moveset([Moves.TACKLE]); - game.override.enemyAbility(Abilities.HYDRATION); - game.override.ability(Abilities.HYDRATION); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + game.override + .enemySpecies(Species.RATTATA) + .startingLevel(2000) + .moveset([Moves.TACKLE]) + .enemyAbility(Abilities.HYDRATION) + .ability(Abilities.HYDRATION) + .enemyMoveset(Moves.TACKLE); }); it("startBattle 2vs1 boss", async () => { diff --git a/test/items/leek.test.ts b/test/items/leek.test.ts index 7a6975f6dae..be2aa73299c 100644 --- a/test/items/leek.test.ts +++ b/test/items/leek.test.ts @@ -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"); diff --git a/test/items/leftovers.test.ts b/test/items/leftovers.test.ts index f4825c2b721..a31b711eb63 100644 --- a/test/items/leftovers.test.ts +++ b/test/items/leftovers.test.ts @@ -23,14 +23,15 @@ describe("Items - Leftovers", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("single"); - game.override.startingLevel(2000); - game.override.ability(Abilities.UNNERVE); - game.override.moveset([Moves.SPLASH]); - game.override.enemySpecies(Species.SHUCKLE); - game.override.enemyAbility(Abilities.UNNERVE); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); - game.override.startingHeldItems([{ name: "LEFTOVERS", count: 1 }]); + game.override + .battleStyle("single") + .startingLevel(2000) + .ability(Abilities.UNNERVE) + .moveset([Moves.SPLASH]) + .enemySpecies(Species.SHUCKLE) + .enemyAbility(Abilities.UNNERVE) + .enemyMoveset(Moves.TACKLE) + .startingHeldItems([{ name: "LEFTOVERS", count: 1 }]); }); it("leftovers works", async () => { diff --git a/test/moves/astonish.test.ts b/test/moves/astonish.test.ts index daa9b0bb878..c07b0d7d2c5 100644 --- a/test/moves/astonish.test.ts +++ b/test/moves/astonish.test.ts @@ -27,13 +27,14 @@ describe("Moves - Astonish", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("single"); - game.override.moveset([Moves.ASTONISH, Moves.SPLASH]); - game.override.enemySpecies(Species.BLASTOISE); - game.override.enemyAbility(Abilities.INSOMNIA); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); - game.override.startingLevel(100); - game.override.enemyLevel(100); + game.override + .battleStyle("single") + .moveset([Moves.ASTONISH, Moves.SPLASH]) + .enemySpecies(Species.BLASTOISE) + .enemyAbility(Abilities.INSOMNIA) + .enemyMoveset(Moves.TACKLE) + .startingLevel(100) + .enemyLevel(100); vi.spyOn(allMoves[Moves.ASTONISH], "chance", "get").mockReturnValue(100); }); diff --git a/test/moves/aurora_veil.test.ts b/test/moves/aurora_veil.test.ts index 96e74ec5a9e..76569ac4a0e 100644 --- a/test/moves/aurora_veil.test.ts +++ b/test/moves/aurora_veil.test.ts @@ -36,14 +36,15 @@ describe("Moves - Aurora Veil", () => { beforeEach(() => { game = new GameManager(phaserGame); globalScene = game.scene; - game.override.battleStyle("single"); - game.override.ability(Abilities.NONE); - game.override.moveset([Moves.ABSORB, Moves.ROCK_SLIDE, Moves.TACKLE]); - game.override.enemyLevel(100); - game.override.enemySpecies(Species.MAGIKARP); - game.override.enemyMoveset([Moves.AURORA_VEIL, Moves.AURORA_VEIL, Moves.AURORA_VEIL, Moves.AURORA_VEIL]); - game.override.disableCrits(); - game.override.weather(WeatherType.HAIL); + game.override + .battleStyle("single") + .ability(Abilities.BALL_FETCH) + .moveset([Moves.ABSORB, Moves.ROCK_SLIDE, Moves.TACKLE]) + .enemyLevel(100) + .enemySpecies(Species.MAGIKARP) + .enemyMoveset(Moves.AURORA_VEIL) + .disableCrits() + .weather(WeatherType.HAIL); }); it("reduces damage of physical attacks by half in a single battle", async () => { diff --git a/test/moves/chilly_reception.test.ts b/test/moves/chilly_reception.test.ts index 1c6c5ce127e..2c04e0e7313 100644 --- a/test/moves/chilly_reception.test.ts +++ b/test/moves/chilly_reception.test.ts @@ -26,7 +26,7 @@ describe("Moves - Chilly Reception", () => { game.override .battleStyle("single") .moveset([Moves.CHILLY_RECEPTION, Moves.SNOWSCAPE]) - .enemyMoveset(Array(4).fill(Moves.SPLASH)) + .enemyMoveset(Moves.SPLASH) .enemyAbility(Abilities.BALL_FETCH) .ability(Abilities.BALL_FETCH); }); @@ -69,10 +69,7 @@ describe("Moves - Chilly Reception", () => { // enemy uses another move and weather doesn't change it("check case - enemy not selecting chilly reception doesn't change weather ", async () => { - game.override - .battleStyle("single") - .enemyMoveset([Moves.CHILLY_RECEPTION, Moves.TACKLE]) - .moveset(Array(4).fill(Moves.SPLASH)); + game.override.battleStyle("single").enemyMoveset([Moves.CHILLY_RECEPTION, Moves.TACKLE]).moveset(Moves.SPLASH); await game.classicMode.startBattle([Species.SLOWKING, Species.MEOWTH]); @@ -87,7 +84,7 @@ describe("Moves - Chilly Reception", () => { game.override .battleStyle("single") .startingWave(8) - .enemyMoveset(Array(4).fill(Moves.CHILLY_RECEPTION)) + .enemyMoveset(Moves.CHILLY_RECEPTION) .enemySpecies(Species.MAGIKARP) .moveset([Moves.SPLASH, Moves.THUNDERBOLT]); diff --git a/test/moves/double_team.test.ts b/test/moves/double_team.test.ts index b97fb1a338e..aa07ee5f688 100644 --- a/test/moves/double_team.test.ts +++ b/test/moves/double_team.test.ts @@ -23,13 +23,14 @@ describe("Moves - Double Team", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("single"); - game.override.moveset([Moves.DOUBLE_TEAM]); - game.override.disableCrits(); - game.override.ability(Abilities.BALL_FETCH); - game.override.enemySpecies(Species.SHUCKLE); - game.override.enemyAbility(Abilities.BALL_FETCH); - game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + game.override + .battleStyle("single") + .moveset([Moves.DOUBLE_TEAM]) + .disableCrits() + .ability(Abilities.BALL_FETCH) + .enemySpecies(Species.SHUCKLE) + .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(Moves.TACKLE); }); it("raises the user's EVA stat stage by 1", async () => { diff --git a/test/moves/dynamax_cannon.test.ts b/test/moves/dynamax_cannon.test.ts index 62004e62778..19a15225653 100644 --- a/test/moves/dynamax_cannon.test.ts +++ b/test/moves/dynamax_cannon.test.ts @@ -29,8 +29,14 @@ describe("Moves - Dynamax Cannon", () => { dynamaxCannon = allMoves[Moves.DYNAMAX_CANNON]; game = new GameManager(phaserGame); - game.override.moveset([dynamaxCannon.id]); - game.override.startingLevel(200); + game.override + .moveset(Moves.DYNAMAX_CANNON) + .startingLevel(200) + .levelCap(10) + .battleStyle("single") + .disableCrits() + .enemySpecies(Species.MAGIKARP) + .enemyMoveset(Moves.SPLASH); // Note that, for Waves 1-10, the level cap is 10 game.override.startingWave(1); diff --git a/test/moves/flower_shield.test.ts b/test/moves/flower_shield.test.ts index d95ef6299b7..30a367f873d 100644 --- a/test/moves/flower_shield.test.ts +++ b/test/moves/flower_shield.test.ts @@ -74,9 +74,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); - game.override.enemyMoveset([Moves.DIG, Moves.DIG, Moves.DIG, Moves.DIG]); - game.override.enemyLevel(50); + game.override.enemySpecies(Species.PARAS).enemyMoveset(Moves.DIG).enemyLevel(50); await game.classicMode.startBattle([Species.CHERRIM]); const paras = game.scene.getEnemyPokemon()!; diff --git a/test/moves/freezy_frost.test.ts b/test/moves/freezy_frost.test.ts index 7cee9bfb372..2b2e06bfe74 100644 --- a/test/moves/freezy_frost.test.ts +++ b/test/moves/freezy_frost.test.ts @@ -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()!; diff --git a/test/moves/fusion_bolt.test.ts b/test/moves/fusion_bolt.test.ts index 5e515a3bc47..3fc8dae1b85 100644 --- a/test/moves/fusion_bolt.test.ts +++ b/test/moves/fusion_bolt.test.ts @@ -23,16 +23,15 @@ describe("Moves - Fusion Bolt", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.moveset([fusionBolt]); - game.override.startingLevel(1); - - game.override.enemySpecies(Species.RESHIRAM); - game.override.enemyAbility(Abilities.ROUGH_SKIN); - game.override.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]); - - game.override.battleStyle("single"); - game.override.startingWave(97); - game.override.disableCrits(); + game.override + .moveset([fusionBolt]) + .startingLevel(1) + .enemySpecies(Species.RESHIRAM) + .enemyAbility(Abilities.ROUGH_SKIN) + .enemyMoveset(Moves.SPLASH) + .battleStyle("single") + .startingWave(97) + .disableCrits(); }); it("should not make contact", async () => { diff --git a/test/moves/fusion_flare.test.ts b/test/moves/fusion_flare.test.ts index b947b9e7f7e..9f16b94da5c 100644 --- a/test/moves/fusion_flare.test.ts +++ b/test/moves/fusion_flare.test.ts @@ -24,15 +24,14 @@ describe("Moves - Fusion Flare", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.moveset([fusionFlare]); - game.override.startingLevel(1); - - game.override.enemySpecies(Species.RATTATA); - game.override.enemyMoveset([Moves.REST, Moves.REST, Moves.REST, Moves.REST]); - - game.override.battleStyle("single"); - game.override.startingWave(97); - game.override.disableCrits(); + game.override + .moveset([fusionFlare]) + .startingLevel(1) + .enemySpecies(Species.RATTATA) + .enemyMoveset(Moves.REST) + .battleStyle("single") + .startingWave(97) + .disableCrits(); }); it("should thaw freeze status condition", async () => { diff --git a/test/moves/fusion_flare_bolt.test.ts b/test/moves/fusion_flare_bolt.test.ts index 1d248e09510..2b66a1a6d2f 100644 --- a/test/moves/fusion_flare_bolt.test.ts +++ b/test/moves/fusion_flare_bolt.test.ts @@ -33,15 +33,14 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => { fusionFlare = allMoves[Moves.FUSION_FLARE]; fusionBolt = allMoves[Moves.FUSION_BOLT]; game = new GameManager(phaserGame); - game.override.moveset([fusionFlare.id, fusionBolt.id]); - game.override.startingLevel(1); - - game.override.enemySpecies(Species.RESHIRAM); - game.override.enemyMoveset([Moves.REST, Moves.REST, Moves.REST, Moves.REST]); - - game.override.battleStyle("double"); - game.override.startingWave(97); - game.override.disableCrits(); + game.override + .moveset([fusionFlare.id, fusionBolt.id]) + .startingLevel(1) + .enemySpecies(Species.RESHIRAM) + .enemyMoveset(Moves.REST) + .battleStyle("double") + .startingWave(97) + .disableCrits(); vi.spyOn(fusionFlare, "calculateBattlePower"); vi.spyOn(fusionBolt, "calculateBattlePower"); @@ -113,7 +112,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => { }, 20000); 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); @@ -158,7 +157,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => { }, 20000); 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(); @@ -212,7 +211,7 @@ describe("Moves - Fusion Flare and Fusion Bolt", () => { }, 20000); 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(); diff --git a/test/moves/light_screen.test.ts b/test/moves/light_screen.test.ts index 93d51ad7372..6ce51da68cd 100644 --- a/test/moves/light_screen.test.ts +++ b/test/moves/light_screen.test.ts @@ -35,13 +35,14 @@ describe("Moves - Light Screen", () => { beforeEach(() => { game = new GameManager(phaserGame); globalScene = game.scene; - game.override.battleStyle("single"); - game.override.ability(Abilities.NONE); - game.override.moveset([Moves.ABSORB, Moves.DAZZLING_GLEAM, Moves.TACKLE]); - game.override.enemyLevel(100); - game.override.enemySpecies(Species.MAGIKARP); - game.override.enemyMoveset([Moves.LIGHT_SCREEN, Moves.LIGHT_SCREEN, Moves.LIGHT_SCREEN, Moves.LIGHT_SCREEN]); - game.override.disableCrits(); + game.override + .battleStyle("single") + .ability(Abilities.BALL_FETCH) + .moveset([Moves.ABSORB, Moves.DAZZLING_GLEAM, Moves.TACKLE]) + .enemyLevel(100) + .enemySpecies(Species.MAGIKARP) + .enemyMoveset(Moves.LIGHT_SCREEN) + .disableCrits(); }); it("reduces damage of special attacks by half in a single battle", async () => { diff --git a/test/moves/magnet_rise.test.ts b/test/moves/magnet_rise.test.ts index 3f15a109f11..5d5ae91c4fe 100644 --- a/test/moves/magnet_rise.test.ts +++ b/test/moves/magnet_rise.test.ts @@ -23,13 +23,14 @@ describe("Moves - Magnet Rise", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("single"); - game.override.starterSpecies(Species.MAGNEZONE); - game.override.enemySpecies(Species.RATTATA); - game.override.enemyMoveset([Moves.DRILL_RUN, Moves.DRILL_RUN, Moves.DRILL_RUN, Moves.DRILL_RUN]); - game.override.disableCrits(); - game.override.enemyLevel(1); - game.override.moveset([moveToUse, Moves.SPLASH, Moves.GRAVITY, Moves.BATON_PASS]); + game.override + .battleStyle("single") + .starterSpecies(Species.MAGNEZONE) + .enemySpecies(Species.RATTATA) + .enemyMoveset(Moves.DRILL_RUN) + .disableCrits() + .enemyLevel(1) + .moveset([moveToUse, Moves.SPLASH, Moves.GRAVITY, Moves.BATON_PASS]); }); it("MAGNET RISE", async () => { diff --git a/test/moves/powder.test.ts b/test/moves/powder.test.ts index b65525109ad..f076923d746 100644 --- a/test/moves/powder.test.ts +++ b/test/moves/powder.test.ts @@ -120,7 +120,7 @@ describe("Moves - Powder", () => { }); it("should not prevent the target from thawing out with Flame Wheel", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.FLAME_WHEEL)).enemyStatusEffect(StatusEffect.FREEZE); + game.override.enemyMoveset(Moves.FLAME_WHEEL).enemyStatusEffect(StatusEffect.FREEZE); await game.classicMode.startBattle([Species.CHARIZARD]); @@ -198,7 +198,7 @@ describe("Moves - Powder", () => { }); it("should cancel Revelation Dance if it becomes a Fire-type move", async () => { - game.override.enemySpecies(Species.CHARIZARD).enemyMoveset(Array(4).fill(Moves.REVELATION_DANCE)); + game.override.enemySpecies(Species.CHARIZARD).enemyMoveset(Moves.REVELATION_DANCE); await game.classicMode.startBattle([Species.CHARIZARD]); @@ -212,7 +212,7 @@ describe("Moves - Powder", () => { }); it("should cancel Shell Trap and damage the target, even if the move would fail", async () => { - game.override.enemyMoveset(Array(4).fill(Moves.SHELL_TRAP)); + game.override.enemyMoveset(Moves.SHELL_TRAP); await game.classicMode.startBattle([Species.CHARIZARD]); diff --git a/test/moves/reflect.test.ts b/test/moves/reflect.test.ts index 268d9ebb71b..191a1a45a09 100644 --- a/test/moves/reflect.test.ts +++ b/test/moves/reflect.test.ts @@ -35,13 +35,14 @@ describe("Moves - Reflect", () => { beforeEach(() => { game = new GameManager(phaserGame); globalScene = game.scene; - game.override.battleStyle("single"); - game.override.ability(Abilities.NONE); - game.override.moveset([Moves.ABSORB, Moves.ROCK_SLIDE, Moves.TACKLE]); - game.override.enemyLevel(100); - game.override.enemySpecies(Species.MAGIKARP); - game.override.enemyMoveset([Moves.REFLECT, Moves.REFLECT, Moves.REFLECT, Moves.REFLECT]); - game.override.disableCrits(); + game.override + .battleStyle("single") + .ability(Abilities.NONE) + .moveset([Moves.ABSORB, Moves.ROCK_SLIDE, Moves.TACKLE]) + .enemyLevel(100) + .enemySpecies(Species.MAGIKARP) + .enemyMoveset(Moves.REFLECT) + .disableCrits(); }); it("reduces damage of physical attacks by half in a single battle", async () => { diff --git a/test/moves/retaliate.test.ts b/test/moves/retaliate.test.ts index 40f31635d9b..24d0cd542cb 100644 --- a/test/moves/retaliate.test.ts +++ b/test/moves/retaliate.test.ts @@ -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) diff --git a/test/moves/swallow.test.ts b/test/moves/swallow.test.ts index cff9daaf97a..6a2fa8840ea 100644 --- a/test/moves/swallow.test.ts +++ b/test/moves/swallow.test.ts @@ -27,15 +27,14 @@ describe("Moves - Swallow", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("single"); - - game.override.enemySpecies(Species.RATTATA); - game.override.enemyMoveset(Moves.SPLASH); - game.override.enemyAbility(Abilities.NONE); - game.override.enemyLevel(2000); - - game.override.moveset([Moves.SWALLOW, Moves.SWALLOW, Moves.SWALLOW, Moves.SWALLOW]); - game.override.ability(Abilities.NONE); + game.override + .battleStyle("single") + .enemySpecies(Species.RATTATA) + .enemyMoveset(Moves.SPLASH) + .enemyAbility(Abilities.NONE) + .enemyLevel(2000) + .moveset(Moves.SWALLOW) + .ability(Abilities.NONE); }); describe("consumes all stockpile stacks to heal (scaling with stacks)", () => { diff --git a/test/moves/tackle.test.ts b/test/moves/tackle.test.ts index 5fd8ba589fc..ecd8750d17f 100644 --- a/test/moves/tackle.test.ts +++ b/test/moves/tackle.test.ts @@ -24,13 +24,14 @@ describe("Moves - Tackle", () => { beforeEach(() => { game = new GameManager(phaserGame); const moveToUse = Moves.TACKLE; - game.override.battleStyle("single"); - game.override.enemySpecies(Species.MAGIKARP); - game.override.startingLevel(1); - game.override.startingWave(97); - game.override.moveset([moveToUse]); - game.override.enemyMoveset([Moves.GROWTH, Moves.GROWTH, Moves.GROWTH, Moves.GROWTH]); - game.override.disableCrits(); + game.override + .battleStyle("single") + .enemySpecies(Species.MAGIKARP) + .startingLevel(1) + .startingWave(97) + .moveset([moveToUse]) + .enemyMoveset(Moves.GROWTH) + .disableCrits(); }); it("TACKLE against ghost", async () => { diff --git a/test/moves/throat_chop.test.ts b/test/moves/throat_chop.test.ts index aaae9c0f5bb..8e504633707 100644 --- a/test/moves/throat_chop.test.ts +++ b/test/moves/throat_chop.test.ts @@ -23,11 +23,11 @@ describe("Moves - Throat Chop", () => { beforeEach(() => { game = new GameManager(phaserGame); game.override - .moveset(Array(4).fill(Moves.GROWL)) + .moveset(Moves.GROWL) .battleStyle("single") .ability(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(Array(4).fill(Moves.THROAT_CHOP)) + .enemyMoveset(Moves.THROAT_CHOP) .enemySpecies(Species.MAGIKARP); }); diff --git a/test/moves/tidy_up.test.ts b/test/moves/tidy_up.test.ts index ba7a1e07959..103b2d0a1c5 100644 --- a/test/moves/tidy_up.test.ts +++ b/test/moves/tidy_up.test.ts @@ -37,8 +37,7 @@ describe("Moves - Tidy Up", () => { }); it("spikes are cleared", async () => { - game.override.moveset([Moves.SPIKES, Moves.TIDY_UP]); - game.override.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); @@ -49,8 +48,7 @@ describe("Moves - Tidy Up", () => { }, 20000); it("stealth rocks are cleared", async () => { - game.override.moveset([Moves.STEALTH_ROCK, Moves.TIDY_UP]); - game.override.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); @@ -61,8 +59,7 @@ describe("Moves - Tidy Up", () => { }, 20000); it("toxic spikes are cleared", async () => { - game.override.moveset([Moves.TOXIC_SPIKES, Moves.TIDY_UP]); - game.override.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); @@ -73,8 +70,7 @@ describe("Moves - Tidy Up", () => { }, 20000); it("sticky webs are cleared", async () => { - game.override.moveset([Moves.STICKY_WEB, Moves.TIDY_UP]); - game.override.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(); @@ -86,8 +82,7 @@ describe("Moves - Tidy Up", () => { }, 20000); it("substitutes are cleared", async () => { - game.override.moveset([Moves.SUBSTITUTE, Moves.TIDY_UP]); - game.override.enemyMoveset([Moves.SUBSTITUTE, Moves.SUBSTITUTE, Moves.SUBSTITUTE, Moves.SUBSTITUTE]); + game.override.moveset([Moves.SUBSTITUTE, Moves.TIDY_UP]).enemyMoveset(Moves.SUBSTITUTE); await game.classicMode.startBattle();