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, 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, 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, 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, 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, Technician, Telepathy, 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, 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.
    • 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

      default void modifyMoveEffectChanceTarget(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects)
      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.
    • 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.
    • 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(PixelmonWrapper 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.
    • 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 pokemon, PixelmonWrapper affected, int amount, BattleStatsType stat)
      Triggers when one of the holder's stats are decreased.
      Parameters:
      pokemon - The Pokémon whose ability it is.
      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 pokemon, PixelmonWrapper user, Attack a)
      Triggers after the Pokémon is attacked.
      Parameters:
      pokemon - The Pokémon with the Ability.
      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.
    • 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.
    • 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.
    • modifyStab

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

      default Element 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 triggered)
      Modifies the Pokémon's attack's priority.
      Parameters:
      pokemon - The attack's user.
      priority - The attack's priority.
      triggered - Mutable boolean object of whether this was activated or not.
      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.
    • getEffectiveTypes

      default List<Element> getEffectiveTypes(PixelmonWrapper user, PixelmonWrapper target)
      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.
      Returns:
      The target's modified types.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • canBeIgnored

      default boolean canBeIgnored()
      Returns whether the ability can be bypassed by moves that ignore abilities or not.
      Returns:
      Whether the ability can be ignored.
    • canBeCopied

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

      default boolean canBeDisabled()
      Returns whether the ability can be disabled by external effects eg. Neutralizing Gas.
      Returns:
      Whether the ability can be disabled.
    • 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.
    • 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.