Hierarchy (view full)

Constructors

Properties

abilityBar add anims arena arenaBg arenaBgTransition arenaEnemy arenaFlyout arenaNextEnemy arenaPlayer arenaPlayerTransition battleStyle bgm bgmCache bgmResumeTimer bgmVolume biomeWaveText cache cameras candyBar candyUpgradeDisplay candyUpgradeNotification charSprite children conditionalQueue currentBattle currentPhase damageNumberHandler damageNumbersMode data disableMenu enableMoveInfo enableRetries enableTouchControls enableTutorials enableVibration enemyModifierBar enemyModifiers eventTarget events expGainsSpeed expParty experimentalSprites facebook field fieldOverlay fieldSpritePipeline fieldUI fusionPaletteSwaps game gameData gameMode gameSpeed hpBarSpeed infoToggles input inputController inputMethod lastEnemyTrainer lastSavePlayTime lights load lockModifierTiers luckLabelText luckText make masterVolume matter modifierBar modifiers money moneyFormat moneyText moveAnimations musicPreference nextCommandPhaseQueue offsetGym party partyExpBar pbTray pbTrayEnemy phaseQueue phaseQueuePrepend phaseQueuePrependSpliceIndex physics playTimeTimer plugins pokeballCounts pokemonInfoContainer registry renderer reroll rexUI rngCounter rngOffset rngSeedOverride scale scene score scoreText seVolume seed sessionPlayTime sessionSlotId showArenaFlyout showLevelUpStats showMovesetFlyout showTimeOfDayWidget skipSeenDialogues sound spritePipeline spriteSparkleHandler standbyPhase sys textures time timeOfDayAnimation trainer tweens typeHints ui uiContainer uiInputs uiTheme waveCycleOffset waveSeed windowType

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 getGeneratedOffsetGym getGeneratedWaveCycleOffset getInfoToggles getMaxExpLevel getModifiers getParty getPlayerField getPlayerPokemon getPokemonById getSpeciesFormIndex getStandbyPhase getWaveMoneyAmount hasExpSprite hideEnemyModifierBar hideFieldOverlay hideLuckText initExpSprites initPokemonSprite initSession initStarterColors initVariantData isBgmPlaying launchBattle loadAtlas loadBgm loadImage loadPokemonAtlas loadSe loadSpritesheet moveBelowOverlay newArena newBattle overridePhase pauseBgm playBgm playSound playSoundWithoutBgm populatePhaseQueue preload processInfoButton pushConditionalPhase pushMovePhase pushPhase queueMessage randBattleSeedInt randomSpecies removeModifier removePartyMemberModifiers reset resetSeed resumeBgm sendTextToBack setFieldScale setModifiersVisible setPhaseQueueSplice setSeed shiftPhase showEnemyModifierBar showFieldOverlay toggleInvert triggerPokemonFormChange tryRemovePhase tryReplacePhase trySpreadPokerus tryTransferHeldItemModifier unshiftPhase update updateAndShowText updateBiomeWaveText updateFieldScale updateGameInfo updateModifiers updateMoneyText updatePartyForModifiers updateScoreText 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: default
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.
bgmCache: Set<string> = ...
bgmResumeTimer: TimerEvent
bgmVolume: number = 1
biomeWaveText: Text

Combined Biome and Wave count text

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
currentPhase: Phase
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
enemyModifierBar: ModifierBar
enemyModifiers: PersistentModifier[]
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.

Remarks

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.

Default

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
fieldOverlay: Rectangle
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
hpBarSpeed: number = 0
infoToggles: InfoToggle[] = []
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: default
lastSavePlayTime: 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
luckLabelText: Text
luckText: Text
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.

modifierBar: ModifierBar
modifiers: PersistentModifier[]
money: number
moneyFormat: MoneyFormat = MoneyFormat.NORMAL
moneyText: Text
moveAnimations: boolean = true
musicPreference: number = 0
nextCommandPhaseQueue: Phase[]
offsetGym: boolean
party: PlayerPokemon[]
partyExpBar: default
pbTray: default
pbTrayEnemy: default
phaseQueue: Phase[]
phaseQueuePrepend: Phase[]
phaseQueuePrependSpliceIndex: number
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.

