pokemon-rogue-battle
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    battlerIndex: number
    fieldIndex: number
    player: boolean
    reflected: boolean = false
    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.

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

      Parameters

      Returns 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 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 void

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

    • 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 void

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

    • 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 void

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

    • Check whether the move should bypass both the accuracy and semi-invulnerable states.

      Parameters

      Returns undefined | boolean

      true if the move should bypass accuracy and semi-invulnerability

      Accuracy and semi-invulnerability can be bypassed by:

      Does not check against effects Glaive Rush status (which should not bypass semi-invulnerability), or interactions like Earthquake hitting against Dig, (which should not bypass the accuracy check).