diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 28cd9ea7273..bb5c9fe515d 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -100,11 +100,10 @@ import { ExpGainsSpeed } from "#enums/exp-gains-speed"; import { BattlerTagType } from "#enums/battler-tag-type"; import { FRIENDSHIP_GAIN_FROM_BATTLE } from "#app/data/balance/starters"; import { StatusEffect } from "#enums/status-effect"; +import { globalScene, initGlobalScene } from "#app/global-scene"; export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1"; -export let globalScene: BattleScene; - const DEBUG_RNG = false; const OPP_IVS_OVERRIDE_VALIDATED : integer[] = ( @@ -331,7 +330,7 @@ export default class BattleScene extends SceneBase { this.nextCommandPhaseQueue = []; this.eventManager = new TimedEventManager(); this.updateGameInfo(); - globalScene = this; + initGlobalScene(this); } loadPokemonAtlas(key: string, atlasPath: string, experimental?: boolean) { diff --git a/src/battle.ts b/src/battle.ts index cf821009371..c0914ae5ec4 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Command } from "./ui/command-ui-handler"; import * as Utils from "./utils"; import Trainer, { TrainerVariant } from "./field/trainer"; diff --git a/src/data/ability.ts b/src/data/ability.ts index eede88c3bcd..23f3486d6ef 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -28,7 +28,7 @@ import { MovePhase } from "#app/phases/move-phase"; import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; import { ShowAbilityPhase } from "#app/phases/show-ability-phase"; import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { SwitchType } from "#app/enums/switch-type"; import { SwitchPhase } from "#app/phases/switch-phase"; import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; diff --git a/src/data/arena-tag.ts b/src/data/arena-tag.ts index 245a1925644..ab95c513427 100644 --- a/src/data/arena-tag.ts +++ b/src/data/arena-tag.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Arena } from "#app/field/arena"; import { Type } from "#enums/type"; import { BooleanHolder, NumberHolder, toDmgValue } from "#app/utils"; diff --git a/src/data/balance/pokemon-evolutions.ts b/src/data/balance/pokemon-evolutions.ts index d1f91a26715..1f69dbe2563 100644 --- a/src/data/balance/pokemon-evolutions.ts +++ b/src/data/balance/pokemon-evolutions.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Gender } from "#app/data/gender"; import { PokeballType } from "#enums/pokeball"; import Pokemon from "#app/field/pokemon"; diff --git a/src/data/battle-anims.ts b/src/data/battle-anims.ts index e99ff045438..06774c735c3 100644 --- a/src/data/battle-anims.ts +++ b/src/data/battle-anims.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { AttackMove, BeakBlastHeaderAttr, DelayedAttackAttr, MoveFlags, SelfStatusMove, allMoves } from "./move"; import Pokemon from "../field/pokemon"; import * as Utils from "../utils"; diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index b255614b8bb..6439b2fa8f3 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { allAbilities, applyAbAttrs, diff --git a/src/data/berry.ts b/src/data/berry.ts index fab54167d5d..2876511758c 100644 --- a/src/data/berry.ts +++ b/src/data/berry.ts @@ -9,7 +9,7 @@ import { BerryType } from "#enums/berry-type"; import { Stat, type BattleStat } from "#app/enums/stat"; import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase"; import { StatStageChangePhase } from "#app/phases/stat-stage-change-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export function getBerryName(berryType: BerryType): string { return i18next.t(`berry:${BerryType[berryType]}.name`); diff --git a/src/data/daily-run.ts b/src/data/daily-run.ts index ccbb5eea19e..f1433d4b252 100644 --- a/src/data/daily-run.ts +++ b/src/data/daily-run.ts @@ -1,6 +1,6 @@ import { PartyMemberStrength } from "#enums/party-member-strength"; import { Species } from "#enums/species"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { PlayerPokemon } from "#app/field/pokemon"; import { Starter } from "#app/ui/starter-select-ui-handler"; import * as Utils from "#app/utils"; diff --git a/src/data/egg-hatch-data.ts b/src/data/egg-hatch-data.ts index 53df4fe7bd7..c8f33eccb78 100644 --- a/src/data/egg-hatch-data.ts +++ b/src/data/egg-hatch-data.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { PlayerPokemon } from "#app/field/pokemon"; import { DexEntry, StarterDataEntry } from "#app/system/game-data"; diff --git a/src/data/egg.ts b/src/data/egg.ts index 1ee07870829..fe5232b5208 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -1,4 +1,5 @@ -import BattleScene, { globalScene } from "#app/battle-scene"; +import BattleScene from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import PokemonSpecies, { getPokemonSpecies } from "#app/data/pokemon-species"; import { speciesStarterCosts } from "#app/data/balance/starters"; import { VariantTier } from "#enums/variant-tier"; diff --git a/src/data/move.ts b/src/data/move.ts index 00e58e56d6c..50cc441010a 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -40,7 +40,7 @@ import { GameMode } from "#app/game-mode"; import { applyChallenges, ChallengeType } from "./challenge"; import { SwitchType } from "#enums/switch-type"; import { StatusEffect } from "enums/status-effect"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export enum MoveCategory { PHYSICAL, diff --git a/src/data/mystery-encounters/encounters/a-trainers-test-encounter.ts b/src/data/mystery-encounters/encounters/a-trainers-test-encounter.ts index ca5f076df3d..f8d7e18501d 100644 --- a/src/data/mystery-encounters/encounters/a-trainers-test-encounter.ts +++ b/src/data/mystery-encounters/encounters/a-trainers-test-encounter.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { EnemyPartyConfig, initBattleWithEnemyConfig, leaveEncounterWithoutBattle, setEncounterRewards, transitionMysteryEncounterIntroVisuals, } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { trainerConfigs, } from "#app/data/trainer-config"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; diff --git a/src/data/mystery-encounters/encounters/absolute-avarice-encounter.ts b/src/data/mystery-encounters/encounters/absolute-avarice-encounter.ts index ae97e3558a9..4d2eb3899fa 100644 --- a/src/data/mystery-encounters/encounters/absolute-avarice-encounter.ts +++ b/src/data/mystery-encounters/encounters/absolute-avarice-encounter.ts @@ -3,7 +3,7 @@ import Pokemon, { EnemyPokemon, PokemonMove } from "#app/field/pokemon"; import { BerryModifierType, modifierTypes, PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Species } from "#enums/species"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { PersistentModifierRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; diff --git a/src/data/mystery-encounters/encounters/an-offer-you-cant-refuse-encounter.ts b/src/data/mystery-encounters/encounters/an-offer-you-cant-refuse-encounter.ts index 9c290d71dc0..084363cd86e 100644 --- a/src/data/mystery-encounters/encounters/an-offer-you-cant-refuse-encounter.ts +++ b/src/data/mystery-encounters/encounters/an-offer-you-cant-refuse-encounter.ts @@ -2,7 +2,7 @@ import { generateModifierType, leaveEncounterWithoutBattle, setEncounterExp, upd import { modifierTypes } from "#app/modifier/modifier-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Species } from "#enums/species"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { AbilityRequirement, CombinationPokemonRequirement, MoveRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; diff --git a/src/data/mystery-encounters/encounters/berries-abound-encounter.ts b/src/data/mystery-encounters/encounters/berries-abound-encounter.ts index 8585378dc67..89542b1c3dd 100644 --- a/src/data/mystery-encounters/encounters/berries-abound-encounter.ts +++ b/src/data/mystery-encounters/encounters/berries-abound-encounter.ts @@ -20,7 +20,7 @@ import { import { randSeedInt } from "#app/utils"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; import { getPokemonNameWithAffix } from "#app/messages"; diff --git a/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts b/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts index c87185170f6..88efd7a7ca0 100644 --- a/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts +++ b/src/data/mystery-encounters/encounters/bug-type-superfan-encounter.ts @@ -18,7 +18,7 @@ import { } from "#app/data/trainer-config"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { PartyMemberStrength } from "#enums/party-member-strength"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { isNullOrUndefined, randSeedInt, randSeedShuffle } from "#app/utils"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; diff --git a/src/data/mystery-encounters/encounters/clowning-around-encounter.ts b/src/data/mystery-encounters/encounters/clowning-around-encounter.ts index daeabee0fe0..077fbfd1ad7 100644 --- a/src/data/mystery-encounters/encounters/clowning-around-encounter.ts +++ b/src/data/mystery-encounters/encounters/clowning-around-encounter.ts @@ -4,7 +4,7 @@ import { ModifierTier } from "#app/modifier/modifier-tier"; import { ModifierPoolType, modifierTypes, PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { PartyMemberStrength } from "#enums/party-member-strength"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { Species } from "#enums/species"; diff --git a/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts b/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts index 2ba006488f5..fa69d51b8b5 100644 --- a/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts +++ b/src/data/mystery-encounters/encounters/dancing-lessons-encounter.ts @@ -1,5 +1,5 @@ import { BattlerIndex } from "#app/battle"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { EncounterBattleAnim } from "#app/data/battle-anims"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; diff --git a/src/data/mystery-encounters/encounters/dark-deal-encounter.ts b/src/data/mystery-encounters/encounters/dark-deal-encounter.ts index 214fde7125d..0f28a1947e8 100644 --- a/src/data/mystery-encounters/encounters/dark-deal-encounter.ts +++ b/src/data/mystery-encounters/encounters/dark-deal-encounter.ts @@ -2,7 +2,7 @@ import { Type } from "#enums/type"; import { isNullOrUndefined, randSeedInt } from "#app/utils"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Species } from "#enums/species"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { modifierTypes } from "#app/modifier/modifier-type"; import { getPokemonSpecies } from "#app/data/pokemon-species"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; diff --git a/src/data/mystery-encounters/encounters/delibirdy-encounter.ts b/src/data/mystery-encounters/encounters/delibirdy-encounter.ts index cabaf59d663..08dca167d61 100644 --- a/src/data/mystery-encounters/encounters/delibirdy-encounter.ts +++ b/src/data/mystery-encounters/encounters/delibirdy-encounter.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { CombinationPokemonRequirement, HeldItemRequirement, MoneyRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; diff --git a/src/data/mystery-encounters/encounters/field-trip-encounter.ts b/src/data/mystery-encounters/encounters/field-trip-encounter.ts index 1ed97b4273d..87e476a30ee 100644 --- a/src/data/mystery-encounters/encounters/field-trip-encounter.ts +++ b/src/data/mystery-encounters/encounters/field-trip-encounter.ts @@ -5,7 +5,7 @@ import { PlayerPokemon, PokemonMove } from "#app/field/pokemon"; import { modifierTypes } from "#app/modifier/modifier-type"; import { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; diff --git a/src/data/mystery-encounters/encounters/fiery-fallout-encounter.ts b/src/data/mystery-encounters/encounters/fiery-fallout-encounter.ts index 34d95bd4350..d53fcf4a4c2 100644 --- a/src/data/mystery-encounters/encounters/fiery-fallout-encounter.ts +++ b/src/data/mystery-encounters/encounters/fiery-fallout-encounter.ts @@ -2,7 +2,7 @@ import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/myst import { EnemyPartyConfig, initBattleWithEnemyConfig, loadCustomMovesForEncounter, leaveEncounterWithoutBattle, setEncounterExp, setEncounterRewards, transitionMysteryEncounterIntroVisuals, generateModifierType } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { AttackTypeBoosterModifierType, modifierTypes, } from "#app/modifier/modifier-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { AbilityRequirement, CombinationPokemonRequirement, TypeRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; import { Species } from "#enums/species"; diff --git a/src/data/mystery-encounters/encounters/fight-or-flight-encounter.ts b/src/data/mystery-encounters/encounters/fight-or-flight-encounter.ts index 94117e5404a..a656f001fcd 100644 --- a/src/data/mystery-encounters/encounters/fight-or-flight-encounter.ts +++ b/src/data/mystery-encounters/encounters/fight-or-flight-encounter.ts @@ -17,7 +17,7 @@ import { regenerateModifierPoolThresholds, } from "#app/modifier/modifier-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MoveRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; diff --git a/src/data/mystery-encounters/encounters/fun-and-games-encounter.ts b/src/data/mystery-encounters/encounters/fun-and-games-encounter.ts index 30a8c9c325d..6ad0db8af13 100644 --- a/src/data/mystery-encounters/encounters/fun-and-games-encounter.ts +++ b/src/data/mystery-encounters/encounters/fun-and-games-encounter.ts @@ -1,6 +1,6 @@ import { leaveEncounterWithoutBattle, selectPokemonForOption, setEncounterRewards, transitionMysteryEncounterIntroVisuals, updatePlayerMoney, } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { TrainerSlot } from "#app/data/trainer-config"; diff --git a/src/data/mystery-encounters/encounters/global-trade-system-encounter.ts b/src/data/mystery-encounters/encounters/global-trade-system-encounter.ts index b58dfd3d8ea..3d55f405ccc 100644 --- a/src/data/mystery-encounters/encounters/global-trade-system-encounter.ts +++ b/src/data/mystery-encounters/encounters/global-trade-system-encounter.ts @@ -4,7 +4,7 @@ import { ModifierTier } from "#app/modifier/modifier-tier"; import { MusicPreference } from "#app/system/settings/settings"; import { getPlayerModifierTypeOptions, ModifierPoolType, ModifierTypeOption, regenerateModifierPoolThresholds } from "#app/modifier/modifier-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { Species } from "#enums/species"; diff --git a/src/data/mystery-encounters/encounters/lost-at-sea-encounter.ts b/src/data/mystery-encounters/encounters/lost-at-sea-encounter.ts index 72393296e66..286c4120bfe 100644 --- a/src/data/mystery-encounters/encounters/lost-at-sea-encounter.ts +++ b/src/data/mystery-encounters/encounters/lost-at-sea-encounter.ts @@ -2,7 +2,7 @@ import { getPokemonSpecies } from "#app/data/pokemon-species"; import { Moves } from "#app/enums/moves"; import { Species } from "#app/enums/species"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { leaveEncounterWithoutBattle, setEncounterExp } from "../utils/encounter-phase-utils"; diff --git a/src/data/mystery-encounters/encounters/mysterious-challengers-encounter.ts b/src/data/mystery-encounters/encounters/mysterious-challengers-encounter.ts index 7866dba1b02..3af8475eb17 100644 --- a/src/data/mystery-encounters/encounters/mysterious-challengers-encounter.ts +++ b/src/data/mystery-encounters/encounters/mysterious-challengers-encounter.ts @@ -13,7 +13,7 @@ import { ModifierTier } from "#app/modifier/modifier-tier"; import { modifierTypes } from "#app/modifier/modifier-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { PartyMemberStrength } from "#enums/party-member-strength"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import * as Utils from "#app/utils"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; diff --git a/src/data/mystery-encounters/encounters/mysterious-chest-encounter.ts b/src/data/mystery-encounters/encounters/mysterious-chest-encounter.ts index b50be98a026..8605b3c2c4b 100644 --- a/src/data/mystery-encounters/encounters/mysterious-chest-encounter.ts +++ b/src/data/mystery-encounters/encounters/mysterious-chest-encounter.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; diff --git a/src/data/mystery-encounters/encounters/part-timer-encounter.ts b/src/data/mystery-encounters/encounters/part-timer-encounter.ts index 1b5163a44c0..a43032afc0d 100644 --- a/src/data/mystery-encounters/encounters/part-timer-encounter.ts +++ b/src/data/mystery-encounters/encounters/part-timer-encounter.ts @@ -1,7 +1,7 @@ import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { leaveEncounterWithoutBattle, selectPokemonForOption, setEncounterExp, setEncounterRewards, transitionMysteryEncounterIntroVisuals, updatePlayerMoney } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MoveRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; diff --git a/src/data/mystery-encounters/encounters/safari-zone-encounter.ts b/src/data/mystery-encounters/encounters/safari-zone-encounter.ts index 512082d3d2b..cd2ed0dd433 100644 --- a/src/data/mystery-encounters/encounters/safari-zone-encounter.ts +++ b/src/data/mystery-encounters/encounters/safari-zone-encounter.ts @@ -1,6 +1,6 @@ import { initSubsequentOptionSelect, leaveEncounterWithoutBattle, transitionMysteryEncounterIntroVisuals, updatePlayerMoney, } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import MysteryEncounterOption, { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { TrainerSlot } from "#app/data/trainer-config"; diff --git a/src/data/mystery-encounters/encounters/shady-vitamin-dealer-encounter.ts b/src/data/mystery-encounters/encounters/shady-vitamin-dealer-encounter.ts index ec1e6c229c4..6ad28b6b6d6 100644 --- a/src/data/mystery-encounters/encounters/shady-vitamin-dealer-encounter.ts +++ b/src/data/mystery-encounters/encounters/shady-vitamin-dealer-encounter.ts @@ -4,7 +4,7 @@ import { modifierTypes } from "#app/modifier/modifier-type"; import { randSeedInt } from "#app/utils"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Species } from "#enums/species"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { MoneyRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; diff --git a/src/data/mystery-encounters/encounters/slumbering-snorlax-encounter.ts b/src/data/mystery-encounters/encounters/slumbering-snorlax-encounter.ts index 3bad4765a81..02c8d2c85ba 100644 --- a/src/data/mystery-encounters/encounters/slumbering-snorlax-encounter.ts +++ b/src/data/mystery-encounters/encounters/slumbering-snorlax-encounter.ts @@ -2,7 +2,7 @@ import { STEALING_MOVES } from "#app/data/mystery-encounters/requirements/requir import { modifierTypes, PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Species } from "#enums/species"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { StatusEffect } from "#enums/status-effect"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; diff --git a/src/data/mystery-encounters/encounters/teleporting-hijinks-encounter.ts b/src/data/mystery-encounters/encounters/teleporting-hijinks-encounter.ts index 148d79b61ba..e46d5405ffe 100644 --- a/src/data/mystery-encounters/encounters/teleporting-hijinks-encounter.ts +++ b/src/data/mystery-encounters/encounters/teleporting-hijinks-encounter.ts @@ -1,7 +1,7 @@ import { EnemyPartyConfig, generateModifierTypeOption, initBattleWithEnemyConfig, setEncounterExp, setEncounterRewards, transitionMysteryEncounterIntroVisuals, updatePlayerMoney, } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { randSeedInt } from "#app/utils"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MoneyRequirement, WaveModulusRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; import Pokemon, { EnemyPokemon } from "#app/field/pokemon"; diff --git a/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts b/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts index 6f96725e2ca..c33fc40c872 100644 --- a/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts +++ b/src/data/mystery-encounters/encounters/the-expert-pokemon-breeder-encounter.ts @@ -1,7 +1,7 @@ import { EnemyPartyConfig, generateModifierType, handleMysteryEncounterBattleFailed, initBattleWithEnemyConfig, setEncounterRewards, } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { trainerConfigs } from "#app/data/trainer-config"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { randSeedShuffle } from "#app/utils"; import MysteryEncounter, { MysteryEncounterBuilder } from "../mystery-encounter"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; diff --git a/src/data/mystery-encounters/encounters/the-pokemon-salesman-encounter.ts b/src/data/mystery-encounters/encounters/the-pokemon-salesman-encounter.ts index f463400fb85..532bbe28175 100644 --- a/src/data/mystery-encounters/encounters/the-pokemon-salesman-encounter.ts +++ b/src/data/mystery-encounters/encounters/the-pokemon-salesman-encounter.ts @@ -1,7 +1,7 @@ import { leaveEncounterWithoutBattle, transitionMysteryEncounterIntroVisuals, updatePlayerMoney, } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { isNullOrUndefined, randSeedInt } from "#app/utils"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MoneyRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; import { catchPokemon, getRandomSpeciesByStarterTier, getSpriteKeysFromPokemon } from "#app/data/mystery-encounters/utils/encounter-pokemon-utils"; diff --git a/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts b/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts index 7412e867e1b..bb04815af41 100644 --- a/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts +++ b/src/data/mystery-encounters/encounters/the-strong-stuff-encounter.ts @@ -1,7 +1,7 @@ import { EnemyPartyConfig, initBattleWithEnemyConfig, loadCustomMovesForEncounter, leaveEncounterWithoutBattle, setEncounterRewards, transitionMysteryEncounterIntroVisuals, generateModifierType } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { modifierTypes, PokemonHeldItemModifierType, } from "#app/modifier/modifier-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { getPokemonSpecies } from "#app/data/pokemon-species"; import { Species } from "#enums/species"; diff --git a/src/data/mystery-encounters/encounters/the-winstrate-challenge-encounter.ts b/src/data/mystery-encounters/encounters/the-winstrate-challenge-encounter.ts index 95e93c5ce23..1cb2c1264d4 100644 --- a/src/data/mystery-encounters/encounters/the-winstrate-challenge-encounter.ts +++ b/src/data/mystery-encounters/encounters/the-winstrate-challenge-encounter.ts @@ -1,7 +1,7 @@ import { EnemyPartyConfig, generateModifierType, generateModifierTypeOption, initBattleWithEnemyConfig, leaveEncounterWithoutBattle, setEncounterRewards, transitionMysteryEncounterIntroVisuals, } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { modifierTypes, PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import { TrainerType } from "#enums/trainer-type"; diff --git a/src/data/mystery-encounters/encounters/training-session-encounter.ts b/src/data/mystery-encounters/encounters/training-session-encounter.ts index d047b3ad0d4..86b268fdfc2 100644 --- a/src/data/mystery-encounters/encounters/training-session-encounter.ts +++ b/src/data/mystery-encounters/encounters/training-session-encounter.ts @@ -10,7 +10,7 @@ import { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; import { isNullOrUndefined, randSeedShuffle } from "#app/utils"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { queueEncounterMessage, showEncounterText } from "#app/data/mystery-encounters/utils/encounter-dialogue-utils"; diff --git a/src/data/mystery-encounters/encounters/trash-to-treasure-encounter.ts b/src/data/mystery-encounters/encounters/trash-to-treasure-encounter.ts index 23be230e56a..582fba8528d 100644 --- a/src/data/mystery-encounters/encounters/trash-to-treasure-encounter.ts +++ b/src/data/mystery-encounters/encounters/trash-to-treasure-encounter.ts @@ -1,7 +1,7 @@ import { EnemyPartyConfig, EnemyPokemonConfig, generateModifierType, initBattleWithEnemyConfig, leaveEncounterWithoutBattle, loadCustomMovesForEncounter, setEncounterRewards, transitionMysteryEncounterIntroVisuals, } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; import { modifierTypes, PokemonHeldItemModifierType } from "#app/modifier/modifier-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; diff --git a/src/data/mystery-encounters/encounters/uncommon-breed-encounter.ts b/src/data/mystery-encounters/encounters/uncommon-breed-encounter.ts index ce369115cd0..8c874671f4a 100644 --- a/src/data/mystery-encounters/encounters/uncommon-breed-encounter.ts +++ b/src/data/mystery-encounters/encounters/uncommon-breed-encounter.ts @@ -4,7 +4,7 @@ import { CHARMING_MOVES } from "#app/data/mystery-encounters/requirements/requir import Pokemon, { EnemyPokemon, PokemonMove } from "#app/field/pokemon"; import { getPartyLuckValue } from "#app/modifier/modifier-type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MoveRequirement, PersistentModifierRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; diff --git a/src/data/mystery-encounters/encounters/weird-dream-encounter.ts b/src/data/mystery-encounters/encounters/weird-dream-encounter.ts index cd000748e57..3820e0ff94a 100644 --- a/src/data/mystery-encounters/encounters/weird-dream-encounter.ts +++ b/src/data/mystery-encounters/encounters/weird-dream-encounter.ts @@ -1,7 +1,7 @@ import { Type } from "#enums/type"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; import { Species } from "#enums/species"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter, { MysteryEncounterBuilder } from "#app/data/mystery-encounters/mystery-encounter"; import { MysteryEncounterOptionBuilder } from "#app/data/mystery-encounters/mystery-encounter-option"; import { EnemyPartyConfig, EnemyPokemonConfig, generateModifierType, initBattleWithEnemyConfig, leaveEncounterWithoutBattle, setEncounterRewards, } from "../utils/encounter-phase-utils"; diff --git a/src/data/mystery-encounters/mystery-encounter-option.ts b/src/data/mystery-encounters/mystery-encounter-option.ts index e05157d1b01..b88a2a9f9fc 100644 --- a/src/data/mystery-encounters/mystery-encounter-option.ts +++ b/src/data/mystery-encounters/mystery-encounter-option.ts @@ -1,7 +1,7 @@ import { OptionTextDisplay } from "#app/data/mystery-encounters/mystery-encounter-dialogue"; import { Moves } from "#app/enums/moves"; import Pokemon, { PlayerPokemon } from "#app/field/pokemon"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Type } from "#enums/type"; import { EncounterPokemonRequirement, EncounterSceneRequirement, MoneyRequirement, TypeRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; import { CanLearnMoveRequirement, CanLearnMoveRequirementOptions } from "./requirements/can-learn-move-requirement"; diff --git a/src/data/mystery-encounters/mystery-encounter-requirements.ts b/src/data/mystery-encounters/mystery-encounter-requirements.ts index 107afee09b7..a9220c63b29 100644 --- a/src/data/mystery-encounters/mystery-encounter-requirements.ts +++ b/src/data/mystery-encounters/mystery-encounter-requirements.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { allAbilities } from "#app/data/ability"; import { EvolutionItem, pokemonEvolutions } from "#app/data/balance/pokemon-evolutions"; import { Nature } from "#enums/nature"; diff --git a/src/data/mystery-encounters/mystery-encounter.ts b/src/data/mystery-encounters/mystery-encounter.ts index 4be6ef57494..09cf0afb13b 100644 --- a/src/data/mystery-encounters/mystery-encounter.ts +++ b/src/data/mystery-encounters/mystery-encounter.ts @@ -15,7 +15,7 @@ import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode import { GameModes } from "#app/game-mode"; import { EncounterAnim } from "#enums/encounter-anims"; import { Challenges } from "#enums/challenges"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export interface EncounterStartOfBattleEffect { sourcePokemon?: Pokemon; diff --git a/src/data/mystery-encounters/requirements/can-learn-move-requirement.ts b/src/data/mystery-encounters/requirements/can-learn-move-requirement.ts index acbc7b22d57..d7012b9ad35 100644 --- a/src/data/mystery-encounters/requirements/can-learn-move-requirement.ts +++ b/src/data/mystery-encounters/requirements/can-learn-move-requirement.ts @@ -2,7 +2,7 @@ import { Moves } from "#app/enums/moves"; import { PlayerPokemon, PokemonMove } from "#app/field/pokemon"; import { isNullOrUndefined } from "#app/utils"; import { EncounterPokemonRequirement } from "#app/data/mystery-encounters/mystery-encounter-requirements"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; /** * {@linkcode CanLearnMoveRequirement} options diff --git a/src/data/mystery-encounters/utils/encounter-dialogue-utils.ts b/src/data/mystery-encounters/utils/encounter-dialogue-utils.ts index 41ffa4057ed..7a0365d55bc 100644 --- a/src/data/mystery-encounters/utils/encounter-dialogue-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-dialogue-utils.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { getTextWithColors, TextStyle } from "#app/ui/text"; import { UiTheme } from "#enums/ui-theme"; import { isNullOrUndefined } from "#app/utils"; diff --git a/src/data/mystery-encounters/utils/encounter-phase-utils.ts b/src/data/mystery-encounters/utils/encounter-phase-utils.ts index ad5a8e8b5c6..4401ddde6f8 100644 --- a/src/data/mystery-encounters/utils/encounter-phase-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-phase-utils.ts @@ -37,7 +37,7 @@ import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; import { PartyExpPhase } from "#app/phases/party-exp-phase"; import { Variant } from "#app/data/variant"; import { StatusEffect } from "#enums/status-effect"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; /** * Animates exclamation sprite over trainer's head at start of encounter diff --git a/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts b/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts index f3578bafebe..48f4c8c5789 100644 --- a/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts +++ b/src/data/mystery-encounters/utils/encounter-pokemon-utils.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import i18next from "i18next"; import { isNullOrUndefined, randSeedInt } from "#app/utils"; import { PokemonHeldItemModifier } from "#app/modifier/modifier"; diff --git a/src/data/mystery-encounters/utils/encounter-transformation-sequence.ts b/src/data/mystery-encounters/utils/encounter-transformation-sequence.ts index dbda1560c90..58398ff12fd 100644 --- a/src/data/mystery-encounters/utils/encounter-transformation-sequence.ts +++ b/src/data/mystery-encounters/utils/encounter-transformation-sequence.ts @@ -2,7 +2,7 @@ import { PlayerPokemon } from "#app/field/pokemon"; import { getFrameMs } from "#app/utils"; import { cos, sin } from "#app/field/anims"; import { getTypeRgb } from "#app/data/type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export enum TransformationScreenPosition { CENTER, diff --git a/src/data/pokeball.ts b/src/data/pokeball.ts index 2e7d4ce655d..049baf11f3d 100644 --- a/src/data/pokeball.ts +++ b/src/data/pokeball.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { CriticalCatchChanceBoosterModifier } from "#app/modifier/modifier"; import { NumberHolder } from "#app/utils"; import { PokeballType } from "#enums/pokeball"; diff --git a/src/data/pokemon-forms.ts b/src/data/pokemon-forms.ts index 2ab1ee46e9d..70abaccdfd5 100644 --- a/src/data/pokemon-forms.ts +++ b/src/data/pokemon-forms.ts @@ -13,7 +13,7 @@ import i18next from "i18next"; import { WeatherType } from "#enums/weather-type"; import { Challenges } from "#app/enums/challenges"; import { SpeciesFormKey } from "#enums/species-form-key"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export enum FormChangeItem { NONE, diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 11325d44244..838ec6aeb7e 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -4,7 +4,8 @@ import { PartyMemberStrength } from "#enums/party-member-strength"; import { Species } from "#enums/species"; import { QuantizerCelebi, argbFromRgba, rgbaFromArgb } from "@material/material-color-utilities"; import i18next from "i18next"; -import { AnySound, globalScene } from "#app/battle-scene"; +import { AnySound } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { GameMode } from "#app/game-mode"; import { StarterMoveset } from "#app/system/game-data"; import * as Utils from "#app/utils"; diff --git a/src/data/trainer-config.ts b/src/data/trainer-config.ts index fb531c5ff66..bc3f8a5631d 100644 --- a/src/data/trainer-config.ts +++ b/src/data/trainer-config.ts @@ -1,4 +1,5 @@ -import { globalScene, startingWave } from "#app/battle-scene"; +import { startingWave } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { ModifierTypeFunc, modifierTypes } from "#app/modifier/modifier-type"; import { EnemyPokemon, PokemonMove } from "#app/field/pokemon"; import * as Utils from "#app/utils"; diff --git a/src/data/weather.ts b/src/data/weather.ts index 91eb8d1f78b..cdaceb067b3 100644 --- a/src/data/weather.ts +++ b/src/data/weather.ts @@ -8,7 +8,7 @@ import * as Utils from "../utils"; import { SuppressWeatherEffectAbAttr } from "./ability"; import { TerrainType, getTerrainName } from "./terrain"; import i18next from "i18next"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class Weather { public weatherType: WeatherType; diff --git a/src/field/anims.ts b/src/field/anims.ts index e73be11979a..2c61480ecac 100644 --- a/src/field/anims.ts +++ b/src/field/anims.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { PokeballType } from "#enums/pokeball"; import * as Utils from "../utils"; diff --git a/src/field/arena.ts b/src/field/arena.ts index e9ad482a16a..f751c98ce90 100644 --- a/src/field/arena.ts +++ b/src/field/arena.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { biomePokemonPools, BiomePoolTier, BiomeTierTrainerPools, biomeTrainerPools, PokemonPools } from "#app/data/balance/biomes"; import { Constructor } from "#app/utils"; import * as Utils from "#app/utils"; diff --git a/src/field/damage-number-handler.ts b/src/field/damage-number-handler.ts index 0ad130a27b4..e64863b7482 100644 --- a/src/field/damage-number-handler.ts +++ b/src/field/damage-number-handler.ts @@ -2,7 +2,7 @@ import { TextStyle, addTextObject } from "../ui/text"; import Pokemon, { DamageResult, HitResult } from "./pokemon"; import * as Utils from "../utils"; import { BattlerIndex } from "../battle"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; type TextAndShadowArr = [ string | null, string | null ]; diff --git a/src/field/mystery-encounter-intro.ts b/src/field/mystery-encounter-intro.ts index c781d31d025..8fb5c0c6385 100644 --- a/src/field/mystery-encounter-intro.ts +++ b/src/field/mystery-encounter-intro.ts @@ -1,5 +1,6 @@ import { GameObjects } from "phaser"; -import BattleScene, { globalScene } from "#app/battle-scene"; +import BattleScene from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import MysteryEncounter from "../data/mystery-encounters/mystery-encounter"; import { Species } from "#enums/species"; import { isNullOrUndefined } from "#app/utils"; diff --git a/src/field/pokemon-sprite-sparkle-handler.ts b/src/field/pokemon-sprite-sparkle-handler.ts index 7fc60cb126c..074933f0f00 100644 --- a/src/field/pokemon-sprite-sparkle-handler.ts +++ b/src/field/pokemon-sprite-sparkle-handler.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import Pokemon from "./pokemon"; import * as Utils from "../utils"; diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index f788d6f5a9a..436a2373714 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1,5 +1,6 @@ import Phaser from "phaser"; -import BattleScene, { AnySound, globalScene } from "#app/battle-scene"; +import BattleScene, { AnySound } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Variant, VariantSet, variantColorCache } from "#app/data/variant"; import { variantData } from "#app/data/variant"; import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from "#app/ui/battle-info"; diff --git a/src/field/trainer.ts b/src/field/trainer.ts index 7d3dc51c24e..adb71d59298 100644 --- a/src/field/trainer.ts +++ b/src/field/trainer.ts @@ -1,4 +1,5 @@ -import BattleScene, { globalScene } from "#app/battle-scene"; +import BattleScene from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { pokemonPrevolutions } from "#app/data/balance/pokemon-evolutions"; import PokemonSpecies, { getPokemonSpecies } from "#app/data/pokemon-species"; import { diff --git a/src/game-mode.ts b/src/game-mode.ts index 5420c8a89be..5f6d8f8a380 100644 --- a/src/game-mode.ts +++ b/src/game-mode.ts @@ -8,7 +8,7 @@ import * as Utils from "./utils"; import { Biome } from "#enums/biome"; import { Species } from "#enums/species"; import { Challenges } from "./enums/challenges"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export enum GameModes { CLASSIC, diff --git a/src/global-scene.ts b/src/global-scene.ts new file mode 100644 index 00000000000..76071bd7fac --- /dev/null +++ b/src/global-scene.ts @@ -0,0 +1,7 @@ +import type BattleScene from "#app/battle-scene"; + +export let globalScene: BattleScene; + +export function initGlobalScene(scene: BattleScene): void { + globalScene = scene; +} diff --git a/src/inputs-controller.ts b/src/inputs-controller.ts index f87cd976afd..33908dd460d 100644 --- a/src/inputs-controller.ts +++ b/src/inputs-controller.ts @@ -15,7 +15,7 @@ import { getButtonWithKeycode, getIconForLatestInput, swap, } from "#app/configs/inputs/configHandler"; -import { globalScene } from "./battle-scene"; +import { globalScene } from "#app/global-scene"; import { SettingGamepad } from "#app/system/settings/settings-gamepad"; import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; import TouchControl from "#app/touch-controls"; diff --git a/src/loading-scene.ts b/src/loading-scene.ts index ab0e82f49fe..9ecede82d89 100644 --- a/src/loading-scene.ts +++ b/src/loading-scene.ts @@ -20,7 +20,7 @@ import { initStatsKeys } from "#app/ui/game-stats-ui-handler"; import { initVouchers } from "#app/system/voucher"; import { Biome } from "#enums/biome"; import { initMysteryEncounters } from "#app/data/mystery-encounters/mystery-encounters"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class LoadingScene extends SceneBase { public static readonly KEY = "loading"; diff --git a/src/messages.ts b/src/messages.ts index 9ca09786d92..96d2e171764 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattleSpec } from "#enums/battle-spec"; import Pokemon from "./field/pokemon"; import i18next from "i18next"; diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index ab6569c0e7d..4b905413071 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { EvolutionItem, pokemonEvolutions } from "#app/data/balance/pokemon-evolutions"; import { tmPoolTiers, tmSpecies } from "#app/data/balance/tms"; import { getBerryEffectDescription, getBerryName } from "#app/data/berry"; diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 79bf0732506..7fa820596e1 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -31,7 +31,7 @@ import { type DoubleBattleChanceBoosterModifierType, type EvolutionItemModifierT import { Color, ShadowColor } from "#enums/color"; import { FRIENDSHIP_GAIN_FROM_RARE_CANDY } from "#app/data/balance/starters"; import { applyAbAttrs, CommanderAbAttr } from "#app/data/ability"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export type ModifierPredicate = (modifier: Modifier) => boolean; diff --git a/src/phase.ts b/src/phase.ts index 359db402f72..8da00d78b61 100644 --- a/src/phase.ts +++ b/src/phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "./battle-scene"; +import { globalScene } from "#app/global-scene"; export class Phase { start() { diff --git a/src/phases/add-enemy-buff-modifier-phase.ts b/src/phases/add-enemy-buff-modifier-phase.ts index 4e184770760..d79b4f6eca5 100644 --- a/src/phases/add-enemy-buff-modifier-phase.ts +++ b/src/phases/add-enemy-buff-modifier-phase.ts @@ -2,7 +2,7 @@ import { ModifierTier } from "#app/modifier/modifier-tier"; import { regenerateModifierPoolThresholds, ModifierPoolType, getEnemyBuffModifierForWave } from "#app/modifier/modifier-type"; import { EnemyPersistentModifier } from "#app/modifier/modifier"; import { Phase } from "#app/phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class AddEnemyBuffModifierPhase extends Phase { constructor() { diff --git a/src/phases/attempt-capture-phase.ts b/src/phases/attempt-capture-phase.ts index 08ef55db211..540a6a6d5c4 100644 --- a/src/phases/attempt-capture-phase.ts +++ b/src/phases/attempt-capture-phase.ts @@ -16,7 +16,7 @@ import { Mode } from "#app/ui/ui"; import { PokeballType } from "#enums/pokeball"; import { StatusEffect } from "#enums/status-effect"; import i18next from "i18next"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class AttemptCapturePhase extends PokemonPhase { private pokeballType: PokeballType; diff --git a/src/phases/attempt-run-phase.ts b/src/phases/attempt-run-phase.ts index 82b1b5db413..765e4d54119 100644 --- a/src/phases/attempt-run-phase.ts +++ b/src/phases/attempt-run-phase.ts @@ -7,7 +7,7 @@ import * as Utils from "#app/utils"; import { BattleEndPhase } from "./battle-end-phase"; import { NewBattlePhase } from "./new-battle-phase"; import { PokemonPhase } from "./pokemon-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class AttemptRunPhase extends PokemonPhase { diff --git a/src/phases/battle-end-phase.ts b/src/phases/battle-end-phase.ts index 37925f11db1..be1c30d0dd3 100644 --- a/src/phases/battle-end-phase.ts +++ b/src/phases/battle-end-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { applyPostBattleAbAttrs, PostBattleAbAttr } from "#app/data/ability"; import { LapsingPersistentModifier, LapsingPokemonHeldItemModifier } from "#app/modifier/modifier"; import { BattlePhase } from "./battle-phase"; diff --git a/src/phases/battle-phase.ts b/src/phases/battle-phase.ts index 52450e7bdd9..4fc826b7957 100644 --- a/src/phases/battle-phase.ts +++ b/src/phases/battle-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { TrainerSlot } from "#app/data/trainer-config"; import { Phase } from "#app/phase"; diff --git a/src/phases/berry-phase.ts b/src/phases/berry-phase.ts index 9a7f67550d4..dd56e8b37d7 100644 --- a/src/phases/berry-phase.ts +++ b/src/phases/berry-phase.ts @@ -7,7 +7,7 @@ import i18next from "i18next"; import * as Utils from "#app/utils"; import { FieldPhase } from "./field-phase"; import { CommonAnimPhase } from "./common-anim-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; /** The phase after attacks where the pokemon eat berries */ export class BerryPhase extends FieldPhase { diff --git a/src/phases/check-status-effect-phase.ts b/src/phases/check-status-effect-phase.ts index d3ea70fc390..dd27e92cb86 100644 --- a/src/phases/check-status-effect-phase.ts +++ b/src/phases/check-status-effect-phase.ts @@ -1,7 +1,7 @@ import { PostTurnStatusEffectPhase } from "#app/phases/post-turn-status-effect-phase"; import { Phase } from "#app/phase"; import { BattlerIndex } from "#app/battle"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class CheckStatusEffectPhase extends Phase { private order : BattlerIndex[]; diff --git a/src/phases/check-switch-phase.ts b/src/phases/check-switch-phase.ts index e5c52d2464f..cc8b3f7aeb6 100644 --- a/src/phases/check-switch-phase.ts +++ b/src/phases/check-switch-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattleStyle } from "#app/enums/battle-style"; import { BattlerTagType } from "#app/enums/battler-tag-type"; import { getPokemonNameWithAffix } from "#app/messages"; diff --git a/src/phases/command-phase.ts b/src/phases/command-phase.ts index b10f8aae16d..203c5fc97aa 100644 --- a/src/phases/command-phase.ts +++ b/src/phases/command-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { TurnCommand, BattleType } from "#app/battle"; import { TrappedTag, EncoreTag } from "#app/data/battler-tags"; import { MoveTargetSet, getMoveTargets } from "#app/data/move"; diff --git a/src/phases/common-anim-phase.ts b/src/phases/common-anim-phase.ts index c354c1cbd7a..da53b89ac2b 100644 --- a/src/phases/common-anim-phase.ts +++ b/src/phases/common-anim-phase.ts @@ -1,5 +1,5 @@ import { BattlerIndex } from "#app/battle"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { CommonAnim, CommonBattleAnim } from "#app/data/battle-anims"; import { PokemonPhase } from "./pokemon-phase"; diff --git a/src/phases/damage-phase.ts b/src/phases/damage-phase.ts index 2f6b0efa64b..14f318f8b5b 100644 --- a/src/phases/damage-phase.ts +++ b/src/phases/damage-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { BattleSpec } from "#app/enums/battle-spec"; import { DamageResult, HitResult } from "#app/field/pokemon"; diff --git a/src/phases/egg-hatch-phase.ts b/src/phases/egg-hatch-phase.ts index 54cf0e66644..0dd885104e2 100644 --- a/src/phases/egg-hatch-phase.ts +++ b/src/phases/egg-hatch-phase.ts @@ -1,4 +1,5 @@ -import { AnySound, globalScene } from "#app/battle-scene"; +import { AnySound } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Egg } from "#app/data/egg"; import { EggCountChangedEvent } from "#app/events/egg"; import { PlayerPokemon } from "#app/field/pokemon"; diff --git a/src/phases/egg-lapse-phase.ts b/src/phases/egg-lapse-phase.ts index 12ca19799af..b6812bab6cd 100644 --- a/src/phases/egg-lapse-phase.ts +++ b/src/phases/egg-lapse-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Egg, EGG_SEED } from "#app/data/egg"; import { Phase } from "#app/phase"; import i18next from "i18next"; diff --git a/src/phases/egg-summary-phase.ts b/src/phases/egg-summary-phase.ts index b3d3041c2ca..1dc4b01b8bf 100644 --- a/src/phases/egg-summary-phase.ts +++ b/src/phases/egg-summary-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; import { Mode } from "#app/ui/ui"; import { EggHatchData } from "#app/data/egg-hatch-data"; diff --git a/src/phases/encounter-phase.ts b/src/phases/encounter-phase.ts index 9c354cbd952..fa2580682b5 100644 --- a/src/phases/encounter-phase.ts +++ b/src/phases/encounter-phase.ts @@ -1,5 +1,5 @@ import { BattlerIndex, BattleType } from "#app/battle"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { PLAYER_PARTY_MAX_SIZE } from "#app/constants"; import { applyAbAttrs, SyncEncounterNatureAbAttr } from "#app/data/ability"; import { initEncounterAnims, loadEncounterAnimAssets } from "#app/data/battle-anims"; diff --git a/src/phases/end-card-phase.ts b/src/phases/end-card-phase.ts index 32b00ac3981..4615a60e661 100644 --- a/src/phases/end-card-phase.ts +++ b/src/phases/end-card-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { PlayerGender } from "#app/enums/player-gender"; import { Phase } from "#app/phase"; import { addTextObject, TextStyle } from "#app/ui/text"; diff --git a/src/phases/end-evolution-phase.ts b/src/phases/end-evolution-phase.ts index 3dd644e4793..58e2e203482 100644 --- a/src/phases/end-evolution-phase.ts +++ b/src/phases/end-evolution-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; import { Mode } from "#app/ui/ui"; diff --git a/src/phases/enemy-command-phase.ts b/src/phases/enemy-command-phase.ts index 4017abb1c39..715303863be 100644 --- a/src/phases/enemy-command-phase.ts +++ b/src/phases/enemy-command-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { Command } from "#app/ui/command-ui-handler"; import { FieldPhase } from "./field-phase"; diff --git a/src/phases/evolution-phase.ts b/src/phases/evolution-phase.ts index 2424049ccb9..413def233bd 100644 --- a/src/phases/evolution-phase.ts +++ b/src/phases/evolution-phase.ts @@ -1,6 +1,7 @@ import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; import { Phase } from "#app/phase"; -import { AnySound, globalScene } from "#app/battle-scene"; +import { AnySound } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { SpeciesFormEvolution } from "#app/data/balance/pokemon-evolutions"; import EvolutionSceneHandler from "#app/ui/evolution-scene-handler"; import * as Utils from "#app/utils"; diff --git a/src/phases/exp-phase.ts b/src/phases/exp-phase.ts index 1ce35f366db..f0fe9fde719 100644 --- a/src/phases/exp-phase.ts +++ b/src/phases/exp-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { getPokemonNameWithAffix } from "#app/messages"; import { ExpBoosterModifier } from "#app/modifier/modifier"; import i18next from "i18next"; diff --git a/src/phases/faint-phase.ts b/src/phases/faint-phase.ts index 11ae6abd386..195e412b8cf 100644 --- a/src/phases/faint-phase.ts +++ b/src/phases/faint-phase.ts @@ -1,5 +1,5 @@ import { BattlerIndex, BattleType } from "#app/battle"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { applyPostFaintAbAttrs, applyPostKnockOutAbAttrs, applyPostVictoryAbAttrs, PostFaintAbAttr, PostKnockOutAbAttr, PostVictoryAbAttr } from "#app/data/ability"; import { BattlerTagLapseType, DestinyBondTag, GrudgeTag } from "#app/data/battler-tags"; import { battleSpecDialogue } from "#app/data/dialogue"; diff --git a/src/phases/field-phase.ts b/src/phases/field-phase.ts index 3315c649664..d50b3e49bf3 100644 --- a/src/phases/field-phase.ts +++ b/src/phases/field-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import Pokemon from "#app/field/pokemon"; import { BattlePhase } from "./battle-phase"; diff --git a/src/phases/form-change-phase.ts b/src/phases/form-change-phase.ts index 07ec7adbd02..d4dda735537 100644 --- a/src/phases/form-change-phase.ts +++ b/src/phases/form-change-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "../battle-scene"; +import { globalScene } from "#app/global-scene"; import * as Utils from "../utils"; import { achvs } from "../system/achv"; import { SpeciesFormChange, getSpeciesFormChangeMessage } from "../data/pokemon-forms"; diff --git a/src/phases/game-over-modifier-reward-phase.ts b/src/phases/game-over-modifier-reward-phase.ts index 08603f89dab..6a713d87871 100644 --- a/src/phases/game-over-modifier-reward-phase.ts +++ b/src/phases/game-over-modifier-reward-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { ModifierTypeFunc } from "#app/modifier/modifier-type"; import { Mode } from "#app/ui/ui"; import i18next from "i18next"; diff --git a/src/phases/game-over-phase.ts b/src/phases/game-over-phase.ts index 8e6c13bebd2..ad3d98bbb14 100644 --- a/src/phases/game-over-phase.ts +++ b/src/phases/game-over-phase.ts @@ -1,6 +1,6 @@ import { clientSessionId } from "#app/account"; import { BattleType } from "#app/battle"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { pokemonEvolutions } from "#app/data/balance/pokemon-evolutions"; import { getCharVariantFromDialogue } from "#app/data/dialogue"; import PokemonSpecies, { getPokemonSpecies } from "#app/data/pokemon-species"; diff --git a/src/phases/hide-party-exp-bar-phase.ts b/src/phases/hide-party-exp-bar-phase.ts index ee4a2d58f88..0dce41044c0 100644 --- a/src/phases/hide-party-exp-bar-phase.ts +++ b/src/phases/hide-party-exp-bar-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlePhase } from "./battle-phase"; export class HidePartyExpBarPhase extends BattlePhase { diff --git a/src/phases/learn-move-phase.ts b/src/phases/learn-move-phase.ts index 6c932428767..8498e938bb5 100644 --- a/src/phases/learn-move-phase.ts +++ b/src/phases/learn-move-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { initMoveAnim, loadMoveAnimAssets } from "#app/data/battle-anims"; import Move, { allMoves } from "#app/data/move"; import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms"; diff --git a/src/phases/level-cap-phase.ts b/src/phases/level-cap-phase.ts index 8001daa0e70..d75bc3be6d4 100644 --- a/src/phases/level-cap-phase.ts +++ b/src/phases/level-cap-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Mode } from "#app/ui/ui"; import i18next from "i18next"; import { FieldPhase } from "./field-phase"; diff --git a/src/phases/level-up-phase.ts b/src/phases/level-up-phase.ts index a0891508d02..9f5308efe4f 100644 --- a/src/phases/level-up-phase.ts +++ b/src/phases/level-up-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { ExpNotification } from "#app/enums/exp-notification"; import { EvolutionPhase } from "#app/phases/evolution-phase"; import { PlayerPokemon } from "#app/field/pokemon"; diff --git a/src/phases/login-phase.ts b/src/phases/login-phase.ts index a86782ce348..0ed8b6feb88 100644 --- a/src/phases/login-phase.ts +++ b/src/phases/login-phase.ts @@ -1,5 +1,6 @@ import { updateUserInfo } from "#app/account"; -import { bypassLogin, globalScene } from "#app/battle-scene"; +import { bypassLogin } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; import { handleTutorial, Tutorial } from "#app/tutorial"; import { Mode } from "#app/ui/ui"; diff --git a/src/phases/message-phase.ts b/src/phases/message-phase.ts index 2569ca86f27..9439d8286c3 100644 --- a/src/phases/message-phase.ts +++ b/src/phases/message-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; export class MessagePhase extends Phase { diff --git a/src/phases/modifier-reward-phase.ts b/src/phases/modifier-reward-phase.ts index 4e6286ebf92..ac8665bee77 100644 --- a/src/phases/modifier-reward-phase.ts +++ b/src/phases/modifier-reward-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { ModifierType, ModifierTypeFunc, getModifierType } from "#app/modifier/modifier-type"; import i18next from "i18next"; import { BattlePhase } from "./battle-phase"; diff --git a/src/phases/money-reward-phase.ts b/src/phases/money-reward-phase.ts index 9b3f2111110..70f0019227c 100644 --- a/src/phases/money-reward-phase.ts +++ b/src/phases/money-reward-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { ArenaTagType } from "#app/enums/arena-tag-type"; import { MoneyMultiplierModifier } from "#app/modifier/modifier"; import i18next from "i18next"; diff --git a/src/phases/move-anim-test-phase.ts b/src/phases/move-anim-test-phase.ts index b6e88d79f2e..588fc402357 100644 --- a/src/phases/move-anim-test-phase.ts +++ b/src/phases/move-anim-test-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { initMoveAnim, loadMoveAnimAssets, MoveAnim } from "#app/data/battle-anims"; import { allMoves, SelfStatusMove } from "#app/data/move"; import { Moves } from "#app/enums/moves"; diff --git a/src/phases/move-charge-phase.ts b/src/phases/move-charge-phase.ts index d3ec016c070..7995b6ebb76 100644 --- a/src/phases/move-charge-phase.ts +++ b/src/phases/move-charge-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { MoveChargeAnim } from "#app/data/battle-anims"; import { applyMoveChargeAttrs, MoveEffectAttr, InstantChargeAttr } from "#app/data/move"; diff --git a/src/phases/move-effect-phase.ts b/src/phases/move-effect-phase.ts index 9390715bea3..9148b03ee04 100644 --- a/src/phases/move-effect-phase.ts +++ b/src/phases/move-effect-phase.ts @@ -1,5 +1,5 @@ import { BattlerIndex } from "#app/battle"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { AddSecondStrikeAbAttr, AlwaysHitAbAttr, diff --git a/src/phases/move-end-phase.ts b/src/phases/move-end-phase.ts index 485c0742e3a..534d8118cac 100644 --- a/src/phases/move-end-phase.ts +++ b/src/phases/move-end-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { BattlerTagLapseType } from "#app/data/battler-tags"; import { PokemonPhase } from "./pokemon-phase"; diff --git a/src/phases/move-phase.ts b/src/phases/move-phase.ts index da6486ce2cb..53e3a891a31 100644 --- a/src/phases/move-phase.ts +++ b/src/phases/move-phase.ts @@ -1,5 +1,5 @@ import { BattlerIndex } from "#app/battle"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { applyAbAttrs, applyPostMoveUsedAbAttrs, diff --git a/src/phases/mystery-encounter-phases.ts b/src/phases/mystery-encounter-phases.ts index 266eedafd9f..f9559ad718e 100644 --- a/src/phases/mystery-encounter-phases.ts +++ b/src/phases/mystery-encounter-phases.ts @@ -17,7 +17,7 @@ import { BattlerTagType } from "#enums/battler-tag-type"; import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; import { SwitchType } from "#enums/switch-type"; import i18next from "i18next"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { getCharVariantFromDialogue } from "../data/dialogue"; import { OptionSelectSettings, transitionMysteryEncounterIntroVisuals } from "../data/mystery-encounters/utils/encounter-phase-utils"; import { TrainerSlot } from "../data/trainer-config"; diff --git a/src/phases/new-battle-phase.ts b/src/phases/new-battle-phase.ts index e04cc31afad..8cdbdc5891a 100644 --- a/src/phases/new-battle-phase.ts +++ b/src/phases/new-battle-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlePhase } from "./battle-phase"; export class NewBattlePhase extends BattlePhase { diff --git a/src/phases/new-biome-encounter-phase.ts b/src/phases/new-biome-encounter-phase.ts index 40459061387..be6815333e5 100644 --- a/src/phases/new-biome-encounter-phase.ts +++ b/src/phases/new-biome-encounter-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { applyAbAttrs, PostBiomeChangeAbAttr } from "#app/data/ability"; import { getRandomWeatherType } from "#app/data/weather"; import { NextEncounterPhase } from "./next-encounter-phase"; diff --git a/src/phases/next-encounter-phase.ts b/src/phases/next-encounter-phase.ts index abc481abb9e..229d37f9a69 100644 --- a/src/phases/next-encounter-phase.ts +++ b/src/phases/next-encounter-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { EncounterPhase } from "./encounter-phase"; export class NextEncounterPhase extends EncounterPhase { diff --git a/src/phases/obtain-status-effect-phase.ts b/src/phases/obtain-status-effect-phase.ts index e5fe1942586..d6d00f851f7 100644 --- a/src/phases/obtain-status-effect-phase.ts +++ b/src/phases/obtain-status-effect-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims"; import { getStatusEffectObtainText, getStatusEffectOverlapText } from "#app/data/status-effect"; diff --git a/src/phases/party-exp-phase.ts b/src/phases/party-exp-phase.ts index 2670023c39f..8fd9e1cf0f6 100644 --- a/src/phases/party-exp-phase.ts +++ b/src/phases/party-exp-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; /** diff --git a/src/phases/party-heal-phase.ts b/src/phases/party-heal-phase.ts index d406bc9297c..2c1a6c33163 100644 --- a/src/phases/party-heal-phase.ts +++ b/src/phases/party-heal-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import * as Utils from "#app/utils"; import { BattlePhase } from "./battle-phase"; diff --git a/src/phases/party-member-pokemon-phase.ts b/src/phases/party-member-pokemon-phase.ts index f023e76dd74..71ddb161254 100644 --- a/src/phases/party-member-pokemon-phase.ts +++ b/src/phases/party-member-pokemon-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import Pokemon from "#app/field/pokemon"; import { FieldPhase } from "./field-phase"; diff --git a/src/phases/pokemon-anim-phase.ts b/src/phases/pokemon-anim-phase.ts index 4dc0f707f66..3dace961ea8 100644 --- a/src/phases/pokemon-anim-phase.ts +++ b/src/phases/pokemon-anim-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { SubstituteTag } from "#app/data/battler-tags"; import Pokemon from "#app/field/pokemon"; import { BattlePhase } from "#app/phases/battle-phase"; diff --git a/src/phases/pokemon-heal-phase.ts b/src/phases/pokemon-heal-phase.ts index 62b774687c1..e83d04872d7 100644 --- a/src/phases/pokemon-heal-phase.ts +++ b/src/phases/pokemon-heal-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { CommonAnim } from "#app/data/battle-anims"; import { getStatusEffectHealText } from "#app/data/status-effect"; diff --git a/src/phases/pokemon-phase.ts b/src/phases/pokemon-phase.ts index 2f07ef022c9..20428242667 100644 --- a/src/phases/pokemon-phase.ts +++ b/src/phases/pokemon-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import Pokemon from "#app/field/pokemon"; import { FieldPhase } from "./field-phase"; diff --git a/src/phases/post-game-over-phase.ts b/src/phases/post-game-over-phase.ts index 4e9bd29b1b9..36d3eb4eceb 100644 --- a/src/phases/post-game-over-phase.ts +++ b/src/phases/post-game-over-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; import { EndCardPhase } from "./end-card-phase"; import { TitlePhase } from "./title-phase"; diff --git a/src/phases/post-summon-phase.ts b/src/phases/post-summon-phase.ts index b7e4e40e75f..6db89e84128 100644 --- a/src/phases/post-summon-phase.ts +++ b/src/phases/post-summon-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { applyAbAttrs, applyPostSummonAbAttrs, CommanderAbAttr, PostSummonAbAttr } from "#app/data/ability"; import { ArenaTrapTag } from "#app/data/arena-tag"; diff --git a/src/phases/post-turn-status-effect-phase.ts b/src/phases/post-turn-status-effect-phase.ts index 0b35cb44663..c5623006673 100644 --- a/src/phases/post-turn-status-effect-phase.ts +++ b/src/phases/post-turn-status-effect-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { applyAbAttrs, applyPostDamageAbAttrs, BlockNonDirectDamageAbAttr, BlockStatusDamageAbAttr, PostDamageAbAttr, ReduceBurnDamageAbAttr } from "#app/data/ability"; import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims"; diff --git a/src/phases/quiet-form-change-phase.ts b/src/phases/quiet-form-change-phase.ts index 8d7c91f04e1..1a4a1415a19 100644 --- a/src/phases/quiet-form-change-phase.ts +++ b/src/phases/quiet-form-change-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { SemiInvulnerableTag } from "#app/data/battler-tags"; import { SpeciesFormChange, getSpeciesFormChangeMessage } from "#app/data/pokemon-forms"; import { getTypeRgb } from "#app/data/type"; diff --git a/src/phases/reload-session-phase.ts b/src/phases/reload-session-phase.ts index c2e71465787..a88cb1b1de3 100644 --- a/src/phases/reload-session-phase.ts +++ b/src/phases/reload-session-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; import { Mode } from "#app/ui/ui"; import * as Utils from "#app/utils"; diff --git a/src/phases/return-phase.ts b/src/phases/return-phase.ts index 3539dbfa951..9dd13f6d5be 100644 --- a/src/phases/return-phase.ts +++ b/src/phases/return-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { SpeciesFormChangeActiveTrigger } from "#app/data/pokemon-forms"; import { SwitchType } from "#enums/switch-type"; import { SwitchSummonPhase } from "./switch-summon-phase"; diff --git a/src/phases/ribbon-modifier-reward-phase.ts b/src/phases/ribbon-modifier-reward-phase.ts index 320e864f095..beda85c2463 100644 --- a/src/phases/ribbon-modifier-reward-phase.ts +++ b/src/phases/ribbon-modifier-reward-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import PokemonSpecies from "#app/data/pokemon-species"; import { ModifierTypeFunc } from "#app/modifier/modifier-type"; import { Mode } from "#app/ui/ui"; diff --git a/src/phases/scan-ivs-phase.ts b/src/phases/scan-ivs-phase.ts index d6b6516bb35..6f9413bc4fd 100644 --- a/src/phases/scan-ivs-phase.ts +++ b/src/phases/scan-ivs-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { CommonBattleAnim, CommonAnim } from "#app/data/battle-anims"; import { Stat } from "#app/enums/stat"; diff --git a/src/phases/select-biome-phase.ts b/src/phases/select-biome-phase.ts index d338796e7ab..55dbbdf69b1 100644 --- a/src/phases/select-biome-phase.ts +++ b/src/phases/select-biome-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { biomeLinks, getBiomeName } from "#app/data/balance/biomes"; import { Biome } from "#app/enums/biome"; import { MoneyInterestModifier, MapModifier } from "#app/modifier/modifier"; diff --git a/src/phases/select-challenge-phase.ts b/src/phases/select-challenge-phase.ts index 373ed1c2f46..2a6797d3556 100644 --- a/src/phases/select-challenge-phase.ts +++ b/src/phases/select-challenge-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; import { Mode } from "#app/ui/ui"; diff --git a/src/phases/select-gender-phase.ts b/src/phases/select-gender-phase.ts index bc0fd1da097..45cbb70dcac 100644 --- a/src/phases/select-gender-phase.ts +++ b/src/phases/select-gender-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { PlayerGender } from "#app/enums/player-gender"; import { Phase } from "#app/phase"; import { SettingKeys } from "#app/system/settings/settings"; diff --git a/src/phases/select-modifier-phase.ts b/src/phases/select-modifier-phase.ts index efeab7b2d94..0ab6c6d4bc5 100644 --- a/src/phases/select-modifier-phase.ts +++ b/src/phases/select-modifier-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { ModifierTier } from "#app/modifier/modifier-tier"; import { regenerateModifierPoolThresholds, ModifierTypeOption, ModifierType, getPlayerShopModifierTypeOptionsForWave, PokemonModifierType, FusePokemonModifierType, PokemonMoveModifierType, TmModifierType, RememberMoveModifierType, PokemonPpRestoreModifierType, PokemonPpUpModifierType, ModifierPoolType, getPlayerModifierTypeOptions } from "#app/modifier/modifier-type"; import { ExtraModifierModifier, HealShopCostModifier, Modifier, PokemonHeldItemModifier, TempExtraModifierModifier } from "#app/modifier/modifier"; diff --git a/src/phases/select-starter-phase.ts b/src/phases/select-starter-phase.ts index 76841f1d109..1a015504698 100644 --- a/src/phases/select-starter-phase.ts +++ b/src/phases/select-starter-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { applyChallenges, ChallengeType } from "#app/data/challenge"; import { Gender } from "#app/data/gender"; import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms"; diff --git a/src/phases/select-target-phase.ts b/src/phases/select-target-phase.ts index 5bc81f54cb9..6bce3bf67a4 100644 --- a/src/phases/select-target-phase.ts +++ b/src/phases/select-target-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { Command } from "#app/ui/command-ui-handler"; import { Mode } from "#app/ui/ui"; diff --git a/src/phases/shiny-sparkle-phase.ts b/src/phases/shiny-sparkle-phase.ts index 9d9bdf50d1f..61d6674601d 100644 --- a/src/phases/shiny-sparkle-phase.ts +++ b/src/phases/shiny-sparkle-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { PokemonPhase } from "./pokemon-phase"; diff --git a/src/phases/show-ability-phase.ts b/src/phases/show-ability-phase.ts index 1db8028fe75..66885c06af8 100644 --- a/src/phases/show-ability-phase.ts +++ b/src/phases/show-ability-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { PokemonPhase } from "./pokemon-phase"; diff --git a/src/phases/show-party-exp-bar-phase.ts b/src/phases/show-party-exp-bar-phase.ts index f7e2b754009..71bd39e3898 100644 --- a/src/phases/show-party-exp-bar-phase.ts +++ b/src/phases/show-party-exp-bar-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { ExpGainsSpeed } from "#app/enums/exp-gains-speed"; import { ExpNotification } from "#app/enums/exp-notification"; import { ExpBoosterModifier } from "#app/modifier/modifier"; diff --git a/src/phases/show-trainer-phase.ts b/src/phases/show-trainer-phase.ts index 5bc05d08d63..17106b54048 100644 --- a/src/phases/show-trainer-phase.ts +++ b/src/phases/show-trainer-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { PlayerGender } from "#app/enums/player-gender"; import { BattlePhase } from "./battle-phase"; diff --git a/src/phases/stat-stage-change-phase.ts b/src/phases/stat-stage-change-phase.ts index 25eaa85fb65..f1e268b3c6c 100644 --- a/src/phases/stat-stage-change-phase.ts +++ b/src/phases/stat-stage-change-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#app/battle"; import { applyAbAttrs, applyPostStatStageChangeAbAttrs, applyPreStatStageChangeAbAttrs, PostStatStageChangeAbAttr, ProtectStatAbAttr, StatStageChangeCopyAbAttr, StatStageChangeMultiplierAbAttr } from "#app/data/ability"; import { ArenaTagSide, MistTag } from "#app/data/arena-tag"; diff --git a/src/phases/summon-missing-phase.ts b/src/phases/summon-missing-phase.ts index 0efb6713ae3..f32f6a377f5 100644 --- a/src/phases/summon-missing-phase.ts +++ b/src/phases/summon-missing-phase.ts @@ -1,7 +1,7 @@ import { getPokemonNameWithAffix } from "#app/messages"; import i18next from "i18next"; import { SummonPhase } from "./summon-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class SummonMissingPhase extends SummonPhase { constructor(fieldIndex: integer) { diff --git a/src/phases/summon-phase.ts b/src/phases/summon-phase.ts index 0c0243b8587..bc4440c3098 100644 --- a/src/phases/summon-phase.ts +++ b/src/phases/summon-phase.ts @@ -12,7 +12,7 @@ import { PostSummonPhase } from "./post-summon-phase"; import { GameOverPhase } from "./game-over-phase"; import { ShinySparklePhase } from "./shiny-sparkle-phase"; import { MysteryEncounterMode } from "#enums/mystery-encounter-mode"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class SummonPhase extends PartyMemberPokemonPhase { private loaded: boolean; diff --git a/src/phases/switch-biome-phase.ts b/src/phases/switch-biome-phase.ts index 42774f7eaf7..e242268d572 100644 --- a/src/phases/switch-biome-phase.ts +++ b/src/phases/switch-biome-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Biome } from "#app/enums/biome"; import { getBiomeKey } from "#app/field/arena"; import { BattlePhase } from "./battle-phase"; diff --git a/src/phases/switch-phase.ts b/src/phases/switch-phase.ts index b0067b29ed2..8f68b52ff15 100644 --- a/src/phases/switch-phase.ts +++ b/src/phases/switch-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; // todo? +import { globalScene } from "#app/global-scene"; import PartyUiHandler, { PartyOption, PartyUiMode } from "#app/ui/party-ui-handler"; import { Mode } from "#app/ui/ui"; import { SwitchType } from "#enums/switch-type"; diff --git a/src/phases/switch-summon-phase.ts b/src/phases/switch-summon-phase.ts index bf35ec13ea6..db43b01dece 100644 --- a/src/phases/switch-summon-phase.ts +++ b/src/phases/switch-summon-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; // todo? +import { globalScene } from "#app/global-scene"; import { applyPreSwitchOutAbAttrs, PreSwitchOutAbAttr } from "#app/data/ability"; import { allMoves, ForceSwitchOutAttr } from "#app/data/move"; import { getPokeballTintColor } from "#app/data/pokeball"; diff --git a/src/phases/title-phase.ts b/src/phases/title-phase.ts index 791aee9656c..8d8615e315b 100644 --- a/src/phases/title-phase.ts +++ b/src/phases/title-phase.ts @@ -20,7 +20,7 @@ import { EncounterPhase } from "./encounter-phase"; import { SelectChallengePhase } from "./select-challenge-phase"; import { SelectStarterPhase } from "./select-starter-phase"; import { SummonPhase } from "./summon-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class TitlePhase extends Phase { diff --git a/src/phases/toggle-double-position-phase.ts b/src/phases/toggle-double-position-phase.ts index 19e374d627e..f61577444d2 100644 --- a/src/phases/toggle-double-position-phase.ts +++ b/src/phases/toggle-double-position-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { FieldPosition } from "#app/field/pokemon"; import { BattlePhase } from "./battle-phase"; diff --git a/src/phases/trainer-message-test-phase.ts b/src/phases/trainer-message-test-phase.ts index 90bf69644e6..64883157fd1 100644 --- a/src/phases/trainer-message-test-phase.ts +++ b/src/phases/trainer-message-test-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { trainerConfigs } from "#app/data/trainer-config"; import { TrainerType } from "#app/enums/trainer-type"; import { BattlePhase } from "./battle-phase"; diff --git a/src/phases/trainer-victory-phase.ts b/src/phases/trainer-victory-phase.ts index 9c5b5b0eeab..6767b65d92d 100644 --- a/src/phases/trainer-victory-phase.ts +++ b/src/phases/trainer-victory-phase.ts @@ -8,7 +8,7 @@ import { BattlePhase } from "./battle-phase"; import { ModifierRewardPhase } from "./modifier-reward-phase"; import { MoneyRewardPhase } from "./money-reward-phase"; import { TrainerSlot } from "#app/data/trainer-config"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class TrainerVictoryPhase extends BattlePhase { constructor() { diff --git a/src/phases/turn-end-phase.ts b/src/phases/turn-end-phase.ts index c1b500d5e70..54a17878e63 100644 --- a/src/phases/turn-end-phase.ts +++ b/src/phases/turn-end-phase.ts @@ -9,7 +9,7 @@ import { TurnHealModifier, EnemyTurnHealModifier, EnemyStatusEffectHealChanceMod import i18next from "i18next"; import { FieldPhase } from "./field-phase"; import { PokemonHealPhase } from "./pokemon-heal-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class TurnEndPhase extends FieldPhase { constructor() { diff --git a/src/phases/turn-init-phase.ts b/src/phases/turn-init-phase.ts index 6e83ca4649e..4f20361d5fa 100644 --- a/src/phases/turn-init-phase.ts +++ b/src/phases/turn-init-phase.ts @@ -9,7 +9,7 @@ import { FieldPhase } from "./field-phase"; import { GameOverPhase } from "./game-over-phase"; import { ToggleDoublePositionPhase } from "./toggle-double-position-phase"; import { TurnStartPhase } from "./turn-start-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class TurnInitPhase extends FieldPhase { constructor() { diff --git a/src/phases/turn-start-phase.ts b/src/phases/turn-start-phase.ts index 7345a511d9c..30f153ad290 100644 --- a/src/phases/turn-start-phase.ts +++ b/src/phases/turn-start-phase.ts @@ -19,7 +19,7 @@ import { CheckStatusEffectPhase } from "#app/phases/check-status-effect-phase"; import { BattlerIndex } from "#app/battle"; import { TrickRoomTag } from "#app/data/arena-tag"; import { SwitchType } from "#enums/switch-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class TurnStartPhase extends FieldPhase { constructor() { diff --git a/src/phases/unavailable-phase.ts b/src/phases/unavailable-phase.ts index db0cc26a68e..c0b5d4224c5 100644 --- a/src/phases/unavailable-phase.ts +++ b/src/phases/unavailable-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; import { Mode } from "#app/ui/ui"; import { LoginPhase } from "./login-phase"; diff --git a/src/phases/unlock-phase.ts b/src/phases/unlock-phase.ts index 02a59c1c5d8..344187051d0 100644 --- a/src/phases/unlock-phase.ts +++ b/src/phases/unlock-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Phase } from "#app/phase"; import { Unlockables, getUnlockableName } from "#app/system/unlockables"; import { Mode } from "#app/ui/ui"; diff --git a/src/phases/victory-phase.ts b/src/phases/victory-phase.ts index 80e58372dc5..30d3795b677 100644 --- a/src/phases/victory-phase.ts +++ b/src/phases/victory-phase.ts @@ -10,7 +10,7 @@ import { ModifierRewardPhase } from "./modifier-reward-phase"; import { SelectModifierPhase } from "./select-modifier-phase"; import { TrainerVictoryPhase } from "./trainer-victory-phase"; import { handleMysteryEncounterVictory } from "#app/data/mystery-encounters/utils/encounter-phase-utils"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export class VictoryPhase extends PokemonPhase { /** If true, indicates that the phase is intended for EXP purposes only, and not to continue a battle to next phase */ diff --git a/src/phases/weather-effect-phase.ts b/src/phases/weather-effect-phase.ts index 0b48e75e8f3..00014fb9cef 100644 --- a/src/phases/weather-effect-phase.ts +++ b/src/phases/weather-effect-phase.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { applyPreWeatherEffectAbAttrs, SuppressWeatherEffectAbAttr, PreWeatherDamageAbAttr, applyAbAttrs, BlockNonDirectDamageAbAttr, applyPostWeatherLapseAbAttrs, PostWeatherLapseAbAttr } from "#app/data/ability"; import { CommonAnim } from "#app/data/battle-anims"; import { Weather, getWeatherDamageMessage, getWeatherLapseMessage } from "#app/data/weather"; diff --git a/src/pipelines/field-sprite.ts b/src/pipelines/field-sprite.ts index b51ed847982..f81845073c1 100644 --- a/src/pipelines/field-sprite.ts +++ b/src/pipelines/field-sprite.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { TerrainType, getTerrainColor } from "../data/terrain"; import * as Utils from "../utils"; diff --git a/src/system/achv.ts b/src/system/achv.ts index 7467909cd82..e0a2cb71393 100644 --- a/src/system/achv.ts +++ b/src/system/achv.ts @@ -8,7 +8,7 @@ import { Challenge, FreshStartChallenge, SingleGenerationChallenge, SingleTypeCh import { ConditionFn } from "#app/@types/common"; import { Stat, getShortenedStatKey } from "#app/enums/stat"; import { Challenges } from "#app/enums/challenges"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export enum AchvTier { COMMON, diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 75bf479dd97..ba459d2a5bd 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -1,5 +1,6 @@ import i18next from "i18next"; -import { bypassLogin, globalScene, PokeballCounts } from "#app/battle-scene"; +import { bypassLogin, PokeballCounts } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import Pokemon, { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; import { pokemonPrevolutions } from "#app/data/balance/pokemon-evolutions"; import PokemonSpecies, { allSpecies, getPokemonSpecies, noStarterFormKeys } from "#app/data/pokemon-species"; diff --git a/src/system/game-speed.ts b/src/system/game-speed.ts index 657d2c36cd7..66687aa8a4c 100644 --- a/src/system/game-speed.ts +++ b/src/system/game-speed.ts @@ -1,7 +1,8 @@ import SoundFade from "phaser3-rex-plugins/plugins/soundfade"; import FadeIn from "phaser3-rex-plugins/plugins/audio/fade/FadeIn"; import FadeOut from "phaser3-rex-plugins/plugins/audio/fade/FadeOut"; -import BattleScene, { globalScene } from "#app/battle-scene"; +import BattleScene from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import * as Utils from "../utils"; type FadeIn = typeof FadeIn; diff --git a/src/system/modifier-data.ts b/src/system/modifier-data.ts index 92ebcafb3df..b02a0fb1d47 100644 --- a/src/system/modifier-data.ts +++ b/src/system/modifier-data.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { PersistentModifier } from "#app/modifier/modifier"; import { GeneratedPersistentModifierType, ModifierType, ModifierTypeGenerator, getModifierTypeFuncById } from "#app/modifier/modifier-type"; diff --git a/src/system/pokemon-data.ts b/src/system/pokemon-data.ts index 80bb951c704..3857105a957 100644 --- a/src/system/pokemon-data.ts +++ b/src/system/pokemon-data.ts @@ -1,5 +1,5 @@ import { BattleType } from "../battle"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Gender } from "../data/gender"; import { Nature } from "#enums/nature"; import { PokeballType } from "#enums/pokeball"; diff --git a/src/system/settings/settings-gamepad.ts b/src/system/settings/settings-gamepad.ts index 3c0d2838c3b..2e7df0b53af 100644 --- a/src/system/settings/settings-gamepad.ts +++ b/src/system/settings/settings-gamepad.ts @@ -3,7 +3,7 @@ import { Mode } from "../../ui/ui"; import { truncateString } from "../../utils"; import { Button } from "#enums/buttons"; import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export enum SettingGamepad { Controller = "CONTROLLER", diff --git a/src/system/settings/settings-keyboard.ts b/src/system/settings/settings-keyboard.ts index 9922b4fbb4f..d259710cc5d 100644 --- a/src/system/settings/settings-keyboard.ts +++ b/src/system/settings/settings-keyboard.ts @@ -2,7 +2,7 @@ import { Button } from "#enums/buttons"; import { Mode } from "#app/ui/ui"; import SettingsKeyboardUiHandler from "#app/ui/settings/settings-keyboard-ui-handler"; import i18next from "i18next"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export enum SettingKeyboard { // Default_Layout = "DEFAULT_LAYOUT", diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index 225da73a436..b136b1bcbb4 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -1,29 +1,21 @@ import { Mode } from "#app/ui/ui"; import i18next from "i18next"; -import { hasTouchscreen } from "../../touch-controls"; -import { updateWindowType } from "../../ui/ui-theme"; -import { CandyUpgradeNotificationChangedEvent } from "../../events/battle-scene"; +import { globalScene } from "#app/global-scene"; +import { hasTouchscreen } from "#app/touch-controls"; +import { updateWindowType } from "#app/ui/ui-theme"; +import { CandyUpgradeNotificationChangedEvent } from "#app/events/battle-scene"; import SettingsUiHandler from "#app/ui/settings/settings-ui-handler"; import { EaseType } from "#enums/ease-type"; import { MoneyFormat } from "#enums/money-format"; import { PlayerGender } from "#enums/player-gender"; -import { getIsInitialized, initI18n } from "#app/plugins/i18n"; -import { ShopCursorTarget } from "#app/enums/shop-cursor-target"; -import { globalScene } from "#app/battle-scene"; - -function getTranslation(key: string): string { - if (!getIsInitialized()) { - initI18n(); - } - return i18next.t(key); -} +import { ShopCursorTarget } from "#enums/shop-cursor-target"; const VOLUME_OPTIONS: SettingOption[] = new Array(11).fill(null).map((_, i) => i ? { value: (i * 10).toString(), label: (i * 10).toString(), } : { value: "Mute", - label: getTranslation("settings:mute") + label: i18next.t("settings:mute") }); const SHOP_OVERLAY_OPACITY_OPTIONS: SettingOption[] = new Array(9).fill(null).map((_, i) => { diff --git a/src/timed-event-manager.ts b/src/timed-event-manager.ts index 6767ae13a07..b3fdacfc3d2 100644 --- a/src/timed-event-manager.ts +++ b/src/timed-event-manager.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { TextStyle, addTextObject } from "#app/ui/text"; import { nil } from "#app/utils"; import i18next from "i18next"; diff --git a/src/touch-controls.ts b/src/touch-controls.ts index db355e2405e..db2ae223d3f 100644 --- a/src/touch-controls.ts +++ b/src/touch-controls.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Button } from "#enums/buttons"; import EventEmitter = Phaser.Events.EventEmitter; diff --git a/src/tutorial.ts b/src/tutorial.ts index ac7ead838f8..542fa10a31f 100644 --- a/src/tutorial.ts +++ b/src/tutorial.ts @@ -1,4 +1,4 @@ -import { globalScene } from "./battle-scene"; +import { globalScene } from "#app/global-scene"; import AwaitableUiHandler from "./ui/awaitable-ui-handler"; import UiHandler from "./ui/ui-handler"; import { Mode } from "./ui/ui"; diff --git a/src/ui-inputs.ts b/src/ui-inputs.ts index 2f8f4016edb..84c029b90d3 100644 --- a/src/ui-inputs.ts +++ b/src/ui-inputs.ts @@ -8,7 +8,7 @@ import SettingsUiHandler from "./ui/settings/settings-ui-handler"; import { Button } from "#enums/buttons"; import SettingsGamepadUiHandler from "./ui/settings/settings-gamepad-ui-handler"; import SettingsKeyboardUiHandler from "#app/ui/settings/settings-keyboard-ui-handler"; -import { globalScene } from "./battle-scene"; +import { globalScene } from "#app/global-scene"; import SettingsDisplayUiHandler from "./ui/settings/settings-display-ui-handler"; import SettingsAudioUiHandler from "./ui/settings/settings-audio-ui-handler"; import RunInfoUiHandler from "./ui/run-info-ui-handler"; diff --git a/src/ui/ability-bar.ts b/src/ui/ability-bar.ts index c1ba8597dd9..5b1e31a6161 100644 --- a/src/ui/ability-bar.ts +++ b/src/ui/ability-bar.ts @@ -1,5 +1,5 @@ import { getPokemonNameWithAffix } from "#app/messages"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import Pokemon from "../field/pokemon"; import { TextStyle, addTextObject } from "./text"; import i18next from "i18next"; diff --git a/src/ui/abstact-option-select-ui-handler.ts b/src/ui/abstact-option-select-ui-handler.ts index 8fd4b6522fd..df592fc45b1 100644 --- a/src/ui/abstact-option-select-ui-handler.ts +++ b/src/ui/abstact-option-select-ui-handler.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { TextStyle, addTextObject, getTextStyleOptions } from "./text"; import { Mode } from "./ui"; import UiHandler from "./ui-handler"; diff --git a/src/ui/achv-bar.ts b/src/ui/achv-bar.ts index c07d93ad910..94b36429d98 100644 --- a/src/ui/achv-bar.ts +++ b/src/ui/achv-bar.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Achv, getAchievementDescription } from "../system/achv"; import { Voucher } from "../system/voucher"; import { TextStyle, addTextObject } from "./text"; diff --git a/src/ui/achvs-ui-handler.ts b/src/ui/achvs-ui-handler.ts index 419b0d65b87..549c5bca2d1 100644 --- a/src/ui/achvs-ui-handler.ts +++ b/src/ui/achvs-ui-handler.ts @@ -8,7 +8,7 @@ import { Mode } from "#app/ui/ui"; import { addWindow } from "#app/ui/ui-theme"; import { ScrollBar } from "#app/ui/scroll-bar"; import { PlayerGender } from "#enums/player-gender"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; enum Page { ACHIEVEMENTS, diff --git a/src/ui/admin-ui-handler.ts b/src/ui/admin-ui-handler.ts index b16303a333e..e6da6f4d0d9 100644 --- a/src/ui/admin-ui-handler.ts +++ b/src/ui/admin-ui-handler.ts @@ -5,7 +5,7 @@ import { FormModalUiHandler, InputFieldConfig } from "./form-modal-ui-handler"; import { ModalConfig } from "./modal-ui-handler"; import { TextStyle } from "./text"; import { Mode } from "./ui"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; type AdminUiHandlerService = "discord" | "google"; type AdminUiHandlerServiceMode = "Link" | "Unlink"; diff --git a/src/ui/arena-flyout.ts b/src/ui/arena-flyout.ts index 7f894038fe8..2ecb8457c16 100644 --- a/src/ui/arena-flyout.ts +++ b/src/ui/arena-flyout.ts @@ -1,5 +1,5 @@ import { addTextObject, TextStyle } from "./text"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag"; import { WeatherType } from "#enums/weather-type"; import { TerrainType } from "#app/data/terrain"; diff --git a/src/ui/awaitable-ui-handler.ts b/src/ui/awaitable-ui-handler.ts index 7470b169033..63b0dac9d1b 100644 --- a/src/ui/awaitable-ui-handler.ts +++ b/src/ui/awaitable-ui-handler.ts @@ -1,7 +1,7 @@ import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import { Button } from "#enums/buttons"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default abstract class AwaitableUiHandler extends UiHandler { protected awaitingActionInput: boolean; diff --git a/src/ui/ball-ui-handler.ts b/src/ui/ball-ui-handler.ts index 52cd19d2ea4..420fd7609ae 100644 --- a/src/ui/ball-ui-handler.ts +++ b/src/ui/ball-ui-handler.ts @@ -6,7 +6,7 @@ import UiHandler from "./ui-handler"; import { addWindow } from "./ui-theme"; import { Button } from "#enums/buttons"; import { CommandPhase } from "#app/phases/command-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default class BallUiHandler extends UiHandler { private pokeballSelectContainer: Phaser.GameObjects.Container; diff --git a/src/ui/battle-flyout.ts b/src/ui/battle-flyout.ts index f950ac87984..7dc807524e7 100644 --- a/src/ui/battle-flyout.ts +++ b/src/ui/battle-flyout.ts @@ -1,7 +1,7 @@ import { default as Pokemon } from "../field/pokemon"; import { addTextObject, TextStyle } from "./text"; import * as Utils from "../utils"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import Move from "#app/data/move"; import { BattleSceneEventType, BerryUsedEvent, MoveUsedEvent } from "../events/battle-scene"; import { BerryType } from "#enums/berry-type"; diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index 0eb6717c291..55e8e4e646a 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -4,7 +4,7 @@ import * as Utils from "../utils"; import { addTextObject, TextStyle } from "./text"; import { getGenderSymbol, getGenderColor, Gender } from "../data/gender"; import { StatusEffect } from "#enums/status-effect"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { getTypeRgb } from "#app/data/type"; import { Type } from "#enums/type"; import { getVariantTint } from "#app/data/variant"; diff --git a/src/ui/battle-message-ui-handler.ts b/src/ui/battle-message-ui-handler.ts index 23b24c94860..8dbfaaa78e0 100644 --- a/src/ui/battle-message-ui-handler.ts +++ b/src/ui/battle-message-ui-handler.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "./text"; import { Mode } from "./ui"; import MessageUiHandler from "./message-ui-handler"; diff --git a/src/ui/bgm-bar.ts b/src/ui/bgm-bar.ts index eeb9c92c165..0cd3da71248 100644 --- a/src/ui/bgm-bar.ts +++ b/src/ui/bgm-bar.ts @@ -1,7 +1,7 @@ import { addTextObject, TextStyle } from "./text"; import i18next from "i18next"; import * as Utils from "#app/utils"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; const hiddenX = -150; const shownX = 0; diff --git a/src/ui/candy-bar.ts b/src/ui/candy-bar.ts index 086127a47c6..20c0918de2f 100644 --- a/src/ui/candy-bar.ts +++ b/src/ui/candy-bar.ts @@ -1,4 +1,5 @@ -import { globalScene, starterColors } from "#app/battle-scene"; +import { starterColors } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { TextStyle, addTextObject } from "./text"; import { argbFromRgba } from "@material/material-color-utilities"; import * as Utils from "../utils"; diff --git a/src/ui/challenges-select-ui-handler.ts b/src/ui/challenges-select-ui-handler.ts index ad0f11794a2..a89a45c6066 100644 --- a/src/ui/challenges-select-ui-handler.ts +++ b/src/ui/challenges-select-ui-handler.ts @@ -11,7 +11,7 @@ import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; import { Color, ShadowColor } from "#app/enums/color"; import { SelectStarterPhase } from "#app/phases/select-starter-phase"; import { TitlePhase } from "#app/phases/title-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; /** * Handles all the UI for choosing optional challenges. diff --git a/src/ui/char-sprite.ts b/src/ui/char-sprite.ts index 02fc933b16b..ccd97e2c8e4 100644 --- a/src/ui/char-sprite.ts +++ b/src/ui/char-sprite.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import * as Utils from "../utils"; export default class CharSprite extends Phaser.GameObjects.Container { diff --git a/src/ui/command-ui-handler.ts b/src/ui/command-ui-handler.ts index 4edecce7be7..32a3bb764a9 100644 --- a/src/ui/command-ui-handler.ts +++ b/src/ui/command-ui-handler.ts @@ -6,7 +6,7 @@ import i18next from "i18next"; import { Button } from "#enums/buttons"; import { getPokemonNameWithAffix } from "#app/messages"; import { CommandPhase } from "#app/phases/command-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export enum Command { FIGHT = 0, diff --git a/src/ui/confirm-ui-handler.ts b/src/ui/confirm-ui-handler.ts index 2f5b9d09846..68fad7ff59d 100644 --- a/src/ui/confirm-ui-handler.ts +++ b/src/ui/confirm-ui-handler.ts @@ -2,7 +2,7 @@ import AbstractOptionSelectUiHandler, { OptionSelectConfig } from "./abstact-opt import { Mode } from "./ui"; import i18next from "i18next"; import { Button } from "#enums/buttons"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler { diff --git a/src/ui/daily-run-scoreboard.ts b/src/ui/daily-run-scoreboard.ts index 242ce19c86d..ab70bcd4dbc 100644 --- a/src/ui/daily-run-scoreboard.ts +++ b/src/ui/daily-run-scoreboard.ts @@ -1,5 +1,6 @@ import i18next from "i18next"; -import BattleScene, { globalScene } from "#app/battle-scene"; +import BattleScene from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import * as Utils from "../utils"; import { TextStyle, addTextObject } from "./text"; import { WindowVariant, addWindow } from "./ui-theme"; diff --git a/src/ui/dropdown.ts b/src/ui/dropdown.ts index 4912f1002f3..ec124312e14 100644 --- a/src/ui/dropdown.ts +++ b/src/ui/dropdown.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { addTextObject, TextStyle } from "./text"; import { addWindow, WindowVariant } from "./ui-theme"; import i18next from "i18next"; diff --git a/src/ui/egg-counter-container.ts b/src/ui/egg-counter-container.ts index e5efc198194..b6fa96a6c70 100644 --- a/src/ui/egg-counter-container.ts +++ b/src/ui/egg-counter-container.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { addWindow } from "./ui-theme"; import { addTextObject, TextStyle } from "./text"; import { EggCountChangedEvent, EggEventType } from "#app/events/egg"; diff --git a/src/ui/egg-gacha-ui-handler.ts b/src/ui/egg-gacha-ui-handler.ts index 5ad664c2bf0..d3031905b34 100644 --- a/src/ui/egg-gacha-ui-handler.ts +++ b/src/ui/egg-gacha-ui-handler.ts @@ -12,7 +12,7 @@ import Overrides from "#app/overrides"; import { GachaType } from "#app/enums/gacha-types"; import i18next from "i18next"; import { EggTier } from "#enums/egg-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default class EggGachaUiHandler extends MessageUiHandler { private eggGachaContainer: Phaser.GameObjects.Container; diff --git a/src/ui/egg-hatch-scene-handler.ts b/src/ui/egg-hatch-scene-handler.ts index 6b19257113d..189d2f295d1 100644 --- a/src/ui/egg-hatch-scene-handler.ts +++ b/src/ui/egg-hatch-scene-handler.ts @@ -2,7 +2,7 @@ import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import { Button } from "#enums/buttons"; import { EggHatchPhase } from "#app/phases/egg-hatch-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default class EggHatchSceneHandler extends UiHandler { public eggHatchContainer: Phaser.GameObjects.Container; diff --git a/src/ui/egg-list-ui-handler.ts b/src/ui/egg-list-ui-handler.ts index 3b4d2855e02..1b25d55d96d 100644 --- a/src/ui/egg-list-ui-handler.ts +++ b/src/ui/egg-list-ui-handler.ts @@ -7,7 +7,7 @@ import { Button } from "#enums/buttons"; import i18next from "i18next"; import ScrollableGridUiHandler from "#app/ui/scrollable-grid-handler"; import { ScrollBar } from "#app/ui/scroll-bar"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default class EggListUiHandler extends MessageUiHandler { private readonly ROWS = 9; diff --git a/src/ui/egg-summary-ui-handler.ts b/src/ui/egg-summary-ui-handler.ts index bfe7ae7d64f..372cfec280a 100644 --- a/src/ui/egg-summary-ui-handler.ts +++ b/src/ui/egg-summary-ui-handler.ts @@ -9,7 +9,7 @@ import { EggHatchData } from "#app/data/egg-hatch-data"; import ScrollableGridUiHandler from "./scrollable-grid-handler"; import { HatchedPokemonContainer } from "./hatched-pokemon-container"; import { ScrollBar } from "#app/ui/scroll-bar"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; const iconContainerX = 112; const iconContainerY = 9; diff --git a/src/ui/evolution-scene-handler.ts b/src/ui/evolution-scene-handler.ts index 161dbe5bcd6..e7866dfea53 100644 --- a/src/ui/evolution-scene-handler.ts +++ b/src/ui/evolution-scene-handler.ts @@ -2,7 +2,7 @@ import MessageUiHandler from "./message-ui-handler"; import { TextStyle, addTextObject } from "./text"; import { Mode } from "./ui"; import { Button } from "#enums/buttons"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default class EvolutionSceneHandler extends MessageUiHandler { public evolutionContainer: Phaser.GameObjects.Container; diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 2041c3b5552..97a8648b3c3 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -1,4 +1,5 @@ -import { globalScene, InfoToggle } from "#app/battle-scene"; +import { InfoToggle } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { addTextObject, TextStyle } from "./text"; import { getTypeDamageMultiplierColor } from "#app/data/type"; import { Type } from "#enums/type"; diff --git a/src/ui/filter-bar.ts b/src/ui/filter-bar.ts index 0f17e5bd4c0..a13fbd30cda 100644 --- a/src/ui/filter-bar.ts +++ b/src/ui/filter-bar.ts @@ -3,7 +3,7 @@ import { StarterContainer } from "./starter-container"; import { addTextObject, getTextColor, TextStyle } from "./text"; import { UiTheme } from "#enums/ui-theme"; import { addWindow, WindowVariant } from "./ui-theme"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export enum DropDownColumn { GEN, diff --git a/src/ui/form-modal-ui-handler.ts b/src/ui/form-modal-ui-handler.ts index 2d5e6da9e90..9655ded4b40 100644 --- a/src/ui/form-modal-ui-handler.ts +++ b/src/ui/form-modal-ui-handler.ts @@ -5,7 +5,7 @@ import { WindowVariant, addWindow } from "./ui-theme"; import InputText from "phaser3-rex-plugins/plugins/inputtext"; import * as Utils from "../utils"; import { Button } from "#enums/buttons"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export interface FormModalConfig extends ModalConfig { errorMessage?: string; diff --git a/src/ui/game-stats-ui-handler.ts b/src/ui/game-stats-ui-handler.ts index 8e787413f7d..b3ec0d43f6e 100644 --- a/src/ui/game-stats-ui-handler.ts +++ b/src/ui/game-stats-ui-handler.ts @@ -9,7 +9,7 @@ import { speciesStarterCosts } from "#app/data/balance/starters"; import { Button } from "#enums/buttons"; import i18next from "i18next"; import { UiTheme } from "#enums/ui-theme"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; interface DisplayStat { label_key?: string; diff --git a/src/ui/hatched-pokemon-container.ts b/src/ui/hatched-pokemon-container.ts index 22e33c9a54c..15057bab560 100644 --- a/src/ui/hatched-pokemon-container.ts +++ b/src/ui/hatched-pokemon-container.ts @@ -2,7 +2,7 @@ import { EggHatchData } from "#app/data/egg-hatch-data"; import { Gender } from "#app/data/gender"; import { getVariantTint } from "#app/data/variant"; import { DexAttr } from "#app/system/game-data"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import PokemonSpecies from "#app/data/pokemon-species"; import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler"; diff --git a/src/ui/login-form-ui-handler.ts b/src/ui/login-form-ui-handler.ts index 9015cc13238..5e9967280b2 100644 --- a/src/ui/login-form-ui-handler.ts +++ b/src/ui/login-form-ui-handler.ts @@ -7,7 +7,7 @@ import { addTextObject, TextStyle } from "./text"; import { addWindow } from "./ui-theme"; import { OptionSelectItem } from "#app/ui/abstact-option-select-ui-handler"; import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; interface BuildInteractableImageOpts { scale?: number; diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index 33762c23429..e29fc248132 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -1,4 +1,5 @@ -import { bypassLogin, globalScene } from "#app/battle-scene"; +import { bypassLogin } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { TextStyle, addTextObject, getTextStyleOptions } from "./text"; import { Mode } from "./ui"; import * as Utils from "../utils"; diff --git a/src/ui/message-ui-handler.ts b/src/ui/message-ui-handler.ts index 9fe4b76e3f6..094d41c340a 100644 --- a/src/ui/message-ui-handler.ts +++ b/src/ui/message-ui-handler.ts @@ -1,7 +1,7 @@ import AwaitableUiHandler from "./awaitable-ui-handler"; import { Mode } from "./ui"; import * as Utils from "../utils"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default abstract class MessageUiHandler extends AwaitableUiHandler { protected textTimer: Phaser.Time.TimerEvent | null; diff --git a/src/ui/modal-ui-handler.ts b/src/ui/modal-ui-handler.ts index ff41a1817ee..4bec753ff5a 100644 --- a/src/ui/modal-ui-handler.ts +++ b/src/ui/modal-ui-handler.ts @@ -3,7 +3,7 @@ import { Mode } from "./ui"; import UiHandler from "./ui-handler"; import { WindowVariant, addWindow } from "./ui-theme"; import { Button } from "#enums/buttons"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export interface ModalConfig { buttonActions: Function[]; diff --git a/src/ui/modifier-select-ui-handler.ts b/src/ui/modifier-select-ui-handler.ts index 3f255c2b2d0..79396757767 100644 --- a/src/ui/modifier-select-ui-handler.ts +++ b/src/ui/modifier-select-ui-handler.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { getPlayerShopModifierTypeOptionsForWave, ModifierTypeOption, TmModifierType } from "../modifier/modifier-type"; import { getPokeballAtlasKey } from "#app/data/pokeball"; import { addTextObject, getTextStyleOptions, getModifierTierTextTint, getTextColor, TextStyle } from "./text"; diff --git a/src/ui/move-info-overlay.ts b/src/ui/move-info-overlay.ts index e099acab1ac..744a447659f 100644 --- a/src/ui/move-info-overlay.ts +++ b/src/ui/move-info-overlay.ts @@ -1,4 +1,5 @@ -import { globalScene, InfoToggle } from "#app/battle-scene"; +import { InfoToggle } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { TextStyle, addTextObject } from "./text"; import { addWindow } from "./ui-theme"; import * as Utils from "../utils"; diff --git a/src/ui/mystery-encounter-ui-handler.ts b/src/ui/mystery-encounter-ui-handler.ts index 7e219515ba9..175aa764834 100644 --- a/src/ui/mystery-encounter-ui-handler.ts +++ b/src/ui/mystery-encounter-ui-handler.ts @@ -15,7 +15,7 @@ import i18next from "i18next"; import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode"; import { MysteryEncounterTier } from "#enums/mystery-encounter-tier"; import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default class MysteryEncounterUiHandler extends UiHandler { private cursorContainer: Phaser.GameObjects.Container; diff --git a/src/ui/party-exp-bar.ts b/src/ui/party-exp-bar.ts index f892b0f9b7e..8c0673c5541 100644 --- a/src/ui/party-exp-bar.ts +++ b/src/ui/party-exp-bar.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import Pokemon from "../field/pokemon"; import { TextStyle, addTextObject } from "./text"; diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index 131773b1a18..b88b96b1ca1 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -23,7 +23,7 @@ import { Species } from "#enums/species"; import { getPokemonNameWithAffix } from "#app/messages"; import { CommandPhase } from "#app/phases/command-phase"; import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; const defaultMessage = i18next.t("partyUiHandler:choosePokemon"); diff --git a/src/ui/pokeball-tray.ts b/src/ui/pokeball-tray.ts index 0997c78a67f..bd0208401ff 100644 --- a/src/ui/pokeball-tray.ts +++ b/src/ui/pokeball-tray.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import Pokemon from "../field/pokemon"; export default class PokeballTray extends Phaser.GameObjects.Container { diff --git a/src/ui/pokemon-hatch-info-container.ts b/src/ui/pokemon-hatch-info-container.ts index 7bdef52030a..34d4f691b49 100644 --- a/src/ui/pokemon-hatch-info-container.ts +++ b/src/ui/pokemon-hatch-info-container.ts @@ -7,7 +7,8 @@ import { speciesEggMoves } from "#app/data/balance/egg-moves"; import { allMoves } from "#app/data/move"; import { Species } from "#enums/species"; import { getEggTierForSpecies } from "#app/data/egg"; -import { globalScene, starterColors } from "#app/battle-scene"; +import { starterColors } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { argbFromRgba } from "@material/material-color-utilities"; import { EggHatchData } from "#app/data/egg-hatch-data"; import { PlayerPokemon } from "#app/field/pokemon"; diff --git a/src/ui/pokemon-icon-anim-handler.ts b/src/ui/pokemon-icon-anim-handler.ts index d6fda22a1ee..010d23315f2 100644 --- a/src/ui/pokemon-icon-anim-handler.ts +++ b/src/ui/pokemon-icon-anim-handler.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import * as Utils from "../utils"; export enum PokemonIconAnimMode { diff --git a/src/ui/pokemon-info-container.ts b/src/ui/pokemon-info-container.ts index ee11ffb659d..2b43cf205b5 100644 --- a/src/ui/pokemon-info-container.ts +++ b/src/ui/pokemon-info-container.ts @@ -1,6 +1,7 @@ import { getVariantTint } from "#app/data/variant"; import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; -import BattleScene, { globalScene } from "#app/battle-scene"; +import BattleScene from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Gender, getGenderColor, getGenderSymbol } from "../data/gender"; import { getNatureName } from "../data/nature"; import { Type } from "#enums/type"; diff --git a/src/ui/registration-form-ui-handler.ts b/src/ui/registration-form-ui-handler.ts index 2904369a473..9c1fd3139fd 100644 --- a/src/ui/registration-form-ui-handler.ts +++ b/src/ui/registration-form-ui-handler.ts @@ -4,7 +4,7 @@ import { Mode } from "./ui"; import { TextStyle, addTextObject } from "./text"; import i18next from "i18next"; import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; interface LanguageSetting { diff --git a/src/ui/run-history-ui-handler.ts b/src/ui/run-history-ui-handler.ts index 05d46ff5a51..3bed6a2526f 100644 --- a/src/ui/run-history-ui-handler.ts +++ b/src/ui/run-history-ui-handler.ts @@ -1,4 +1,5 @@ -import BattleScene, { globalScene } from "#app/battle-scene"; +import BattleScene from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { GameModes } from "../game-mode"; import { TextStyle, addTextObject } from "./text"; import { Mode } from "./ui"; diff --git a/src/ui/run-info-ui-handler.ts b/src/ui/run-info-ui-handler.ts index 8f7c8dc3a72..1a575741e5e 100644 --- a/src/ui/run-info-ui-handler.ts +++ b/src/ui/run-info-ui-handler.ts @@ -25,7 +25,7 @@ import { PlayerGender } from "#enums/player-gender"; import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; import { getBiomeName } from "#app/data/balance/biomes"; import { MysteryEncounterType } from "#enums/mystery-encounter-type"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; /** * RunInfoUiMode indicates possible overlays of RunInfoUiHandler. diff --git a/src/ui/save-slot-select-ui-handler.ts b/src/ui/save-slot-select-ui-handler.ts index 2dba66f6531..30390f48c1b 100644 --- a/src/ui/save-slot-select-ui-handler.ts +++ b/src/ui/save-slot-select-ui-handler.ts @@ -1,5 +1,6 @@ import i18next from "i18next"; -import BattleScene, { globalScene } from "#app/battle-scene"; +import BattleScene from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Button } from "#enums/buttons"; import { GameMode } from "../game-mode"; import * as Modifier from "../modifier/modifier"; diff --git a/src/ui/saving-icon-handler.ts b/src/ui/saving-icon-handler.ts index 2793194c151..ca7b1fb1aa8 100644 --- a/src/ui/saving-icon-handler.ts +++ b/src/ui/saving-icon-handler.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import * as Utils from "../utils"; export default class SavingIconHandler extends Phaser.GameObjects.Container { diff --git a/src/ui/scroll-bar.ts b/src/ui/scroll-bar.ts index ffa341afceb..c94692631f8 100644 --- a/src/ui/scroll-bar.ts +++ b/src/ui/scroll-bar.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; /** * A vertical scrollbar element that resizes dynamically based on the current scrolling diff --git a/src/ui/settings/abstract-binding-ui-handler.ts b/src/ui/settings/abstract-binding-ui-handler.ts index 6b4e0b13330..cbf50ef4a58 100644 --- a/src/ui/settings/abstract-binding-ui-handler.ts +++ b/src/ui/settings/abstract-binding-ui-handler.ts @@ -5,7 +5,7 @@ import { addTextObject, TextStyle } from "../text"; import { Button } from "#enums/buttons"; import { NavigationManager } from "#app/ui/settings/navigationMenu"; import i18next from "i18next"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; type CancelFn = (succes?: boolean) => boolean; diff --git a/src/ui/settings/abstract-control-settings-ui-handler.ts b/src/ui/settings/abstract-control-settings-ui-handler.ts index e7ae290cb04..c66c8a356fe 100644 --- a/src/ui/settings/abstract-control-settings-ui-handler.ts +++ b/src/ui/settings/abstract-control-settings-ui-handler.ts @@ -9,7 +9,7 @@ import NavigationMenu, { NavigationManager } from "#app/ui/settings/navigationMe import { Device } from "#enums/devices"; import { Button } from "#enums/buttons"; import i18next from "i18next"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export interface InputsIcons { [key: string]: Phaser.GameObjects.Sprite; diff --git a/src/ui/settings/abstract-settings-ui-handler.ts b/src/ui/settings/abstract-settings-ui-handler.ts index 9e6eb277720..68f1315640c 100644 --- a/src/ui/settings/abstract-settings-ui-handler.ts +++ b/src/ui/settings/abstract-settings-ui-handler.ts @@ -9,7 +9,7 @@ import { InputsIcons } from "#app/ui/settings/abstract-control-settings-ui-handl import NavigationMenu, { NavigationManager } from "#app/ui/settings/navigationMenu"; import { Setting, SettingKeys, SettingType } from "#app/system/settings/settings"; import i18next from "i18next"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; /** diff --git a/src/ui/settings/gamepad-binding-ui-handler.ts b/src/ui/settings/gamepad-binding-ui-handler.ts index 7db82658ee6..e69578312bb 100644 --- a/src/ui/settings/gamepad-binding-ui-handler.ts +++ b/src/ui/settings/gamepad-binding-ui-handler.ts @@ -3,7 +3,7 @@ import { Mode } from "../ui"; import { Device } from "#enums/devices"; import { getIconWithSettingName, getKeyWithKeycode } from "#app/configs/inputs/configHandler"; import { addTextObject, TextStyle } from "#app/ui/text"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default class GamepadBindingUiHandler extends AbstractBindingUiHandler { diff --git a/src/ui/settings/keyboard-binding-ui-handler.ts b/src/ui/settings/keyboard-binding-ui-handler.ts index a6b45b1801f..18238241c94 100644 --- a/src/ui/settings/keyboard-binding-ui-handler.ts +++ b/src/ui/settings/keyboard-binding-ui-handler.ts @@ -3,7 +3,7 @@ import { Mode } from "../ui"; import { getKeyWithKeycode } from "#app/configs/inputs/configHandler"; import { Device } from "#enums/devices"; import { addTextObject, TextStyle } from "#app/ui/text"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default class KeyboardBindingUiHandler extends AbstractBindingUiHandler { diff --git a/src/ui/settings/move-touch-controls-handler.ts b/src/ui/settings/move-touch-controls-handler.ts index 59ec6149358..d4f1a2dbbb8 100644 --- a/src/ui/settings/move-touch-controls-handler.ts +++ b/src/ui/settings/move-touch-controls-handler.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import TouchControl from "#app/touch-controls"; import UI from "#app/ui/ui"; import { Scene } from "phaser"; diff --git a/src/ui/settings/navigationMenu.ts b/src/ui/settings/navigationMenu.ts index 8caba76a19e..729b7543e1d 100644 --- a/src/ui/settings/navigationMenu.ts +++ b/src/ui/settings/navigationMenu.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Mode } from "#app/ui/ui"; import { InputsIcons } from "#app/ui/settings/abstract-control-settings-ui-handler"; import { addTextObject, setTextStyle, TextStyle } from "#app/ui/text"; diff --git a/src/ui/settings/settings-gamepad-ui-handler.ts b/src/ui/settings/settings-gamepad-ui-handler.ts index 72f6502003a..24aeeb911e9 100644 --- a/src/ui/settings/settings-gamepad-ui-handler.ts +++ b/src/ui/settings/settings-gamepad-ui-handler.ts @@ -15,7 +15,7 @@ import AbstractControlSettingsUiHandler from "#app/ui/settings/abstract-control- import { Device } from "#enums/devices"; import { truncateString } from "#app/utils"; import i18next from "i18next"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; /** * Class representing the settings UI handler for gamepads. diff --git a/src/ui/settings/settings-keyboard-ui-handler.ts b/src/ui/settings/settings-keyboard-ui-handler.ts index e13f5ba8b88..129e283dca3 100644 --- a/src/ui/settings/settings-keyboard-ui-handler.ts +++ b/src/ui/settings/settings-keyboard-ui-handler.ts @@ -15,7 +15,7 @@ import { deleteBind } from "#app/configs/inputs/configHandler"; import { Device } from "#enums/devices"; import { NavigationManager } from "#app/ui/settings/navigationMenu"; import i18next from "i18next"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; /** * Class representing the settings UI handler for keyboards. diff --git a/src/ui/starter-container.ts b/src/ui/starter-container.ts index 43151d45f83..abf484677ce 100644 --- a/src/ui/starter-container.ts +++ b/src/ui/starter-container.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import PokemonSpecies from "../data/pokemon-species"; import { addTextObject, TextStyle } from "./text"; diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 223c04d2459..e300e670b3f 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -4,7 +4,8 @@ import { Variant, getVariantTint, getVariantIcon } from "#app/data/variant"; import { argbFromRgba } from "@material/material-color-utilities"; import i18next from "i18next"; import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; -import { globalScene, starterColors } from "#app/battle-scene"; +import { starterColors } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { allAbilities } from "#app/data/ability"; import { speciesEggMoves } from "#app/data/balance/egg-moves"; import { GrowthRate, getGrowthRateColor } from "#app/data/exp"; diff --git a/src/ui/stats-container.ts b/src/ui/stats-container.ts index 8398f94c681..bbf3146624b 100644 --- a/src/ui/stats-container.ts +++ b/src/ui/stats-container.ts @@ -2,7 +2,7 @@ import BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodete import { TextStyle, addBBCodeTextObject, addTextObject, getTextColor } from "./text"; import { PERMANENT_STATS, getStatKey } from "#app/enums/stat"; import i18next from "i18next"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; const ivChartSize = 24; diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index e9bab9104ef..8cad852b104 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -1,4 +1,5 @@ -import { globalScene, starterColors } from "#app/battle-scene"; +import { starterColors } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { Mode } from "#app/ui/ui"; import UiHandler from "#app/ui/ui-handler"; import * as Utils from "#app/utils"; diff --git a/src/ui/target-select-ui-handler.ts b/src/ui/target-select-ui-handler.ts index 12a172bf6db..84bfad3ac74 100644 --- a/src/ui/target-select-ui-handler.ts +++ b/src/ui/target-select-ui-handler.ts @@ -8,7 +8,7 @@ import { Moves } from "#enums/moves"; import Pokemon from "#app/field/pokemon"; import { ModifierBar } from "#app/modifier/modifier"; import { SubstituteTag } from "#app/data/battler-tags"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export type TargetSelectCallback = (targets: BattlerIndex[]) => void; diff --git a/src/ui/text.ts b/src/ui/text.ts index a1f645e687d..4611b895333 100644 --- a/src/ui/text.ts +++ b/src/ui/text.ts @@ -3,7 +3,7 @@ import { UiTheme } from "#enums/ui-theme"; import Phaser from "phaser"; import BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText"; import InputText from "phaser3-rex-plugins/plugins/inputtext"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { ModifierTier } from "../modifier/modifier-tier"; import i18next from "#app/plugins/i18n"; diff --git a/src/ui/time-of-day-widget.ts b/src/ui/time-of-day-widget.ts index 9c81ff561fb..2a33b475385 100644 --- a/src/ui/time-of-day-widget.ts +++ b/src/ui/time-of-day-widget.ts @@ -1,5 +1,5 @@ import * as Utils from "../utils"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { BattleSceneEventType } from "../events/battle-scene"; import { EaseType } from "#enums/ease-type"; import { TimeOfDay } from "#enums/time-of-day"; diff --git a/src/ui/title-ui-handler.ts b/src/ui/title-ui-handler.ts index f93ae6e4a97..538f78e877e 100644 --- a/src/ui/title-ui-handler.ts +++ b/src/ui/title-ui-handler.ts @@ -7,7 +7,7 @@ import i18next from "i18next"; import { TimedEventDisplay } from "#app/timed-event-manager"; import { version } from "../../package.json"; import { pokerogueApi } from "#app/plugins/api/pokerogue-api"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default class TitleUiHandler extends OptionSelectUiHandler { /** If the stats can not be retrieved, use this fallback value */ diff --git a/src/ui/ui-handler.ts b/src/ui/ui-handler.ts index c63290927e2..66ea240aac5 100644 --- a/src/ui/ui-handler.ts +++ b/src/ui/ui-handler.ts @@ -1,4 +1,4 @@ -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import { TextStyle, getTextColor } from "./text"; import { Mode } from "./ui"; import { Button } from "#enums/buttons"; diff --git a/src/ui/ui-theme.ts b/src/ui/ui-theme.ts index 64bb3eb90bf..0d42815f842 100644 --- a/src/ui/ui-theme.ts +++ b/src/ui/ui-theme.ts @@ -1,6 +1,6 @@ import { UiTheme } from "#enums/ui-theme"; import { legacyCompatibleImages } from "#app/scene-base"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export enum WindowVariant { NORMAL, diff --git a/src/ui/ui.ts b/src/ui/ui.ts index 907b010bd75..d2c73fa6ae0 100644 --- a/src/ui/ui.ts +++ b/src/ui/ui.ts @@ -1,4 +1,5 @@ -import { default as BattleScene, globalScene } from "#app/battle-scene"; +import { default as BattleScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; import UiHandler from "./ui-handler"; import BattleMessageUiHandler from "./battle-message-ui-handler"; import CommandUiHandler from "./command-ui-handler"; diff --git a/src/ui/unavailable-modal-ui-handler.ts b/src/ui/unavailable-modal-ui-handler.ts index fd084424bf2..417270aea1b 100644 --- a/src/ui/unavailable-modal-ui-handler.ts +++ b/src/ui/unavailable-modal-ui-handler.ts @@ -4,7 +4,7 @@ import { Mode } from "./ui"; import { updateUserInfo } from "#app/account"; import * as Utils from "#app/utils"; import i18next from "i18next"; -import { globalScene } from "#app/battle-scene"; +import { globalScene } from "#app/global-scene"; export default class UnavailableModalUiHandler extends ModalUiHandler { private reconnectTimer: NodeJS.Timeout | null;