pokemon-rogue-battle
    Preparing search index...

    Class RandomMoveAttr

    Attribute used to call a random move. Used for Moves.METRONOME

    apply for move selection and move call

    Hierarchy

    • CallMoveAttr
      • RandomMoveAttr
    Index

    Constructors

    Properties

    hasTarget: boolean
    invalidMoves: ReadonlySet<Moves>
    selfTarget: boolean

    Should this Move target the user?

    Methods

    • User calls a random moveId.

      Invalid moves are indicated by what is passed in to invalidMoves: invalidMetronomeMoves

      Parameters

      • user: default

        Pokemon that used the move and will call a random move

      • target: default

        Pokemon that will be targeted by the random move (if single target)

      • move: default

        Move being used

      • args: any[]

        Unused

      Returns boolean

    • This function exists solely to allow tests to override the randomly selected move by mocking this function.

      Returns null | Moves