Class StatusPersist
java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.EffectBase
com.pixelmonmod.pixelmon.battles.status.StatusBase
com.pixelmonmod.pixelmon.battles.status.StatusPersist
A status that remains after switching out.
-
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.battles.status.StatusBase
battleTurnGained, turnGained, type
Fields inherited from class com.pixelmonmod.pixelmon.battles.attacks.EffectBase
modifiers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
addStatus
(PixelmonWrapper user, PixelmonWrapper target, Attack attack, boolean showMessage, String alreadyMessage, String addMessage) Adds the status to the target if possible.protected boolean
Checks if the Pokémon already has the status.boolean
isStatus
(StatusType type) static StatusPersist
readStatusFromNBT
(net.minecraft.nbt.CompoundTag nbt) Reads the Pokémon's status from NBT.abstract StatusPersist
restoreFromNBT
(net.minecraft.nbt.CompoundTag nbt) Loads the status from NBT.void
writeToNBT
(net.minecraft.nbt.CompoundTag nbt) Writes the status to NBT.Methods inherited from class com.pixelmonmod.pixelmon.battles.status.StatusBase
adjustCritStage, allowsStatChange, applyBeforeEffect, applyEffect, applyEffectOnSwitch, applyEndOfBattleEffect, applyRepeatedEffect, applySwitchOutEffect, canAttackThisTurn, cantMiss, copy, getCureMessage, getCureMessageItem, getNewInstance, ignoreStatus, isImmune, isTeamStatus, isWholeTeamStatus, modifyBaseStats, modifyDamageIncludeFixed, modifyEffectiveTypes, modifyMoveEffectChanceTarget, modifyMoveEffectChanceUser, modifyPowerAndAccuracyTarget, modifyPowerAndAccuracyUser, modifyStats, modifyStatsCancellable, modifyWeight, onAttackEnd, onAttackUsed, onDamageReceived, onDynamaxTriggered, onEndOfAttackersTurn, onEndOfTurn, onFormChanged, redirectAttack, skipsTurn, stopsEvolution, stopsForcedSwitches, stopsIncomingAttack, stopsIncomingAttackMessage, stopsIncomingAttackUser, stopsSelfStatusMove, stopsStatusChange, stopsSwitching
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
-
Constructor Details
-
StatusPersist
Initializes the status.- Parameters:
type
- The status's type.
-
-
Method Details
-
writeToNBT
public void writeToNBT(net.minecraft.nbt.CompoundTag nbt) Writes the status to NBT.- Parameters:
nbt
- The NBT tag to write to.
-
restoreFromNBT
Loads the status from NBT.- Parameters:
nbt
- The NBT tag to read from.- Returns:
- A new instance of the status.
-
readStatusFromNBT
Reads the Pokémon's status from NBT.- Parameters:
nbt
- The NBT tag to read from.- Returns:
- The status read from NBT.
-
addStatus
protected boolean addStatus(PixelmonWrapper user, PixelmonWrapper target, Attack attack, boolean showMessage, String alreadyMessage, String addMessage) Adds the status to the target if possible.- Parameters:
user
- The Pokémon causing the status.target
- The Pokémon to add the status to.attack
- The move causing the status.showMessage
- Whether to show messages depending on what occurs.alreadyMessage
- The message to show if the target already has the status.addMessage
- The message to show if the status is added successfully.- Returns:
- Whether the status was afflicted successfully.
-
isStatus
-
alreadyHasStatus
Checks if the Pokémon already has the status.- Parameters:
pw
- The Pokémon to check.- Returns:
- Whether the Pokémon already has the status.
-