Hierarchy (view full)

Constructors

Properties

battlerIndex: number
fieldIndex: number
player: boolean
scene: default
targets: BattlerIndex[]

Methods

  • Handles checking for and applying Flinches

    Parameters

    • user: default

      The Pokemon using this phase's invoked move

    • target: default

      Pokemon the current target of this phase's invoked move

    • dealsDamage: boolean

      true if the attempted move successfully dealt damage

    Returns (() => void)

    a function intended to be passed into a then() call.

      • (): void
      • Returns void

  • Applies reactive effects that occur when a Pokémon is hit. (i.e. Effect Spore, Disguise, Liquid Ooze, Beak Blast)

    Parameters

    Returns Promise<null | void>

    a Promise intended to be passed into a then() call.

  • Applies effects that trigger on HIT (i.e. Final Gambit, Power-Up Punch, Drain Punch)

    Parameters

    • user: default

      The Pokemon using this phase's invoked move

    • target: default

      Pokemon the current target of this phase's invoked move

    • firstHit: boolean

      true if this is the first hit in a multi-hit attack

    • lastHit: boolean

      true if this is the last hit in a multi-hit attack

    • firstTarget: boolean

      true if target is the first target hit by this strike of move

    Returns Promise<void>

    a function intended to be passed into a then() call.

  • Applies non-self-targeted effects that trigger POST_APPLY (i.e. Smelling Salts curing Paralysis, and the forced switch from U-Turn, Dragon Tail, etc)

    Parameters

    • user: default

      The Pokemon using this phase's invoked move

    • target: default

      Pokemon the current target of this phase's invoked move

    • firstHit: boolean

      true if this is the first hit in a multi-hit attack

    • lastHit: boolean

      true if this is the last hit in a multi-hit attack

    Returns (() => Promise<null | void>)

    a function intended to be passed into a then() call.

      • (): Promise<null | void>
      • Returns Promise<null | void>

  • Apply self-targeted effects that trigger POST_APPLY

    Parameters

    • user: default

      The Pokemon using this phase's invoked move

    • target: default

      Pokemon the current target of this phase's invoked move

    • firstHit: boolean

      true if this is the first hit in a multi-hit attack

    • lastHit: boolean

      true if this is the last hit in a multi-hit attack

    Returns (() => Promise<null | void>)

    a function intended to be passed into a then() call.

      • (): Promise<null | void>
      • Returns Promise<null | void>

  • Applies all effects and attributes that require a move to connect with a target, namely reactive effects like Weak Armor, on-hit effects like that of Power-Up Punch, and item stealing effects

    Parameters

    • user: default

      The Pokemon using this phase's invoked move

    • target: default

      Pokemon the current target of this phase's invoked move

    • firstHit: boolean

      true if this is the first hit in a multi-hit attack

    • lastHit: boolean

      true if this is the last hit in a multi-hit attack

    • isProtected: boolean

      true if the target is protected by effects such as Protect

    • hitResult: HitResult

      The HitResult of the attempted move

    • firstTarget: boolean

      true if target is the first target hit by this strike of move

    Returns (() => Promise<null | void>)

    a function intended to be passed into a then() call.

      • (): Promise<null | void>
      • Returns Promise<null | void>

  • Resolves whether this phase's invoked move hits the given target

    Parameters

    Returns boolean

    true if the move hits the target

  • Prevents subsequent strikes of this phase's invoked move from occurring

    Parameters

    • Optionaltarget: default

      If defined, only stop subsequent strikes against this Pokemon

    Returns void