PokéRogue
    Preparing search index...

    Wrapper class for the Move class for Pokemon to interact with. These are the moves assigned to a Pokemon object. It links to Move class via the move ID. Compared to Move, this class also tracks things like PP Ups received, PP used, etc.

    • isUsable - checks if move is restricted, out of PP, or not implemented.
    • getMove - returns Move object by looking it up via ID.
    • usePp - removes a point of PP from the move.
    • getMovePp - returns amount of PP a move currently has.
    • getPpRatio - returns the current PP amount / max PP amount.
    • getName - returns name of Move.
    Index

    Constructors

    Properties

    maxPpOverride?: number

    If defined and nonzero, overrides the maximum PP of the move (e.g., due to move being copied by Transform). This also nullifies all effects of ppUp.

    moveId: MoveId
    ppUp: number
    ppUsed: number

    Methods

    • Determine whether the move can be selected by the pokemon based on its own requirements

      Parameters

      • pokemon: Pokemon

        The Pokemon under consideration

      Returns [selectable: boolean, preventionText: string]

      An tuple containing a boolean indicating whether the move can be selected, and a string with the reason if it cannot

      Does not check for PP, moves blocked by challenges, or unimplemented moves, all of which are handled by isUsable

    • Checks whether this move can be performed by a Pokemon, without consideration for the move's targets. The move is unusable if it is out of PP, restricted by an effect, or unimplemented.

      Should not be confused with isSelectable, which only checks if the move can be selected by a Pokemon.

      Parameters

      • pokemon: Pokemon

        The Pokemon attempting to use this move

      • ignorePp: boolean = false

        Whether to ignore checking if the move is out of PP; default false

      • forSelection: boolean = false

        Whether this is being checked for move selection; default false

      Returns [usable: boolean, preventionText: string]

      A tuple containing a boolean indicating whether the move can be selected, and a string with the reason if it cannot