pokemon-rogue-battle
    Preparing search index...

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    accuracy: number
    attrs: MoveAttr[] = []
    chance: number

    The chance of a move's secondary effects activating

    effect: string
    generation: number
    id: Moves
    moveTarget: MoveTarget
    name: string
    power: number
    pp: number
    priority: number

    Accessors

    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

      • ...args: ConstructorParameters<T>

        the args needed to instantiate a the given class

      Returns this

      the called object Move

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

      Parameters

      • user: default

        Pokemon The Pokémon using the move.

      • target: default

        Pokemon The Pokémon being targeted by the move.

      • simulated: boolean = false

      Returns number

      The calculated accuracy of the move.

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

      Parameters

      • source: default

        Pokemon The Pokémon using the move.

      • target: default

        Pokemon The Pokémon being targeted by the move.

      • simulated: boolean = false

      Returns number

      The calculated power of the move.

    • Calculate the Expected Power per turn of this move, taking into account multi hit moves, accuracy, and the number of turns it takes to execute.

      Does not (yet) consider the current field effects or the user's abilities.

      Returns number

    • Returns true if this move can be given additional strikes by enhancing effects. Currently used for Parental Bond and Multi-Lens.

      Parameters

      • user: default

        The Pokemon using the move

      • restrictSpread: boolean = false

        true if the enhancing effect should not affect multi-target moves (default false)

      Returns boolean

    • Internal dev flag for documenting edge cases. When using this, please document the known edge case.

      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: MoveAttr) => boolean

      Returns MoveAttr

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

    • Checks if the move would hit its target's Substitute instead of the target itself.

      Parameters

      Returns boolean

      true if the move can bypass the target's Substitute; false otherwise.

    • Getter function that returns if the move targets the user or its 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 looks at cases of Grass types with powder moves and Dark types with moves affected by Prankster.

      Parameters

      Returns boolean

      boolean

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

      Returns this

      the called object Move

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

      Returns this

      the called object Move