A reference to the global Animation Manager.
This property will only be available if defined in the Scene Injection Map.
Determines the selected battle style.
A reference to the global Cache.
This property will only be available if defined in the Scene Injection Map.
The Scene Camera Manager.
This property will only be available if defined in the Scene Injection Map.
Determines what type of notification is used for Candy Upgrades
Determines the condition for a notification should be shown for Candy Upgrades
The Game Object Display List belonging to this Scene.
This property will only be available if defined in the Scene Injection Map.
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.
Determines if the egg hatching animation should be skipped
A Scene specific Event Emitter.
This property will only be available if defined in the Scene Injection Map.
ReadonlyeventAllows subscribers to listen for events
Current Events:
NewArenaEventDefines the Experience gain display mode.
The Facebook Instant Games Plugin.
This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.
A reference to the Phaser.Game instance.
This property will only be available if defined in the Scene Injection Map.
The Scene Input Manager Plugin.
This property will only be available if defined in the Scene Injection Map and the plugin is installed.
OptionallastIf the previous wave was a MysteryEncounter, tracks the object with this variable. Mostly used for visual object cleanup
The Scene Lights Manager Plugin.
This property will only be available if defined in the Scene Injection Map and the plugin is installed.
The Scene Loader Plugin.
This property will only be available if defined in the Scene Injection Map and the plugin is installed.
The Scene Game Object Creator.
This property will only be available if defined in the Scene Injection Map.
The Scene Matter Physics Plugin.
This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.
Session save data that pertains to Mystery Encounters
ReadonlyphaseManager for the phases active in the battle scene
The Scene Arcade Physics Plugin.
This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.
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.
A reference to the global Data Manager.
This property will only be available if defined in the Scene Injection Map.
A reference to the renderer instance Phaser is using, either Canvas Renderer or WebGL Renderer.
A reference to the global Scale Manager.
This property will only be available if defined in the Scene Injection Map.
ReadonlyscaledSince 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
A reference to the Scene Manager Plugin.
This property will only be available if defined in the Scene Injection Map.
A reference to the Sound Manager.
This property will only be available if defined in the Scene Injection Map and the plugin is installed.
The Scene Systems. You must never overwrite this property, or all hell will break loose.
A reference to the Texture Manager.
This property will only be available if defined in the Scene Injection Map.
The Scene Time and Clock Plugin.
This property will only be available if defined in the Scene Injection Map and the plugin is installed.
The Scene Tween Manager Plugin.
This property will only be available if defined in the Scene Injection Map and the plugin is installed.
Defines whether or not to show type effectiveness hints
OptionalignoreUpdate: booleanOptionalinstant: booleanOptionaldataSource: PokemonDataOptionalpostProcess: (enemyPokemon: EnemyPokemon) => voidOptionalignoreUpdate: booleanOptionalplaySound: booleanOptionalvirtual: booleanOptionalinstant: booleanOptionalcost: numberOptionalabilityIndex: numberOptionalformIndex: numberOptionalgender: GenderOptionalshiny: booleanOptionalvariant: VariantOptionalivs: number[]Optionalnature: NatureOptionaldataSource: Pokemon | PokemonDataOptionalpostProcess: (playerPokemon: PlayerPokemon) => voidOptionalframe: string | numberApply the first modifier that matches modifierType
The type of modifier to apply; must extend PersistentModifier
Whether to search the player (true) or the enemy (false); Defaults to true
the first modifier that matches modifierType and was applied; return null if none matched
Apply all modifiers that match modifierType
The type of modifier to apply; must extend PersistentModifier
Whether to search the player (true) or the enemy (false); Defaults to true
the list of all modifiers that matched modifierType and were applied.
Helper function to apply all passed modifiers
Updates Exp and level values for Player's party, adding new level up phases as required
raw value of exp to split among participants, OR the base multiplier to use with waveIndex
If true, will increment Macho Brace stacks and give the party Pokemon friendship increases
OptionaluseWaveIndexMultiplier: booleanDefault false. If true, will multiply expValue by a scaling waveIndex multiplier. Not needed if expValue is already scaled by level/wave
OptionalpokemonParticipantIds: Set<number>Participants. If none are defined, no exp will be given. To spread evenly among the party, should pass all ids of party members.
Apply all modifiers that match modifierType in a random order
The type of modifier to apply; must extend PersistentModifier
Whether to search the player (true) or the enemy (false); Defaults to true
the list of all modifiers that matched modifierType and were applied.
Optionalinit: RequestInitRemoves all modifiers from enemy pokemon of PokemonHeldItemModifier type
Removes all modifiers from enemy pokemon of PersistentModifier type
Fades out current track for delay ms, then fades in new track.
Find the first modifier that pass the modifierFilter function
The function used to filter a target's modifiers
Whether to search the player (true) or the enemy (false); Defaults to true
the first modifier that passed the modifierFilter function; undefined if none passed
Get all of the modifiers that pass the modifierFilter function
The function used to filter a target's modifiers
Whether to search the player (true) or the enemy (false); Defaults to true
the list of all modifiers that passed the modifierFilter function
OptionalheldModifiersConfigs: HeldModifierConfig[][]The loop point of any given battle, mystery encounter, or title track, read as seconds and milliseconds.
Optionalspecies: PokemonSpeciesReturns an array of EnemyPokemon of length 1 or 2 depending on if in a double battle or not. Does not actually check if the pokemon are on the field or not.
array of EnemyPokemon
Whether a pokemon that is currently switching out is valid, default true
The first EnemyPokemon that is on the field
and is active
(aka is allowed in battle),
or undefined if there are no valid pokemon
Returns an array of Pokemon on both sides of the battle - player first, then enemy. Does not actually check if the pokemon are on the field or not, and always has length 4 regardless of battle type.
Whether to consider only active pokemon (as described by ()); default false.
If true, will also remove all null values from the array.
An array of Pokemon, as described above.
Returns the ModifierBar of this scene, which is declared private and therefore not accessible elsewhere
Whether to return the enemy modifier bar instead of the player bar; default false
The ModifierBar for the given side of the field
Get all of the modifiers that match modifierType
The type of modifier to apply; must extend PersistentModifier
Whether to search the player (true) or the enemy (false); Defaults to true
the list of all modifiers that matched modifierType.
Loads or generates a mystery encounter
OptionalencounterType: MysteryEncounterTypeused to load session encounter when restarting game, etc.
OptionalcanBypass: booleanoptional boolean to indicate that the request is coming from a function that needs to access a Mystery Encounter outside of gameplay requirements
Returns an array of PlayerPokemon of length 1 or 2 depending on if in a double battle or not.
(Default false) Whether to consider only active on-field pokemon
array of PlayerPokemon
Whether a pokemon that is currently switching out is valid, default true
The first PlayerPokemon that is on the field
and is active
(aka is allowed in battle),
or undefined if there are no valid pokemon
An array of PlayerPokemon filtered from the player's party
that are allowed in battle.
Optionalgender: GenderOptionalnature: NatureOptionalignoreArena: booleanInitialized the 2nd phase of the final boss (e.g. form-change for Eternatus)
The (enemy) pokemon
Initialize the variant data. If experimental sprites are enabled, their entries are replaced via this method.
Returns if a wave COULD spawn a MysteryEncounter.
Even if returns true, does not guarantee that a wave will actually be a ME.
That check is made in BattleScene.isWaveMysteryEncounter instead.
OptionalfilenameRoot: stringOptionalfilename: stringOptionalfilename: stringOptionalexperimental: booleanOptionalfolder: stringOptionalfilenames: string | string[]OptionalwaveIndex: numberOptionalbattleType: BattleTypeOptionaltrainerData: TrainerDataOptionaldouble: booleanOptionalmysteryEncounterType: MysteryEncounterTypeOptionalbgmName: stringOptionalfadeOut: booleanOptionalpauseDuration: numberGenerates a random number using the current battle's seed
This calls Battle.randSeedInt(range, min) in src/battle.ts
which calls randSeedInt(range, min) in src/utils.ts
The minimum integer to pick, default 0
OptionalfromArenaPool: booleanOptionalspeciesFilter: PokemonSpeciesFilterOptionalfilterAllEvolutions: booleanRemoves a currently owned item. If the item is stacked, the entire item stack
gets removed. This function does NOT apply in-battle effects, such as Unburden.
If in-battle effects are needed, use Pokemon.loseHeldItem instead.
The item to be removed.
true to remove an item owned by the enemy rather than the player; default false.
true if the item exists and was successfully removed, false otherwise
Removes a PlayerPokemon from the party, and clears modifiers for that Pokemon's id
Useful for MEs/Challenges that remove Pokemon from the player party temporarily or permanently
Default true. If true, will destroy the PlayerPokemon after removing
OptionalwaveIndex: numberPushes all Phaser.GameObjects.Text objects in the top right to the bottom of the canvas
OptionalfieldAssets: Sprite[]Attempt to discard one or more copies of a held item.
The PokemonHeldItemModifier being discarded
The number of copies to remove (up to the amount currently held); default 1
Whether the item was successfully discarded. Removing fewer items than requested is still considered a success.
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.
PokemonHeldItemModifier item to transfer (represents the whole stack)
Pokemon recepient in this transfer
true to play a sound when transferring the item
How many items of the stack to transfer. Optional, defaults to 1
Optionalinstant: boolean??? (Optional)
OptionalignoreUpdate: boolean??? (Optional)
If true, treat the item's current holder as losing the item (for now, this simply enables Unburden). Default is true.
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.
Displays the current luck value.
The time for this label to fade in, if it is not already visible.
Optionalinstant: booleanOptionalinstant: booleanOptionalargs: unknown[]Optionalargs: unknown[]
The Scene Game Object Factory.
This property will only be available if defined in the Scene Injection Map.