Hierarchy (view full)

Constructors

Properties

Methods

addEnemyModifier addEnemyPokemon addFaintedEnemyScore addFieldSprite addInfoToggle addModifier addMoney addPlayerPokemon addPokemonIcon addPokemonSprite animateMoneyChanged applyModifier applyModifiers applyModifiersInternal applyShuffledModifiers cachedFetch clearEnemyHeldItemModifiers clearEnemyModifiers clearPhaseQueue clearPhaseQueueSplice create executeWithSeedOffset fadeOutBgm findModifier findModifiers findPhase generateEnemyModifiers generateRandomBiome getBgmLoopPoint getCachedUrl getCurrentPhase getEncounterBossSegments getEnemyField getEnemyParty getEnemyPokemon getField getInfoToggles getMaxExpLevel getModifierBar getModifiers getParty getPlayerField getPlayerPokemon getPokemonById getSpeciesFormIndex getStandbyPhase getWaveMoneyAmount hasExpSprite hideEnemyModifierBar hideFieldOverlay hideLuckText hideShopOverlay initExpSprites initFinalBossPhaseTwo initPokemonSprite initSession initStarterColors initVariantData isBgmPlaying launchBattle loadAtlas loadBgm loadImage loadPokemonAtlas loadSe loadSpritesheet moveBelowOverlay newArena newBattle overridePhase pauseBgm playBgm playSound playSoundWithoutBgm populatePhaseQueue preload prependToPhase processInfoButton pushConditionalPhase pushMovePhase pushPhase queueMessage randBattleSeedInt randomSpecies redirectPokemonMoves removeModifier removePartyMemberModifiers reset resetSeed resumeBgm sendTextToBack setFieldScale setModifiersVisible setPhaseQueueSplice setSeed shiftPhase showEnemyModifierBar showFieldOverlay showShopOverlay toggleInvert triggerPokemonFormChange tryRemovePhase tryReplacePhase trySpreadPokerus tryTransferHeldItemModifier unshiftPhase update updateAndShowText updateBiomeWaveText updateFieldScale updateGameInfo updateModifiers updateMoneyText updatePartyForModifiers updateScoreText updateShopOverlayOpacity updateSoundVolume updateUIPositions validateAchv validateAchvs validateVoucher

Constructors

Properties

abilityBar: default
add: GameObjectFactory

The Scene Game Object Factory.

This property will only be available if defined in the Scene Injection Map.

anims: AnimationManager

A reference to the global Animation Manager.

This property will only be available if defined in the Scene Injection Map.

arena: Arena
arenaBg: Sprite
arenaBgTransition: Sprite
arenaEnemy: ArenaBase
arenaFlyout: ArenaFlyout
arenaNextEnemy: ArenaBase
arenaPlayer: ArenaBase
arenaPlayerTransition: ArenaBase
battleStyle: number = BattleStyle.SWITCH

Determines the selected battle style.

  • 0 = 'Switch'
  • 1 = 'Set' - The option to switch the active pokemon at the start of a battle will not display.
bgmVolume: number = 1
cache: CacheManager

A reference to the global Cache.

This property will only be available if defined in the Scene Injection Map.

cameras: CameraManager

The Scene Camera Manager.

This property will only be available if defined in the Scene Injection Map.

candyBar: default
candyUpgradeDisplay: number = 0

Determines what type of notification is used for Candy Upgrades

  • 0 = 'Icon'
  • 1 = 'Animation'
candyUpgradeNotification: number = 0

Determines the condition for a notification should be shown for Candy Upgrades

  • 0 = 'Off'
  • 1 = 'Passives Only'
  • 2 = 'On'
charSprite: default
children: DisplayList

The Game Object Display List belonging to this Scene.

This property will only be available if defined in the Scene Injection Map.

conditionalQueue: [(() => boolean), Phase][]
currentBattle: default
damageNumberHandler: default
damageNumbersMode: number = 0
data: DataManager

A Scene specific Data Manager Plugin.

See the registry property for the global Data Manager.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

disableMenu: boolean = false
enableMoveInfo: boolean = true
enableRetries: boolean = false
enableTouchControls: boolean = false
enableTutorials: boolean = ...
enableVibration: boolean = false
eventManager: TimedEventManager
eventTarget: EventTarget = ...

