Class ProtectVariation
java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.EffectBase
com.pixelmonmod.pixelmon.battles.status.StatusBase
com.pixelmonmod.pixelmon.battles.status.ProtectVariation
- Direct Known Subclasses:
Protect,ProtectVariationTeam
Uses a shared counter that reduces the chance of move success upon consecutive use.
-
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.battles.status.StatusBase
battleTurnGained, turnGained, typeFields inherited from class com.pixelmonmod.pixelmon.battles.attacks.EffectBase
modifiers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleanaddStatus(PixelmonWrapper user) Adds the status to the user.voidapplyEffect(PixelmonWrapper user, PixelmonWrapper target) Causes various effects during the move.voidapplyProtectionEffect(PixelmonWrapper target, PixelmonWrapper user, Attack a) booleanprotected booleancanFail()Checks if the move can fail when used in succession.protected abstract voidDisplays a battle message upon successfully using the move.booleanisPenetratedByMove(Attack attack) intmodifyDamageIncludeFixed(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a, DamageTypeEnum damageType) Triggers when the Pokémon takes direct damage, including fixed damage moves.booleanprotectVariationBlocksAttack(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a) booleanstopsIncomingAttack(PixelmonWrapper pokemon, PixelmonWrapper user) Determines whether the status stops an attack about to hit the statused Pokémon.Methods inherited from class com.pixelmonmod.pixelmon.battles.status.StatusBase
adjustCritStage, allowsStatChange, applyBeforeEffect, applyEffectOnSwitch, applyEndOfBattleEffect, applyRepeatedEffect, applySwitchOutEffect, canAttackThisTurn, cantMiss, copy, getCureMessage, getCureMessageItem, getNewInstance, ignoreStatus, isImmune, isTeamStatus, isWholeTeamStatus, modifyBaseStats, modifyEffectiveTypes, modifyMoveEffectChanceTarget, modifyMoveEffectChanceUser, modifyPowerAndAccuracyTarget, modifyPowerAndAccuracyUser, modifyStats, modifyStatsCancellable, modifyWeight, onAttackEnd, onAttackUsed, onDamageReceived, onDynamaxTriggered, onEndOfAttackersTurn, onEndOfTurn, onFormChanged, redirectAttack, skipsTurn, stopsEvolution, stopsForcedSwitches, stopsIncomingAttackMessage, stopsIncomingAttackUser, stopsSelfStatusMove, stopsStatusChange, stopsSwitchingMethods inherited from class com.pixelmonmod.pixelmon.battles.attacks.EffectBase
applyEarlyEffect, applyEffectAfterAllTargets, applyEffectAfterStatus, applyEffectHitOrMiss, applyEffectStart, applyMissEffect, canHitMultipleTargets, changeChance, checkChance, dealtDamage, dealtDamagePerHit, doesPersist, getChance, getWeightWithChance, isChance, isUser, modifyDamage, modifyPriority, modifyTargets, modifyTypeEffectiveness, preventsRedirection, setChance, weightEffect
-
Constructor Details
-
ProtectVariation
Initializes the Protect variation.- Parameters:
type- The status's type.
-
-
Method Details
-
applyEffect
Description copied from class:EffectBaseCauses various effects during the move.- Overrides:
applyEffectin classStatusBase- Parameters:
user- The move's user.target- The move's target.
-
stopsIncomingAttack
Description copied from class:StatusBaseDetermines whether the status stops an attack about to hit the statused Pokémon.- Overrides:
stopsIncomingAttackin classStatusBase- Parameters:
pokemon- The statused Pokémon.user- The attack's user.- Returns:
- Whether the attack is stopped.
-
protectVariationBlocksAttack
public boolean protectVariationBlocksAttack(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a) -
isPenetratedByMove
-
applyProtectionEffect
-
canBeRemoved
public boolean canBeRemoved() -
modifyDamageIncludeFixed
public int modifyDamageIncludeFixed(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a, DamageTypeEnum damageType) Description copied from class:StatusBaseTriggers when the Pokémon takes direct damage, including fixed damage moves.- Overrides:
modifyDamageIncludeFixedin classStatusBase- Parameters:
damage- The amount of damage dealt.user- The attack's user.target- The attack's target.a- The attack.- Returns:
- The modified damage.
-
addStatus
Adds the status to the user.- Parameters:
user- The user of the move.- Returns:
- Whether the status addition succeeded.
-
displayMessage
Displays a battle message upon successfully using the move.- Parameters:
user- The user of the move.
-
canFail
protected boolean canFail()Checks if the move can fail when used in succession.- Returns:
- Whether the move can fail when used in succession.
-