public class Substitute extends StatusBase
Modifier and Type | Field and Description |
---|---|
int |
health
The substitute's hp.
|
type
modifiers
Constructor and Description |
---|
Substitute()
Initializes the status.
|
Substitute(int health)
Initializes a substitute.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsStatChange(PixelmonWrapper pokemon,
PixelmonWrapper user,
StatsEffect e)
Determines whether the status allows stats to be modified
|
void |
applyEffect(PixelmonWrapper user,
PixelmonWrapper target)
Causes various effects during the move.
|
void |
applyRepeatedEffect(PixelmonWrapper pw)
Triggered at the end of every turn.
|
float |
attackSubstitute(float damage,
PixelmonWrapper source,
PixelmonWrapper pw)
Deals damage to the substitute.
|
boolean |
ignoreSubstitute(PixelmonWrapper attacker)
Checks if an incoming move should ignore the substitute and directly damage the Pokémon.
|
void |
onEndOfAttackersTurn(PixelmonWrapper statusedPokemon,
PixelmonWrapper attacker)
If possible, remove the substitute immediately after the end of the attacking Pokémon's turn.
|
boolean |
stopsIncomingAttack(PixelmonWrapper pokemon,
PixelmonWrapper user)
Determines whether the status stops an attack about to hit the statused Pokémon.
|
boolean |
stopsStatusChange(StatusType t,
PixelmonWrapper target,
PixelmonWrapper user)
Determines whether the status prevents the Pokémon from obtaining other statuses.
|
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.
|
applyBeforeEffect, applyEffectOnSwitch, applyEndOfBattleEffect, applySwitchOutEffect, canAttackThisTurn, cantMiss, copy, getCureMessage, getCureMessageItem, getEffectiveTypes, getNewInstance, ignoreStatus, isImmune, isTeamStatus, isWholeTeamStatus, modifyBaseStats, modifyDamageIncludeFixed, modifyPowerAndAccuracyTarget, modifyPowerAndAccuracyUser, modifyStats, modifyStatsCancellable, modifyWeight, onAttackEnd, onAttackUsed, onDamageReceived, onEndOfTurn, redirectAttack, skipsTurn, stopsForcedSwitches, stopsIncomingAttackMessage, stopsIncomingAttackUser, stopsSelfStatusMove, stopsSwitching
applyEarlyEffect, applyEffectAfterAllTargets, applyEffectAfterStatus, applyEffectHitOrMiss, applyEffectStart, applyMissEffect, changeChance, checkChance, dealtDamage, doesPersist, getChance, getWeightWithChance, isChance, modifyDamage, modifyPriority, modifyTypeEffectiveness, modifyTypeEffectiveness
public Substitute()
public Substitute(int health)
health
- The subsitute's initial hp.public void applyEffect(PixelmonWrapper user, PixelmonWrapper target)
EffectBase
applyEffect
in class StatusBase
user
- The move's user.target
- The move's target.public boolean stopsStatusChange(StatusType t, PixelmonWrapper target, PixelmonWrapper user)
StatusBase
stopsStatusChange
in class StatusBase
t
- The status to be afflictedtarget
- The Pokémon to be afflicted.user
- The Pokémon afflicting the status.public boolean stopsIncomingAttack(PixelmonWrapper pokemon, PixelmonWrapper user)
StatusBase
stopsIncomingAttack
in class StatusBase
pokemon
- The statused Pokémon.user
- The attack's user.public boolean allowsStatChange(PixelmonWrapper pokemon, PixelmonWrapper user, StatsEffect e)
StatusBase
allowsStatChange
in class StatusBase
pokemon
- The statused Pokémon.user
- The attack's user.e
- The stat modifier.public void applyRepeatedEffect(PixelmonWrapper pw)
StatusBase
applyRepeatedEffect
in class StatusBase
pw
- The statused Pokémon.public void onEndOfAttackersTurn(PixelmonWrapper statusedPokemon, PixelmonWrapper attacker)
onEndOfAttackersTurn
in class StatusBase
statusedPokemon
- The defending Pokémon that has the status condition.attacker
- The attacking Pokémon.public float attackSubstitute(float damage, PixelmonWrapper source, PixelmonWrapper pw)
damage
- The damage to deal.pw
- The Pokémon with the substitute.public boolean ignoreSubstitute(PixelmonWrapper attacker)
attacker
- The attacking Pokémon.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.