PokéRogue
    Preparing search index...

    Class MoveRestrictionBattlerTagAbstract

    Base class for tags that restrict the usage of moves. This effect is generally referred to as "disabling" a move in-game (not to be confused with MoveId.DISABLE).

    Descendants can override isMoveRestricted to restrict moves that match a condition. A restricted move gets cancelled before it is used. Players and enemies should not be allowed to select restricted moves.

    Require descendant subclasses to inherit a PRE_MOVE lapse type

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    sourceId?: number

    The PID of the Pokemon that added this tag, or undefined if not set by a Pokemon.

    sourceMove?: MoveId

    The MoveId that created this tag, or undefined if not set by a move.

    turnCount: number

    The tag's remaining duration.

    Accessors

    Methods

    • Gets the text to display when a move's execution is prevented as a result of the restriction. Because restriction effects also prevent selection of the move, this situation can only arise if a pokemon first selects a move, then gets outsped by a pokemon using a move that restricts the selected move.

      Parameters

      • _pokemon: Pokemon

        The pokemon attempting to use the restricted move

      • _move: MoveId

        The ID of the move being interrupted

      Returns string

      The text to display when the move is interrupted

    • Check whether this Tag can be transferred to another Pokemon via Baton Pass.

      Parameters

      • recipient: Pokemon

        The Pokemon receiving this Tag (i.e. the one switching in) Unused by default but exposed to allow for subclasses to perform custom logic.

      Returns boolean

      Whether this Tag can be transferred via Baton Pass. Defaults to returning the value set in the class constructor.

    • Check if this tag is restricting a move based on a user's decisions during the target selection phase

      Parameters

      Returns boolean

      Whether the move is restricted by this tag

    • Get the text to display when the player attempts to select a move that is restricted by this tag.

      Parameters

      • pokemon: Pokemon

        The pokemon for which the player is attempting to select the restricted move

      • move: MoveId

        The ID of the Move that is having its selection denied

      Returns string

      The text to display when the player attempts to select the restricted move