Hierarchy (view full)

Implements

Constructors

Properties

accuracy: number
attrs: MoveAttr[]
category: MoveCategory
chance: number
conditions: MoveCondition[]
effect: string
flags: number
generation: number
id: Moves
moveTarget: MoveTarget
name: string
nameAppend: 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

  • Checks if the move flag applies to the pokemon(s) using/receiving the move

    Parameters

    Returns boolean

    boolean

  • Adds a move condition to the move

    Parameters

    • condition: MoveCondition | MoveConditionFunc

      MoveCondition or MoveConditionFunc, appends to conditions array a new MoveCondition object

    Returns this

    the called object Move

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

    Parameters

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

          Returns boolean

    Returns MoveAttr

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

  • Get all move attributes that match attrType

    Type Parameters

    Parameters

    • attrType: (new (...args) => T)

      any attribute that extends MoveAttr

        • new (...args): T
        • Parameters

          • Rest ...args: any[]

          Returns T

    Returns T[]

    Array of attributes that match attrType, Empty Array if none match.

  • Calculates the targetBenefitScore across all the attributes

    Parameters

    Returns number

    integer representing the total benefitScore

  • Calculates the userBenefitScore across all the attributes and conditions

    Parameters

    Returns number

    integer representing the total benefitScore

  • Check if a move has an attribute that matches attrType

    Type Parameters

    Parameters

    • attrType: (new (...args) => T)

      any attribute that extends MoveAttr

        • new (...args): T
        • Parameters

          • Rest ...args: any[]

          Returns T

    Returns boolean

    true if the move has attribute attrType

  • Getter function that returns if the move targets itself or an ally

    Returns boolean

    boolean

  • Getter function that returns if the move hits multiple targets

    Returns boolean

    boolean

  • Checks if the move is immune to certain types currently only look at case of Grass types and powder moves

    Parameters

    Returns boolean

    boolean

  • Sets the MoveFlags.MAKES_CONTACT flag for the calling Move

    Parameters

    • Optional makesContact: boolean

      The value (boolean) to set the flag to

    Returns this

    The Move that called this function

  • Marks the move as "partial": appends texts to the move name

    Returns this

    the called object Move

  • Sets the flags of the move

    Parameters

    • flag: MoveFlags
    • on: boolean

      a boolean, if True, then "ORs" the flag onto existing ones, if False then "XORs" the flag onto existing ones

    Returns void

  • Marks the move as "unimplemented": appends texts to the move name

    Returns this

    the called object Move