Class StatsEffectPost
java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.EffectBase
com.pixelmonmod.pixelmon.battles.attacks.specialAttacks.StatsEffectPost
An effect that lowers or raises the user's stats once for a multi-target attack.
-
Field Summary
FieldsModifier and TypeFieldDescriptionintThe amount to change the stat by.The stat affected by the effect.Fields inherited from class com.pixelmonmod.pixelmon.battles.attacks.EffectBase
modifiers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddStatChangeAnimation(PixelmonWrapper user, PixelmonWrapper target, BattleStatsType stat, int stages) voidapplyEffect(PixelmonWrapper user, PixelmonWrapper target) Causes various effects during the move.voidExecutes the stat effect after all hits of the attack have been completed.booleancantMiss(PixelmonWrapper user, PixelmonWrapper target) Determines whether a move cannot miss.Returns the type of stat modification.booleanisUser()Determines whether the move only affects the user.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.attacks.EffectBase
applyEarlyEffect, applyEffectAfterStatus, applyEffectHitOrMiss, applyEffectStart, applyMissEffect, canHitMultipleTargets, changeChance, checkChance, dealtDamage, dealtDamagePerHit, doesPersist, getChance, getWeightWithChance, isChance, modifyDamage, modifyPriority, modifyTargets, modifyTypeEffectiveness, preventsRedirection, setChance
-
Field Details
-
type
The stat affected by the effect. -
amount
public int amountThe amount to change the stat by.
-
-
Constructor Details
-
StatsEffectPost
public StatsEffectPost() -
StatsEffectPost
Initializes a stat effect.- Parameters:
type- The stat affected by the effect.value- The amount to raise or lower the stat by.
-
-
Method Details
-
applyEffect
Description copied from class:EffectBaseCauses various effects during the move.- Specified by:
applyEffectin classEffectBase- Parameters:
user- The move's user.target- The move's target.
-
cantMiss
Description copied from class:EffectBaseDetermines whether a move cannot miss.- Specified by:
cantMissin classEffectBase- Parameters:
user- The move's user.target- The move's target.- Returns:
- Whether the move can't miss.
-
isUser
public boolean isUser()Description copied from class:EffectBaseDetermines whether the move only affects the user.- Overrides:
isUserin classEffectBase- Returns:
- Whether the move only affects the user.
-
applyEffectAfterAllTargets
Executes the stat effect after all hits of the attack have been completed.- Overrides:
applyEffectAfterAllTargetsin classEffectBase- Parameters:
user- The attack's user.
-
addStatChangeAnimation
public static void addStatChangeAnimation(PixelmonWrapper user, PixelmonWrapper target, BattleStatsType stat, int stages) -
getStatsType
Returns the type of stat modification.- Returns:
- The type of stat modification.
-
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 classEffectBase- 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.
-