pokemon-rogue-battle
    Preparing search index...

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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    active: boolean = false
    awaitingActionInput: boolean
    blockInput: boolean = false
    cursor: number = 0
    cursorObj: Image
    message: Text
    mode: null | number
    onActionInput: null | Function
    pendingPrompt: boolean
    prompt: Sprite
    starterSpecies: PokemonSpecies[] = []
    textCallbackTimer: null | TimerEvent
    textTimer: null | TimerEvent
    tutorialActive: boolean = false
    tutorialOverlay: Rectangle

    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

    • Parameters

      • speciesId: number

      Returns { currentFriendship: number; friendshipCap: number }

    • 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 'Icon' based upgrade notifications should be shown

      Returns boolean

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

    • 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

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