PokéRogue
    Preparing search index...

    A basic abstract class to act as a holder and processor for UI elements.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    abilityCursor abilityIconElement abilityLabel active activeTooltip allowTera allSpecies assetLoadCancelled awaitingActionInput blockInput canCycleAbility canCycleForm canCycleGender canCycleNature canCycleShiny canCycleTera cursor cursorObj dexAttrCursor eggMovesLabel filterBar filterBarContainer filterBarCursor filteredStarterContainers filterInstructionRowX filterInstructionRowY filterInstructionsContainer filterMode formIconElement formLabel genderIconElement genderLabel goFilterIconElement goFilterLabel hasSwappedMoves iconAnimHandler instructionRowTextOffset instructionRowX instructionRowY instructionsContainer lastSpecies message mode moveInfoOverlay natureCursor natureIconElement natureLabel onActionInput originalStarterPreferences pendingPrompt pokemonAbilityLabelText pokemonAbilityText pokemonAdditionalMoveCountLabel pokemonCandyContainer pokemonCandyCountText pokemonCandyDarknessOverlay pokemonCandyIcon pokemonCandyOverlayIcon pokemonCaughtCountText pokemonCaughtHatchedContainer pokemonEggMoveBgs pokemonEggMoveContainers pokemonEggMoveLabels pokemonEggMovesContainer pokemonFormText pokemonGenderText pokemonGrowthRateLabelText pokemonGrowthRateText pokemonHatchedCountText pokemonHatchedIcon pokemonLuckLabelText pokemonLuckText pokemonMoveBgs pokemonMoveContainers pokemonMoveLabels pokemonMovesContainer pokemonNameText pokemonNatureLabelText pokemonNatureText pokemonNumberText pokemonPassiveDisabledIcon pokemonPassiveLabelText pokemonPassiveLockedIcon pokemonPassiveText pokemonShinyIcon pokemonSprite pokemonUncaughtText pokerusCursorObjs pokerusSpecies prompt randomCursorObj scrollCursor shinyIconElement shinyLabel shinyOverlay speciesLoaded speciesStarterDexEntry speciesStarterMoves startCursorObj starterContainers starterCursorObjs starterIcons starterIconsCursorIndex starterIconsCursorObj starterIconsCursorXOffset starterIconsCursorYOffset starterMoveset starterPreferences starters starterSelectCallback starterSelectContainer starterSelectMessageBox starterSelectMessageBoxContainer starterSelectScrollBar starterSpecies statsContainer statsMode teraCursor teraIcon teraIconElement teraLabel textCallbackTimer textTimer tutorialActive tutorialOverlay type1Icon type2Icon validStarterContainers valueLimitLabel

    Methods

    Constructors

    Properties

    abilityCursor: number = -1
    abilityIconElement: Sprite
    abilityLabel: Text
    active: boolean = false
    activeTooltip: undefined | "ABILITY" | "PASSIVE" | "CANDY"
    allowTera: boolean
    allSpecies: PokemonSpecies[] = []
    assetLoadCancelled: null | BooleanHolder
    awaitingActionInput: boolean
    blockInput: boolean = false
    canCycleAbility: boolean
    canCycleForm: boolean
    canCycleGender: boolean
    canCycleNature: boolean
    canCycleShiny: boolean
    canCycleTera: boolean
    cursor: number = 0
    cursorObj: Image
    dexAttrCursor: bigint = 0n
    eggMovesLabel: Text
    filterBar: FilterBar
    filterBarContainer: Container
    filterBarCursor: number = 0
    filteredStarterContainers: StarterContainer[] = []
    filterInstructionRowX: number = 0
    filterInstructionRowY: number = 0
    filterInstructionsContainer: Container
    filterMode: boolean
    formIconElement: Sprite
    formLabel: Text
    genderIconElement: Sprite
    genderLabel: Text
    goFilterIconElement: Sprite
    goFilterLabel: Text
    hasSwappedMoves: boolean = false

    Used to check whether any moves were swapped using the reorder menu, to decide whether a save should be performed or not.

    iconAnimHandler: PokemonIconAnimHelper
    instructionRowTextOffset: number = 9
    instructionRowX: number = 0
    instructionRowY: number = 0
    instructionsContainer: Container
    lastSpecies: PokemonSpecies
    message: Text
    mode: null | number
    moveInfoOverlay: MoveInfoOverlay
    natureCursor: number = -1
    natureIconElement: Sprite
    natureLabel: Text
    onActionInput: null | Function
    originalStarterPreferences: StarterPreferences
    pendingPrompt: boolean
    pokemonAbilityLabelText: Text
    pokemonAbilityText: Text
    pokemonAdditionalMoveCountLabel: Text
    pokemonCandyContainer: Container
    pokemonCandyCountText: Text
    pokemonCandyDarknessOverlay: Sprite
    pokemonCandyIcon: Sprite
    pokemonCandyOverlayIcon: Sprite
    pokemonCaughtCountText: Text
    pokemonCaughtHatchedContainer: Container
    pokemonEggMoveBgs: NineSlice[]
    pokemonEggMoveContainers: Container[]
    pokemonEggMoveLabels: Text[]
    pokemonEggMovesContainer: Container
    pokemonFormText: Text
    pokemonGenderText: Text
    pokemonGrowthRateLabelText: Text
    pokemonGrowthRateText: Text
    pokemonHatchedCountText: Text
    pokemonHatchedIcon: Sprite
    pokemonLuckLabelText: Text
    pokemonLuckText: Text
    pokemonMoveBgs: NineSlice[]
    pokemonMoveContainers: Container[]
    pokemonMoveLabels: Text[]
    pokemonMovesContainer: Container
    pokemonNameText: Text
    pokemonNatureLabelText: Text
    pokemonNatureText: BBCodeText
    pokemonNumberText: Text
    pokemonPassiveDisabledIcon: Sprite
    pokemonPassiveLabelText: Text
    pokemonPassiveLockedIcon: Sprite
    pokemonPassiveText: Text
    pokemonShinyIcon: Sprite
    pokemonSprite: Sprite
    pokemonUncaughtText: Text
    pokerusCursorObjs: Image[]
    pokerusSpecies: PokemonSpecies[] = []
    prompt: Sprite
    randomCursorObj: NineSlice
    scrollCursor: number
    shinyIconElement: Sprite
    shinyLabel: Text
    shinyOverlay: Image
    speciesLoaded: Map<SpeciesId, boolean> = ...
    speciesStarterDexEntry: null | DexEntry
    speciesStarterMoves: MoveId[]
    startCursorObj: NineSlice
    starterContainers: StarterContainer[] = []
    starterCursorObjs: Image[]
    starterIcons: Sprite[]
    starterIconsCursorIndex: number
    starterIconsCursorObj: Image
    starterIconsCursorXOffset: number = -3
    starterIconsCursorYOffset: number = 1
    starterMoveset: null | StarterMoveset
    starterPreferences: StarterPreferences
    starters: Starter[] = []
    starterSelectCallback: null | StarterSelectCallback
    starterSelectContainer: Container
    starterSelectMessageBox: NineSlice

    Group holding the UI elements appearing in the instructionsContainer

    starterSelectMessageBoxContainer: Container
    starterSelectScrollBar: ScrollBar
    starterSpecies: PokemonSpecies[] = []
    statsContainer: StatsContainer
    statsMode: boolean
    teraCursor: PokemonType = PokemonType.UNKNOWN
    teraIcon: Sprite
    teraIconElement: Sprite
    teraLabel: Text
    textCallbackTimer: null | TimerEvent
    textTimer: null | TimerEvent
    tutorialActive: boolean = false
    tutorialOverlay: Rectangle
    type1Icon: Sprite
    type2Icon: Sprite
    validStarterContainers: StarterContainer[] = []
    valueLimitLabel: Text

    Methods

    • Creates a temporary dex attr props that will be used to check whether a pokemon is valid for a challenge and to display the correct shiny, variant, and form based on the StarterPreferences

      Parameters

      • speciesId: number

        the id of the species to get props for

      Returns bigint

      the dex props

    • This block checks to see if your party is valid It checks each pokemon against the challenge - noting that due to monotype challenges it needs to check the pokemon while ignoring their evolutions/form change items

      Returns boolean

    • Determines if a passive upgrade is available for the given species ID

      Parameters

      • speciesId: number

        The ID of the species to check the passive of

      Returns boolean

      true if the user has enough candies and a passive has not been unlocked already

    • Determines if an same species egg can be bought for the given species ID

      Parameters

      • speciesId: number

        The ID of the species to check the value reduction of

      Returns boolean

      true if the user has enough candies

    • Determines if 'Animation' based upgrade notifications should be shown

      Returns boolean

      true if upgrade notifications are enabled and set to display an 'Animation'

    • Determines if a value reduction upgrade is available for the given species ID

      Parameters

      • speciesId: number

        The ID of the species to check the value reduction of

      Returns boolean

      true if the user has enough candies and all value reductions have not been unlocked already

    • Sets a bounce animation if enabled and the Pokemon has an upgrade

      Parameters

      • icon: Sprite

        Phaser.GameObjects.GameObject to animate

      • species: PokemonSpecies

        PokemonSpecies of the icon used to check for upgrades

      • startPaused: boolean = false

        Should this animation be paused after it is added?

      Returns void

    • Parameters

      • text: string
      • Optional_name: string
      • Optionaldelay: null | number
      • Optionalcallback: null | Function
      • OptionalcallbackDelay: null | number
      • Optionalprompt: null | boolean
      • OptionalpromptDelay: null | number

      Returns void

    • Parameters

      • text: string
      • Optionaldelay: number
      • Optionalcallback: Function
      • OptionalcallbackDelay: number
      • Optionalprompt: boolean
      • OptionalpromptDelay: number
      • OptionalmoveToTop: boolean

      Returns void

    • Puts a move at the requested index in the current highlighted Pokemon's moveset. If the move was already present in the moveset, swap its position with the one at the requested index.

      Parameters

      • targetIndex: number

        The index to place the move

      • newMove: MoveId

        The move to place in the moveset

      • previousMove: MoveId

        The move that was previously in the spot

      Returns void

      ⚠️ this.starterMoveset must not be null when this method is called

    • Update the starter moveset for the given species if it is part of the selected starters.

      Parameters

      • id: SpeciesId

        The species ID to update the moveset for

      Returns void

      It is safe to call with a species that is not part of the selected starters.