public class Sleep extends StatusPersist
| Modifier and Type | Field and Description |
|---|---|
int |
effectTurns
The number of turns left for sleep to last.
|
typemodifiers| Constructor and Description |
|---|
Sleep()
Initializes a new sleep with a random duration.
|
Sleep(int i)
Initializes a new sleep with a specified duration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyEffect(PixelmonWrapper user,
PixelmonWrapper target)
Causes various effects during the move.
|
boolean |
canAttackThisTurn(PixelmonWrapper user,
Attack a)
Determines whether the statused Pokémon can attack.
|
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.
|
boolean |
isImmune(PixelmonWrapper pokemon)
Checks if the Pokémon is immune to the status.
|
StatusPersist |
restoreFromNBT(net.minecraft.nbt.CompoundNBT nbt)
Loads the status from NBT.
|
static boolean |
sleep(PixelmonWrapper user,
PixelmonWrapper target,
Attack attack,
boolean showMessage)
Puts the Pokémon to sleep if possible.
|
static boolean |
uproarActive(PixelmonWrapper pokemon)
Checks if any Pokémon in battle are using Uproar.
|
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.
|
void |
writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
Writes the status to NBT.
|
addStatus, alreadyHasStatus, isStatus, readStatusFromNBTallowsStatChange, applyBeforeEffect, applyEffectOnSwitch, applyEndOfBattleEffect, applyRepeatedEffect, applySwitchOutEffect, cantMiss, getEffectiveTypes, getNewInstance, ignoreStatus, isTeamStatus, isWholeTeamStatus, modifyBaseStats, modifyDamageIncludeFixed, modifyPowerAndAccuracyTarget, modifyPowerAndAccuracyUser, modifyStats, modifyStatsCancellable, modifyWeight, onAttackEnd, onAttackUsed, onDamageReceived, onEndOfAttackersTurn, onEndOfTurn, redirectAttack, skipsTurn, stopsForcedSwitches, stopsIncomingAttack, stopsIncomingAttackMessage, stopsIncomingAttackUser, stopsSelfStatusMove, stopsStatusChange, stopsSwitchingapplyEarlyEffect, applyEffectAfterAllTargets, applyEffectAfterStatus, applyEffectHitOrMiss, applyEffectStart, applyMissEffect, changeChance, checkChance, dealtDamage, doesPersist, getChance, getWeightWithChance, isChance, modifyDamage, modifyPriority, modifyTypeEffectiveness, modifyTypeEffectivenesspublic transient int effectTurns
public Sleep()
public Sleep(int i)
i - The duration of sleep.public void applyEffect(PixelmonWrapper user, PixelmonWrapper target)
EffectBaseapplyEffect in class StatusBaseuser - The move's user.target - The move's target.public static boolean sleep(PixelmonWrapper user, PixelmonWrapper target, Attack attack, boolean showMessage)
user - The Pokémon causing the sleep.target - The Pokémon to put to sleep.attack - The attack causing the sleep.showMessage - Whether to show messages depending on what occurs.public boolean isImmune(PixelmonWrapper pokemon)
StatusBaseisImmune in class StatusBasepokemon - The Pokémon to check.public boolean canAttackThisTurn(PixelmonWrapper user, Attack a)
StatusBasecanAttackThisTurn in class StatusBaseuser - The statused Pokémon.a - The attack to be used by the Pokémon.public void writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
StatusPersistwriteToNBT in class StatusPersistnbt - The NBT tag to write to.public StatusPersist restoreFromNBT(net.minecraft.nbt.CompoundNBT nbt)
StatusPersistrestoreFromNBT in class StatusPersistnbt - The NBT tag to read from.public static boolean uproarActive(PixelmonWrapper pokemon)
pokemon - A Pokémon in the battle.public StatusBase copy()
StatusBasecopy in class StatusBasepublic java.lang.String getCureMessage()
StatusBasegetCureMessage in class StatusBasepublic java.lang.String getCureMessageItem()
StatusBasegetCureMessageItem in class StatusBasepublic 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)
EffectBaseweightEffect in class EffectBasepw - 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.