Interface Ability
- 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
Interface representing a Pokemon's Ability
-
Method Summary
Modifier and TypeMethodDescriptiondefault float
adjustCriticalHitChance
(PixelmonWrapper pokemon, PixelmonWrapper target, Attack a, float critChance) Triggers at the last moment before a critical hit is rolled.default int
Modifies the user's critical hit ratio.default boolean
allowsAttack
(PixelmonWrapper pokemon, PixelmonWrapper user, PixelmonWrapper target, Attack a) Determines whether an outgoing attack can hit the target.default boolean
allowsIncomingAttack
(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a) Determines whether an incoming attack can hit the Pokémondefault void
allowsIncomingAttackMessage
(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a) Sends a battle message when the Pokémon's Ability nullifies an attack.default boolean
allowsIncomingAttackTeammate
(PixelmonWrapper pokemon, PixelmonWrapper target, PixelmonWrapper user, Attack a) Determines whether an incoming attack can hit a teammate Pokémondefault boolean
allowsOutgoingAttack
(PixelmonWrapper user, PixelmonWrapper target, Attack a) Determines whether an outgoing attack can hit the target.default boolean
allowsStatChange
(PixelmonWrapper pokemon, PixelmonWrapper user, StatsEffect e) Whether the Pokémon Ability allows a stat to be modified.default boolean
allowsStatChangeTeammate
(PixelmonWrapper pokemon, PixelmonWrapper target, PixelmonWrapper user, StatsEffect e) Whether a teammate's Ability allows a stat to be modified.default boolean
allowsStatus
(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper user) Fires when a status attempts to apply.default boolean
allowsStatusOpponent
(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper target, PixelmonWrapper user) Fires for all opponents when a status attempts to be applied.default boolean
allowsStatusTeammate
(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper target, PixelmonWrapper user) Fires for all teammates when a status attempts to be applied.default boolean
Whether the Pokémon with this ability should always be considered as hurt for moves such as Recover.default void
applyAllySwitchInEffect
(PixelmonWrapper user, PixelmonWrapper target) Triggers after an allied Pokémon switches in.default double
Applies a bonus critical hit multiplier on top of the 1.5x standard.default void
applyDynamaxEffect
(PixelmonWrapper pokemon) Triggers when the Pokémon Dynamaxes.default void
applyEffectOnContactTarget
(PixelmonWrapper user, PixelmonWrapper target) Triggers when another Pokémon makes contact with this Pokémon.default void
applyEffectOnContactTargetLate
(PixelmonWrapper user, PixelmonWrapper target) Triggers when another Pokémon makes contact with this Pokémon.default void
applyEffectOnContactUser
(PixelmonWrapper user, PixelmonWrapper target) Triggers when the Pokémon makes contact.default void
applyEffectOnStatModified
(PixelmonWrapper pokemon, PixelmonWrapper affected) Triggers when the holder's stats are modified.default void
applyEndOfBattleEffect
(PixelmonWrapper pokemon) Triggers at the end of the battle.default void
applyFoeSwitchInEffect
(PixelmonWrapper user, PixelmonWrapper target, PixelmonWrapper former) Triggers after an enemy Pokémon switches in.default void
applyPostSwitchEffect
(PixelmonWrapper newPokemon) Triggers after all the Pokémon switch in at the start of turn.default void
applyRepeatedEffect
(PixelmonWrapper pokemon) Fires at the end of the turn.default void
Triggers at the end of every turn after residual status damage has been applied.default void
Triggers at the start of the battle.default void
Triggers at the start of the battle, if the ability is at the head of the party.default void
Triggers at the start of the turn, after switches and evolutionsdefault void
applySwitchInEffect
(PixelmonWrapper newPokemon) Triggers after the Pokémon switches in and when the Pokémon gains an Ability.default void
applySwitchOutEffect
(PixelmonWrapper oldPokemon) Triggers when the Pokémon switches out.default void
applySwitchReplaceEffect
(PixelmonWrapper newPokemon, PixelmonWrapper oldPokemon) Triggers after an Pokémon switches in.default void
beforeSwitch
(PixelmonWrapper newPokemon) Triggers just before the Pokémon switches in.default boolean
canAttackThisTurn
(PixelmonWrapper user, Attack a) Checks if the Pokémon's Ability allows it to make a move.default boolean
Returns whether the ability fully blocks anything that can copy this ability, including transform effects etc.default boolean
Returns whether the ability can be disabled by external effects eg.default boolean
Returns whether the ability can be transferred via Entrainment.default boolean
Returns whether the ability can be bypassed by moves that ignore abilities or not.default boolean
Returns whether the ability can be copied from an ally via Receiver.default boolean
Returns whether the ability can be copied via Roleplay.default boolean
Returns whether the ability can be part of a Skill Swap exchange.default boolean
Returns whether the ability can be copied via Trace.default boolean
Returns whether the ability blocks use of Perish-type effects, eg Perish Song, Destiny Bond, Perish Body.default boolean
doesAttackUserIgnoreProtect
(PixelmonWrapper pokemon, PixelmonWrapper target, Attack a) Determines whether this ability makes this attack pierces protection moves.default boolean
Whether this contact move will continue to make contact.default float
getMultiplier
(AbstractSpawner spawner, SpawnInfo spawnInfo, float sum, float rarity) getName()
Returns the Ability's class name.Returns a new instance of the Ability class.default boolean
Determines whether the Ability ignores the opponent's evasion.default boolean
ignoresStatusTypeImmunity
(PixelmonWrapper target, StatusType type) Determines whether the Ability ignores the opponent's type immunity to statuses.default boolean
Determines whether the Ability ignores weather.default boolean
isAbility
(RegistryValue<Ability>... abilities) default boolean
Checks if this ability is the one passed in.default boolean
Checks if this ability is the one passed in.default boolean
Checks if the Ability is one of an array of Abilities.default boolean
default boolean
Checks if the Ability has only negative effects.default int
modifyConfusionDamage
(int damage, PixelmonWrapper pw) Triggers when the Pokémon takes would take Confusion damage.default int
modifyDamage
(int damage, PixelmonWrapper user, PixelmonWrapper target, DamageTypeEnum type, Attack attack, Ability ability) Triggers when the Pokémon takes damage, from any source.default int
modifyDamageIncludeFixed
(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a) Triggers when the Pokémon takes direct damage, including fixed damage moves.default int
modifyDamageTarget
(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a) Triggers when the Pokémon takes direct damage.default int
modifyDamageTeammate
(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a) Triggers when the Pokémon's ally takes direct damage.default int
modifyDamageUser
(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a) Triggers when the Pokémon deals direct damage.modifyEffectiveTypes
(PixelmonWrapper user, PixelmonWrapper target, List<Element> types) Returns the types that will be used in calculating the Pokémon's attack's type effectiveness.default void
modifyMoveEffectChanceTarget
(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the target to adjust the move's effects, such as disabling effects from CovertCloakdefault void
modifyMoveEffectChanceUser
(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the user to adjust the move's effectsdefault void
modifyMoveEffects
(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the user to add or remove the move's effectsdefault 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.default int[]
modifyPowerAndAccuracyTeammate
(int power, int accuracy, PixelmonWrapper user, PixelmonWrapper target, Attack a) Modifies the power and accuracy of a teammate's attack.default int[]
modifyPowerAndAccuracyUser
(int power, int accuracy, PixelmonWrapper user, PixelmonWrapper target, Attack a) Modifies the power and accuracy of the Pokémon's attack.default float
modifyPriority
(PixelmonWrapper pokemon, float priority, MutableBoolean fractional) Modifies the Pokémon's attack's priority.default int
modifySelfDamage
(int damage, PixelmonWrapper pw, Attack a) Triggers when the Pokémon takes self damage.default double
modifyStab
(double stab) Modifies the STAB multiplier.default int[]
modifyStats
(PixelmonWrapper user, int[] stats) Modifies the Pokémon's stats at the beginning of a battle turn.default int[]
modifyStatsCancellable
(PixelmonWrapper user, int[] stats) Modifies the Pokémon's stats at the beginning of a battle turn.default int[]
modifyStatsCancellableOther
(PixelmonWrapper user, PixelmonWrapper target, int[] stats) Modifies other Pokémon's stats at the beginning of a battle turn.default int[]
modifyStatsCancellableTeammate
(PixelmonWrapper pokemon, int[] stats) Modifies an allied Pokémon's stats at the beginning of a battle turn.default int[]
modifyStatsOther
(PixelmonWrapper pokemon, int[] stats) Modifies other Pokémon's stats at the beginning of a battle turn.default int[]
modifyStatsTeammate
(PixelmonWrapper pokemon, int[] stats) Modifies an allied Pokémon's stats at the beginning of a battle turn.default Element
modifyType
(PixelmonWrapper pw, Attack attack) Modifies an attack's typing.default float
modifyWeight
(float initWeight) Modifies the Pokémon's weight.default boolean
Checks if a new instance of the Ability needs to be initialized if a Pokémon receives it in battle.default void
onAbilityLost
(PixelmonWrapper pokemon) Triggers just before the Pokémon loses an Ability in battle.default void
onAllyFaint
(PixelmonWrapper pokemon, PixelmonWrapper fainted, PixelmonWrapper source) Triggers right after an allied Pokémon faints.default void
onBerryEaten
(PixelmonWrapper pokemon, PixelmonWrapper consumer, HeldItem heldItem) Triggers when a berry is eaten.default void
onDamageReceived
(PixelmonWrapper user, PixelmonWrapper pokemon, Attack a, int damage, DamageTypeEnum damagetype) default void
onFoeFaint
(PixelmonWrapper pokemon, PixelmonWrapper fainted, PixelmonWrapper source) Triggers right after a foe faints.default int
onHealed
(PixelmonWrapper pw, int heal) Fired whenever a Pokémon is about to be healed.default void
onItemChanged
(PixelmonWrapper pw, HeldItem newItem) default void
onItemConsumed
(PixelmonWrapper pokemon, PixelmonWrapper consumer, HeldItem heldItem) Triggers when a held item is consumed.default void
onSelfFaint
(PixelmonWrapper pokemon, PixelmonWrapper source) Triggers right after an allied Pokémon faints.default void
onStatDecrease
(PixelmonWrapper pokemon, PixelmonWrapper affected, int amount, BattleStatsType stat) Triggers when one of the holder's stats are decreased.default void
onStatIncrease
(PixelmonWrapper pokemon, PixelmonWrapper affected, int amount, BattleStatsType stat) Triggers when one of the holder's stats are increased.default void
onStatusAdded
(StatusBase status, PixelmonWrapper user, PixelmonWrapper opponent) Triggers when the Pokémon acquires a status.default void
onTerrainSwitch
(BattleController bc, PixelmonWrapper user, Terrain terrain) Triggers when the terrain is changed in battle.default void
onWeatherChange
(PixelmonWrapper pw, Weather weather) Triggers when the weather changes.default void
postProcessAttack
(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a) Triggers after the Pokémon is attacked.default void
postProcessAttackOther
(PixelmonWrapper pokemon, PixelmonWrapper user, PixelmonWrapper target, Attack a) Triggers after any Pokémon attacks.default void
postProcessAttackUser
(PixelmonWrapper pokemon, PixelmonWrapper target, Attack a) Triggers after the Pokémon attacks.default void
postProcessAttackUserHitOrMiss
(PixelmonWrapper pokemon, PixelmonWrapper target, Attack a) Triggers after the Pokémon attacks, no matter if the Pokémon hits or misses.default void
preProcessAttack
(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a) Triggers before the Pokémon is attacked.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.default void
preProcessAttackUser
(PixelmonWrapper pokemon, PixelmonWrapper target, Attack a) Triggers before the Pokémon attacks.default boolean
preventsCriticalHits
(PixelmonWrapper opponent) Fires in query of whether the Pokémon is protected from critical hits.default boolean
preventsItemRemoval
(PixelmonWrapper thief, PixelmonWrapper target) Whether this ability prevents an item being stolendefault boolean
preventsRedirection
(PixelmonWrapper user, Attack attack) Prevents redirection abilities and moves from changing the targets of the user's attacksdefault boolean
redirectAttack
(PixelmonWrapper user, PixelmonWrapper targetAlly, Attack attack) Determines whether the Pokémon's Ability causes an incoming attack to be redirected.default void
Sends a message indicating that the Ability was activated.default void
startMove
(PixelmonWrapper user) Affects the Pokémon at the start of using a move.default boolean
stopsForcedSwitches
(PixelmonWrapper user, PixelmonWrapper cause) Determines whether the Pokémon's Ability prevents another Pokémon from switching them.default boolean
stopsSwitching
(PixelmonWrapper user, PixelmonWrapper opponent) Determines whether the Pokemon's Ability traps another Pokémon.default void
tookDamageTarget
(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a) Triggers after the Pokémon takes damage.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.default void
tookDamageUser
(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a) Triggers after the Pokémon deals damage.default boolean
Returns whether the ability is active for Transformed pokemon.Methods inherited from interface com.pixelmonmod.pixelmon.api.util.ITranslatable
getLocalizedName, getTranslatedName, getTranslationKey
-
Method Details
-
getName
String getName()Returns the Ability's class name.- Returns:
- The Ability's class name.
-
startMove
Affects the Pokémon at the start of using a move.- Parameters:
user
- The Pokémon with the Ability.
-
canAttackThisTurn
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
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
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
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
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
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
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
Triggers just before the Pokémon switches in.- Parameters:
newPokemon
- The Pokémon switching in.
-
applySwitchInEffect
Triggers after the Pokémon switches in and when the Pokémon gains an Ability.- Parameters:
newPokemon
- The Pokémon switching in.
-
applyPostSwitchEffect
Triggers after all the Pokémon switch in at the start of turn.- Parameters:
newPokemon
- The Pokémon switching in.
-
applySwitchOutEffect
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
Triggers after an allied Pokémon switches in.- Parameters:
user
- The Pokémon with the ability.target
- The allied Pokémon switching in.
-
applySwitchReplaceEffect
Triggers after an Pokémon switches in.- Parameters:
newPokemon
- The Pokémon with the ability switching in.oldPokemon
- The Pokémon switching out.
-
applyDynamaxEffect
Triggers when the Pokémon Dynamaxes.- Parameters:
pokemon
- The Pokémon Dynamaxing.
-
applyEndOfBattleEffect
Triggers at the end of the battle.- Parameters:
pokemon
- The Pokémon in battle at the battle's end.
-
doesContactAttackMakeContact
Whether this contact move will continue to make contact.- Parameters:
user
- - The user of the movea
- - The attack being used- Returns:
- - Whether or not it will continue to make contact.
-
preventsItemRemoval
Whether this ability prevents an item being stolen- Parameters:
thief
- - Thetarget
- - The attack being used- Returns:
- - Whether or not it will continue to make contact.
-
applyStartOfTurnEffect
Triggers at the start of the turn, after switches and evolutions- Parameters:
pw
- The ability holder.
-
applyStartOfBattleHeadOfPartyEffect
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
Triggers at the start of the battle.- Parameters:
user
- The ability holder.
-
applyEffectOnContactUser
Triggers when the Pokémon makes contact.- Parameters:
user
- The attack's user.target
- The attack's target.
-
applyEffectOnContactTarget
Triggers when another Pokémon makes contact with this Pokémon.- Parameters:
user
- The attack's user.target
- The attack's target.
-
applyEffectOnContactTargetLate
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
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
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
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
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
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
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
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
Fires at the end of the turn.- Parameters:
pokemon
- The Pokémon with the Ability.
-
applyRepeatedEffectAfterStatus
Triggers at the end of every turn after residual status damage has been applied.- Parameters:
pokemon
- The Pokémon with the Ability.
-
allowsStatChange
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 abilityuser
- - The user of the movetarget
- - The target of this Pokémon's attack.a
- - The attack- Returns:
- Whether the attack can hit the target or not.
-
allowsOutgoingAttack
Determines whether an outgoing attack can hit the target.- Parameters:
user
- - The user of the move and the Pokémon with the abilitytarget
- - The target of this Pokémon's attack.a
- - The attack- Returns:
- Whether the attack can hit the target or not.
-
allowsIncomingAttack
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
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
Triggers before the Pokémon is attacked.- Parameters:
pokemon
- The Pokémon with the Ability.user
- The attack's user.a
- The attack.
-
preProcessAttackUser
Triggers before the Pokémon attacks.- Parameters:
pokemon
- The Pokémon with the Ability.target
- The attack's target.a
- The attack.
-
postProcessAttackUser
Triggers after the Pokémon attacks.- Parameters:
pokemon
- The Pokémon with the Ability.target
- The attack's target.a
- The attack.
-
postProcessAttack
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.
-
adjustCritStage
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 abilitytarget
- The target of the attacka
- The attack being usedcritChance
- The critical hit chance, as a number between 0-1- Returns:
- The critical hit chance, as a number between 0-1
-
preventsCriticalHits
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
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(double stab) Modifies the STAB multiplier.- Parameters:
stab
- The STAB multiplier.- Returns:
- The modified STAB multiplier.
-
modifyType
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
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
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
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<Element> modifyEffectiveTypes(PixelmonWrapper user, PixelmonWrapper target, List<Element> 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.
-
onStatusAdded
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.
-
ignoreEvasion
default boolean ignoreEvasion()Determines whether the Ability ignores the opponent's evasion.- Returns:
- Whether the Ability ignores evasion.
-
ignoresStatusTypeImmunity
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
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
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
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
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
Triggers just before the Pokémon loses an Ability in battle.- Parameters:
pokemon
- The Pokémon with the Ability.
-
onAllyFaint
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
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
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
Triggers when the weather changes.- Parameters:
pw
- The Pokémon to affect with the weather change.weather
- The new weather.
-
onTerrainSwitch
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.
-
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
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
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
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
-
isAbility
-
getNewInstance
Ability getNewInstance()Returns a new instance of the Ability class.- Returns:
- A new instance of the Ability class.
-
sendActivatedMessage
Sends a message indicating that the Ability was activated.- Parameters:
pw
- The Pokémon with the Ability.
-
onItemChanged
-
getMultiplier
- Specified by:
getMultiplier
in interfaceRarityTweak
-
onHealed
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
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.
-