pokemon-rogue-battle
    Preparing search index...

    Class ChargingAttackMove

    Hierarchy

    Index

    Constructors

    Properties

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

    The chance of a move's secondary effects activating

    chargeAnim: ChargeAnim = ...

    The animation to play during the move's charging phase

    chargeAttrs: MoveAttr[] = []

    Move attributes that apply during the move's charging phase

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

    Accessors

    Methods

    • Adds a new MoveAttr to this move (appends to the attr array). If the MoveAttr also comes with a condition, it is added to its MoveCondition array.

      Similar to attr, except this takes an already instantiated MoveAttr object as opposed to a constructor and its arguments.

      Parameters

      Returns this

      this

    • Applies each MoveCondition function of this move to the params, determines if the move can be used prior to calling each attribute's apply()

      Parameters

      Returns boolean

      boolean: false if any of the apply()'s return false, else true

    • Adds a new MoveAttr to this move (appends to the attr array). If the MoveAttr also comes with a condition, it is added to its MoveCondition array.

      Type Parameters

      Parameters

      • attrType: T

        The MoveAttr to add

      • ...args: ConstructorParameters<T>

        The arguments needed to instantiate the given class

      Returns this

      this

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

      Parameters

      • user: Pokemon

        Pokemon The Pokémon using the move.

      • target: Pokemon

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

        Pokemon The Pokémon using the move.

      • target: Pokemon

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

        The Pokemon using the move

      • restrictSpread: boolean = false

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

      Returns boolean

    • Adds an attribute to this move to be applied during the move's charging phase

      Type Parameters

      Parameters

      • ChargeAttrType: T

        the type of MoveAttr being added

      • ...args: ConstructorParameters<T>

        the parameters to construct the given MoveAttr with

      Returns this

      this Move (for chaining API purposes)

    • Sets the text to be displayed during this move's charging phase. References to the user Pokemon should be written as "{USER}", and references to the target Pokemon should be written as "{TARGET}".

      Parameters

      • chargeText: string

        the text to set

      Returns this

      this Move (for chaining API purposes)

    • Adds a condition to this move (in addition to any provided by its prior MoveAttrs). The move will fail upon use if at least 1 of its conditions is not met.

      Parameters

      Returns this

      this

    • Checks if the move flag applies to the pokemon(s) using/receiving the move

      This method will take the user's ability into account when reporting flags, e.g. calling this method for MAKES_CONTACT will return false if the user has a AbilityId.LONG_REACH that is not being suppressed.

      Note: This method only checks if the move should have effectively have the flag applied to its use. It does not check whether the flag will trigger related effects. For example using this method to check MoveFlags.WIND_MOVE will not consider Wind Rider .

      To simply check whether the move has a flag, use hasFlag.

      Parameters

      Returns boolean

      boolean

    • Mark a move as having one or more edge cases. The move may lack certain niche interactions with other moves/abilities, but still functions as intended in most cases.

      When using this, make sure to document the edge case (or else this becomes pointless).

      Returns this

      this

    • Find the first attribute that matches a given predicate function.

      Parameters

      • attrPredicate: (attr: MoveAttr) => boolean

        The predicate function to search MoveAttrs by

      Returns MoveAttr

      The first MoveAttr for which attrPredicate returns true

    • Get all move attributes that match attrType.

      Type Parameters

      • T extends
            | "DelayedAttackAttr"
            | "MoveEffectAttr"
            | "MoveHeaderAttr"
            | "MessageHeaderAttr"
            | "AddBattlerTagAttr"
            | "AddBattlerTagHeaderAttr"
            | "BeakBlastHeaderAttr"
            | "PreMoveMessageAttr"
            | "PreUseInterruptAttr"
            | "RespectAttackTypeImmunityAttr"
            | "IgnoreOpponentStatStagesAttr"
            | "HighCritAttr"
            | "CritOnlyAttr"
            | "FixedDamageAttr"
            | "UserHpDamageAttr"
            | "TargetHalfHpDamageAttr"
            | "MatchHpAttr"
            | "CounterDamageAttr"
            | "LevelDamageAttr"
            | "RandomLevelDamageAttr"
            | "ModifiedDamageAttr"
            | "SurviveDamageAttr"
            | "SplashAttr"
            | "CelebrateAttr"
            | "RecoilAttr"
            | "SacrificialAttr"
            | "SacrificialAttrOnHit"
            | "HalfSacrificialAttr"
            | "AddSubstituteAttr"
            | "HealAttr"
            | "PartyStatusCureAttr"
            | "FlameBurstAttr"
            | "SacrificialFullRestoreAttr"
            | "IgnoreWeatherTypeDebuffAttr"
            | "WeatherHealAttr"
            | "PlantHealAttr"
            | "SandHealAttr"
            | "BoostHealAttr"
            | "HealOnAllyAttr"
            | "HitHealAttr"
            | "IncrementMovePriorityAttr"
            | "MultiHitAttr"
            | "ChangeMultiHitTypeAttr"
            | "WaterShurikenMultiHitTypeAttr"
            | "StatusEffectAttr"
            | "MultiStatusEffectAttr"
            | "PsychoShiftEffectAttr"
            | "StealHeldItemChanceAttr"
            | "RemoveHeldItemAttr"
            | "EatBerryAttr"
            | "StealEatBerryAttr"
            | "HealStatusEffectAttr"
            | "BypassSleepAttr"
            | "BypassBurnDamageReductionAttr"
            | "WeatherChangeAttr"
            | "ClearWeatherAttr"
            | "TerrainChangeAttr"
            | "ClearTerrainAttr"
            | "OneHitKOAttr"
            | "InstantChargeAttr"
            | "WeatherInstantChargeAttr"
            | "OverrideMoveEffectAttr"
            | "AwaitCombinedPledgeAttr"
            | "StatStageChangeAttr"
            | "SecretPowerAttr"
            | "PostVictoryStatStageChangeAttr"
            | "AcupressureStatStageChangeAttr"
            | "GrowthStatStageChangeAttr"
            | "CutHpStatStageBoostAttr"
            | "OrderUpStatBoostAttr"
            | "CopyStatsAttr"
            | "InvertStatsAttr"
            | "ResetStatsAttr"
            | "SwapStatStagesAttr"
            | "HpSplitAttr"
            | "VariablePowerAttr"
            | "LessPPMorePowerAttr"
            | "MovePowerMultiplierAttr"
            | "BeatUpAttr"
            | "DoublePowerChanceAttr"
            | "ConsecutiveUsePowerMultiplierAttr"
            | "ConsecutiveUseDoublePowerAttr"
            | "ConsecutiveUseMultiBasePowerAttr"
            | "WeightPowerAttr"
            | "ElectroBallPowerAttr"
            | "GyroBallPowerAttr"
            | "LowHpPowerAttr"
            | "CompareWeightPowerAttr"
            | "HpPowerAttr"
            | "OpponentHighHpPowerAttr"
            | "TurnDamagedDoublePowerAttr"
            | "MagnitudePowerAttr"
            | "AntiSunlightPowerDecreaseAttr"
            | "FriendshipPowerAttr"
            | "RageFistPowerAttr"
            | "PositiveStatStagePowerAttr"
            | "PunishmentPowerAttr"
            | "PresentPowerAttr"
            | "WaterShurikenPowerAttr"
            | "SpitUpPowerAttr"
            | "SwallowHealAttr"
            | "MultiHitPowerIncrementAttr"
            | "LastMoveDoublePowerAttr"
            | "CombinedPledgePowerAttr"
            | "CombinedPledgeStabBoostAttr"
            | "RoundPowerAttr"
            | "CueNextRoundAttr"
            | "StatChangeBeforeDmgCalcAttr"
            | "SpectralThiefAttr"
            | "VariableAtkAttr"
            | "TargetAtkUserAtkAttr"
            | "DefAtkAttr"
            | "VariableDefAttr"
            | "DefDefAttr"
            | "VariableAccuracyAttr"
            | "ThunderAccuracyAttr"
            | "StormAccuracyAttr"
            | "AlwaysHitMinimizeAttr"
            | "ToxicAccuracyAttr"
            | "BlizzardAccuracyAttr"
            | "VariableMoveCategoryAttr"
            | "PhotonGeyserCategoryAttr"
            | "TeraMoveCategoryAttr"
            | "TeraBlastPowerAttr"
            | "StatusCategoryOnAllyAttr"
            | "ShellSideArmCategoryAttr"
            | "VariableMoveTypeAttr"
            | "FormChangeItemTypeAttr"
            | "TechnoBlastTypeAttr"
            | "AuraWheelTypeAttr"
            | "RagingBullTypeAttr"
            | "IvyCudgelTypeAttr"
            | "WeatherBallTypeAttr"
            | "TerrainPulseTypeAttr"
            | "HiddenPowerTypeAttr"
            | "TeraBlastTypeAttr"
            | "TeraStarstormTypeAttr"
            | "MatchUserTypeAttr"
            | "CombinedPledgeTypeAttr"
            | "VariableMoveTypeMultiplierAttr"
            | "NeutralDamageAgainstFlyingTypeMultiplierAttr"
            | "IceNoEffectTypeAttr"
            | "FlyingTypeMultiplierAttr"
            | "VariableMoveTypeChartAttr"
            | "FreezeDryAttr"
            | "OneHitKOAccuracyAttr"
            | "SheerColdAccuracyAttr"
            | "MissEffectAttr"
            | "NoEffectAttr"
            | "TypelessAttr"
            | "BypassRedirectAttr"
            | "FrenzyAttr"
            | "SemiInvulnerableAttr"
            | "LeechSeedAttr"
            | "FallDownAttr"
            | "GulpMissileTagAttr"
            | "JawLockAttr"
            | "CurseAttr"
            | "LapseBattlerTagAttr"
            | "RemoveBattlerTagAttr"
            | "FlinchAttr"
            | "ConfuseAttr"
            | "RechargeAttr"
            | "TrapAttr"
            | "ProtectAttr"
            | "IgnoreAccuracyAttr"
            | "FaintCountdownAttr"
            | "RemoveAllSubstitutesAttr"
            | "HitsTagAttr"
            | "HitsTagForDoubleDamageAttr"
            | "AddArenaTagAttr"
            | "RemoveArenaTagsAttr"
            | "AddArenaTrapTagAttr"
            | "AddArenaTrapTagHitAttr"
            | "RemoveArenaTrapAttr"
            | "RemoveScreensAttr"
            | "SwapArenaTagsAttr"
            | "AddPledgeEffectAttr"
            | "RevivalBlessingAttr"
            | "ForceSwitchOutAttr"
            | "ChillyReceptionAttr"
            | "RemoveTypeAttr"
            | "CopyTypeAttr"
            | "CopyBiomeTypeAttr"
            | "ChangeTypeAttr"
            | "AddTypeAttr"
            | "FirstMoveTypeAttr"
            | "CallMoveAttr"
            | "RandomMoveAttr"
            | "RandomMovesetMoveAttr"
            | "NaturePowerAttr"
            | "CopyMoveAttr"
            | "RepeatMoveAttr"
            | "ReducePpMoveAttr"
            | "AttackReducePpMoveAttr"
            | "MovesetCopyMoveAttr"
            | "SketchAttr"
            | "AbilityChangeAttr"
            | "AbilityCopyAttr"
            | "AbilityGiveAttr"
            | "SwitchAbilitiesAttr"
            | "SuppressAbilitiesAttr"
            | "TransformAttr"
            | "SwapStatAttr"
            | "ShiftStatAttr"
            | "AverageStatsAttr"
            | "MoneyAttr"
            | "DestinyBondAttr"
            | "AddBattlerTagIfBoostedAttr"
            | "StatusIfBoostedAttr"
            | "LastResortAttr"
            | "VariableTargetAttr"
            | "AfterYouAttr"
            | "ForceLastAttr"
            | "HitsSameTypeAttr"
            | "ResistLastMoveTypeAttr"
            | "ExposedMoveAttr"

      Parameters

      • attrType: T

        The name of a MoveAttr to search for

      Returns MoveAttrMap[T][]

      An array containing all attributes matching attrType, or an empty array if none match.

    • Gets all charge attributes of the given attribute type.

      Type Parameters

      • T extends
            | "DelayedAttackAttr"
            | "MoveEffectAttr"
            | "MoveHeaderAttr"
            | "MessageHeaderAttr"
            | "AddBattlerTagAttr"
            | "AddBattlerTagHeaderAttr"
            | "BeakBlastHeaderAttr"
            | "PreMoveMessageAttr"
            | "PreUseInterruptAttr"
            | "RespectAttackTypeImmunityAttr"
            | "IgnoreOpponentStatStagesAttr"
            | "HighCritAttr"
            | "CritOnlyAttr"
            | "FixedDamageAttr"
            | "UserHpDamageAttr"
            | "TargetHalfHpDamageAttr"
            | "MatchHpAttr"
            | "CounterDamageAttr"
            | "LevelDamageAttr"
            | "RandomLevelDamageAttr"
            | "ModifiedDamageAttr"
            | "SurviveDamageAttr"
            | "SplashAttr"
            | "CelebrateAttr"
            | "RecoilAttr"
            | "SacrificialAttr"
            | "SacrificialAttrOnHit"
            | "HalfSacrificialAttr"
            | "AddSubstituteAttr"
            | "HealAttr"
            | "PartyStatusCureAttr"
            | "FlameBurstAttr"
            | "SacrificialFullRestoreAttr"
            | "IgnoreWeatherTypeDebuffAttr"
            | "WeatherHealAttr"
            | "PlantHealAttr"
            | "SandHealAttr"
            | "BoostHealAttr"
            | "HealOnAllyAttr"
            | "HitHealAttr"
            | "IncrementMovePriorityAttr"
            | "MultiHitAttr"
            | "ChangeMultiHitTypeAttr"
            | "WaterShurikenMultiHitTypeAttr"
            | "StatusEffectAttr"
            | "MultiStatusEffectAttr"
            | "PsychoShiftEffectAttr"
            | "StealHeldItemChanceAttr"
            | "RemoveHeldItemAttr"
            | "EatBerryAttr"
            | "StealEatBerryAttr"
            | "HealStatusEffectAttr"
            | "BypassSleepAttr"
            | "BypassBurnDamageReductionAttr"
            | "WeatherChangeAttr"
            | "ClearWeatherAttr"
            | "TerrainChangeAttr"
            | "ClearTerrainAttr"
            | "OneHitKOAttr"
            | "InstantChargeAttr"
            | "WeatherInstantChargeAttr"
            | "OverrideMoveEffectAttr"
            | "AwaitCombinedPledgeAttr"
            | "StatStageChangeAttr"
            | "SecretPowerAttr"
            | "PostVictoryStatStageChangeAttr"
            | "AcupressureStatStageChangeAttr"
            | "GrowthStatStageChangeAttr"
            | "CutHpStatStageBoostAttr"
            | "OrderUpStatBoostAttr"
            | "CopyStatsAttr"
            | "InvertStatsAttr"
            | "ResetStatsAttr"
            | "SwapStatStagesAttr"
            | "HpSplitAttr"
            | "VariablePowerAttr"
            | "LessPPMorePowerAttr"
            | "MovePowerMultiplierAttr"
            | "BeatUpAttr"
            | "DoublePowerChanceAttr"
            | "ConsecutiveUsePowerMultiplierAttr"
            | "ConsecutiveUseDoublePowerAttr"
            | "ConsecutiveUseMultiBasePowerAttr"
            | "WeightPowerAttr"
            | "ElectroBallPowerAttr"
            | "GyroBallPowerAttr"
            | "LowHpPowerAttr"
            | "CompareWeightPowerAttr"
            | "HpPowerAttr"
            | "OpponentHighHpPowerAttr"
            | "TurnDamagedDoublePowerAttr"
            | "MagnitudePowerAttr"
            | "AntiSunlightPowerDecreaseAttr"
            | "FriendshipPowerAttr"
            | "RageFistPowerAttr"
            | "PositiveStatStagePowerAttr"
            | "PunishmentPowerAttr"
            | "PresentPowerAttr"
            | "WaterShurikenPowerAttr"
            | "SpitUpPowerAttr"
            | "SwallowHealAttr"
            | "MultiHitPowerIncrementAttr"
            | "LastMoveDoublePowerAttr"
            | "CombinedPledgePowerAttr"
            | "CombinedPledgeStabBoostAttr"
            | "RoundPowerAttr"
            | "CueNextRoundAttr"
            | "StatChangeBeforeDmgCalcAttr"
            | "SpectralThiefAttr"
            | "VariableAtkAttr"
            | "TargetAtkUserAtkAttr"
            | "DefAtkAttr"
            | "VariableDefAttr"
            | "DefDefAttr"
            | "VariableAccuracyAttr"
            | "ThunderAccuracyAttr"
            | "StormAccuracyAttr"
            | "AlwaysHitMinimizeAttr"
            | "ToxicAccuracyAttr"
            | "BlizzardAccuracyAttr"
            | "VariableMoveCategoryAttr"
            | "PhotonGeyserCategoryAttr"
            | "TeraMoveCategoryAttr"
            | "TeraBlastPowerAttr"
            | "StatusCategoryOnAllyAttr"
            | "ShellSideArmCategoryAttr"
            | "VariableMoveTypeAttr"
            | "FormChangeItemTypeAttr"
            | "TechnoBlastTypeAttr"
            | "AuraWheelTypeAttr"
            | "RagingBullTypeAttr"
            | "IvyCudgelTypeAttr"
            | "WeatherBallTypeAttr"
            | "TerrainPulseTypeAttr"
            | "HiddenPowerTypeAttr"
            | "TeraBlastTypeAttr"
            | "TeraStarstormTypeAttr"
            | "MatchUserTypeAttr"
            | "CombinedPledgeTypeAttr"
            | "VariableMoveTypeMultiplierAttr"
            | "NeutralDamageAgainstFlyingTypeMultiplierAttr"
            | "IceNoEffectTypeAttr"
            | "FlyingTypeMultiplierAttr"
            | "VariableMoveTypeChartAttr"
            | "FreezeDryAttr"
            | "OneHitKOAccuracyAttr"
            | "SheerColdAccuracyAttr"
            | "MissEffectAttr"
            | "NoEffectAttr"
            | "TypelessAttr"
            | "BypassRedirectAttr"
            | "FrenzyAttr"
            | "SemiInvulnerableAttr"
            | "LeechSeedAttr"
            | "FallDownAttr"
            | "GulpMissileTagAttr"
            | "JawLockAttr"
            | "CurseAttr"
            | "LapseBattlerTagAttr"
            | "RemoveBattlerTagAttr"
            | "FlinchAttr"
            | "ConfuseAttr"
            | "RechargeAttr"
            | "TrapAttr"
            | "ProtectAttr"
            | "IgnoreAccuracyAttr"
            | "FaintCountdownAttr"
            | "RemoveAllSubstitutesAttr"
            | "HitsTagAttr"
            | "HitsTagForDoubleDamageAttr"
            | "AddArenaTagAttr"
            | "RemoveArenaTagsAttr"
            | "AddArenaTrapTagAttr"
            | "AddArenaTrapTagHitAttr"
            | "RemoveArenaTrapAttr"
            | "RemoveScreensAttr"
            | "SwapArenaTagsAttr"
            | "AddPledgeEffectAttr"
            | "RevivalBlessingAttr"
            | "ForceSwitchOutAttr"
            | "ChillyReceptionAttr"
            | "RemoveTypeAttr"
            | "CopyTypeAttr"
            | "CopyBiomeTypeAttr"
            | "ChangeTypeAttr"
            | "AddTypeAttr"
            | "FirstMoveTypeAttr"
            | "CallMoveAttr"
            | "RandomMoveAttr"
            | "RandomMovesetMoveAttr"
            | "NaturePowerAttr"
            | "CopyMoveAttr"
            | "RepeatMoveAttr"
            | "ReducePpMoveAttr"
            | "AttackReducePpMoveAttr"
            | "MovesetCopyMoveAttr"
            | "SketchAttr"
            | "AbilityChangeAttr"
            | "AbilityCopyAttr"
            | "AbilityGiveAttr"
            | "SwitchAbilitiesAttr"
            | "SuppressAbilitiesAttr"
            | "TransformAttr"
            | "SwapStatAttr"
            | "ShiftStatAttr"
            | "AverageStatsAttr"
            | "MoneyAttr"
            | "DestinyBondAttr"
            | "AddBattlerTagIfBoostedAttr"
            | "StatusIfBoostedAttr"
            | "LastResortAttr"
            | "VariableTargetAttr"
            | "AfterYouAttr"
            | "ForceLastAttr"
            | "HitsSameTypeAttr"
            | "ResistLastMoveTypeAttr"
            | "ExposedMoveAttr"

      Parameters

      • attrType: T

        any attribute that extends MoveAttr

      Returns MoveAttrMap[T][]

      Array of attributes that match attrType, or an empty array if no matches are found.

    • Sees if a move has a custom failure text (by looking at each MoveAttr of this move)

      Parameters

      Returns undefined | string

      string of the custom failure text, or null if it uses the default text ("But it failed!")

    • Parameters

      • user: Pokemon
      • simulated: boolean = true

      Returns number

    • Calculates the userBenefitScore across all the attributes and conditions

      Parameters

      Returns number

      integer representing the total benefitScore

    • Check if a move has an attribute that matches attrType.

      Parameters

      • attrType:
            | "DelayedAttackAttr"
            | "MoveEffectAttr"
            | "MoveHeaderAttr"
            | "MessageHeaderAttr"
            | "AddBattlerTagAttr"
            | "AddBattlerTagHeaderAttr"
            | "BeakBlastHeaderAttr"
            | "PreMoveMessageAttr"
            | "PreUseInterruptAttr"
            | "RespectAttackTypeImmunityAttr"
            | "IgnoreOpponentStatStagesAttr"
            | "HighCritAttr"
            | "CritOnlyAttr"
            | "FixedDamageAttr"
            | "UserHpDamageAttr"
            | "TargetHalfHpDamageAttr"
            | "MatchHpAttr"
            | "CounterDamageAttr"
            | "LevelDamageAttr"
            | "RandomLevelDamageAttr"
            | "ModifiedDamageAttr"
            | "SurviveDamageAttr"
            | "SplashAttr"
            | "CelebrateAttr"
            | "RecoilAttr"
            | "SacrificialAttr"
            | "SacrificialAttrOnHit"
            | "HalfSacrificialAttr"
            | "AddSubstituteAttr"
            | "HealAttr"
            | "PartyStatusCureAttr"
            | "FlameBurstAttr"
            | "SacrificialFullRestoreAttr"
            | "IgnoreWeatherTypeDebuffAttr"
            | "WeatherHealAttr"
            | "PlantHealAttr"
            | "SandHealAttr"
            | "BoostHealAttr"
            | "HealOnAllyAttr"
            | "HitHealAttr"
            | "IncrementMovePriorityAttr"
            | "MultiHitAttr"
            | "ChangeMultiHitTypeAttr"
            | "WaterShurikenMultiHitTypeAttr"
            | "StatusEffectAttr"
            | "MultiStatusEffectAttr"
            | "PsychoShiftEffectAttr"
            | "StealHeldItemChanceAttr"
            | "RemoveHeldItemAttr"
            | "EatBerryAttr"
            | "StealEatBerryAttr"
            | "HealStatusEffectAttr"
            | "BypassSleepAttr"
            | "BypassBurnDamageReductionAttr"
            | "WeatherChangeAttr"
            | "ClearWeatherAttr"
            | "TerrainChangeAttr"
            | "ClearTerrainAttr"
            | "OneHitKOAttr"
            | "InstantChargeAttr"
            | "WeatherInstantChargeAttr"
            | "OverrideMoveEffectAttr"
            | "AwaitCombinedPledgeAttr"
            | "StatStageChangeAttr"
            | "SecretPowerAttr"
            | "PostVictoryStatStageChangeAttr"
            | "AcupressureStatStageChangeAttr"
            | "GrowthStatStageChangeAttr"
            | "CutHpStatStageBoostAttr"
            | "OrderUpStatBoostAttr"
            | "CopyStatsAttr"
            | "InvertStatsAttr"
            | "ResetStatsAttr"
            | "SwapStatStagesAttr"
            | "HpSplitAttr"
            | "VariablePowerAttr"
            | "LessPPMorePowerAttr"
            | "MovePowerMultiplierAttr"
            | "BeatUpAttr"
            | "DoublePowerChanceAttr"
            | "ConsecutiveUsePowerMultiplierAttr"
            | "ConsecutiveUseDoublePowerAttr"
            | "ConsecutiveUseMultiBasePowerAttr"
            | "WeightPowerAttr"
            | "ElectroBallPowerAttr"
            | "GyroBallPowerAttr"
            | "LowHpPowerAttr"
            | "CompareWeightPowerAttr"
            | "HpPowerAttr"
            | "OpponentHighHpPowerAttr"
            | "TurnDamagedDoublePowerAttr"
            | "MagnitudePowerAttr"
            | "AntiSunlightPowerDecreaseAttr"
            | "FriendshipPowerAttr"
            | "RageFistPowerAttr"
            | "PositiveStatStagePowerAttr"
            | "PunishmentPowerAttr"
            | "PresentPowerAttr"
            | "WaterShurikenPowerAttr"
            | "SpitUpPowerAttr"
            | "SwallowHealAttr"
            | "MultiHitPowerIncrementAttr"
            | "LastMoveDoublePowerAttr"
            | "CombinedPledgePowerAttr"
            | "CombinedPledgeStabBoostAttr"
            | "RoundPowerAttr"
            | "CueNextRoundAttr"
            | "StatChangeBeforeDmgCalcAttr"
            | "SpectralThiefAttr"
            | "VariableAtkAttr"
            | "TargetAtkUserAtkAttr"
            | "DefAtkAttr"
            | "VariableDefAttr"
            | "DefDefAttr"
            | "VariableAccuracyAttr"
            | "ThunderAccuracyAttr"
            | "StormAccuracyAttr"
            | "AlwaysHitMinimizeAttr"
            | "ToxicAccuracyAttr"
            | "BlizzardAccuracyAttr"
            | "VariableMoveCategoryAttr"
            | "PhotonGeyserCategoryAttr"
            | "TeraMoveCategoryAttr"
            | "TeraBlastPowerAttr"
            | "StatusCategoryOnAllyAttr"
            | "ShellSideArmCategoryAttr"
            | "VariableMoveTypeAttr"
            | "FormChangeItemTypeAttr"
            | "TechnoBlastTypeAttr"
            | "AuraWheelTypeAttr"
            | "RagingBullTypeAttr"
            | "IvyCudgelTypeAttr"
            | "WeatherBallTypeAttr"
            | "TerrainPulseTypeAttr"
            | "HiddenPowerTypeAttr"
            | "TeraBlastTypeAttr"
            | "TeraStarstormTypeAttr"
            | "MatchUserTypeAttr"
            | "CombinedPledgeTypeAttr"
            | "VariableMoveTypeMultiplierAttr"
            | "NeutralDamageAgainstFlyingTypeMultiplierAttr"
            | "IceNoEffectTypeAttr"
            | "FlyingTypeMultiplierAttr"
            | "VariableMoveTypeChartAttr"
            | "FreezeDryAttr"
            | "OneHitKOAccuracyAttr"
            | "SheerColdAccuracyAttr"
            | "MissEffectAttr"
            | "NoEffectAttr"
            | "TypelessAttr"
            | "BypassRedirectAttr"
            | "FrenzyAttr"
            | "SemiInvulnerableAttr"
            | "LeechSeedAttr"
            | "FallDownAttr"
            | "GulpMissileTagAttr"
            | "JawLockAttr"
            | "CurseAttr"
            | "LapseBattlerTagAttr"
            | "RemoveBattlerTagAttr"
            | "FlinchAttr"
            | "ConfuseAttr"
            | "RechargeAttr"
            | "TrapAttr"
            | "ProtectAttr"
            | "IgnoreAccuracyAttr"
            | "FaintCountdownAttr"
            | "RemoveAllSubstitutesAttr"
            | "HitsTagAttr"
            | "HitsTagForDoubleDamageAttr"
            | "AddArenaTagAttr"
            | "RemoveArenaTagsAttr"
            | "AddArenaTrapTagAttr"
            | "AddArenaTrapTagHitAttr"
            | "RemoveArenaTrapAttr"
            | "RemoveScreensAttr"
            | "SwapArenaTagsAttr"
            | "AddPledgeEffectAttr"
            | "RevivalBlessingAttr"
            | "ForceSwitchOutAttr"
            | "ChillyReceptionAttr"
            | "RemoveTypeAttr"
            | "CopyTypeAttr"
            | "CopyBiomeTypeAttr"
            | "ChangeTypeAttr"
            | "AddTypeAttr"
            | "FirstMoveTypeAttr"
            | "CallMoveAttr"
            | "RandomMoveAttr"
            | "RandomMovesetMoveAttr"
            | "NaturePowerAttr"
            | "CopyMoveAttr"
            | "RepeatMoveAttr"
            | "ReducePpMoveAttr"
            | "AttackReducePpMoveAttr"
            | "MovesetCopyMoveAttr"
            | "SketchAttr"
            | "AbilityChangeAttr"
            | "AbilityCopyAttr"
            | "AbilityGiveAttr"
            | "SwitchAbilitiesAttr"
            | "SuppressAbilitiesAttr"
            | "TransformAttr"
            | "SwapStatAttr"
            | "ShiftStatAttr"
            | "AverageStatsAttr"
            | "MoneyAttr"
            | "DestinyBondAttr"
            | "AddBattlerTagIfBoostedAttr"
            | "StatusIfBoostedAttr"
            | "LastResortAttr"
            | "VariableTargetAttr"
            | "AfterYouAttr"
            | "ForceLastAttr"
            | "HitsSameTypeAttr"
            | "ResistLastMoveTypeAttr"
            | "ExposedMoveAttr"

        The name of a MoveAttr to search for

      Returns boolean

      Whether this move has at least 1 attribute that matches attrType

    • Checks if this move has an attribute of the given type.

      Type Parameters

      • T extends
            | "DelayedAttackAttr"
            | "MoveEffectAttr"
            | "MoveHeaderAttr"
            | "MessageHeaderAttr"
            | "AddBattlerTagAttr"
            | "AddBattlerTagHeaderAttr"
            | "BeakBlastHeaderAttr"
            | "PreMoveMessageAttr"
            | "PreUseInterruptAttr"
            | "RespectAttackTypeImmunityAttr"
            | "IgnoreOpponentStatStagesAttr"
            | "HighCritAttr"
            | "CritOnlyAttr"
            | "FixedDamageAttr"
            | "UserHpDamageAttr"
            | "TargetHalfHpDamageAttr"
            | "MatchHpAttr"
            | "CounterDamageAttr"
            | "LevelDamageAttr"
            | "RandomLevelDamageAttr"
            | "ModifiedDamageAttr"
            | "SurviveDamageAttr"
            | "SplashAttr"
            | "CelebrateAttr"
            | "RecoilAttr"
            | "SacrificialAttr"
            | "SacrificialAttrOnHit"
            | "HalfSacrificialAttr"
            | "AddSubstituteAttr"
            | "HealAttr"
            | "PartyStatusCureAttr"
            | "FlameBurstAttr"
            | "SacrificialFullRestoreAttr"
            | "IgnoreWeatherTypeDebuffAttr"
            | "WeatherHealAttr"
            | "PlantHealAttr"
            | "SandHealAttr"
            | "BoostHealAttr"
            | "HealOnAllyAttr"
            | "HitHealAttr"
            | "IncrementMovePriorityAttr"
            | "MultiHitAttr"
            | "ChangeMultiHitTypeAttr"
            | "WaterShurikenMultiHitTypeAttr"
            | "StatusEffectAttr"
            | "MultiStatusEffectAttr"
            | "PsychoShiftEffectAttr"
            | "StealHeldItemChanceAttr"
            | "RemoveHeldItemAttr"
            | "EatBerryAttr"
            | "StealEatBerryAttr"
            | "HealStatusEffectAttr"
            | "BypassSleepAttr"
            | "BypassBurnDamageReductionAttr"
            | "WeatherChangeAttr"
            | "ClearWeatherAttr"
            | "TerrainChangeAttr"
            | "ClearTerrainAttr"
            | "OneHitKOAttr"
            | "InstantChargeAttr"
            | "WeatherInstantChargeAttr"
            | "OverrideMoveEffectAttr"
            | "AwaitCombinedPledgeAttr"
            | "StatStageChangeAttr"
            | "SecretPowerAttr"
            | "PostVictoryStatStageChangeAttr"
            | "AcupressureStatStageChangeAttr"
            | "GrowthStatStageChangeAttr"
            | "CutHpStatStageBoostAttr"
            | "OrderUpStatBoostAttr"
            | "CopyStatsAttr"
            | "InvertStatsAttr"
            | "ResetStatsAttr"
            | "SwapStatStagesAttr"
            | "HpSplitAttr"
            | "VariablePowerAttr"
            | "LessPPMorePowerAttr"
            | "MovePowerMultiplierAttr"
            | "BeatUpAttr"
            | "DoublePowerChanceAttr"
            | "ConsecutiveUsePowerMultiplierAttr"
            | "ConsecutiveUseDoublePowerAttr"
            | "ConsecutiveUseMultiBasePowerAttr"
            | "WeightPowerAttr"
            | "ElectroBallPowerAttr"
            | "GyroBallPowerAttr"
            | "LowHpPowerAttr"
            | "CompareWeightPowerAttr"
            | "HpPowerAttr"
            | "OpponentHighHpPowerAttr"
            | "TurnDamagedDoublePowerAttr"
            | "MagnitudePowerAttr"
            | "AntiSunlightPowerDecreaseAttr"
            | "FriendshipPowerAttr"
            | "RageFistPowerAttr"
            | "PositiveStatStagePowerAttr"
            | "PunishmentPowerAttr"
            | "PresentPowerAttr"
            | "WaterShurikenPowerAttr"
            | "SpitUpPowerAttr"
            | "SwallowHealAttr"
            | "MultiHitPowerIncrementAttr"
            | "LastMoveDoublePowerAttr"
            | "CombinedPledgePowerAttr"
            | "CombinedPledgeStabBoostAttr"
            | "RoundPowerAttr"
            | "CueNextRoundAttr"
            | "StatChangeBeforeDmgCalcAttr"
            | "SpectralThiefAttr"
            | "VariableAtkAttr"
            | "TargetAtkUserAtkAttr"
            | "DefAtkAttr"
            | "VariableDefAttr"
            | "DefDefAttr"
            | "VariableAccuracyAttr"
            | "ThunderAccuracyAttr"
            | "StormAccuracyAttr"
            | "AlwaysHitMinimizeAttr"
            | "ToxicAccuracyAttr"
            | "BlizzardAccuracyAttr"
            | "VariableMoveCategoryAttr"
            | "PhotonGeyserCategoryAttr"
            | "TeraMoveCategoryAttr"
            | "TeraBlastPowerAttr"
            | "StatusCategoryOnAllyAttr"
            | "ShellSideArmCategoryAttr"
            | "VariableMoveTypeAttr"
            | "FormChangeItemTypeAttr"
            | "TechnoBlastTypeAttr"
            | "AuraWheelTypeAttr"
            | "RagingBullTypeAttr"
            | "IvyCudgelTypeAttr"
            | "WeatherBallTypeAttr"
            | "TerrainPulseTypeAttr"
            | "HiddenPowerTypeAttr"
            | "TeraBlastTypeAttr"
            | "TeraStarstormTypeAttr"
            | "MatchUserTypeAttr"
            | "CombinedPledgeTypeAttr"
            | "VariableMoveTypeMultiplierAttr"
            | "NeutralDamageAgainstFlyingTypeMultiplierAttr"
            | "IceNoEffectTypeAttr"
            | "FlyingTypeMultiplierAttr"
            | "VariableMoveTypeChartAttr"
            | "FreezeDryAttr"
            | "OneHitKOAccuracyAttr"
            | "SheerColdAccuracyAttr"
            | "MissEffectAttr"
            | "NoEffectAttr"
            | "TypelessAttr"
            | "BypassRedirectAttr"
            | "FrenzyAttr"
            | "SemiInvulnerableAttr"
            | "LeechSeedAttr"
            | "FallDownAttr"
            | "GulpMissileTagAttr"
            | "JawLockAttr"
            | "CurseAttr"
            | "LapseBattlerTagAttr"
            | "RemoveBattlerTagAttr"
            | "FlinchAttr"
            | "ConfuseAttr"
            | "RechargeAttr"
            | "TrapAttr"
            | "ProtectAttr"
            | "IgnoreAccuracyAttr"
            | "FaintCountdownAttr"
            | "RemoveAllSubstitutesAttr"
            | "HitsTagAttr"
            | "HitsTagForDoubleDamageAttr"
            | "AddArenaTagAttr"
            | "RemoveArenaTagsAttr"
            | "AddArenaTrapTagAttr"
            | "AddArenaTrapTagHitAttr"
            | "RemoveArenaTrapAttr"
            | "RemoveScreensAttr"
            | "SwapArenaTagsAttr"
            | "AddPledgeEffectAttr"
            | "RevivalBlessingAttr"
            | "ForceSwitchOutAttr"
            | "ChillyReceptionAttr"
            | "RemoveTypeAttr"
            | "CopyTypeAttr"
            | "CopyBiomeTypeAttr"
            | "ChangeTypeAttr"
            | "AddTypeAttr"
            | "FirstMoveTypeAttr"
            | "CallMoveAttr"
            | "RandomMoveAttr"
            | "RandomMovesetMoveAttr"
            | "NaturePowerAttr"
            | "CopyMoveAttr"
            | "RepeatMoveAttr"
            | "ReducePpMoveAttr"
            | "AttackReducePpMoveAttr"
            | "MovesetCopyMoveAttr"
            | "SketchAttr"
            | "AbilityChangeAttr"
            | "AbilityCopyAttr"
            | "AbilityGiveAttr"
            | "SwitchAbilitiesAttr"
            | "SuppressAbilitiesAttr"
            | "TransformAttr"
            | "SwapStatAttr"
            | "ShiftStatAttr"
            | "AverageStatsAttr"
            | "MoneyAttr"
            | "DestinyBondAttr"
            | "AddBattlerTagIfBoostedAttr"
            | "StatusIfBoostedAttr"
            | "LastResortAttr"
            | "VariableTargetAttr"
            | "AfterYouAttr"
            | "ForceLastAttr"
            | "HitsSameTypeAttr"
            | "ResistLastMoveTypeAttr"
            | "ExposedMoveAttr"

      Parameters

      • attrType: T

        any attribute that extends MoveAttr

      Returns boolean

      true if a matching attribute is found; false otherwise

    • Getter function that returns if this Move has a given MoveFlag.

      Parameters

      Returns boolean

      Whether this Move has the specified flag.

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

      Parameters

      Returns boolean

      Whether this Move will hit the target's Substitute (assuming one exists).

    • 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 target is immune to this Move's type. Currently looks at cases of Grass types with powder moves and Dark types with moves affected by Prankster.

      Parameters

      Returns boolean

      Whether the move is blocked by the target's type. Self-targeted moves will return false regardless of circumstances.

    • Returns void

    • Sets the MoveFlags.MAKES_CONTACT flag for the calling Move

      Parameters

      • setFlag: boolean = true

        Whether the move should make contact; default true

      Returns this

      this

    • Mark this move as partially implemented. Partial moves are expected to have some core functionality implemented, but may lack certain notable features or interactions with other moves or abilities.

      Returns this

      this

    • Mark this move as unimplemented. Unimplemented moves are ones which have none of their basic functionality enabled, and cannot be used.

      Returns this

      this