playTimeTimer: TimerEvent
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.

scene: ScenePlugin

A reference to the Scene Manager Plugin.

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

score: number
scoreText: Text
seVolume: number = 1
seed: string
sessionPlayTime: number = null
sessionSlotId: number
showArenaFlyout: 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
spriteSparkleHandler: default
standbyPhase: Phase
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
    • Optional frame: string | number
    • terrainColorRatio: number = 0

    Returns Sprite

  • Parameters

    • modifier: Modifier
    • Optional ignoreUpdate: boolean
    • Optional playSound: boolean
    • Optional virtual: boolean
    • Optional instant: boolean

    Returns Promise<boolean>

  • Parameters

    • species: default
    • level: number
    • abilityIndex: number
    • formIndex: number
    • Optional gender: Gender
    • Optional shiny: boolean
    • Optional variant: Variant
    • Optional ivs: number[]
    • Optional nature: Nature
    • Optional dataSource: default | default
    • Optional postProcess: ((playerPokemon) => void)
        • (playerPokemon): void
        • Parameters

          Returns void

    Returns PlayerPokemon

  • 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
    • Optional frame: string | number
    • hasShadow: boolean = false
    • ignoreOverride: boolean = false

    Returns Sprite

  • Parameters

    • positiveChange: boolean

    Returns void

  • Parameters

    • url: string
    • Optional init: RequestInit

    Returns Promise<Response>

  • Removes all modifiers from enemy of PokemonHeldItemModifier type

    Returns void

  • Removes all modifiers from enemy of PersistentModifier type

    Returns void

  • Parameters

    • func: Function
    • offset: number
    • Optional seedOverride: string

    Returns void

  • Parameters

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

    Returns boolean

  • Parameters

    • waveIndex: number
    • level: number
    • Optional species: default
    • forceBoss: boolean = false

    Returns number

  • Parameters

    • Optional ignoreLevelCap: boolean

    Returns number

  • Parameters

    Returns number

  • Parameters

    • moneyMultiplier: number

    Returns number

  • Parameters

    • duration: number

    Returns Promise<void>

  • Parameters

    • sprite: Sprite
    • Optional pokemon: default
    • hasShadow: boolean = false
    • ignoreOverride: boolean = false

    Returns Sprite

  • Parameters

    • key: string
    • atlasPath: string
    • Optional experimental: boolean

    Returns void

  • Parameters

    • key: string
    • Optional folder: string
    • Optional filenames: string | string[]

    Returns void

  • Type Parameters

    • T extends GameObject

    Parameters

    • gameObject: T

    Returns void

  • Parameters

    • Optional bgmName: string
    • Optional fadeOut: boolean

    Returns void

  • 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

  • Parameters

    • message: string
    • Optional callbackDelay: number
    • Optional prompt: boolean
    • Optional promptDelay: number
    • Optional defer: boolean

    Returns void

  • Parameters

    • range: number
    • min: number = 0

    Returns number

  • Parameters

    • waveIndex: number
    • level: number
    • Optional fromArenaPool: boolean
    • Optional speciesFilter: PokemonSpeciesFilter
    • Optional filterAllEvolutions: boolean

    Returns default

  • 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>

  • Parameters

    • duration: number

    Returns Promise<void>

  • Parameters

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

          Returns boolean

    Returns boolean

  • Parameters

    • phaseFilter: ((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

    • Optional instant: boolean

      {boolean}

    • Optional ignoreUpdate: boolean

      {boolean}

    Returns Promise<boolean>

    true if the transfer was successful

  • 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

    • Optional player: boolean
    • Optional instant: boolean

    Returns Promise<void>

  • Parameters

    • forceVisible: boolean = true

    Returns void

  • Parameters

    • party: default[]
    • Optional instant: boolean

    Returns Promise<void>

  • Parameters

    • achvType: (new (...args) => Achv)
        • new (...args): Achv
        • Parameters

          • Rest ...args: any[]

          Returns Achv

    • Rest ...args: any[]

    Returns void