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, type
Fields inherited from class com.pixelmonmod.pixelmon.battles.attacks.EffectBase
modifiers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract boolean
addStatus
(PixelmonWrapper user) Adds the status to the user.void
applyEffect
(PixelmonWrapper user, PixelmonWrapper target) Causes various effects during the move.void
applyProtectionEffect
(PixelmonWrapper target, PixelmonWrapper user, Attack a) boolean
protected boolean
canFail()
Checks if the move can fail when used in succession.protected abstract void
Displays a battle message upon successfully using the move.boolean
isPenetratedByMove
(Attack attack) int
modifyDamageIncludeFixed
(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a, DamageTypeEnum damageType) Triggers when the Pokémon takes direct damage, including fixed damage moves.boolean
protectVariationBlocksAttack
(PixelmonWrapper pokemon, PixelmonWrapper user, Attack a) boolean
stopsIncomingAttack
(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, stopsSwitching
Methods 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, modifyTypeEffectiveness, preventsRedirection, setChance, weightEffect
-
Constructor Details
-
ProtectVariation
Initializes the Protect variation.- Parameters:
type
- The status's type.
-
-
Method Details
-
applyEffect
Description copied from class:EffectBase
Causes various effects during the move.- Overrides:
applyEffect
in classStatusBase
- Parameters:
user
- The move's user.target
- The move's target.
-
stopsIncomingAttack
Description copied from class:StatusBase
Determines whether the status stops an attack about to hit the statused Pokémon.- Overrides:
stopsIncomingAttack
in 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:StatusBase
Triggers when the Pokémon takes direct damage, including fixed damage moves.- Overrides:
modifyDamageIncludeFixed
in 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.
-