PokéRogue
    Preparing search index...

    Some variables are protected because this UI class will most likely be extended in the future to display more information. These variables will most likely be shared across 'classes' aka pages. I believe that it is possible that the contents/methods of the first page will be placed in their own class that is an extension of RunInfoUiHandler as more pages are added. For now, I leave as is.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    active: boolean = false
    cursor: number = 0
    endCardContainer: Container
    hallofFameContainer: Container
    isVictory: boolean
    mode: null | number
    modifiersModule: any
    pageMode: RunInfoUiMode
    partyContainer: Container
    partyVisibility: boolean
    runContainer: Container
    runDisplayMode: RunDisplayMode
    runInfoContainer: Container
    runResultContainer: Container
    statsBgWidth: number

    Methods

    • Creates and adds the header background, title text, and important buttons to RunInfoUiHandler It does check if the run has modifiers before adding a button for the user to display their party's held items It does not check if the run has any PokemonHeldItemModifiers though.

      Returns void

    • buttonCycleOption : takes a parameter button to execute different actions in the run-info page The use of non-directional / A / B buttons is named in relation to functions used during starter-select. Button.CYCLE_FORM (F key) --> displays ending art (victory only) Button.CYCLE_SHINY (R key) --> displays hall of fame (victory only) Button.CYCLE_ABILITY (E key) --> shows pokemon held items

      Parameters

      Returns void

    • This function parses the Challenges section of the Run Entry and returns a list of active challenge.

      Returns string[]

      string[] of active challenge names

    • createHallofFame() - if the run is victorious, this creates a hall of fame image for the player to view Overlay created by Koda (Thank you!) This could be adapted into a public-facing method for victory screens. Perhaps.

      Returns void

    • Parses and displays the run's player party. Default Information: Icon, Level, Nature, Ability, Passive, Shiny Status, Fusion Status, Stats, and Moves. B-Side Information: Icon + Held Items (Can be displayed to the user through pressing the abilityButton)

      Returns void

    • Shows information about the run like the run's mode, duration, luck, money, and player held items The values for luck and money are from the end of the run, not the player's luck at the start of the run.

      Parameters

      • windowX: number
      • windowY: number

        These two params are the coordinates of the window's bottom right corner. This is used to dynamically position Luck based on its length, creating a nice layout regardless of language / luck value.

      Returns Promise<void>

    • Shows the run's end result

      Victory : The run will display options to allow the player to view the Hall of Fame + Ending Art Defeat : The run will show the opposing Pokemon (+ Trainer) that the trainer was defeated by. Defeat can call either parseWildSingleDefeat(), parseWildDoubleDefeat(), or parseTrainerDefeat()

      Returns Promise<void>

    • This function is used when the Run Info UI is used to preview a Session. It edits runResultContainer, but most importantly - does not display the negative results of a Mystery Encounter or any details of a trainer's party. Trainer Parties are replaced with their sprites, names, and their party size. Mystery Encounters contain sprites associated with MEs + the title of the specific ME.

      Returns void

    • This edits a container to represent a loss from a defeat by a trainer battle. The trainers are placed to the left of their party. Depending on the trainer icon, there may be overlap between the edges of the box or their party. (Capes...)

      Party Pokemon have their icons, terastalization status, and level shown.

      Parameters

      • enemyContainer: Container

        container holding enemy visuals and level information

      Returns void

    • This function is called to edit a container to represent a loss from a defeat by a wild double Pokemon battle. This function and parseWildSingleDefeat can technically be merged, but I find it tricky to manipulate the different 'centers' a single battle / double battle container will hold.

      Parameters

      • enemyContainer: Container

        container holding enemy visuals and level information

      Returns void

    • This function is called to edit an enemyContainer to represent a loss from a defeat by a wild single Pokemon battle.

      Parameters

      • enemyContainer: Container

        container holding enemy visual and level information

      Returns void

    • Takes input from the user to perform a desired action.

      Parameters

      • button: Button

        Button object to be processed Button.CANCEL, Button.LEFT - removes all containers related to RunInfo and returns the user to Run History Button.CYCLE_FORM, Button.CYCLE_SHINY, Button.CYCLE_ABILITY - runs the function buttonCycleOption()

      Returns boolean

    • Changes what is displayed of the Pokemon's held items

      Parameters

      • partyVisible: boolean

        {boolean} True -> Shows the Pokemon's default information and hides held items False -> Shows the Pokemon's held items and hides default information

      Returns void

    • This loads the enemy sprites, positions, and scales them according to the current display mode of the RunInfo UI and then adds them to the container parameter. Used by parseRunStatus and parseTrainerDefeat

      Parameters

      • enemyContainer: Container

        a Phaser Container that should hold enemy sprites

      Returns void