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, typeFields inherited from class com.pixelmonmod.pixelmon.battles.attacks.EffectBase
modifiers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddStatus(PixelmonWrapper user) Adds the status to the user.voidTriggers at the end of every turn after residual status damage has been applied.booleanprotected voidDisplays a battle message upon successfully using the move.intmodifyDamageIncludeFixed(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a, DamageTypeEnum damageType) Triggers when the Pokémon takes direct damage, including fixed damage moves.booleanstopsIncomingAttack(PixelmonWrapper pokemon, PixelmonWrapper user) Determines whether the status stops an attack about to hit the statused Pokémon.voidweightEffect(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, stopsIncomingAttackMessageMethods inherited from class com.pixelmonmod.pixelmon.battles.status.ProtectVariation
applyEffect, applyProtectionEffect, canFail, isPenetratedByMove, protectVariationBlocksAttackMethods 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, stopsSwitchingMethods 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, preventsRedirection, setChance
-
Constructor Details
-
Endure
public Endure()Initializes the status.
-
-
Method Details
-
addStatus
Description copied from class:ProtectVariationAdds the status to the user. -
displayMessage
Description copied from class:ProtectVariationDisplays a battle message upon successfully using the move.- Overrides:
displayMessagein classProtect- Parameters:
user- The user of the move.
-
stopsIncomingAttack
Description copied from class:StatusBaseDetermines whether the status stops an attack about to hit the statused Pokémon.- Overrides:
stopsIncomingAttackin 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:StatusBaseTriggers when the Pokémon takes direct damage, including fixed damage moves.- Overrides:
modifyDamageIncludeFixedin 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:EffectBaseTriggers at the end of every turn after residual status damage has been applied.- Overrides:
applyEffectAfterStatusin classEffectBase- Parameters:
pw- The Pokémon that attacked.
-
canBeRemoved
public boolean canBeRemoved()- Overrides:
canBeRemovedin 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:EffectBaseDetermines a weight for the move that has this effect. Used for battle AI.- Overrides:
weightEffectin 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.
-