pokemon-rogue-battle
    Preparing search index...

    Class ResistLastMoveTypeAttr

    Attribute used for Conversion 2, to convert the user's type to a random type that resists the target's last used move. Fails if the user already has ALL types that resist the target's last used move. Fails if the opponent has not used a move yet Fails if the type is unknown or stellar

    TODO: If a move has its type changed (e.g. Moves.HIDDEN_POWER), it will check the new type.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    options?: MoveEffectAttrOptions

    A container for this attribute's optional parameters

    MoveEffectAttrOptions for supported params.

    selfTarget: boolean

    Should this Move target the user?

    Accessors

    • get effectChanceOverride(): undefined | number

      If defined, overrides the move's base chance for this secondary effect to trigger.

      Returns undefined | number

    • get firstHitOnly(): boolean

      true if this effect should only trigger on the first hit of multi-hit moves.

      Returns boolean

      false
      
    • get firstTargetOnly(): boolean

      true if this effect should apply only upon hitting a target for the first time when targeting multiple Pokemon.

      Returns boolean

      false
      
    • get lastHitOnly(): boolean

      true if this effect should only trigger on the last hit of multi-hit moves.

      Returns boolean

      false
      

    Methods

    • User changes its type to a random type that resists the target's last used move

      Parameters

      • user: default

        Pokemon that used the move and will change types

      • target: default

        Opposing pokemon that recently used a move

      • move: default

        Move being used

      • args: any[]

        Unused

      Returns boolean

      true if the function succeeds

    • Retrieve the types resisting a given type. Used by Conversion 2

      Parameters

      Returns PokemonType[]

      An array populated with Types, or an empty array if no resistances exist (Unknown or Stellar type)