All Superinterfaces:
ITranslatable, RarityTweak
All Known Implementing Classes:
Absorb, AbstractAbility, Adaptability, Aerilate, Aftermath, AirLock, Analytic, AngerPoint, AngerShell, Anticipation, ArenaTrap, ArmorTail, AromaVeil, AsOne, Ate, Aura, AuraBreak, BadDreams, BallFetch, Battery, BattleArmour, BattleBond, BeadsOfRuin, BeastBoost, Berserk, BigPecks, Blaze, Bulletproof, CheekPouch, ChillingNeigh, Chlorophyll, ClearBody, CloudNine, ColorChange, Comatose, ComingSoon, Commander, Competitive, CompoundEyes, ContactDamage, Contrary, CornerstoneMask, Corrosion, Costar, CottonDown, CudChew, CuriousMedicine, CursedBody, CuteCharm, Damp, Dancer, DarkAura, DauntlessShield, Dazzling, Defeatist, Defiant, DeltaStream, DesolateLand, Disguise, Download, DragonsMaw, Drizzle, Drought, DrySkin, EarlyBird, EarthEater, EffectSpore, ElectricSurge, Electromorphosis, EmbodyAspect, EmergencyExit, Error, FairyAura, Filter, FlameBody, FlareBoost, FlashFire, FlowerGift, FlowerVeil, Fluffy, Forecast, Forewarn, FriendGuard, Frisk, FullMetalBody, FurCoat, GaleWings, Galvanize, Gluttony, GoodAsGold, Gooey, GorillaTactics, GrassPelt, GrassySurge, GrimNeigh, GuardDog, GulpMissile, Guts, HadronEngine, Harvest, Healer, HearthflameMask, Heatproof, HeavyMetal, HoneyGather, Hospitality, HugePower, HungerSwitch, Hustle, Hydration, HyperCutter, IceBody, IceFace, IceScales, IgnoreWeather, Illuminate, Illusion, Immunity, Imposter, Infiltrator, InnardsOut, InnerFocus, Insomnia, Intimidate, IntrepidSword, IronBarbs, IronFist, Justified, KeenEye, Klutz, LeafGuard, Levitate, Libero, LightMetal, LightningRod, Limber, LingeringAroma, LiquidOoze, LiquidVoice, LongReach, LowHPTypeBoost, MagicBounce, MagicGuard, Magician, MagmaArmor, MagnetPull, MarvelScale, MegaLauncher, Merciless, Mimicry, MindsEye, Minus, MirrorArmor, MistySurge, MoldBreaker, Moody, MotorDrive, Moxie, Multiscale, Multitype, Mummy, MyceliumMight, NaturalCure, Neuroforce, NeutralizingGas, NoGuard, Normalize, Oblivious, OfRuin, Opportunist, OrichalcumPulse, Overcoat, Overgrow, OwnTempo, ParadoxBoostAbility, ParentalBond, PastelVeil, PerishBody, Pickpocket, Pickup, Pixilate, Plus, PoisonHeal, PoisonPoint, PoisonPuppeteer, PoisonTouch, PowerConstruct, PowerOfAlchemy, PowerSpot, Prankster, Pressure, PreventSleep, PreventStatDrop, PreventStatus, PreventStatusTeam, PrimordialSea, PrismArmor, PropellerTail, Protean, Protosynthesis, PsychicSurge, PunkRock, PurePower, PurifyingSalt, QuarkDrive, QueenlyMajesty, QuickDraw, QuickFeet, RainDish, Rattled, Receiver, Reckless, Redirect, Refrigerate, Regenerator, Revenant, Ripen, Rivalry, RKSSystem, RockHead, RockyPayload, RoughSkin, RunAway, SandForce, SandRush, SandSpit, SandStream, SandVeil, SapSipper, Schooling, Scrappy, ScreenCleaner, SeedSower, SereneGrace, ShadowShield, ShadowTag, Sharpness, ShedSkin, SheerForce, ShellArmour, ShieldDust, ShieldsDown, Simple, SkillLink, SlowStart, SlushRush, Sniper, SnowCloak, SnowWarning, SolarPower, SolidRock, SoulHeart, Soundproof, SpeedBoost, Stakeout, Stall, Stalwart, Stamina, StanceChange, Static, Steadfast, SteamEngine, Steelworker, SteelySpirit, Stench, StickyHold, StormDrain, StrongJaw, Sturdy, SuctionCups, SuperLuck, SupersweetSyrup, SupremeOverlord, SurgeSurfer, Swarm, SweetVeil, SwiftSwim, SwordOfRuin, Symbiosis, Synchronize, TabletsOfRuin, TangledFeet, TanglingHair, TealMask, Technician, Telepathy, TeraformZero, TeraShell, TeraShift, Teravolt, ThermalExchange, ThickFat, TintedLens, Torrent, ToughClaws, ToxicBoost, ToxicChain, ToxicDebris, Trace, Transistor, Triage, Truant, Turboblaze, Unaware, Unburden, Unnerve, UnseenFist, VesselOfRuin, VictoryStar, VitalSpirit, VoltAbsorb, WanderingSpirit, WaterAbsorb, WaterBubble, WaterCompaction, WaterVeil, WeakArmor, WellBakedBody, WellspringMask, WhiteSmoke, WimpOut, WindPower, WindRider, WonderGuard, WonderSkin, ZenMode, ZeroToHero

