public abstract class EntryHazard extends StatusBase
Modifier and Type | Field and Description |
---|---|
static java.util.List<java.util.function.Supplier<ImmutableAttack>> |
ENTRY_HAZARDS |
protected int |
numLayers
The current number of layers of the entry hazard present.
|
type
modifiers
Constructor and Description |
---|
EntryHazard(StatusType type,
int maxLayers)
Initializes the entry hazard.
|
Modifier and Type | Method and Description |
---|---|
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 |
applyHazards(PixelmonWrapper user,
PixelmonWrapper target) |
StatusBase |
copy()
If necessary, makes a deep copy of the status.
|
protected void |
doEffect(PixelmonWrapper pw)
Affects a Pokémon when it switches in.
|
protected abstract java.lang.String |
getAffectedMessage()
Gets the lang key for the message displayed when a hazard is triggered.
|
abstract int |
getAIWeight()
Gets the weight per Pokémon that an AI will assign to the move.
|
int |
getDamage(PixelmonWrapper pw)
Returns the amount of damage dealt by the entry hazard.
|
protected abstract java.lang.String |
getFirstLayerMessage()
Gets the lang key for the message displayed when a hazard is first laid.
|
protected java.lang.String |
getMultiLayerMessage()
Gets the lang key for the message displayed when a hazard layer is added to an existing one.
|
abstract EntryHazard |
getNewInstance()
Gets a new instance of the entry hazard.
|
int |
getNumLayers()
Gets the current number of layers of the entry hazard present.
|
protected boolean |
isAirborne(PixelmonWrapper pw)
Checks if the Pokémon is flying over the entry hazard.
|
boolean |
isTeamStatus()
Determines whether the status applies to the Pokémon's position in the battle.
|
protected boolean |
isUnharmed(PixelmonWrapper pw)
Checks if the Pokémon is unharmed by the entry hazard.
|
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.
|
allowsStatChange, applyBeforeEffect, applyEndOfBattleEffect, applyRepeatedEffect, applySwitchOutEffect, canAttackThisTurn, cantMiss, getCureMessage, getCureMessageItem, getEffectiveTypes, getNewInstance, ignoreStatus, isImmune, isWholeTeamStatus, modifyBaseStats, modifyDamageIncludeFixed, modifyPowerAndAccuracyTarget, modifyPowerAndAccuracyUser, modifyStats, modifyStatsCancellable, modifyWeight, onAttackEnd, onAttackUsed, onDamageReceived, onEndOfAttackersTurn, onEndOfTurn, redirectAttack, skipsTurn, stopsForcedSwitches, stopsIncomingAttack, stopsIncomingAttackMessage, stopsIncomingAttackUser, stopsSelfStatusMove, stopsStatusChange, stopsSwitching
applyEarlyEffect, applyEffectAfterAllTargets, applyEffectAfterStatus, applyEffectHitOrMiss, applyEffectStart, applyMissEffect, changeChance, checkChance, dealtDamage, doesPersist, getChance, getWeightWithChance, isChance, modifyDamage, modifyPriority, modifyTypeEffectiveness, modifyTypeEffectiveness
public static java.util.List<java.util.function.Supplier<ImmutableAttack>> ENTRY_HAZARDS
protected transient int numLayers
public EntryHazard(StatusType type, int maxLayers)
type
- The type of entry hazard.maxLayers
- The maximum number of layers of the entry hazard that can be laid.public void applyEffect(PixelmonWrapper user, PixelmonWrapper target)
EffectBase
applyEffect
in class StatusBase
user
- The move's user.target
- The move's target.public void applyHazards(PixelmonWrapper user, PixelmonWrapper target)
public int getNumLayers()
public abstract EntryHazard getNewInstance()
protected abstract java.lang.String getFirstLayerMessage()
protected java.lang.String getMultiLayerMessage()
protected abstract java.lang.String getAffectedMessage()
public boolean isTeamStatus()
StatusBase
isTeamStatus
in class StatusBase
public void applyEffectOnSwitch(PixelmonWrapper pw)
StatusBase
applyEffectOnSwitch
in class StatusBase
pw
- The statused Pokémon.protected void doEffect(PixelmonWrapper pw)
pw
- The Pokémon to affect.public int getDamage(PixelmonWrapper pw)
pw
- The Pokémon being damaged by the entry hazard.public StatusBase copy()
StatusBase
copy
in class StatusBase
protected boolean isAirborne(PixelmonWrapper pw)
pw
- The Pokémon to check.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.public abstract int getAIWeight()
protected boolean isUnharmed(PixelmonWrapper pw)
pw
- The Pokémon to check.