Class Endure
Causes any fatal move to instead leave the Pokémon at 1 hp remaining.
-
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 boolean
addStatus
(PixelmonWrapper user) Adds the status to the user.void
Triggers at the end of every turn after residual status damage has been applied.boolean
protected void
Displays a battle message upon successfully using the move.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
stopsIncomingAttack
(PixelmonWrapper pokemon, PixelmonWrapper user) Determines whether the status stops an attack about to hit the statused Pokémon.void
weightEffect
(PixelmonWrapper pw, MoveChoice userChoice, List<MoveChoice> userChoices, List<MoveChoice> bestUserChoices, List<MoveChoice> opponentChoices, List<MoveChoice> bestOpponentChoices) Determines a weight for the move that has this effect.Methods inherited from class com.pixelmonmod.pixelmon.battles.status.Protect
applyRepeatedEffect, stopsIncomingAttackMessage
Methods inherited from class com.pixelmonmod.pixelmon.battles.status.ProtectVariation
applyEffect, applyProtectionEffect, canFail, isPenetratedByMove, protectVariationBlocksAttack
Methods inherited from class com.pixelmonmod.pixelmon.battles.status.StatusBase
adjustCritStage, allowsStatChange, applyBeforeEffect, applyEffectOnSwitch, applyEndOfBattleEffect, 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, stopsIncomingAttackUser, stopsSelfStatusMove, stopsStatusChange, stopsSwitching
Methods inherited from class com.pixelmonmod.pixelmon.battles.attacks.EffectBase
applyEarlyEffect, applyEffectAfterAllTargets, applyEffectHitOrMiss, applyEffectStart, applyMissEffect, canHitMultipleTargets, changeChance, checkChance, dealtDamage, dealtDamagePerHit, doesPersist, getChance, getWeightWithChance, isChance, isUser, modifyDamage, modifyPriority, modifyTargets, modifyTypeEffectiveness, modifyTypeEffectiveness, preventsRedirection, setChance
-
Constructor Details
-
Endure
public Endure()Initializes the status.
-
-
Method Details
-
addStatus
Description copied from class:ProtectVariation
Adds the status to the user. -
displayMessage
Description copied from class:ProtectVariation
Displays a battle message upon successfully using the move.- Overrides:
displayMessage
in classProtect
- Parameters:
user
- The user of the move.
-
stopsIncomingAttack
Description copied from class:StatusBase
Determines whether the status stops an attack about to hit the statused Pokémon.- Overrides:
stopsIncomingAttack
in classProtect
- Parameters:
pokemon
- The statused Pokémon.user
- The attack's user.- Returns:
- Whether the attack is stopped.
-
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 classProtectVariation
- Parameters:
damage
- The amount of damage dealt.user
- The attack's user.target
- The attack's target.a
- The attack.- Returns:
- The modified damage.
-
applyEffectAfterStatus
Description copied from class:EffectBase
Triggers at the end of every turn after residual status damage has been applied.- Overrides:
applyEffectAfterStatus
in classEffectBase
- Parameters:
pw
- The Pokémon that attacked.
-
canBeRemoved
public boolean canBeRemoved()- Overrides:
canBeRemoved
in classProtectVariation
-
weightEffect
public void weightEffect(PixelmonWrapper pw, MoveChoice userChoice, List<MoveChoice> userChoices, List<MoveChoice> bestUserChoices, List<MoveChoice> opponentChoices, List<MoveChoice> bestOpponentChoices) Description copied from class:EffectBase
Determines a weight for the move that has this effect. Used for battle AI.- Overrides:
weightEffect
in classProtect
- Parameters:
pw
- The Pokémon using the move.userChoice
- The move with this effect.userChoices
- All choices the Pokémon has for the turn.bestUserChoices
- The best offensive choices the Pokémon has for the turn.opponentChoices
- All choices the opponent has for the turn.bestOpponentChoices
- The best choices the opponent has for the turn.
-