Allows subscribers to listen for events

Current Events:

  • BattleSceneEventType.MOVE_USED MoveUsedEvent
  • BattleSceneEventType.TURN_INIT TurnInitEvent
  • BattleSceneEventType.TURN_END TurnEndEvent
  • BattleSceneEventType.NEW_ARENA NewArenaEvent
events: EventEmitter

A Scene specific Event Emitter.

This property will only be available if defined in the Scene Injection Map.

expGainsSpeed: number = 0
expParty: ExpNotification = 0

Defines the experience gain display mode.

The expParty can have several modes:

  • 0 - Default: The normal experience gain display, nothing changed.
  • 1 - Level Up Notification: Displays the level up in the small frame instead of a message.
  • 2 - Skip: No level up frame nor message.

Modes 1 and 2 are still compatible with stats display, level up, new move, etc.

0 - Uses the default normal experience gain display.
experimentalSprites: boolean = false
facebook: FacebookInstantGamesPlugin

The Facebook Instant Games Plugin.

This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.

field: Container
fieldSpritePipeline: default
fieldUI: Container
fusionPaletteSwaps: boolean = true
game: Game

A reference to the Phaser.Game instance.

This property will only be available if defined in the Scene Injection Map.

gameData: GameData
gameMode: GameMode
gameSpeed: number = 1
hideIvs: boolean = false
hpBarSpeed: number = 0
input: InputPlugin

The Scene Input Manager Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

inputController: InputsController
inputMethod: string
lastEnemyTrainer: null | default
lastSavePlayTime: null | number = null
lights: LightsManager

The Scene Lights Manager Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

load: LoaderPlugin

The Scene Loader Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

lockModifierTiers: boolean
make: GameObjectCreator

The Scene Game Object Creator.

This property will only be available if defined in the Scene Injection Map.

masterVolume: number = 0.5
matter: MatterPhysics

The Scene Matter Physics Plugin.

This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.

modifiers: PersistentModifier[]
money: number
moneyFormat: MoneyFormat = MoneyFormat.NORMAL
moveAnimations: boolean = true
musicPreference: number = 0
offsetGym: boolean
partyExpBar: default
pbTray: default
pbTrayEnemy: default
phaseQueue: Phase[]

PhaseQueue: dequeue/remove the first element to get the next phase

physics: ArcadePhysics

The Scene Arcade Physics Plugin.

This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.

plugins: PluginManager

A reference to the global Plugin Manager.

The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install those plugins into Scenes as required.

pokeballCounts: PokeballCounts
pokemonInfoContainer: default
registry: DataManager

A reference to the global Data Manager.

This property will only be available if defined in the Scene Injection Map.

renderer: CanvasRenderer | WebGLRenderer

A reference to the renderer instance Phaser is using, either Canvas Renderer or WebGL Renderer.

reroll: boolean = false
rexUI: UIPlugin
rngCounter: number = 0
rngOffset: number = 0
rngSeedOverride: string = ""
scale: ScaleManager

A reference to the global Scale Manager.

This property will only be available if defined in the Scene Injection Map.

scaledCanvas: {
    height: number;
    width: number;
} = ...

Since everything is scaled up by 6 by default using the game.canvas is annoying Until such point that we use the canvas normally, this will be easier than having to divide every width and heigh by 6 to position and scale the ui

width: 320 height: 180

scene: ScenePlugin

A reference to the Scene Manager Plugin.

This property will only be available if defined in the Scene Injection Map.

score: number
seVolume: number = 1
seed: string
sessionPlayTime: null | number = null
sessionSlotId: number
showArenaFlyout: boolean = true
showBgmBar: boolean = true
showLevelUpStats: boolean = true
showMovesetFlyout: boolean = true
showTimeOfDayWidget: boolean = true
skipSeenDialogues: boolean = false
sound: NoAudioSoundManager | HTML5AudioSoundManager | WebAudioSoundManager

A reference to the Sound Manager.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

spritePipeline: default
sys: Systems

The Scene Systems. You must never overwrite this property, or all hell will break lose.

textures: TextureManager

A reference to the Texture Manager.

This property will only be available if defined in the Scene Injection Map.

time: Clock

The Scene Time and Clock Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

timeOfDayAnimation: EaseType = EaseType.NONE
trainer: Sprite
tweens: TweenManager

