PokéRogue
    Preparing search index...
    Index

    Constructors

    Properties

    endBySetMode: (
        | typeof CommandPhase
        | typeof MysteryEncounterPhase
        | typeof PostMysteryEncounterPhase
        | typeof SelectGenderPhase
        | typeof SelectModifierPhase
        | typeof SelectStarterPhase
        | typeof TitlePhase
    )[] = ...
    inProgress?: InProgressStub
    interval: Timeout
    intervalRun: Timeout
    log: (
        | "AddEnemyBuffModifierPhase"
        | "AttemptCapturePhase"
        | "AttemptRunPhase"
        | "BattleEndPhase"
        | "BerryPhase"
        | "CheckInterludePhase"
        | "CheckStatusEffectPhase"
        | "CheckSwitchPhase"
        | "CommandPhase"
        | "CommonAnimPhase"
        | "DamageAnimPhase"
        | "DynamicPhaseMarker"
        | "EggHatchPhase"
        | "EggLapsePhase"
        | "EggSummaryPhase"
        | "EncounterPhase"
        | "EndCardPhase"
        | "EndEvolutionPhase"
        | "EnemyCommandPhase"
        | "EvolutionPhase"
        | "ExpPhase"
        | "FaintPhase"
        | "FormChangePhase"
        | "GameOverPhase"
        | "GameOverModifierRewardPhase"
        | "HideAbilityPhase"
        | "HidePartyExpBarPhase"
        | "InitEncounterPhase"
        | "LearnMovePhase"
        | "LevelCapPhase"
        | "LevelUpPhase"
        | "LoadMoveAnimPhase"
        | "LoginPhase"
        | "MessagePhase"
        | "ModifierRewardPhase"
        | "MoneyRewardPhase"
        | "MoveAnimPhase"
        | "MoveChargePhase"
        | "MoveEffectPhase"
        | "MoveEndPhase"
        | "MoveHeaderPhase"
        | "MovePhase"
        | "MysteryEncounterPhase"
        | "MysteryEncounterOptionSelectedPhase"
        | "MysteryEncounterBattlePhase"
        | "MysteryEncounterBattleStartCleanupPhase"
        | "MysteryEncounterRewardsPhase"
        | "PostMysteryEncounterPhase"
        | "NewBattlePhase"
        | "NewBiomeEncounterPhase"
        | "NextEncounterPhase"
        | "ObtainStatusEffectPhase"
        | "PartyExpPhase"
        | "PartyHealPhase"
        | "PokemonAnimPhase"
        | "PokemonHealPhase"
        | "PokemonTransformPhase"
        | "PositionalTagPhase"
        | "PostGameOverPhase"
        | "PostSummonPhase"
        | "PostTurnStatusEffectPhase"
        | "QuietFormChangePhase"
        | "ReloadSessionPhase"
        | "ResetStatusPhase"
        | "ReturnPhase"
        | "RevivalBlessingPhase"
        | "RibbonModifierRewardPhase"
        | "ScanIvsPhase"
        | "SelectBiomePhase"
        | "SelectChallengePhase"
        | "SelectGenderPhase"
        | "SelectModifierPhase"
        | "SelectStarterPhase"
        | "SelectTargetPhase"
        | "ShinySparklePhase"
        | "ShowAbilityPhase"
        | "ShowPartyExpBarPhase"
        | "ShowTrainerPhase"
        | "StatStageChangePhase"
        | "SummonMissingPhase"
        | "SummonPhase"
        | "SwitchBiomePhase"
        | "SwitchPhase"
        | "SwitchSummonPhase"
        | "TeraPhase"
        | "TitlePhase"
        | "ToggleDoublePositionPhase"
        | "TrainerVictoryPhase"
        | "TurnEndPhase"
        | "TurnInitPhase"
        | "TurnStartPhase"
        | "UnavailablePhase"
        | "UnlockPhase"
        | "VictoryPhase"
        | "WeatherEffectPhase"
    )[]
    onHold: onHoldStub[]

    TODO: This should not be an array; Our linear phase system means only 1 phase is ever started at once (if any)

    originalSetMode: (mode: UiMode, ...args: any[]) => Promise<void>
    originalSuperEnd: () => void

    Type Declaration

      • (): void
      • End the current phase and start a new one.

        Returns void

    phases: Record<PhaseString, PhaseStub> = {}
    PHASES: (
        | typeof AttemptCapturePhase
        | typeof AttemptRunPhase
        | typeof BattleEndPhase
        | typeof BerryPhase
        | typeof CheckSwitchPhase
        | typeof CommandPhase
        | typeof DamageAnimPhase
        | typeof EggLapsePhase
        | typeof EncounterPhase
        | typeof EndEvolutionPhase
        | typeof EnemyCommandPhase
        | typeof EvolutionPhase
        | typeof ExpPhase
        | typeof FaintPhase
        | typeof FormChangePhase
        | typeof GameOverPhase
        | typeof ModifierRewardPhase
        | typeof LearnMovePhase
        | typeof LevelCapPhase
        | typeof LoginPhase
        | typeof MessagePhase
        | typeof MoveEffectPhase
        | typeof MoveEndPhase
        | typeof MovePhase
        | typeof MysteryEncounterPhase
        | typeof MysteryEncounterOptionSelectedPhase
        | typeof MysteryEncounterBattlePhase
        | typeof MysteryEncounterRewardsPhase
        | typeof PostMysteryEncounterPhase
        | typeof NewBattlePhase
        | typeof PartyExpPhase
        | typeof PartyHealPhase
        | typeof PokemonHealPhase
        | typeof PokemonTransformPhase
        | typeof PositionalTagPhase
        | typeof PostGameOverPhase
        | typeof PostSummonPhase
        | typeof QuietFormChangePhase
        | typeof SwitchSummonPhase
        | typeof SummonPhase
        | typeof RevivalBlessingPhase
        | typeof RibbonModifierRewardPhase
        | typeof SelectBiomePhase
        | typeof SelectGenderPhase
        | typeof SelectModifierPhase
        | typeof SelectStarterPhase
        | typeof SelectTargetPhase
        | typeof ShinySparklePhase
        | typeof ShowAbilityPhase
        | typeof StatStageChangePhase
        | typeof SwitchPhase
        | typeof TitlePhase
        | typeof ToggleDoublePositionPhase
        | typeof TurnEndPhase
        | typeof TurnInitPhase
        | typeof TurnStartPhase
        | typeof UnavailablePhase
        | typeof UnlockPhase
        | typeof VictoryPhase
    )[] = ...

    List of phases with their corresponding start methods.

    CAUTION: If a phase and its subclasses (if any) both appear in this list, make sure that this list contains said phase AFTER all of its subclasses. This way, the phase's prototype.start is properly preserved during initPhases() so that its subclasses can use super.start() properly.

    promptInterval: Timeout
    prompts: PromptHandler[]

    Methods

    • Method to add an action to the next prompt.

      Parameters

      • phaseTarget: string

        The target phase for the prompt.

      • mode: UiMode

        The mode of the UI.

      • callback: () => void

        The callback function to execute.

      • OptionalexpireFn: () => void

        The function to determine if the prompt has expired.

      • awaitingActionInput: boolean = false

        ???; default false

      Returns void

    • Restores the original state of phases and clears intervals.

      This function iterates through all phases and resets their start method to the original function stored in this.phases. Additionally, it clears the promptInterval and interval.

      Returns void

    • Remove the current phase from the phase interceptor.

      Do not call this unless absolutely necessary. This function is intended for cleaning up the phase interceptor when, for whatever reason, a phase is manually ended without using the phase interceptor.

      Parameters

      • shouldRun: boolean = false

        Whether or not the current scene should also be run.

      Returns void

    • Method to transition to a target phase.

      Parameters

      • phaseTo: PhaseInterceptorPhase

        The phase to transition to.

      • runTarget: boolean = true

        Whether or not to run the target phase; default true.

      Returns Promise<void>

      A promise that resolves when the transition is complete.