ReadonlybgmReadonlybiomeReadonlyeventPrivatelastPrivatepokemonReadonlypositionalAll currently-active PositionalTags on both sides of the field, sorted by tag type.
All currently-active ArenaTags on both sides of the field.
Private ReadonlytrainerA float representing the loop point of the current biome's bgm in seconds
The denominator for the chance for a trainer spawn
(e.g. if this is 4, then the chance for a trainer battle in that biome is 1/4)
Add a new ArenaTag to the arena, triggering overlap effects on existing tags as applicable.
The ArenaTagType of the tag to add.
The number of turns the newly-added tag should last.
The MoveId of the move creating the tag, or undefined if not from a move.
The PID of the Pokemon creating the tag.
The ArenaTagSide(s) to which the tag should apply; default ArenaTagSide.BOTH.
Whether to suppress messages produced by tag addition; default false.
true if the tag was successfully added without overlapping.
Applies the specified tag to both sides (ie: both user and trainer's tag that match the Tag specified)
by calling ()
The ArenaTagType of the desired tag
Parameters for the tag
Applies the specified tag to both sides (ie: both user and trainer's tag that match the Tag specified)
by calling ()
A constructor of an ArenaTag to filter tags by
Parameters for the tag
Applies each ArenaTag in this Arena, based on which side (self, enemy, or both) is passed in as a parameter
A constructor of an ArenaTag to filter tags by
The ArenaTagSide dictating which side's arena tags to apply
Parameters for the tag
Applies each ArenaTag in this Arena, based on which side (self, enemy, or both) is passed in as a parameter
The ArenaTagType of the desired tag
The ArenaTagSide dictating which side's arena tags to apply
Parameters for the tag
Whether or not the terrain can be set to the specified terrain
Whether or not the weather can be changed to the specified weather
PrivatecheckHelper method to determine whether or not to reroll a legend-like species generation attempt based on the estimated BST and wave.
The species being checked
The adjusted wave index, accounting for Daily Mode
Whether rerolling is required
Uses findTagsOnSide to filter (using the parameter function) for specific tags that apply to both sides
array of ArenaTags from which the Arena's tags return true and apply to both sides
Returns specific tags from the arena that pass the tagPredicate function passed in as a parameter, and apply to the given side
a function mapping ArenaTags to booleans
The ArenaTagSide to look at
array of ArenaTags from which the Arena's tags return true and apply to the given side
PrivategenerateGenerates a boss BiomePoolTier for a given tier value.
| Tier | Tier Values | Chance |
|---|---|---|
| Boss | 20-63 | 44/64 |
| Boss R | 6-19 | 14/64 |
| Boss SR | 1-5 | 5/64 |
| Boss UR | 0 | 1/64 |
Number from 0-63
the generated BiomePoolTier
PrivategenerateGenerates a non-boss BiomePoolTier for a given tier value.
| Tier | Tier Values | Chance |
|---|---|---|
| Common | 156-511 | 356/512 |
| Uncommon | 32-155 | 124/512 |
| Rare | 6-31 | 26/512 |
| Super Rare | 1-5 | 5/512 |
| Ultra Rare | 0 | 1/512 |
Number from 0-511
the generated BiomePoolTier
Attempt to get a tag from the Arena via getTagOnSide that applies to both sides
The ArenaTagType to retrieve
The existing ArenaTag, or undefined if not present.
Attempt to get a tag from the Arena via getTagOnSide that applies to both sides
The constructor of the ArenaTag to retrieve
The existing ArenaTag, or undefined if not present.
Attempts to get a tag from the Arena from a specific side (the tag passed in has to either apply to both sides, or the specific side only)
eg: MIST only applies to the user's side, while MUD_SPORT applies to both user and enemy side
The ArenaTagType or ArenaTag to get
The ArenaTagSide to look at
either the ArenaTag, or undefined if it isn't there
Check whether the Arena has any of the given tags.
One or more tag types to check
Whether a tag exists on either side of the field with any of the given type(s).
Whether the current biome takes place "outdoors" (for the purposes of time of day tints)
PrivateoverrideOverride the terrain to the value set inside Overrides.STARTING_TERRAIN_OVERRIDE.
PrivateoverrideSets weather to the override specified in overrides.ts
Generate a random Pokemon species for the current biome
The current wave number
The level of the Pokemon to generate
Internal counter used to track legendary mon rerolls; should always be 0 when called initially
(Default 0) The player's luck value, used to decrease the RNG ceiling of higher rarities
(and thus make them more likely)
OptionalisBoss: boolean(Optional) Whether the Pokemon is a boss
A Pokemon species.
Find and remove all ArenaTags with the given tag types on the given side of the field.
The ArenaTagTypes to remove
The ArenaTagSide to remove the tags from (for side-based tags), or ArenaTagSide.BOTH
to clear all tags on either side of the field
Whether to suppress removal messages from currently-present tags; default false
Clears weather, terrain and arena tags when entering new biome or trainer battle.
Sets a random terrain based on the biome
Sets a random weather based on the time of day and the current biome
Function to trigger all weather based form changes
Optionalsource: PokemonThe Pokemon causing the changes by removing itself from the field
Function to trigger all weather based form changes back into their normal forms
Attempt to set the current terrain to the specified type.
The TerrainType to try and set.
(Default false) Whether to prevent showing an the animation
Optionaluser: Pokemon(Optional) The Pokemon creating the terrain
Whether the terrain was successfully set.
Attempts to set a new weather to the battle
WeatherType new WeatherType to set
Optionaluser: PokemonPokemon that caused the weather effect
true if new weather set, false if no weather provided or attempting to set the same weather as currently in use
Saves the number of times a party pokemon faints during a arena encounter.
globalScene.currentBattle.enemyFaintsis the corresponding faint counter for the enemy (this resets every wave).