The Scene Tween Manager Plugin.

This property will only be available if defined in the Scene Injection Map and the plugin is installed.

typeHints: boolean = false

Defines whether or not to show type effectiveness hints

  • true: No hints
  • false: Show hints for moves
uiContainer: Container
uiInputs: UiInputs
uiTheme: UiTheme = UiTheme.DEFAULT
waveCycleOffset: number
waveSeed: string
windowType: number = 0

Methods

  • Parameters

    Returns Promise<void>

  • Parameters

    • x: number
    • y: number
    • texture: string | Texture
    • Optionalframe: string | number
    • terrainColorRatio: number = 0

    Returns Sprite

  • Parameters

    • modifier: null | Modifier
    • OptionalignoreUpdate: boolean
    • OptionalplaySound: boolean
    • Optionalvirtual: boolean
    • Optionalinstant: boolean

    Returns Promise<boolean>

  • Parameters

    • pokemon: default
    • x: number
    • y: number
    • originX: number = 0.5
    • originY: number = 0.5
    • ignoreOverride: boolean = false

    Returns Container

  • Parameters

    • pokemon: default
    • x: number
    • y: number
    • texture: string | Texture
    • Optionalframe: string | number
    • hasShadow: boolean = false
    • ignoreOverride: boolean = false

    Returns Sprite

  • Parameters

    • positiveChange: boolean

    Returns void

  • Parameters

    • url: string
    • Optionalinit: RequestInit

    Returns Promise<Response>

  • Removes all modifiers from enemy of PokemonHeldItemModifier type

    Returns void

  • Removes all modifiers from enemy of PersistentModifier type

    Returns void

  • Resets phaseQueuePrependSpliceIndex to -1, implies that calls to unshiftPhase will insert at end of phaseQueuePrepend

    Returns void

  • Parameters

    • func: Function
    • offset: number
    • OptionalseedOverride: string

    Returns void

  • Parameters

    • duration: number = 500
    • destroy: boolean = true

    Returns boolean

  • Parameters

    • waveIndex: number
    • level: number
    • Optionalspecies: default
    • forceBoss: boolean = false

    Returns number

  • Parameters

    • OptionalignoreLevelCap: boolean

    Returns number

  • Returns the ModifierBar of this scene, which is declared private and therefore not accessible elsewhere

    Parameters

    • OptionalisEnemy: boolean

      Whether to return the enemy's modifier bar

    Returns ModifierBar

  • Get all of the modifiers that match modifierType

    Type Parameters

    Parameters

    • modifierType: Constructor<T>

      The type of modifier to apply; must extend PersistentModifier

    • player: boolean = true

      Whether to search the player (true) or the enemy (false); Defaults to true

    Returns T[]

    the list of all modifiers that matched modifierType.

  • Parameters

    Returns number

  • Parameters

    • moneyMultiplier: number

    Returns number

  • Parameters

    • duration: number

    Returns Promise<void>

  • Parameters

    • duration: number

    Returns Promise<void>

  • Initialized the 2nd phase of the final boss (e.g. form-change for Eternatus)

    Parameters

    • pokemon: default

      The (enemy) pokemon

    Returns void

  • Parameters

    • sprite: Sprite
    • Optionalpokemon: default
    • hasShadow: boolean = false
    • ignoreOverride: boolean = false

    Returns Sprite

  • Parameters

    • key: string
    • atlasPath: string
    • Optionalexperimental: boolean

    Returns void

  • Parameters

    • key: string
    • Optionalfolder: string
    • Optionalfilenames: string | string[]

    Returns void

  • Type Parameters

    • T extends GameObject

    Parameters

    • gameObject: T

    Returns void

  • Parameters

    • OptionalbgmName: string
    • OptionalfadeOut: boolean

    Returns void

  • Moves everything from nextCommandPhaseQueue to phaseQueue (keeping order)

    Returns void

  • Tries to add the input phase to index before target phase in the phaseQueue, else simply calls unshiftPhase()

    Parameters

    Returns boolean

    boolean if a targetPhase was found and added

  • Adds a phase to the conditional queue and ensures it is executed only when the specified condition is met.

    This method allows deferring the execution of a phase until certain conditions are met, which is useful for handling situations like abilities and entry hazards that depend on specific game states.

    Parameters

    • phase: Phase

      The phase to be added to the conditional queue.

    • condition: (() => boolean)

      A function that returns a boolean indicating whether the phase should be executed.

        • (): boolean
        • Returns boolean

    Returns void

  • Adds a phase to nextCommandPhaseQueue, as long as boolean passed in is false

    Parameters

    • phase: Phase

      Phase the phase to add

    • defer: boolean = false

      boolean on which queue to add to, defaults to false, and adds to phaseQueue

    Returns void

  • Adds a MessagePhase, either to PhaseQueuePrepend or nextCommandPhaseQueue

    Parameters

    • message: string

      string for MessagePhase

    • OptionalcallbackDelay: null | number

      optional param for MessagePhase constructor

    • Optionalprompt: null | boolean

      optional param for MessagePhase constructor

    • OptionalpromptDelay: null | number

      optional param for MessagePhase constructor

    • Optionaldefer: null | boolean

      boolean for which queue to add it to, false -> add to PhaseQueuePrepend, true -> nextCommandPhaseQueue

    Returns void

  • Parameters

    • range: number
    • min: number = 0

    Returns number

  • Parameters

    • waveIndex: number
    • level: number
    • OptionalfromArenaPool: boolean
    • OptionalspeciesFilter: PokemonSpeciesFilter
    • OptionalfilterAllEvolutions: boolean

    Returns default

  • Used in doubles battles to redirect moves from one pokemon to another when one faints or is removed from the field

    Parameters

    • removedPokemon: default

      Pokemon the pokemon that is being removed from the field (flee, faint), moves to be redirected FROM

    • allyPokemon: default

      Pokemon the pokemon that will have the moves be redirected TO

    Returns void

  • Parameters

    • partyMemberIndex: number

    Returns Promise<void>

  • Parameters

    • clearScene: boolean = false
    • clearData: boolean = false
    • reloadI18n: boolean = false

    Returns void

  • Pushes all Phaser.GameObjects.Text objects in the top right to the bottom of the canvas

    Returns void

  • Parameters

    • scale: number
    • instant: boolean = false

    Returns Promise<void>

  • Used by function unshiftPhase(), sets index to start inserting at current length instead of the end of the array, useful if phaseQueuePrepend gets longer with Phases

    Returns void

  • Is called by each Phase implementations "end()" by default We dump everything from phaseQueuePrepend to the start of of phaseQueue then removes first Phase and starts it

    Returns void

  • Parameters

    • duration: number

    Returns Promise<void>

  • Parameters

    • duration: number

    Returns Promise<void>

  • Parameters

    • phaseFilter: ((phase: Phase) => boolean)
        • (phase): boolean
        • Parameters

          Returns boolean

    Returns boolean

  • Parameters

    • phaseFilter: ((phase: Phase) => boolean)
        • (phase): boolean
        • Parameters

          Returns boolean

    • phase: Phase

    Returns boolean

  • Try to transfer a held item to another pokemon. If the recepient already has the maximum amount allowed for this item, the transfer is cancelled. The quantity to transfer is automatically capped at how much the recepient can take before reaching the maximum stack size for the item. A transfer that moves a quantity smaller than what is specified in the transferQuantity parameter is still considered successful.

    Parameters

    • itemModifier: PokemonHeldItemModifier

      PokemonHeldItemModifier item to transfer (represents the whole stack)

    • target: default

      Pokemon pokemon recepient in this transfer

    • playSound: boolean

      {boolean}

    • transferQuantity: number = 1

      integer how many items of the stack to transfer. Optional, defaults to 1

    • Optionalinstant: boolean

      {boolean}

    • OptionalignoreUpdate: boolean

      {boolean}

    Returns Promise<boolean>

    true if the transfer was successful

  • Adds Phase to the end of phaseQueuePrepend, or at phaseQueuePrependSpliceIndex

    Parameters

    Returns void

  • This method should be overridden by your own Scenes.

    This method is called once per game step while the scene is running.

    Returns void

  • Parameters

    • Optionalplayer: boolean
    • Optionalinstant: boolean

    Returns Promise<void>

  • Parameters

    • forceVisible: boolean = true

    Returns void

  • Parameters

    • party: default[]
    • Optionalinstant: boolean

    Returns Promise<void>