Class PreventStatusTeam
java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.ability.AbstractAbility
com.pixelmonmod.pixelmon.api.pokemon.ability.abilities.PreventStatusTeam
- All Implemented Interfaces:
Ability
,RarityTweak
,ITranslatable
- Direct Known Subclasses:
PastelVeil
Prevents the Pokémon and allies from being afflicted by certain statuses.
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
The lang code for the text to display when the Ability cures the status.protected String
The lang code for the text to display when the Ability prevents the status.protected StatusType[]
The statuses that the Ability grants an immunity to. -
Constructor Summary
ConstructorDescriptionPreventStatusTeam
(String immuneText, String cureText, StatusType... preventedStatuses) Initializes the Ability. -
Method Summary
Modifier and TypeMethodDescriptionboolean
allowsStatus
(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper user) Fires when a status attempts to apply.boolean
allowsStatusTeammate
(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper target, PixelmonWrapper user) Fires for all teammates when a status attempts to be applied.void
applySwitchInEffect
(PixelmonWrapper pokemon) Triggers after the Pokémon switches in and when the Pokémon gains an Ability.boolean
Returns whether the ability can be bypassed by moves that ignore abilities or not.void
onStatusAdded
(StatusBase status, PixelmonWrapper user, PixelmonWrapper opponent) Triggers when the Pokémon acquires a status.Methods inherited from class com.pixelmonmod.pixelmon.api.pokemon.ability.AbstractAbility
equals, getName, getNewInstance, getTranslationKey, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pixelmonmod.pixelmon.api.pokemon.ability.Ability
adjustCriticalHitChance, adjustCritStage, allowsAttack, allowsIncomingAttack, allowsIncomingAttackMessage, allowsIncomingAttackTeammate, allowsOutgoingAttack, allowsStatChange, allowsStatChangeTeammate, allowsStatusOpponent, alwaysConsideredDamaged, applyAllySwitchInEffect, applyCritMultiplier, applyDynamaxEffect, applyEffectOnContactTarget, applyEffectOnContactTargetLate, applyEffectOnContactUser, applyEffectOnStatModified, applyEndOfBattleEffect, applyFoeSwitchInEffect, applyPostSwitchEffect, applyRepeatedEffect, applyRepeatedEffectAfterStatus, applyStartOfBattleEffect, applyStartOfBattleHeadOfPartyEffect, applyStartOfTurnEffect, applySwitchOutEffect, applySwitchReplaceEffect, beforeSwitch, canAttackThisTurn, canBeCopied, canBeDisabled, canBeEntrained, canBeReceived, canBeRoleplayed, canBeSwapped, canBeTraced, canPerish, doesAttackUserIgnoreProtect, doesContactAttackMakeContact, getMultiplier, ignoreEvasion, ignoresStatusTypeImmunity, ignoreWeather, isAbility, isAbility, isAbility, isAbility, isAbility, isNegativeAbility, modifyConfusionDamage, modifyDamage, modifyDamageIncludeFixed, modifyDamageTarget, modifyDamageTeammate, modifyDamageUser, modifyEffectiveTypes, modifyMoveEffectChanceTarget, modifyMoveEffectChanceUser, modifyMoveEffects, modifyPowerAndAccuracyTarget, modifyPowerAndAccuracyTeammate, modifyPowerAndAccuracyUser, modifyPriority, modifySelfDamage, modifyStab, modifyStats, modifyStatsCancellable, modifyStatsCancellableOther, modifyStatsCancellableTeammate, modifyStatsOther, modifyStatsTeammate, modifyType, modifyWeight, needNewInstance, onAbilityLost, onAllyFaint, onBerryEaten, onDamageReceived, onFoeFaint, onHealed, onItemChanged, onItemConsumed, onSelfFaint, onStatDecrease, onStatIncrease, onTerrainSwitch, onWeatherChange, postProcessAttack, postProcessAttackOther, postProcessAttackUser, postProcessAttackUserHitOrMiss, preProcessAttack, preProcessAttackStatBeforeDamageCalc, preProcessAttackUser, preventsCriticalHits, preventsItemRemoval, preventsRedirection, redirectAttack, sendActivatedMessage, startMove, stopsForcedSwitches, stopsSwitching, tookDamageTarget, tookDamageTargetAfterMove, tookDamageUser, worksWithTransformedPokemon
Methods inherited from interface com.pixelmonmod.pixelmon.api.util.ITranslatable
getLocalizedName, getTranslatedName
-
Field Details
-
preventedStatuses
The statuses that the Ability grants an immunity to. -
immuneText
The lang code for the text to display when the Ability prevents the status. -
cureText
The lang code for the text to display when the Ability cures the status.
-
-
Constructor Details
-
PreventStatusTeam
Initializes the Ability.- Parameters:
immuneText
- The lang code for the text to display when the Ability prevents the status.cureText
- The lang code for the text to display when the Ability cures the status.preventedStatuses
- The statuses that the Ability grants an immunity to.
-
-
Method Details
-
allowsStatus
Description copied from interface:Ability
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
public boolean allowsStatusTeammate(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper target, PixelmonWrapper user) Description copied from interface:Ability
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.
-
onStatusAdded
Description copied from interface:Ability
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.
-
applySwitchInEffect
Description copied from interface:Ability
Triggers after the Pokémon switches in and when the Pokémon gains an Ability.- Parameters:
pokemon
- The Pokémon switching in.
-
canBeIgnored
public boolean canBeIgnored()Description copied from interface:Ability
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.
-