Class StatsEffectCone
java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.EffectBase
com.pixelmonmod.pixelmon.battles.attacks.specialAttacks.StatsEffect
com.pixelmonmod.pixelmon.battles.attacks.specialAttacks.StatsEffectCone
An effect that lowers or raises stats of a cone of targets.
Example: Targets 1, 2, 3.
Target 1, affect 1 + 2.
Target 2, affect 1 + 2 + 3.
Target 3, affect 2 + 3.
-
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.battles.attacks.specialAttacks.StatsEffect
amount, isAttack, isUser, type
Fields inherited from class com.pixelmonmod.pixelmon.battles.attacks.EffectBase
modifiers
-
Constructor Summary
ConstructorDescriptionStatsEffectCone
(BattleStatsType type, int value, boolean isUser) Initializes a stat effect. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addStatChangeAnimation
(PixelmonWrapper user, PixelmonWrapper target, BattleStatsType stat, int stages) void
applyEffect
(PixelmonWrapper user, PixelmonWrapper target) Causes various effects during the move.applyStatEffect
(PixelmonWrapper user, PixelmonWrapper target, ImmutableAttack a) Executes the stat effect.boolean
cantMiss
(PixelmonWrapper user) Determines whether a move cannot miss.Returns the type of stat modification.boolean
getUser()
Returns whether the stat effect affects the user.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.attacks.specialAttacks.StatsEffect
weightStatsEffect
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
-
Constructor Details
-
StatsEffectCone
public StatsEffectCone() -
StatsEffectCone
Initializes a stat effect.- Parameters:
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 allies.
-
-
Method Details
-
applyStatEffect
public AttackResult applyStatEffect(PixelmonWrapper user, PixelmonWrapper target, ImmutableAttack a) Executes the stat effect.- Overrides:
applyStatEffect
in classStatsEffect
- Parameters:
user
- The attack's user.target
- The attack's target.a
- The attack.- Returns:
- The result of the attack.
-
addStatChangeAnimation
public static void addStatChangeAnimation(PixelmonWrapper user, PixelmonWrapper target, BattleStatsType stat, int stages) -
applyEffect
Description copied from class:EffectBase
Causes various effects during the move.- Overrides:
applyEffect
in classStatsEffect
- Parameters:
user
- The move's user.target
- The move's target.
-
cantMiss
Description copied from class:EffectBase
Determines whether a move cannot miss.- Overrides:
cantMiss
in classStatsEffect
- Parameters:
user
- The move's user.- Returns:
- Whether the move can't miss.
-
getStatsType
Returns the type of stat modification.- Overrides:
getStatsType
in classStatsEffect
- Returns:
- The type of stat modification.
-
getUser
public boolean getUser()Returns whether the stat effect affects the user.- Overrides:
getUser
in classStatsEffect
- Returns:
- Whether the stat effect affects the user.
-
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 classStatsEffect
- 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.
-