Class StatusBase
java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.EffectBase
com.pixelmonmod.pixelmon.battles.status.StatusBase
- Direct Known Subclasses:
AquaRing
,Autotomize
,BeakBlastStatus
,BerryEaten
,BideStatus
,Charge
,ChiStrikeStatus
,Commanded
,Confusion
,CopiedBoosts
,Cursed
,DefenseCurl
,DestinyBond
,Disable
,Electrify
,Embargo
,Encore
,EntryHazard
,FixatedStatus
,Flinch
,Flying
,Focus
,FollowMe
,Foresight
,FuryCutterStatus
,FutureSighted
,GastroAcid
,GlaiveRushLock
,GlobalStatusBase
,Grudge
,HealBlock
,HealingWish
,HelpingHand
,Imprison
,Infatuated
,Ingrain
,InMouth
,InPursuit
,LaserFocus
,Leech
,LockOn
,LuckyChant
,LunarBlessing
,LunarDance
,MagicCoat
,MagnetRise
,MatBlock
,MeanLook
,MeFirstStatus
,Minimize
,Mist
,MoveOrderModifier
,MultiTurn
,Nightmare
,NoRetreat
,ObscuredStatus
,Overlord
,ParadoxBoost
,PartialTrap
,Perish
,PledgeBase
,Powder
,PowerShift
,PowerTrick
,ProtectVariation
,Pumped
,Raging
,Recharge
,SafeGuard
,SaltCure
,Screen
,ShellTrapStatus
,SkyDropBase
,SmackedDown
,Snatch
,SpeedSwapStatus
,Splinters
,Split
,Spotlight
,SpringtideStormStatus
,StatusPersist
,Stockpile
,Submerged
,Substitute
,SuppressType
,SyrupBomb
,Tailwind
,TarShot
,Taunt
,Telekinesis
,ThroatChop
,Torment
,Transformed
,UnderGround
,UproarStatus
,Vanish
,Wish
,Yawn
,ZPowerHeal
A battle status.
-
Field Summary
Modifier and TypeFieldDescriptionint
int
The type of the status.Fields inherited from class com.pixelmonmod.pixelmon.battles.attacks.EffectBase
modifiers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Adjusts the number of crit rate stages for an attack.boolean
allowsStatChange
(PixelmonWrapper pokemon, PixelmonWrapper user, StatsEffect e) Determines whether the status allows stats to be modifiedvoid
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
Triggers when the statused Pokémon switches in.void
applyEndOfBattleEffect
(PixelmonWrapper pokemon) Triggers when the battle ends.void
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.copy()
If necessary, makes a deep copy of the status.Gets the lang key for the message that is displayed when the status is cured.Gets the lang key for the message that is displayed when the status is cured with a held item.static StatusBase
getNewInstance
(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
Determines whether the status applies to the Pokémon's position in the battle.boolean
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.modifyEffectiveTypes
(PixelmonWrapper user, PixelmonWrapper target, List<Element> types) Returns the types that will be used in calculating the Pokémon's attack's type effectiveness.void
modifyMoveEffectChanceTarget
(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the target's status to adjust the move's effectsvoid
modifyMoveEffectChanceUser
(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the user's status to adjust the move's effectsint[]
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
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
Triggers when the statused Pokémon dynamaxes.void
onEndOfAttackersTurn
(PixelmonWrapper statusedPokemon, PixelmonWrapper attacker) Affects the statuses of the Pokémon defending against this attacking Pokémon.void
Occurs at the end of the Pokémon's current turn.void
Triggers when the statused Pokémon's form changes.boolean
redirectAttack
(PixelmonWrapper user, PixelmonWrapper targetAlly, Attack attack) Determines whether the status causes an incoming attack to be redirected.boolean
Determines whether the user skips their turn due to this status.boolean
Determines whether the status prevents the Pokémon from evolving.boolean
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
Determines whether the status stops switching.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, weightEffect
-
Field Details
-
type
The type of the status. -
battleTurnGained
public int battleTurnGained -
turnGained
public int turnGained
-
-
Constructor Details
-
StatusBase
public StatusBase() -
StatusBase
Initializes the status with its type.- Parameters:
type
- The status's type.
-
-
Method Details
-
applyEffect
Description copied from class:EffectBase
Causes various effects during the move.- Specified by:
applyEffect
in classEffectBase
- Parameters:
user
- The move's user.target
- The move's target.
-
onAttackUsed
Triggers when the Pokémon uses an attack.- Parameters:
user
- The attack's user.attack
- The attack.
-
stopsSwitching
public boolean stopsSwitching()Determines whether the status stops switching.- Returns:
- Whether the status stops switching.
-
stopsForcedSwitches
Determines whether the status prevents another Pokémon from switching them.- Parameters:
cause
- The Pokémon triggering the switch.- Returns:
- Whether the status stops the forced switch.
-
skipsTurn
public boolean skipsTurn()Determines whether the user skips their turn due to this status. Skips all actions.- Returns:
- Whether the turn is skipped
-
applyRepeatedEffect
Triggered at the end of every turn.- Parameters:
pw
- The statused Pokémon.
-
onAttackEnd
Triggered when an attack against the Pokémon finishes.- Parameters:
pw
- The statused Pokémon.
-
canAttackThisTurn
Determines whether the statused Pokémon can attack.- Parameters:
user
- The statused Pokémon.a
- The attack to be used by the Pokémon.- Returns:
- Whether the Pokémon can attack.
-
stopsSelfStatusMove
Determines whether the Pokémon's status stops an opponent's status move on itself.- Parameters:
user
- The statused Pokémon.opponent
- The attack's user.attack
- The attack.- Returns:
- Whether the attack is stopped.
-
onEndOfTurn
Occurs at the end of the Pokémon's current turn.- Parameters:
pw
- The statused Pokémon.
-
onEndOfAttackersTurn
Affects the statuses of the Pokémon defending against this attacking Pokémon. Occurs at the end of the attacking Pokémon's current turn.- Parameters:
statusedPokemon
- The defending Pokémon that has the status condition.attacker
- The attacking Pokémon.
-
modifyPowerAndAccuracyUser
public 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.- Parameters:
power
- The attack's power.accuracy
- The attack's accuracy.user
- The attack's user.target
- The attack's target.a
- The attack.- Returns:
- The modified power and accuracy.
-
modifyPowerAndAccuracyTarget
public 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.- Parameters:
power
- The attack's power.accuracy
- The attack's accuracy.user
- The attack's user.target
- The attack's target.a
- The attack.- Returns:
- The modified power and accuracy.
-
modifyMoveEffectChanceUser
public void modifyMoveEffectChanceUser(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the user's status to adjust the move's effects- Parameters:
user
- The attacking Pokemon, with the Status.target
- The Pokemon being attacked.effects
- The current effects of the attack.
-
modifyMoveEffectChanceTarget
public void modifyMoveEffectChanceTarget(PixelmonWrapper user, PixelmonWrapper target, List<EffectBase> effects) Allows the target's status to adjust the move's effects- Parameters:
user
- The item holder and attacking Pokemon.target
- The Pokemon being attacked.effects
- The current effects of the attack.
-
stopsIncomingAttack
Determines whether the status stops an attack about to hit the statused Pokémon.- Parameters:
pokemon
- The statused Pokémon.user
- The attack's user.- Returns:
- Whether the attack is stopped.
-
stopsIncomingAttackUser
Determines whether the status stops an attack used by the statused Pokémon.- Parameters:
pokemon
- The statused Pokémon.user
- The attack's user.- Returns:
- Whether the attack is stopped.
-
stopsIncomingAttackMessage
Displays a battle message when the status stops an attack.- Parameters:
pokemon
- The statused Pokémon.user
- The attack's user.
-
stopsStatusChange
Determines whether the status prevents the Pokémon from obtaining other statuses.- Parameters:
t
- The status to be afflictedtarget
- The Pokémon to be afflicted.user
- The Pokémon afflicting the status.- Returns:
- Whether the status stops the other status from being afflicted.
-
stopsEvolution
Determines whether the status prevents the Pokémon from evolving.- Parameters:
pw
- The Pokémon with the status.- Returns:
- Whether the status stops the pokemon from evolving.
-
onDynamaxTriggered
Triggers when the statused Pokémon dynamaxes.- Parameters:
pw
- The Pokémon with the status.
-
onFormChanged
Triggers when the statused Pokémon's form changes.- Parameters:
pw
- The Pokémon with the status.
-
onDamageReceived
public void onDamageReceived(PixelmonWrapper userWrapper, PixelmonWrapper pokemon, Attack a, int damage, DamageTypeEnum damageType) Triggers when the statused Pokémon takes damage.- Parameters:
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.
-
modifyDamageIncludeFixed
public int modifyDamageIncludeFixed(int damage, PixelmonWrapper user, PixelmonWrapper target, Attack a, DamageTypeEnum damageType) Triggers when the Pokémon takes direct damage, including fixed damage moves.- Parameters:
damage
- The amount of damage dealt.user
- The attack's user.target
- The attack's target.a
- The attack.- Returns:
- The modified damage.
-
isTeamStatus
public boolean isTeamStatus()Determines whether the status applies to the Pokémon's position in the battle.- Returns:
- Whether the status applies to the Pokémon's position in the battle.
-
isWholeTeamStatus
public boolean isWholeTeamStatus()Determines whether the status applies to the Pokémon's side of the battle.- Returns:
- Whether the status applies to the Pokémon's side of the battle.
-
applySwitchOutEffect
Triggers when the statused Pokémon switches out.- Parameters:
outgoing
- The statused Pokémon.incoming
- The incoming Pokémon.
-
applyEffectOnSwitch
Triggers when the statused Pokémon switches in.- Parameters:
pw
- The statused Pokémon.
-
applyBeforeEffect
Triggers when the Pokémon gains the status.- Parameters:
victim
- The statused Pokémon.opponent
- The attack's target.
-
applyEndOfBattleEffect
Triggers when the battle ends.- Parameters:
pokemon
- The statused Pokémon.
-
modifyEffectiveTypes
public List<Element> modifyEffectiveTypes(PixelmonWrapper user, PixelmonWrapper target, List<Element> types) Returns the types that will be used in calculating the Pokémon's attack's type effectiveness.- Parameters:
user
- The attack's user.target
- The attack's target.- Returns:
- The target's modified types.
-
modifyBaseStats
Modifies the Pokémon's base stats at the beginning of a battle turn.- Parameters:
user
- The Pokémon.stats
- The Pokémon's stats.- Returns:
- The modified stats.
-
modifyStats
Modifies the Pokémon's stats at the beginning of a battle turn.- Parameters:
user
- The Pokémon.stats
- The Pokémon's stats.- Returns:
- The modified stats.
-
modifyStatsCancellable
Modifies the Pokémon's stats at the beginning of a battle turn. Affected by Abilities that negate status.- Parameters:
user
- The Pokémon.stats
- The Pokémon's stats.- Returns:
- The modified stats.
-
ignoreStatus
Determines whether the status is ignored during the attack.- Parameters:
user
- The attack's user.target
- The attack's target.- Returns:
- Whether the status is ignored.
-
allowsStatChange
Determines whether the status allows stats to be modified- Parameters:
pokemon
- The statused Pokémon.user
- The attack's user.e
- The stat modifier.- Returns:
- Whether the stat can be modified.
-
adjustCritStage
Adjusts the number of crit rate stages for an attack.- Parameters:
pw
- The Pokémon with the status- Returns:
- The critical stage boost
-
modifyWeight
public float modifyWeight(float initWeight) Modifies the Pokémon's weight.- Parameters:
initWeight
- The Pokémon's weight.- Returns:
- The modified weight.
-
redirectAttack
Determines whether the status causes an incoming attack to be redirected.- Parameters:
user
- The Pokémon using the attack.targetAlly
- The Pokémon with the status.attack
- The attack.- Returns:
- Whether the attack is redirected to the Pokémon with the status.
-
isImmune
Checks if the Pokémon is immune to the status.- Parameters:
pokemon
- The Pokémon to check.- Returns:
- Whether the Pokémon is immune to the status.
-
copy
If necessary, makes a deep copy of the status.- Returns:
- A deep copy of the status.
-
cantMiss
Description copied from class:EffectBase
Determines whether a move cannot miss.- Specified by:
cantMiss
in classEffectBase
- Parameters:
user
- The move's user.- Returns:
- Whether the move can't miss.
-
getCureMessage
Gets the lang key for the message that is displayed when the status is cured.- Returns:
- The lang key for the message that is displayed when the status is cured.
-
getCureMessageItem
Gets the lang key for the message that is displayed when the status is cured with a held item.- Returns:
- The lang key for the message that is displayed when the status is cured with a held item.
-
getNewInstance
Returns a new instance of the given status class.- Parameters:
statusClass
- The status class to make a new instance of.- Returns:
- A new instance of the given status class.
-