Hierarchy (view full)

Constructors

Properties

accuracy: number
attrs: MoveAttr[]
category: MoveCategory
chance: number
defaultType: Type
effect: string
generation: number
id: Moves
moveTarget: MoveTarget
name: string
power: number
pp: number
priority: number
type: Type

Methods

  • Adds a new MoveAttr to the move (appends to the attr array) if the MoveAttr also comes with a condition, also adds that to the conditions array: MoveCondition Almost identical to attr, except you are passing in a MoveAttr object, instead of a constructor and it's arguments

    Parameters

    Returns this

    the called object Move

  • Adds a new MoveAttr to the move (appends to the attr array) if the MoveAttr also comes with a condition, also adds that to the conditions array: MoveCondition

    Type Parameters

    Parameters

    • AttrType: T

      MoveAttr the constructor of a MoveAttr class

    • Rest...args: ConstructorParameters<T>

      the args needed to instantiate a the given class

    Returns this

    the called object Move

  • Calculates the power of a move in battle based on various conditions and attributes.

    Parameters

    Returns number

    The calculated power of the move.

  • Takes as input a boolean function and returns the first MoveAttr in attrs that matches true

    Parameters

    • attrPredicate: ((attr: MoveAttr) => boolean)
        • (attr): boolean
        • Parameters

          Returns boolean

    Returns MoveAttr

    the first MoveAttr element in attrs that makes the input function return true

  • Checks if the move is immune to certain types. Currently looks at cases of Grass types with powder moves and Dark types with moves affected by Prankster.

    Parameters

    • user: default

      the source of this move

    • target: default

      the target of this move

    • type: Type

      the type of the move's target

    Returns boolean

    boolean