public class StatsEffect extends EffectBase
Modifier and Type | Field and Description |
---|---|
int |
amount
The amount to change the stat by.
|
boolean |
isUser
Whether the effect affects the move user's stats.
|
BattleStatsType |
type
The stat affected by the effect.
|
modifiers
Constructor and Description |
---|
StatsEffect() |
StatsEffect(BattleStatsType type,
int value,
boolean isUser)
Initializes a stat effect.
|
Modifier and Type | Method and Description |
---|---|
static void |
addStatChangeAnimation(PixelmonWrapper user,
PixelmonWrapper target,
BattleStatsType stat,
int stages) |
void |
applyEffect(PixelmonWrapper user,
PixelmonWrapper target)
Causes various effects during the move.
|
AttackResult |
applyStatEffect(PixelmonWrapper user,
PixelmonWrapper target,
ImmutableAttack a)
Executes the stat effect.
|
boolean |
cantMiss(PixelmonWrapper user)
Determines whether a move cannot miss.
|
BattleStatsType |
getStatsType()
Returns the type of stat modification.
|
boolean |
getUser()
Returns whether the stat effect affects the user.
|
void |
weightEffect(PixelmonWrapper pw,
MoveChoice userChoice,
java.util.List<MoveChoice> userChoices,
java.util.List<MoveChoice> bestUserChoices,
java.util.List<MoveChoice> opponentChoices,
java.util.List<MoveChoice> bestOpponentChoices)
Determines a weight for the move that has this effect.
|
void |
weightStatsEffect(PixelmonWrapper pw,
MoveChoice userChoice,
java.util.List<MoveChoice> userChoices,
java.util.List<MoveChoice> bestUserChoices,
java.util.List<MoveChoice> opponentChoices,
java.util.List<MoveChoice> bestOpponentChoices) |
applyEarlyEffect, applyEffectAfterAllTargets, applyEffectAfterStatus, applyEffectHitOrMiss, applyEffectStart, applyMissEffect, changeChance, checkChance, dealtDamage, doesPersist, getChance, getWeightWithChance, isChance, modifyDamage, modifyPriority, modifyTypeEffectiveness, modifyTypeEffectiveness
public BattleStatsType type
public int amount
public boolean isUser
public StatsEffect()
public StatsEffect(BattleStatsType type, int value, boolean isUser)
type
- The stat affected by the effect.value
- The amount to raise or lower the stat by.isUser
- Whether the effect affects the move user's stats.public AttackResult applyStatEffect(PixelmonWrapper user, PixelmonWrapper target, ImmutableAttack a)
user
- The attack's user.target
- The attack's target.a
- The attack.java.lang.Exception
public static void addStatChangeAnimation(PixelmonWrapper user, PixelmonWrapper target, BattleStatsType stat, int stages)
public void applyEffect(PixelmonWrapper user, PixelmonWrapper target)
EffectBase
applyEffect
in class EffectBase
user
- The move's user.target
- The move's target.public boolean cantMiss(PixelmonWrapper user)
EffectBase
cantMiss
in class EffectBase
user
- The move's user.public BattleStatsType getStatsType()
public boolean getUser()
public void weightEffect(PixelmonWrapper pw, MoveChoice userChoice, java.util.List<MoveChoice> userChoices, java.util.List<MoveChoice> bestUserChoices, java.util.List<MoveChoice> opponentChoices, java.util.List<MoveChoice> bestOpponentChoices)
EffectBase
weightEffect
in class EffectBase
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.public void weightStatsEffect(PixelmonWrapper pw, MoveChoice userChoice, java.util.List<MoveChoice> userChoices, java.util.List<MoveChoice> bestUserChoices, java.util.List<MoveChoice> opponentChoices, java.util.List<MoveChoice> bestOpponentChoices)