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
FieldsModifier and TypeFieldDescriptionprotected StringThe lang code for the text to display when the Ability cures the status.protected StringThe 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
ConstructorsConstructorDescriptionPreventStatusTeam(String immuneText, String cureText, StatusType... preventedStatuses) Initializes the Ability. -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowsStatus(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper user) Fires when a status attempts to apply.booleanallowsStatusTeammate(StatusType status, PixelmonWrapper pokemon, PixelmonWrapper target, PixelmonWrapper user) Fires for all teammates when a status attempts to be applied.voidapplySwitchInEffect(PixelmonWrapper pokemon) Triggers after the Pokémon switches in and when the Pokémon gains an Ability.booleanReturns whether the ability can be bypassed by moves that ignore abilities or not.voidonStatusAdded(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, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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, onStatusInflicted, onTerrainSwitch, onWeatherChange, postProcessAttack, postProcessAttackOther, postProcessAttackUser, postProcessAttackUserHitOrMiss, preProcessAttack, preProcessAttackStatBeforeDamageCalc, preProcessAttackUser, preventsCriticalHits, preventsItemRemoval, preventsRedirection, redirectAttack, redirectStatChange, sendActivatedMessage, startMove, stopsForcedSwitches, stopsSwitching, tookDamageTarget, tookDamageTargetAfterMove, tookDamageTargetAfterMoveLate, tookDamageUser, worksWithTransformedPokemonMethods 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:AbilityFires 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:AbilityFires 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:AbilityTriggers 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:AbilityTriggers 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:AbilityReturns 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.
-