diff --git a/src/data/move.ts b/src/data/move.ts index 0510b45112b..fb7fd0c5653 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -37,7 +37,7 @@ import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; import { SpeciesFormChangeRevertWeatherFormTrigger } from "./pokemon-forms"; import { GameMode } from "#app/game-mode"; import { applyChallenges, ChallengeType } from "./challenge"; -import { SwitchType } from "#app/enums/switch-type"; +import { SwitchType } from "#enums/switch-type"; export enum MoveCategory { PHYSICAL, diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index b012d5de24b..f22d7a37586 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -61,7 +61,7 @@ import { Challenges } from "#enums/challenges"; import { PokemonAnimType } from "#app/enums/pokemon-anim-type"; import { PLAYER_PARTY_MAX_SIZE } from "#app/constants"; import { MysteryEncounterPokemonData } from "#app/data/mystery-encounters/mystery-encounter-pokemon-data"; -import { SwitchType } from "#app/enums/switch-type"; +import { SwitchType } from "#enums/switch-type"; export enum FieldPosition { CENTER, diff --git a/src/phases/check-switch-phase.ts b/src/phases/check-switch-phase.ts index af9df41375d..8849d304435 100644 --- a/src/phases/check-switch-phase.ts +++ b/src/phases/check-switch-phase.ts @@ -8,7 +8,7 @@ import { BattlePhase } from "./battle-phase"; import { PostSummonPhase } from "./post-summon-phase"; import { SummonMissingPhase } from "./summon-missing-phase"; import { SwitchPhase } from "./switch-phase"; -import { SwitchType } from "#app/enums/switch-type"; +import { SwitchType } from "#enums/switch-type"; export class CheckSwitchPhase extends BattlePhase { protected fieldIndex: integer; diff --git a/src/phases/faint-phase.ts b/src/phases/faint-phase.ts index a89ffd4875f..ba25225f6e0 100644 --- a/src/phases/faint-phase.ts +++ b/src/phases/faint-phase.ts @@ -18,7 +18,7 @@ import { GameOverPhase } from "./game-over-phase"; import { SwitchPhase } from "./switch-phase"; import { VictoryPhase } from "./victory-phase"; import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms"; -import { SwitchType } from "#app/enums/switch-type"; +import { SwitchType } from "#enums/switch-type"; export class FaintPhase extends PokemonPhase { private preventEndure: boolean; diff --git a/src/phases/mystery-encounter-phases.ts b/src/phases/mystery-encounter-phases.ts index 95064f9c40b..60755095cca 100644 --- a/src/phases/mystery-encounter-phases.ts +++ b/src/phases/mystery-encounter-phases.ts @@ -24,7 +24,7 @@ import { NewBattlePhase } from "#app/phases/new-battle-phase"; import { GameOverPhase } from "#app/phases/game-over-phase"; import { SwitchPhase } from "#app/phases/switch-phase"; import { SeenEncounterData } from "#app/data/mystery-encounters/mystery-encounter-save-data"; -import { SwitchType } from "#app/enums/switch-type"; +import { SwitchType } from "#enums/switch-type"; /** * Will handle (in order): diff --git a/src/phases/return-phase.ts b/src/phases/return-phase.ts index 09b8b58c133..eb587201585 100644 --- a/src/phases/return-phase.ts +++ b/src/phases/return-phase.ts @@ -1,6 +1,6 @@ import BattleScene from "#app/battle-scene"; import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms"; -import { SwitchType } from "#app/enums/switch-type"; +import { SwitchType } from "#enums/switch-type"; import { SwitchSummonPhase } from "./switch-summon-phase"; export class ReturnPhase extends SwitchSummonPhase { diff --git a/src/phases/switch-phase.ts b/src/phases/switch-phase.ts index 28b78c08870..f6c9d838e10 100644 --- a/src/phases/switch-phase.ts +++ b/src/phases/switch-phase.ts @@ -1,5 +1,5 @@ import BattleScene from "#app/battle-scene"; -import { SwitchType } from "#app/enums/switch-type"; +import { SwitchType } from "#enums/switch-type"; import PartyUiHandler, { PartyUiMode, PartyOption } from "#app/ui/party-ui-handler"; import { Mode } from "#app/ui/ui"; import { BattlePhase } from "./battle-phase"; diff --git a/src/phases/switch-summon-phase.ts b/src/phases/switch-summon-phase.ts index 98a90b13ab8..796a6195945 100644 --- a/src/phases/switch-summon-phase.ts +++ b/src/phases/switch-summon-phase.ts @@ -12,7 +12,7 @@ import i18next from "i18next"; import { PostSummonPhase } from "./post-summon-phase"; import { SummonPhase } from "./summon-phase"; import { SubstituteTag } from "#app/data/battler-tags"; -import { SwitchType } from "#app/enums/switch-type"; +import { SwitchType } from "#enums/switch-type"; export class SwitchSummonPhase extends SummonPhase { private switchType: SwitchType; diff --git a/src/phases/turn-start-phase.ts b/src/phases/turn-start-phase.ts index 28abfb7972a..b070abb390a 100644 --- a/src/phases/turn-start-phase.ts +++ b/src/phases/turn-start-phase.ts @@ -19,7 +19,7 @@ import { TurnEndPhase } from "./turn-end-phase"; import { WeatherEffectPhase } from "./weather-effect-phase"; import { BattlerIndex } from "#app/battle"; import { TrickRoomTag } from "#app/data/arena-tag"; -import { SwitchType } from "#app/enums/switch-type"; +import { SwitchType } from "#enums/switch-type"; export class TurnStartPhase extends FieldPhase { constructor(scene: BattleScene) { @@ -180,7 +180,7 @@ export class TurnStartPhase extends FieldPhase { this.scene.unshiftPhase(new AttemptCapturePhase(this.scene, turnCommand.targets![0] % 2, turnCommand.cursor!));//TODO: is the bang correct here? break; case Command.POKEMON: - const switchType = turnCommand.args![0] ? SwitchType.BATON_PASS : SwitchType.SWITCH; // TODO: is the bang correct here? + const switchType = turnCommand.args?.[0] ? SwitchType.BATON_PASS : SwitchType.SWITCH; this.scene.unshiftPhase(new SwitchSummonPhase(this.scene, switchType, pokemon.getFieldIndex(), turnCommand.cursor!, true, pokemon.isPlayer())); break; case Command.RUN: diff --git a/src/test/abilities/zen_mode.test.ts b/src/test/abilities/zen_mode.test.ts index 541f450f97e..b4c60aa7a7f 100644 --- a/src/test/abilities/zen_mode.test.ts +++ b/src/test/abilities/zen_mode.test.ts @@ -18,7 +18,7 @@ import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; import { Status, StatusEffect } from "#app/data/status-effect"; -import { SwitchType } from "#app/enums/switch-type"; +import { SwitchType } from "#enums/switch-type";