Constructors

Properties

PHASES: ((typeof LoginPhase | ((phase) => void))[] | (typeof SelectGenderPhase | ((phase) => void))[] | (typeof EncounterPhase | ((phase) => void))[] | (typeof SelectStarterPhase | ((phase) => void))[] | (typeof PostSummonPhase | ((phase) => void))[] | (typeof SummonPhase | ((phase) => void))[] | (typeof ToggleDoublePositionPhase | ((phase) => void))[] | (typeof CheckSwitchPhase | ((phase) => void))[] | (typeof ShowAbilityPhase | ((phase) => void))[] | (typeof MessagePhase | ((phase) => void))[] | (typeof CommandPhase | ((phase) => void))[] | (typeof EnemyCommandPhase | ((phase) => void))[] | (typeof MovePhase | ((phase) => void))[] | (typeof MoveEffectPhase | ((phase) => void))[] | (typeof DamagePhase | ((phase) => void))[] | (typeof FaintPhase | ((phase) => void))[] | (typeof SelectModifierPhase | ((phase) => void))[] | (typeof StatChangePhase | ((phase) => void))[])[] = ...

List of phases with their corresponding start methods.

interval: any
intervalRun: any
log: any
onHold: any
phaseFrom: any
phases: {} = {}

Type declaration

    promptInterval: any
    prompts: any
    scene: any

    Methods

    • Method to add an action to the next prompt.

      Parameters

      • phaseTarget: string

        The target phase for the prompt.

      • mode: Mode

        The mode of the UI.

      • callback: (() => void)

        The callback function to execute.

          • (): void
          • Returns void

      • expireFn: (() => void)

        The function to determine if the prompt has expired.

          • (): void
          • Returns void

      Returns void

    • Method to ensure a phase is run, to throw error on test if not.

      Parameters

      • phaseTarget: any

        The phase to run.

      Returns Promise<void>

      A promise that resolves when the phase is run.

    • Method to remove a phase from the list.

      Parameters

      • phaseTarget: any

        The phase to remove.

      • Optional skipFn: any

        Optional skip function.

      Returns Promise<void>

      A promise that resolves when the phase is removed.

    • 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

    • Method to run a phase with an optional skip function.

      Parameters

      • phaseTarget: any

        The phase to run.

      • Optional skipFn: any

        Optional skip function.

      Returns Promise<void>

      A promise that resolves when the phase is run.

    • Method to transition to a target phase.

      Parameters

      • phaseTo: any

        The phase to transition to.

      Returns Promise<void>

      A promise that resolves when the transition is complete.

    • Method to wait until a specific phase is reached.

      Parameters

      • phaseTarget: any

        The phase to wait for.

      • Optional skipFn: any

        Optional skip function.

      Returns Promise<void>

      A promise that resolves when the phase is reached.

    • Method to execute actions when about to run a phase. Does not run the phase, stop right before.

      Parameters

      • phaseTarget: any

        The phase to run.

      • Optional skipFn: any

        Optional skip function.

      Returns Promise<void>

      A promise that resolves when the phase is about to run.