pokemon-rogue-battle
    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.

    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 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