pokemon-rogue-battle
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    battlerIndex: number
    fieldIndex: number
    move: default
    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 all effects aimed at the move's target. To be used when the target is successfully and directly hit by the move.

      Parameters

      • user: default

        The Pokemon using the move

      • target: default

        The Pokemon targeted by the move

      • hitResult: HitResult

        The HitResult obtained from applying the move

      • firstTarget: boolean

        true if the target is the first Pokemon hit by the attack

      Returns void

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

      • An ability like Abilities.NO_GUARD | No Guard
      • A poison type using Toxic
      • A move like Lock-On or Mind Reader.
      • A field-targeted move like spikes

      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).

    • Conduct the hit check and type effectiveness for this move against the target

      Checks occur in the following order:

      1. if the move is self-target
      2. if the target is on the field
      3. if the target is hidden by the effects of its commander ability
      4. if the target is in an applicable semi-invulnerable state
      5. if the target has an applicable protection effect
      6. if the move is reflected by magic coat or magic bounce
      7. type effectiveness calculation, including immunities from abilities and typing
      8. if accuracy is checked, whether the roll passes the accuracy check

      Parameters

      Returns HitCheckEntry

      a HitCheckEntry containing the attack's HitCheckResult and effectiveness against the target.

    • Triggers move effects of the given move effect trigger.

      Parameters

      • triggerType: MoveEffectTrigger

        The MoveEffectTrigger being applied

      • user: default

        The Pokemon using the move

      • target: null | default

        The Pokemon targeted by the move

      • OptionalfirstTarget: null | boolean

        Whether the target is the first to be hit by the current strike

      • OptionalselfTarget: boolean

        If defined, limits the effects triggered to either self-targeted effects (if set to true) or targeted effects (if set to false).

      Returns void

      a Promise applying the relevant move effects.