public abstract class StatusBase extends EffectBase
Modifier and Type | Field and Description |
---|---|
StatusType |
type
The type of the status.
|
modifiers
Constructor and Description |
---|
StatusBase() |
StatusBase(StatusType type)
Initializes the status with its type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsStatChange(PixelmonWrapper pokemon,
PixelmonWrapper user,
StatsEffect e)
Determines whether the status allows stats to be modified
|
void |
applyBeforeEffect(PixelmonWrapper victim,
PixelmonWrapper opponent)
Triggers when the Pokémon gains the status.
|
void |
applyEffect(PixelmonWrapper user,
PixelmonWrapper target)
Causes various effects during the move.
|
void |
applyEffectOnSwitch(PixelmonWrapper pw)
Triggers when the statused Pokémon switches in.
|
void |
applyEndOfBattleEffect(PixelmonWrapper pokemon)
Triggers when the battle ends.
|
void |
applyRepeatedEffect(PixelmonWrapper pw)
Triggered at the end of every turn.
|
void |
applySwitchOutEffect(PixelmonWrapper outgoing,
PixelmonWrapper incoming)
Triggers when the statused Pokémon switches out.
|
boolean |
canAttackThisTurn(PixelmonWrapper user,
Attack a)
Determines whether the statused Pokémon can attack.
|
boolean |
cantMiss(PixelmonWrapper user)
Determines whether a move cannot miss.
|
StatusBase |
copy()
If necessary, makes a deep copy of the status.
|
java.lang.String |
getCureMessage()
Gets the lang key for the message that is displayed when the status is cured.
|
java.lang.String |
getCureMessageItem()
Gets the lang key for the message that is displayed when the status is cured with a held item.
|
java.util.List<Element> |
getEffectiveTypes(PixelmonWrapper user,
PixelmonWrapper target)
Returns the types that will be used in calculating the Pokémon's attack's type effectiveness.
|
static StatusBase |
getNewInstance(java.lang.Class<? extends StatusBase> statusClass)
Returns a new instance of the given status class.
|
boolean |
ignoreStatus(PixelmonWrapper user,
PixelmonWrapper target)
Determines whether the status is ignored during the attack.
|
boolean |
isImmune(PixelmonWrapper pokemon)
Checks if the Pokémon is immune to the status.
|
boolean |
isTeamStatus()
Determines whether the status applies to the Pokémon's position in the battle.
|
boolean |
isWholeTeamStatus()
Determines whether the status applies to the Pokémon's side of the battle.
|
int[] |
modifyBaseStats(PixelmonWrapper user,
int[] stats)
Modifies the Pokémon's base stats at the beginning of a battle turn.
|
int |
modifyDamageIncludeFixed(int damage,
PixelmonWrapper user,
PixelmonWrapper target,
Attack a,
DamageTypeEnum damageType)
Triggers when the Pokémon takes direct damage, including fixed damage moves.
|
int[] |
modifyPowerAndAccuracyTarget(int power,
int accuracy,
PixelmonWrapper user,
PixelmonWrapper target,
Attack a)
Modifies the power and accuracy of the attack about to hit the statused Pokémon.
|
int[] |
modifyPowerAndAccuracyUser(int power,
int accuracy,
PixelmonWrapper user,
PixelmonWrapper target,
Attack a)
Modifies the power and accuracy of the attack used by the statused Pokémon.
|
int[] |
modifyStats(PixelmonWrapper user,
int[] stats)
Modifies the Pokémon's stats at the beginning of a battle turn.
|
int[] |
modifyStatsCancellable(PixelmonWrapper user,
int[] stats)
Modifies the Pokémon's stats at the beginning of a battle turn.
|
float |
modifyWeight(float initWeight)
Modifies the Pokémon's weight.
|
void |
onAttackEnd(PixelmonWrapper pw)
Triggered when an attack against the Pokémon finishes.
|
void |
onAttackUsed(PixelmonWrapper user,
Attack attack)
Triggers when the Pokémon uses an attack.
|
void |
onDamageReceived(PixelmonWrapper userWrapper,
PixelmonWrapper pokemon,
Attack a,
int damage,
DamageTypeEnum damageType)
Triggers when the statused Pokémon takes damage.
|
void |
onEndOfAttackersTurn(PixelmonWrapper statusedPokemon,
PixelmonWrapper attacker)
Affects the statuses of the Pokémon defending against this attacking Pokémon.
|
void |
onEndOfTurn(PixelmonWrapper pw)
Occurs at the end of the Pokémon's current turn.
|
boolean |
redirectAttack(PixelmonWrapper user,
PixelmonWrapper targetAlly,
Attack attack)
Determines whether the status causes an incoming attack to be redirected.
|
boolean |
skipsTurn()
Determines whether the user skips their turn due to this status.
|
boolean |
stopsForcedSwitches(PixelmonWrapper cause)
Determines whether the status prevents another Pokémon from switching them.
|
boolean |
stopsIncomingAttack(PixelmonWrapper pokemon,
PixelmonWrapper user)
Determines whether the status stops an attack about to hit the statused Pokémon.
|
void |
stopsIncomingAttackMessage(PixelmonWrapper pokemon,
PixelmonWrapper user)
Displays a battle message when the status stops an attack.
|
boolean |
stopsIncomingAttackUser(PixelmonWrapper pokemon,
PixelmonWrapper user)
Determines whether the status stops an attack used by the statused Pokémon.
|
boolean |
stopsSelfStatusMove(PixelmonWrapper user,
PixelmonWrapper opponent,
Attack attack)
Determines whether the Pokémon's status stops an opponent's status move on itself.
|
boolean |
stopsStatusChange(StatusType t,
PixelmonWrapper target,
PixelmonWrapper user)
Determines whether the status prevents the Pokémon from obtaining other statuses.
|
boolean |
stopsSwitching()
Determines whether the status stops switching.
|
applyEarlyEffect, applyEffectAfterAllTargets, applyEffectAfterStatus, applyEffectHitOrMiss, applyEffectStart, applyMissEffect, changeChance, checkChance, dealtDamage, doesPersist, getChance, getWeightWithChance, isChance, modifyDamage, modifyPriority, modifyTypeEffectiveness, modifyTypeEffectiveness, weightEffect
public StatusType type
public StatusBase()
public StatusBase(StatusType type)
type
- The status's type.public void applyEffect(PixelmonWrapper user, PixelmonWrapper target)
EffectBase
applyEffect
in class EffectBase
user
- The move's user.target
- The move's target.public void onAttackUsed(PixelmonWrapper user, Attack attack)
user
- The attack's user.attack
- The attack.public boolean stopsSwitching()
public boolean stopsForcedSwitches(PixelmonWrapper cause)
cause
- The Pokémon triggering the switch.public boolean skipsTurn()
public void applyRepeatedEffect(PixelmonWrapper pw)
pw
- The statused Pokémon.public void onAttackEnd(PixelmonWrapper pw)
pw
- The statused Pokémon.public boolean canAttackThisTurn(PixelmonWrapper user, Attack a)
user
- The statused Pokémon.a
- The attack to be used by the Pokémon.public boolean stopsSelfStatusMove(PixelmonWrapper user, PixelmonWrapper opponent, Attack attack)
user
- The statused Pokémon.opponent
- The attack's user.attack
- The attack.public void onEndOfTurn(PixelmonWrapper pw)
pw
- The statused Pokémon.public void onEndOfAttackersTurn(PixelmonWrapper statusedPokemon, PixelmonWrapper attacker)
statusedPokemon
- The defending Pokémon that has the status condition.attacker
- The attacking Pokémon.public int[] modifyPowerAndAccuracyUser(int power, int accuracy, PixelmonWrapper user, PixelmonWrapper target, Attack a)
power
- The attack's power.accuracy
- The attack's accuracy.user
- The attack's user.target
- The attack's target.a
- The attack.public int[] modifyPowerAndAccuracyTarget(int power, int accuracy, PixelmonWrapper user, PixelmonWrapper target, Attack a)
power
- The attack's power.accuracy
- The attack's accuracy.user
- The attack's user.target
- The attack's target.a
- The attack.public boolean stopsIncomingAttack(PixelmonWrapper pokemon, PixelmonWrapper user)
pokemon
- The statused Pokémon.user
- The attack's user.public boolean stopsIncomingAttackUser(PixelmonWrapper pokemon, PixelmonWrapper user)
pokemon
- The statused Pokémon.user
- The attack's user.public void stopsIncomingAttackMessage(PixelmonWrapper pokemon, PixelmonWrapper user)
pokemon
- The statused Pokémon.user
- The attack's user.public boolean stopsStatusChange(StatusType t, PixelmonWrapper target, PixelmonWrapper user)
t
- The status to be afflictedtarget
- The Pokémon to be afflicted.user
- The Pokémon afflicting the status.public void onDamageReceived(PixelmonWrapper userWrapper, PixelmonWrapper pokemon, Attack a, int damage, DamageTypeEnum damageType)
userWrapper
- The attack's user.pokemon
- The statused Pokémon.a
- The attack.damage
- The amount of damage dealt.damageType
- The type of damage dealt.public int modifyDamageIncludeFixed(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a, DamageTypeEnum damageType)
damage
- The amount of damage dealt.user
- The attack's user.target
- The attack's target.a
- The attack.public boolean isTeamStatus()
public boolean isWholeTeamStatus()
public void applySwitchOutEffect(PixelmonWrapper outgoing, PixelmonWrapper incoming)
outgoing
- The statused Pokémon.incoming
- The incoming Pokémon.public void applyEffectOnSwitch(PixelmonWrapper pw)
pw
- The statused Pokémon.public void applyBeforeEffect(PixelmonWrapper victim, PixelmonWrapper opponent)
victim
- The statused Pokémon.opponent
- The attack's target.public void applyEndOfBattleEffect(PixelmonWrapper pokemon)
pokemon
- The statused Pokémon.public java.util.List<Element> getEffectiveTypes(PixelmonWrapper user, PixelmonWrapper target)
user
- The attack's user.target
- The attack's target.public int[] modifyBaseStats(PixelmonWrapper user, int[] stats)
user
- The Pokémon.stats
- The Pokémon's stats.public int[] modifyStats(PixelmonWrapper user, int[] stats)
user
- The Pokémon.stats
- The Pokémon's stats.public int[] modifyStatsCancellable(PixelmonWrapper user, int[] stats)
user
- The Pokémon.stats
- The Pokémon's stats.public boolean ignoreStatus(PixelmonWrapper user, PixelmonWrapper target)
user
- The attack's user.target
- The attack's target.public boolean allowsStatChange(PixelmonWrapper pokemon, PixelmonWrapper user, StatsEffect e)
pokemon
- The statused Pokémon.user
- The attack's user.e
- The stat modifier.public float modifyWeight(float initWeight)
initWeight
- The Pokémon's weight.public boolean redirectAttack(PixelmonWrapper user, PixelmonWrapper targetAlly, Attack attack)
user
- The Pokémon using the attack.targetAlly
- The Pokémon with the status.attack
- The attack.public boolean isImmune(PixelmonWrapper pokemon)
pokemon
- The Pokémon to check.public StatusBase copy()
public boolean cantMiss(PixelmonWrapper user)
EffectBase
cantMiss
in class EffectBase
user
- The move's user.public java.lang.String getCureMessage()
public java.lang.String getCureMessageItem()
public static StatusBase getNewInstance(java.lang.Class<? extends StatusBase> statusClass)
statusClass
- The status class to make a new instance of.