pokemon-rogue-battle
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    fieldIndex: number
    partyMemberIndex: number
    phaseName: "LearnMovePhase"

    The string name of the phase, used to identify the phase type for is

    player: boolean

    Methods

    • This facilitates the process in which an old move is chosen to be forgotten.

      Which move should be forgotten?

      The game then goes Mode.SUMMARY to select a move to be forgotten. If a player does not select a move or chooses the new move (moveIndex === 4), the game goes to this.rejectMoveAndEnd(). If an old move is selected, the function then passes the moveIndex to this.learnMove()

      Parameters

      Returns Promise<void>

    • Check if the phase is of the given type without requiring instanceof.

      Type Parameters

      • K extends
            | "ActivatePriorityQueuePhase"
            | "AddEnemyBuffModifierPhase"
            | "AttemptCapturePhase"
            | "AttemptRunPhase"
            | "BattleEndPhase"
            | "BerryPhase"
            | "CheckInterludePhase"
            | "CheckStatusEffectPhase"
            | "CheckSwitchPhase"
            | "CommandPhase"
            | "CommonAnimPhase"
            | "DamageAnimPhase"
            | "EggHatchPhase"
            | "EggLapsePhase"
            | "EggSummaryPhase"
            | "EncounterPhase"
            | "EndCardPhase"
            | "EndEvolutionPhase"
            | "EnemyCommandPhase"
            | "EvolutionPhase"
            | "ExpPhase"
            | "FaintPhase"
            | "FormChangePhase"
            | "GameOverPhase"
            | "GameOverModifierRewardPhase"
            | "HideAbilityPhase"
            | "HidePartyExpBarPhase"
            | "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"

      Parameters

      • phase: K

        The string name of the phase to check.

      Returns this is PhaseMap[K]

      Whether this phase is of the provided type.

      This does not check for subclasses! It only checks if the phase is exactly the given type. This method exists to avoid circular import issues, as using instanceof would require importing each phase.

    • This teaches the Pokemon the new move and ends the phase. When a Pokemon forgets a move and learns a new one, its 'Learn Move' message is significantly longer.

      Pokemon with a moveset.length < 4

      [Pokemon] learned [MoveName]

      Pokemon with a moveset.length > 4

      1... 2... and 3... and Poof! [Pokemon] forgot how to use [MoveName] And... [Pokemon] learned [MoveName]!

      Parameters

      • index: number
      • move: Move

        The Move to be learned

      • pokemon: Pokemon
      • OptionaltextMessage: string

      Returns Promise<void>

    • This asks the player if they wish to end the current move learning process.

      Stop trying to teach [MoveName]? --> Mode.CONFIRM --> Yes: > [Pokemon] did not learn the move [MoveName], No: this.replaceMoveCheck()

      If the player wishes to not teach the Pokemon the move, it displays a message and ends the phase. If the player reconsiders, it repeats the process for a Pokemon with a full moveset once again.

      Parameters

      Returns Promise<void>

    • This displays a chain of messages (listed below) and asks if the user wishes to forget a move.

      [Pokemon] wants to learn the move [MoveName] However, [Pokemon] already knows four moves. Should a move be forgotten and replaced with [MoveName]? --> Mode.CONFIRM -> Yes: Go to this.forgetMoveProcess(), No: Go to this.rejectMoveAndEnd()

      Parameters

      Returns Promise<void>