If true, when an option is selected the field visuals will fade out automatically Default false
If true, allows catching a wild pokemon during the encounter Default false
If true, encounter will continuously run through multiple battles/puzzles/etc. instead of going to next wave MUST EVENTUALLY BE DISABLED TO CONTINUE TO NEXT WAVE Default false
Dialogue object containing all the dialogue, messages, tooltips, etc. for an encounter
Can be set for uses programatic dialogue during an encounter (storing the name of one of the party's pokemon, etc.) Example use: see MYSTERIOUS_CHEST
Optional
disallowedIf specified, defines any challenges (from Challenge game mode) where the MysteryEncounter
should NOT spawn
Optional
disallowedIf specified, defines any game modes where the MysteryEncounter
should NOT spawn
Optional
doWill execute callback during VictoryPhase of a continuousEncounter
Optional
doWill provide the player party EXP before rewards are displayed for that wave
Optional
doWill provide the player a rewards shop for that wave
Optional
encounterCustom battle animations that are configured for encounter effects and visuals Specify here so that assets are loaded on initialization of encounter
Should be set depending upon option selected as part of an encounter For example, if there is no battle as part of the encounter/selected option, should be set to NO_BATTLE Defaults to DEFAULT
Data used for setting up/initializing enemy party in battles
Can store multiple configs so that one can be chosen based on option selected
Should usually be defined in onInit()
or onPreOptionPhase()
Intro visuals on the field will slide in from the right instead of the left Default false
Can be set higher or lower based on the type of battle or exp gained for an option/encounter Defaults to 1
If true, allows fleeing from a wild encounter (trainer battle MEs auto-disable fleeing) Default true
If true, encounter will not animate the target Pokemon as part of battle animations Used for encounters where it is not a "real" battle, but still uses battle animations and commands (see FunAndGamesEncounter for an example)
If true, hides "A Wild X Appeared" etc. messages Default true
Optional
introObject instance containing sprite data for an encounter when it is being spawned Otherwise, will be undefined You probably shouldn't do anything directly with this unless you have a very specific need
Can add any asset load promises here during onInit() to make sure the scene awaits the loads properly
Flag for checking if it's the first time a shop is being shown for an encounter. Defaults to true so that the first shop does not override the specified rewards. Will be set to false after a shop is shown (so can't reroll same rarity items for free)
Maximum number of times the encounter can be seen per run Rogue tier encounters default to 1, others default to 3
Optional
miscGeneric property to set any custom data required for the encounter Extremely useful for carrying state/data between onPreOptionPhase/onOptionPhase/onPostOptionPhase
Optional
onCan perform special logic when a ME battle is lost, before GameOver/battle retry prompt.
Should return true
if it is treated as "real" Game Over, false
if not.
Optional
onEvent when Encounter is first loaded, use it for data conditioning
Optional
onEvent prior to any rewards logic in MysteryEncounterRewardsPhase
Optional
onEvent triggered prior to CommandPhase, during TurnInitPhase
Optional
onEvent when battlefield visuals have finished sliding in and the encounter dialogue begins
If true, will prevent updating GameStats for encountering and/or defeating Pokemon
Optional
primaryPrimary Pokemon is a single pokemon randomly selected from the party that meet ALL primary pokemon requirements
Requirements
Optional
secondarySecondary Pokemon are pokemon that meet ALL secondary pokemon requirements Note that an individual requirement may require multiple pokemon, but the resulting pokemon after all secondary requirements are met may be lower than expected If the primary pokemon and secondary pokemon are the same and ExcludePrimaryFromSupportRequirements flag is true, primary pokemon may be promoted from secondary pool
Optional
selectedWill be set by option select handlers automatically, and can be used to refer to which option was chosen by later phases
If true, will skip enemy pokemon turns during battle for the encounter Used for encounters where it is not a "real" battle, but still uses battle animations and commands (see FunAndGamesEncounter for an example)
If true, will skip COMMAND input and go straight to FIGHT (move select) input menu
Will be set by option select handlers automatically, and can be used to refer to which option was chosen by later phases
Will be set automatically, indicates special moves in startOfBattleEffects are complete (so will not repeat)
If an encounter uses MysteryEncounterMode.continuousEncounter, should rely on this value for seed offset instead of wave index.
This offset is incremented for each new MysteryEncounterPhase that occurs, so multi-encounter RNG will be consistent on resets and not be affected by number of turns, move RNG, etc.
Initializes encounter intro sprites based on the sprite configs defined in spriteConfigs
Checks if the current scene state meets the requirements for the MysteryEncounter
to spawn
This is used to filter the pool of encounters down to only the ones with all requirements met
Checks if a specific player pokemon meets all given primary EncounterPokemonRequirements
Used automatically as part of meetsRequirements
, but can also be used to manually check certain Pokemon where needed
Auto-pushes dialogue tokens from the encounter (and option) requirements. Will use the first support pokemon in list For multiple support pokemon in the dialogue token, it will have to be overridden.
Maintains seed offset for RNG consistency
Increments if the same MysteryEncounter
has multiple option select cycles
MysteryEncounter class that defines the logic for a single encounter These objects will be saved as part of session data any time the player is on a floor with an encounter Unless you know what you're doing, you should use MysteryEncounterBuilder to create an instance for this class