public interface Ability extends ITranslatable, RarityTweak
Interface representing a Pokemon's Ability
  • Method Details

    • getName

      String getName()
      Returns the Ability's class name.
      Returns:
      The Ability's class name.
    • startMove

      default void startMove(PixelmonWrapper user)
      Affects the Pokémon at the start of using a move.
      Parameters:
      user - The Pokémon with the Ability.
    • canAttackThisTurn

      default boolean canAttackThisTurn(PixelmonWrapper user, Attack a)
      Checks if the Pokémon's Ability allows it to make a move.
      Parameters:
      user - The Pokémon with the Ability.
      a - The move to be used.
      Returns:
      Whether the Pokémon's Ability allows it to make a move.
    • modifyDamageUser

      default int modifyDamageUser(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Triggers when the Pokémon deals direct damage.
      Parameters:
      damage - The amount of damage dealt.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
      Returns:
      The modified damage.
    • modifyDamageTarget

      default int modifyDamageTarget(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Triggers when the Pokémon takes direct damage.
      Parameters:
      damage - The amount of damage dealt.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
      Returns:
      The modified damage.
    • modifyDamageIncludeFixed

      default int modifyDamageIncludeFixed(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Triggers when the Pokémon takes direct damage, including fixed damage moves.
      Parameters:
      damage - The amount of damage dealt.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
      Returns:
      The modified damage.
    • modifySelfDamage

      default int modifySelfDamage(int damage, PixelmonWrapper pw, Attack a)
      Triggers when the Pokémon takes self damage.
      Parameters:
      damage - The amount of damage dealt.
      pw - The Pokémon taking damage.
      a - The attack.
      Returns:
      The modified damage.
    • modifyConfusionDamage

      default int modifyConfusionDamage(int damage, PixelmonWrapper pw)
      Triggers when the Pokémon takes would take Confusion damage.
      Parameters:
      damage - The amount of damage dealt.
      pw - The Pokémon taking damage.
      Returns:
      The modified damage.
    • modifyDamage

      default int modifyDamage(int damage, PixelmonWrapper user, PixelmonWrapper target, DamageTypeEnum type, @Nullable Attack attack, @Nullable Ability ability)
      Triggers when the Pokémon takes damage, from any source.
      Parameters:
      damage - The amount of damage dealt.
      user - The attack's user.
      target - The attack's target.
      type - The damage type.
      attack - The attack used by the source Pokémon, if present.
      ability - The ability of the source Pokémon.
      Returns:
      The modified damage.
    • modifyDamageTeammate

      default int modifyDamageTeammate(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Triggers when the Pokémon's ally takes direct damage.
      Parameters:
      damage - The amount of damage dealt.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
      Returns:
      The modified damage.
    • tookDamageUser

      default void tookDamageUser(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Triggers after the Pokémon deals damage.
      Parameters:
      damage - The amount of damage dealt.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
    • tookDamageTarget

      default void tookDamageTarget(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Triggers after the Pokémon takes damage.
      Parameters:
      damage - The amount of damage dealt.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
    • tookDamageTargetAfterMove

      default void tookDamageTargetAfterMove(PixelmonWrapper user, PixelmonWrapper target, Attack a, float damage)
      Triggers at the end of an attack (after all hits of a multi-hit move) if the user takes damage.
      Parameters:
      user - The attack's user.
      target - The attack's target.
      a - The attack.
    • tookDamageTargetAfterMoveLate

      default void tookDamageTargetAfterMoveLate(PixelmonWrapper user, PixelmonWrapper abilityUserAndTarget)
      Triggers at the end of an attack, after all effects (after all hits of a multi-hit move and after being poisoned, burned, etc.) if the user takes damage.

      The target is guaranteed to have taken damage this turn.

      Parameters:
      user - The attack's user.
      abilityUserAndTarget - The attack's target and the user of the ability.
    • modifyPowerAndAccuracyUser

      default int[] modifyPowerAndAccuracyUser(int power, int accuracy, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Modifies the power and accuracy of the Pokémon's attack.
      Parameters:
      power - The attack's power.
      accuracy - The attack's accuracy.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
      Returns:
      The modified power and accuracy.
    • modifyPowerAndAccuracyTarget

      default int[] modifyPowerAndAccuracyTarget(int power, int accuracy, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Modifies the power and accuracy of the attack about to hit the Pokémon.
      Parameters:
      power - The attack's power.
      accuracy - The attack's accuracy.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
      Returns:
      The modified power and accuracy.
    • modifyPowerAndAccuracyTeammate

      default int[] modifyPowerAndAccuracyTeammate(int power, int accuracy, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Modifies the power and accuracy of a teammate's attack.
      Parameters:
      power - The attack's power.
      accuracy - The attack's accuracy.
      user - The attack's user.
      target - The attack's target.
      a - The attack.
      Returns:
      The modified power and accuracy.
    • modifyMoveEffects

      default void modifyMoveEffects(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects)
      Allows the user to add or remove the move's effects
      Parameters:
      user - The attacking Pokemon, with the ability.
      target - The Pokemon being attacked.
      effects - The current effects of the attack.
    • modifyMoveEffectChanceUser

      default void modifyMoveEffectChanceUser(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects)
      Allows the user to adjust the move's effects
      Parameters:
      user - The attacking Pokemon, with the ability.
      target - The Pokemon being attacked.
      effects - The current effects of the attack.
    • modifyMoveEffectChanceTarget

      @Deprecated(forRemoval=true) default void modifyMoveEffectChanceTarget(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Allows the target to adjust the move's effects, such as disabling effects from CovertCloak
      Parameters:
      user - The attacking Pokemon.
      target - The Pokemon being attacked, with the ability.
      effects - The current effects of the attack.
    • ignoresAdditionalEffectsFromAttacker

      default boolean ignoresAdditionalEffectsFromAttacker(EffectBase effect, PixelmonWrapper abilityUser, PixelmonWrapper attacker)
      When overridden, allows the user's ability to ignore the additional effects of moves.
      Parameters:
      effect - What will potentially be ignored.
      abilityUser - The defending Pokémon with the ability.
      attacker - The Pokémon attacking.
    • ignoresAdditionalEffectsAgainstTarget

      default boolean ignoresAdditionalEffectsAgainstTarget(EffectBase effect, PixelmonWrapper abilityUser)
      When overridden, allows the user's ability to ignore the additional effects of moves.
      Parameters:
      effect - What will potentially be ignored.
      abilityUser - The Pokémon with the ability that is attacking.
    • beforeSwitch

      default void beforeSwitch(PixelmonWrapper newPokemon)
      Triggers just before the Pokémon switches in.
      Parameters:
      newPokemon - The Pokémon switching in.
    • applySwitchInEffect

      default void applySwitchInEffect(PixelmonWrapper newPokemon)
      Triggers after the Pokémon switches in and when the Pokémon gains an Ability.
      Parameters:
      newPokemon - The Pokémon switching in.
    • applyPostSwitchEffect

      default void applyPostSwitchEffect(PixelmonWrapper newPokemon)
      Triggers after all the Pokémon switch in at the start of turn.
      Parameters:
      newPokemon - The Pokémon switching in.
    • applySwitchOutEffect

      default void applySwitchOutEffect(PixelmonWrapper oldPokemon)
      Triggers when the Pokémon switches out.
      Parameters:
      oldPokemon - The Pokémon switching out.
    • applyFoeSwitchInEffect

      default void applyFoeSwitchInEffect(PixelmonWrapper user, PixelmonWrapper target, PixelmonWrapper former)
      Triggers after an enemy Pokémon switches in.
    • applyAllySwitchInEffect

      default void applyAllySwitchInEffect(PixelmonWrapper user, PixelmonWrapper target)
      Triggers after an allied Pokémon switches in.
      Parameters:
      user - The Pokémon with the ability.
      target - The allied Pokémon switching in.
    • applySwitchReplaceEffect

      default void applySwitchReplaceEffect(PixelmonWrapper newPokemon, PixelmonWrapper oldPokemon)
      Triggers after an Pokémon switches in.
      Parameters:
      newPokemon - The Pokémon with the ability switching in.
      oldPokemon - The Pokémon switching out.
    • applyDynamaxEffect

      default void applyDynamaxEffect(PixelmonWrapper pokemon)
      Triggers when the Pokémon Dynamaxes.
      Parameters:
      pokemon - The Pokémon Dynamaxing.
    • applyTerastalEffect

      default void applyTerastalEffect(PixelmonWrapper pokemon)
      Triggers when the Pokémon Terastallizes.
      Parameters:
      pokemon - The Pokémon terastallizing.
    • applyEndOfBattleEffect

      default void applyEndOfBattleEffect(PixelmonWrapper pokemon)
      Triggers at the end of the battle.
      Parameters:
      pokemon - The Pokémon in battle at the battle's end.
    • doesContactAttackMakeContact

      default boolean doesContactAttackMakeContact(PixelmonWrapper user, Attack a)
      Whether this contact move will continue to make contact.
      Parameters:
      user - - The user of the move
      a - - The attack being used
      Returns:
      - Whether or not it will continue to make contact.
    • preventsItemRemoval

      default boolean preventsItemRemoval(PixelmonWrapper thief, PixelmonWrapper target)
      Whether this ability prevents an item being stolen
      Parameters:
      thief - - The
      target - - The attack being used
      Returns:
      - Whether or not it will continue to make contact.
    • applyStartOfTurnEffect

      default void applyStartOfTurnEffect(PixelmonWrapper pw)
      Triggers at the start of the turn, after switches and evolutions
      Parameters:
      pw - The ability holder.
    • applyStartOfBattleHeadOfPartyEffect

      default void applyStartOfBattleHeadOfPartyEffect(Pokemon user, PixelmonWrapper target)
      Triggers at the start of the battle, if the ability is at the head of the party. Ignores fainting.
      Parameters:
      user - The ability holder.
      target - The opposing Pokémon.
    • applyStartOfBattleEffect

      default void applyStartOfBattleEffect(PixelmonWrapper user)
      Triggers at the start of the battle.
      Parameters:
      user - The ability holder.
    • applyEffectOnContactUser

      default void applyEffectOnContactUser(PixelmonWrapper user, PixelmonWrapper target)
      Triggers when the Pokémon makes contact.
      Parameters:
      user - The attack's user.
      target - The attack's target.
    • applyEffectOnContactTarget

      default void applyEffectOnContactTarget(PixelmonWrapper user, PixelmonWrapper target)
      Triggers when another Pokémon makes contact with this Pokémon.
      Parameters:
      user - The attack's user.
      target - The attack's target.
    • applyEffectOnContactTargetLate

      default void applyEffectOnContactTargetLate(PixelmonWrapper user, PixelmonWrapper target)
      Triggers when another Pokémon makes contact with this Pokémon. Happens after other end-of-move effects.
      Parameters:
      user - The attack's user.
      target - The attack's target.
    • ignoresContactEffectsFromTarget

      default boolean ignoresContactEffectsFromTarget(PixelmonWrapper abilityUser, PixelmonWrapper target)
      When overridden, allows an ability to ignore any effects from the target that would occur due to contact.
      Parameters:
      abilityUser - The Pixelmon with the ability that is also attacking.
      target - The defending Pixelmon that has contact effects that could activate.
      Returns:
      True if contact effects will be ignored.
    • onStatIncrease

      default void onStatIncrease(PixelmonWrapper pokemon, PixelmonWrapper affected, int amount, BattleStatsType stat)
      Triggers when one of the holder's stats are increased.
      Parameters:
      pokemon - The Pokémon whose ability it is.
      affected - The Pokémon whose stat was increased.
      amount - The size of the increase.
      stat - The stat that was increased.
    • onStatDecrease

      default void onStatDecrease(PixelmonWrapper abilityUser, PixelmonWrapper cause, PixelmonWrapper affected, int amount, BattleStatsType stat)
      Triggers when one of the holder's stats are decreased.
      Parameters:
      abilityUser - The Pokémon whose ability it is.
      cause - The Pokémon that caused stat decrease.
      affected - The Pokémon whose stat was decreased.
      amount - The size of the decrease.
      stat - The stat that was decreased.
    • applyEffectOnStatModified

      default void applyEffectOnStatModified(PixelmonWrapper pokemon, PixelmonWrapper affected)
      Triggers when the holder's stats are modified. Fired after onStatIncrease and onStatDecrease fire for each stat change.
      Parameters:
      pokemon - The Pokémon whose ability it is.
      affected - The Pokémon whose stats were just modified.
    • preProcessAttackStatBeforeDamageCalc

      default double preProcessAttackStatBeforeDamageCalc(PixelmonWrapper attacker, double attackStat)
      Triggers when another Pokémon is attacking this Pokémon, the attack will hit, and the attack is not charging. Triggers right before damage calculation is done.
      Parameters:
      attacker - The Pokémon that is attacking.
      attackStat - The attacker's attack value.
    • modifyStats

      default int[] modifyStats(PixelmonWrapper user, int[] stats)
      Modifies the Pokémon's stats at the beginning of a battle turn.
      Parameters:
      user - The Pokémon.
      stats - The Pokémon's stats.
      Returns:
      The modified stats.
    • modifyStatsTeammate

      default int[] modifyStatsTeammate(PixelmonWrapper pokemon, int[] stats)
      Modifies an allied Pokémon's stats at the beginning of a battle turn.
      Parameters:
      pokemon - The Pokémon to be modified.
      stats - The Pokémon's stats.
      Returns:
      The modified stats.
    • modifyStatsOther

      default int[] modifyStatsOther(PixelmonWrapper pokemon, int[] stats)
      Modifies other Pokémon's stats at the beginning of a battle turn.
      Parameters:
      pokemon - The Pokémon to be modified.
      stats - The Pokémon's stats.
      Returns:
      The modified stats.
    • modifyStatsCancellable

      default int[] modifyStatsCancellable(PixelmonWrapper user, int[] stats)
      Modifies the Pokémon's stats at the beginning of a battle turn. Affected by Abilities that negate other Abilities.
      Parameters:
      user - The Pokémon.
      stats - The Pokémon's stats.
      Returns:
      The modified stats.
    • modifyStatsCancellableTeammate

      default int[] modifyStatsCancellableTeammate(PixelmonWrapper pokemon, int[] stats)
      Modifies an allied Pokémon's stats at the beginning of a battle turn. Affected by Abilities that negate other Abilities.
      Parameters:
      pokemon - The Pokémon to be modified.
      stats - The Pokémon's stats.
      Returns:
      The modified stats.
    • modifyStatsCancellableOther

      default int[] modifyStatsCancellableOther(PixelmonWrapper user, PixelmonWrapper target, int[] stats)
      Modifies other Pokémon's stats at the beginning of a battle turn. Affected by Abilities that negate other Abilities.
      Parameters:
      user - The Pokémon modifying the target.
      target - The Pokémon to be modified.
      stats - The Pokémon's stats.
      Returns:
      The modified stats.
    • applyRepeatedEffect

      default void applyRepeatedEffect(PixelmonWrapper pokemon)
      Fires at the end of the turn.
      Parameters:
      pokemon - The Pokémon with the Ability.
    • applyRepeatedEffectAfterStatus

      default void applyRepeatedEffectAfterStatus(PixelmonWrapper pokemon)
      Triggers at the end of every turn after residual status damage has been applied.
      Parameters:
      pokemon - The Pokémon with the Ability.
    • allowsStatChange

      default boolean allowsStatChange(PixelmonWrapper pokemon, PixelmonWrapper user, StatsEffect e)
      Whether the Pokémon Ability allows a stat to be modified.
      Parameters:
      pokemon - The Pokémon with the Ability.
      user - The attack's user.
      e - The stat modifier.
      Returns:
      Whether the stat modifier can occur.
    • allowsStatChangeTeammate

      default boolean allowsStatChangeTeammate(PixelmonWrapper pokemon, PixelmonWrapper target, PixelmonWrapper user, StatsEffect e)
      Whether a teammate's Ability allows a stat to be modified.
      Parameters:
      pokemon - The Pokémon with the Ability.
      target - The Pokémon whose stat is to be lowered.
      user - The attack's user.
      e - The stat modifier.
      Returns:
      Whether the stat modifier can occur.
    • allowsAttack

      default boolean allowsAttack(PixelmonWrapper pokemon, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Determines whether an outgoing attack can hit the target.
      Parameters:
      pokemon - - The Pokémon with the ability
      user - - The user of the move
      target - - The target of this Pokémon's attack.
      a - - The attack
      Returns:
      Whether the attack can hit the target or not.
    • allowsOutgoingAttack

      default boolean allowsOutgoingAttack(PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Determines whether an outgoing attack can hit the target.
      Parameters:
      user - - The user of the move and the Pokémon with the ability
      target - - The target of this Pokémon's attack.
      a - - The attack
      Returns:
      Whether the attack can hit the target or not.
    • allowsIncomingAttack

      default boolean allowsIncomingAttack(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a)
      Determines whether an incoming attack can hit the Pokémon
      Parameters:
      pokemon - The Pokémon with the Ability.
      user - The attack's user.
      a - The attack.
      Returns:
      Whether the attack can hit the Pokémon.
    • allowsIncomingAttackTeammate

      default boolean allowsIncomingAttackTeammate(PixelmonWrapper pokemon, PixelmonWrapper target, PixelmonWrapper user, Attack a)
      Determines whether an incoming attack can hit a teammate Pokémon
      Parameters:
      pokemon - The Pokémon with the Ability.
      target - The teammate being targeted.
      user - The attack's user.
      a - The attack.
      Returns:
      Whether the attack can hit the Pokémon.
    • allowsIncomingAttackMessage

      default void allowsIncomingAttackMessage(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a)
      Sends a battle message when the Pokémon's Ability nullifies an attack.
      Parameters:
      pokemon - The Pokémon with the Ability.
      user - The attack's user.
      a - The attack.
    • preProcessAttack

      default void preProcessAttack(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a)
      Triggers before the Pokémon is attacked.
      Parameters:
      pokemon - The Pokémon with the Ability.
      user - The attack's user.
      a - The attack.
    • preProcessAttackUser

      default void preProcessAttackUser(PixelmonWrapper pokemon, PixelmonWrapper target, Attack a)
      Triggers before the Pokémon attacks.
      Parameters:
      pokemon - The Pokémon with the Ability.
      target - The attack's target.
      a - The attack.
    • postProcessAttackUser

      default void postProcessAttackUser(PixelmonWrapper pokemon, PixelmonWrapper target, Attack a)
      Triggers after the Pokémon attacks.
      Parameters:
      pokemon - The Pokémon with the Ability.
      target - The attack's target.
      a - The attack.
    • postProcessAttack

      default void postProcessAttack(PixelmonWrapper abilityUsingTarget, PixelmonWrapper user, Attack a)
      Triggers after the Pokémon is attacked.
      Parameters:
      abilityUsingTarget - The Pokémon with the Ability and target of the attack.
      user - The attack's user.
      a - The attack.
    • postProcessAttackOther

      default void postProcessAttackOther(PixelmonWrapper pokemon, PixelmonWrapper user, PixelmonWrapper target, Attack a)
      Triggers after any Pokémon attacks.
      Parameters:
      pokemon - The Pokémon with the Ability.
      user - The Pokémon attacking.
      target - The attack's target.
      a - The attack.
    • postProcessAttackUserHitOrMiss

      default void postProcessAttackUserHitOrMiss(PixelmonWrapper pokemon, PixelmonWrapper target, Attack a)
      Triggers after the Pokémon attacks, no matter if the Pokémon hits or misses.
      Parameters:
      pokemon - The Pokémon with the Ability.
      target - The attack's target.
      a - The attack.
    • doesAttackUserIgnoreProtect

      default boolean doesAttackUserIgnoreProtect(PixelmonWrapper pokemon, PixelmonWrapper target, Attack a)
      Determines whether this ability makes this attack pierces protection moves.
      Parameters:
      pokemon - The Pokémon with the Ability.
      target - The attack's target.
      a - The attack.
    • adjustCritStage

      default int adjustCritStage(PixelmonWrapper user)
      Modifies the user's critical hit ratio.
      Parameters:
      user - The holder.
    • adjustCriticalHitChance

      default float adjustCriticalHitChance(PixelmonWrapper pokemon, PixelmonWrapper target, Attack a, float critChance)
      Triggers at the last moment before a critical hit is rolled.
      Parameters:
      pokemon - The Pokémon with the ability
      target - The target of the attack
      a - The attack being used
      critChance - The critical hit chance, as a number between 0-1
      Returns:
      The critical hit chance, as a number between 0-1
    • preventsCriticalHits

      default boolean preventsCriticalHits(PixelmonWrapper opponent)
      Fires in query of whether the Pokémon is protected from critical hits.
      Returns:
      True if no crits allowed on the Pokémon.
    • applyCritMultiplier

      default double applyCritMultiplier()
      Applies a bonus critical hit multiplier on top of the 1.5x standard.
      Returns:
      The additional multiplier.
    • allowsStatus

      default boolean allowsStatus(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper user)
      Fires when a status attempts to apply.
      Parameters:
      status - StatusType.[whatever status] == status is the condition of the if statement.
      pokemon - The victim.
      user - The user.
      Returns:
      Whether the status can be afflicted.
    • allowsStatusTeammate

      default boolean allowsStatusTeammate(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper target, PixelmonWrapper user)
      Fires for all teammates when a status attempts to be applied.
      Parameters:
      status - The status being afflicted.
      pokemon - The Pokémon with the Ability.
      target - The Pokémon who is being afflicted with the status.
      user - The Pokémon inflicting the status.
      Returns:
      Whether the status can be afflicted.
    • allowsStatusOpponent

      default boolean allowsStatusOpponent(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper target, PixelmonWrapper user)
      Fires for all opponents when a status attempts to be applied.
      Parameters:
      status - The status being afflicted.
      pokemon - The Pokémon with the Ability.
      target - The Pokémon who is being afflicted with the status.
      user - The Pokémon inflicting the status.
      Returns:
      Whether the status can be afflicted.
    • modifyStab

      default double modifyStab(PixelmonWrapper user, double stab)
      Modifies the STAB multiplier.
      Parameters:
      user - The attacker.
      stab - The STAB multiplier.
      Returns:
      The modified STAB multiplier.
    • modifyType

      default net.minecraft.resources.ResourceKey<Type> modifyType(PixelmonWrapper pw, Attack attack)
      Modifies an attack's typing.
      Parameters:
      pw - The Pokémon with the ability, who is using a move.
      attack - The attack used.
      Returns:
      The modified typing, null for no change.
    • modifyPriority

      default float modifyPriority(PixelmonWrapper pokemon, float priority, MutableBoolean fractional)
      Modifies the Pokémon's attack's priority.
      Parameters:
      pokemon - The attack's user.
      priority - The attack's priority.
      fractional - Mutable boolean object of whether this was a fractional change.
      Returns:
      The modified priority.
    • stopsSwitching

      default boolean stopsSwitching(PixelmonWrapper user, PixelmonWrapper opponent)
      Determines whether the Pokemon's Ability traps another Pokémon.
      Parameters:
      user - The Pokémon with the Ability.
      opponent - The Pokémon affected by the Ability.
      Returns:
      Whether the opponent is trapped.
    • stopsForcedSwitches

      default boolean stopsForcedSwitches(PixelmonWrapper user, PixelmonWrapper cause)
      Determines whether the Pokémon's Ability prevents another Pokémon from switching them.
      Parameters:
      user - The Pokémon with the Ability.
      cause - The Pokémon triggering the switch.
      Returns:
      Whether the user stays in.
    • modifyWeight

      default float modifyWeight(float initWeight)
      Modifies the Pokémon's weight.
      Parameters:
      initWeight - The Pokémon's weight.
      Returns:
      The modified weight.
    • modifyEffectiveTypes

      default List<net.minecraft.core.Holder<Type>> modifyEffectiveTypes(PixelmonWrapper user, PixelmonWrapper target, List<net.minecraft.core.Holder<Type>> types)
      Returns the types that will be used in calculating the Pokémon's attack's type effectiveness.
      Parameters:
      user - The attack's user.
      target - The attack's target.
      types - The current effective types of the target.
      Returns:
      The target's modified types.
    • modifyTypeEffectivenessTarget

      default double modifyTypeEffectivenessTarget(PixelmonWrapper attackUser, PixelmonWrapper target, List<net.minecraft.core.Holder<Type>> targetEffectiveTypes, double currentEffectiveness)
      Allows the target's ability to modify the type effectiveness of a move.
      Parameters:
      attackUser - The user of the attack being defended against.
      target - The target of the move that has the ability.
      targetEffectiveTypes - The types of the Pokémon targeted by the move.
      currentEffectiveness - The type effectiveness before modification.
      Returns:
      The new type effectiveness.
    • onStatusAdded

      default void onStatusAdded(StatusBase status, PixelmonWrapper user, PixelmonWrapper opponent)
      Triggers when the Pokémon acquires a status.
      Parameters:
      status - The status that was added.
      user - The statused Pokémon.
      opponent - The Pokémon who caused the status.
    • onStatusInflicted

      default void onStatusInflicted(StatusBase status, PixelmonWrapper user, PixelmonWrapper target)
      Triggers when the Pokémon inflicts a status.
      Parameters:
      status - The status that was added.
      user - The Pokémon who inflicted the status.
      target - The Pokémon who gained the status.
    • onDamageReceived

      default void onDamageReceived(PixelmonWrapper user, PixelmonWrapper pokemon, Attack a, int damage, DamageTypeEnum damagetype)
    • ignoreWeather

      default boolean ignoreWeather()
      Determines whether the Ability ignores weather.
      Returns:
      Whether the Ability ignores weather.
    • ignoreEvasion

      default boolean ignoreEvasion()
      Determines whether the Ability ignores the opponent's evasion.
      Returns:
      Whether the Ability ignores evasion.
    • ignoresStatusTypeImmunity

      default boolean ignoresStatusTypeImmunity(PixelmonWrapper target, StatusType type)
      Determines whether the Ability ignores the opponent's type immunity to statuses.
      Parameters:
      target - The Pokémon gaining the status.
      type - The type of the status.
      Returns:
      Whether the Ability ignores the type immunity for the status.
    • redirectAttack

      default boolean redirectAttack(PixelmonWrapper user, PixelmonWrapper targetAlly, Attack attack)
      Determines whether the Pokémon's Ability causes an incoming attack to be redirected.
      Parameters:
      user - The Pokémon using the attack.
      targetAlly - The Pokémon with the Ability.
      attack - The attack.
      Returns:
      Whether the attack is redirected to the Pokémon with the Ability.
    • redirectStatChange

      default boolean redirectStatChange(PixelmonWrapper user, PixelmonWrapper attacker, StatsEffect statsEffect)
      Whether the Pokémon's Ability allows a stat change to be redirected.
      Parameters:
      user - The Pokémon with the Ability.
      attacker - The attack's user.
      statsEffect - The stat modifier.
      Returns:
      Whether the stat redirection can occur.
    • preventsRedirection

      default boolean preventsRedirection(PixelmonWrapper user, Attack attack)
      Prevents redirection abilities and moves from changing the targets of the user's attacks
      Parameters:
      user - The Pokémon with the Ability.
      attack - The attack.
      Returns:
      Whether the attack is redirected to the Pokémon with the Ability.
    • onItemConsumed

      default void onItemConsumed(PixelmonWrapper pokemon, PixelmonWrapper consumer, HeldItem heldItem)
      Triggers when a held item is consumed.
      Parameters:
      pokemon - The Pokémon with the Ability.
      consumer - The Pokémon who consumed the held item.
      heldItem - The consumed held item.
    • onBerryEaten

      default void onBerryEaten(PixelmonWrapper pokemon, PixelmonWrapper consumer, HeldItem heldItem)
      Triggers when a berry is eaten.
      Parameters:
      pokemon - The Pokémon with the Ability.
      consumer - The Pokémon who consumed the berry.
      heldItem - The consumed held item.
    • onAbilityLost

      default void onAbilityLost(PixelmonWrapper pokemon)
      Triggers just before the Pokémon loses an Ability in battle.
      Parameters:
      pokemon - The Pokémon with the Ability.
    • onAllyFaint

      default void onAllyFaint(PixelmonWrapper pokemon, PixelmonWrapper fainted, PixelmonWrapper source)
      Triggers right after an allied Pokémon faints.
      Parameters:
      pokemon - - The Pokémon with the ability. Not the one fainting.
      fainted - - The ally Pokémon that fainted.
      source - - The ultimate cause of the fainting. Self inflicted or global causes give the fainted as the source.
    • onSelfFaint

      default void onSelfFaint(PixelmonWrapper pokemon, PixelmonWrapper source)
      Triggers right after an allied Pokémon faints.
      Parameters:
      pokemon - - The Pokémon with the ability.
      source - - The ultimate cause of the fainting. Self inflicted or global causes give the fainted as the source.
    • onFoeFaint

      default void onFoeFaint(PixelmonWrapper pokemon, PixelmonWrapper fainted, PixelmonWrapper source)
      Triggers right after a foe faints.
      Parameters:
      pokemon - - The Pokémon with the ability. Not the one fainting.
      fainted - - The opponent Pokémon that fainted.
      source - - The ultimate cause of the fainting. Self inflicted or global causes give the fainted as the source.
    • onTargetKnockedOut

      default void onTargetKnockedOut(PixelmonWrapper abilityUser, PixelmonWrapper target)
      Triggers if the user of the ability was responsible for knocking out the target.
      Parameters:
      abilityUser - - The Pixelmon with the ability. The one responsible for knocking out the target.
      target - - The Pokémon that fainted. Not necessarily an opponent.
    • needNewInstance

      default boolean needNewInstance()
      Checks if a new instance of the Ability needs to be initialized if a Pokémon receives it in battle.
      Returns:
      Whether a new instance of the Ability needs to be initialized if a Pokémon receives it in battle.
    • isNegativeAbility

      default boolean isNegativeAbility()
      Checks if the Ability has only negative effects.
      Returns:
      Whether the Ability has only negative effects.
    • onWeatherChange

      default void onWeatherChange(PixelmonWrapper pw, Weather weather)
      Triggers when the weather changes.
      Parameters:
      pw - The Pokémon to affect with the weather change.
      weather - The new weather.
    • onTerrainSwitch

      default void onTerrainSwitch(BattleController bc, PixelmonWrapper user, Terrain terrain)
      Triggers when the terrain is changed in battle.
      Parameters:
      bc - The battle controller.
      user - The Pokémon whose holding this item.
      terrain - The terrain being switched in.
    • canBeCopied

      default boolean canBeCopied()
      Returns whether the ability fully blocks anything that can copy this ability, including transform effects etc.
      Returns:
      Whether the ability can be copied.
    • canPerish

      default boolean canPerish()
      Returns whether the ability blocks use of Perish-type effects, eg Perish Song, Destiny Bond, Perish Body.
      Returns:
      Whether the ability blocks Perish-type effects.
    • canBeIgnored

      default boolean canBeIgnored()
      Returns whether the ability can be bypassed by moves that ignore abilities or not. e.g. Moldbreaker or G-Max Drum Solo
      Returns:
      Whether the ability can be ignored.
    • canBeDisabled

      default boolean canBeDisabled()
      Returns whether the ability can be disabled by external effects eg. Neutralizing Gas.
      Returns:
      Whether the ability can be disabled.
    • canBeReplaced

      default boolean canBeReplaced()
      Returns whether the user's ability can be replaced by Role Play (i.e., the holder can use Role Play to overwrite their own ability with the target's). Distinct from canBeDisabled() (Gastro Acid / Neutralizing Gas suppression): Hunger Switch is suppressible but not Role-Play-replaceable.
      Returns:
      Whether the user's ability can be replaced.
    • canBeRoleplayed

      default boolean canBeRoleplayed()
      Returns whether the ability can be copied via Roleplay.
      Returns:
      Whether the ability can be copied.
    • canBeSwapped

      default boolean canBeSwapped()
      Returns whether the ability can be part of a Skill Swap exchange.
      Returns:
      Whether the ability can be swapped.
    • canBeEntrained

      default boolean canBeEntrained()
      Returns whether the ability can be transferred via Entrainment.
      Returns:
      Whether the ability can be set on opponent.
    • canBeReceived

      default boolean canBeReceived()
      Returns whether the ability can be copied from an ally via Receiver.
      Returns:
      Whether the ability can be Received from an ally.
    • canBeTraced

      default boolean canBeTraced()
      Returns whether the ability can be copied via Trace.
      Returns:
      Whether the ability can be Traced.
    • worksWithTransformedPokemon

      default boolean worksWithTransformedPokemon()
      Returns whether the ability is active for Transformed pokemon.
      Returns:
      Whether the ability can be used by transformed pokemon.
    • isAbility

      default boolean isAbility(Class<? extends Ability> ability)
      Checks if this ability is the one passed in.
      Parameters:
      ability - The ability to compare against.
      Returns:
      Whether the ability is the one passed in.
    • isAbility

      default boolean isAbility(Ability ability)
      Checks if this ability is the one passed in.
      Parameters:
      ability - The ability to compare against.
      Returns:
      Whether the ability is the one passed in.
    • isAbility

      default boolean isAbility(Class<? extends Ability>... abilities)
      Checks if the Ability is one of an array of Abilities.
      Parameters:
      abilities - The Abilities to compare against.
      Returns:
      Whether the Ability is one of an array of Abilities.
    • isAbility

      default boolean isAbility(Optional<Ability>... abilities)
    • isAbility

      default boolean isAbility(RegistryValue<Ability>... abilities)
    • getNewInstance

      Ability getNewInstance()
      Returns a new instance of the Ability class.
      Returns:
      A new instance of the Ability class.
    • sendActivatedMessage

      default void sendActivatedMessage(PixelmonWrapper pw)
      Sends a message indicating that the Ability was activated.
      Parameters:
      pw - The Pokémon with the Ability.
    • onItemChanged

      default void onItemChanged(PixelmonWrapper pw, HeldItem newItem)
    • getMultiplier

      default float getMultiplier(AbstractSpawner spawner, SpawnInfo spawnInfo, float sum, float rarity)
      Specified by:
      getMultiplier in interface RarityTweak
    • onHealed

      default int onHealed(PixelmonWrapper pw, int heal)
      Fired whenever a Pokémon is about to be healed.
      Parameters:
      pw - The Pokémon being healed.
      heal - The heal amount.
      Returns:
      The new heal amount.
    • alwaysConsideredDamaged

      default boolean alwaysConsideredDamaged(PixelmonWrapper pw)
      Whether the Pokémon with this ability should always be considered as hurt for moves such as Recover.
      Parameters:
      pw - The Pokémon being considered.
      Returns:
      Whether the Pokémon is always considered damaged or not.
    • applyEffectBeforeContactLate

      default void applyEffectBeforeContactLate(PixelmonWrapper user, PixelmonWrapper target)
      Applies an ability effect after most attack effects, but before Attack.applyContactLate(PixelmonWrapper, PixelmonWrapper)
      Parameters:
      user - The user with the ability that is attacking.
      target - The target of the attack.
    • onEndOfTurn

      default void onEndOfTurn(PixelmonWrapper pw)
      Occurs at the end of the Pokémon's current turn.
      Parameters:
      pw - The Pokémon with the ability.