public abstract class Terrain extends GlobalStatusBase
Modifier and Type | Field and Description |
---|---|
java.lang.String |
langEnd
The lang string to display when the terrain ends.
|
java.lang.String |
langStart
The lang string to display when the terrain starts.
|
protected int |
turnsToGo
The amount of turns of the terrain remaining.
|
type
modifiers
Modifier | Constructor and Description |
---|---|
protected |
Terrain(StatusType type,
int turnsToGo,
java.lang.String langStart,
java.lang.String langEnd) |
|
Terrain(StatusType type,
java.lang.String langStart,
java.lang.String langEnd,
boolean extended)
Initializes a terrain effect.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
affectsPokemon(PixelmonWrapper pw)
Checks if the terrain can affect a Pokémon.
|
void |
applyEffect(PixelmonWrapper user,
PixelmonWrapper target)
Causes various effects during the move.
|
protected void |
applyRepeatedEffect(BattleController bc)
Triggers at the end of every turn.
|
void |
applyRepeatedEffect(GlobalStatusController global)
Triggers at the end of every turn.
|
protected abstract int |
countBenefits(PixelmonWrapper user,
PixelmonWrapper target)
Counts the number of ways that the target Pokémon benefits from the terrain.
|
abstract Terrain |
getNewInstance()
Gets a new instance of the subclass.
|
int |
getRemainingTurns() |
abstract Terrain |
getTerrainType() |
abstract Element |
getTypingForTerrain() |
void |
setTurns(int turns) |
java.lang.String |
toString() |
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.
|
ignoreWeather, isTerrain, isWeather
allowsStatChange, applyBeforeEffect, applyEffectOnSwitch, applyEndOfBattleEffect, applyRepeatedEffect, applySwitchOutEffect, canAttackThisTurn, cantMiss, copy, getCureMessage, getCureMessageItem, getEffectiveTypes, getNewInstance, ignoreStatus, isImmune, isTeamStatus, 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
protected transient int turnsToGo
public java.lang.String langStart
public java.lang.String langEnd
public Terrain(StatusType type, java.lang.String langStart, java.lang.String langEnd, boolean extended)
type
- The terrain's type.langStart
- The lang string to display when the terrain starts.langEnd
- The lang string to display when the terrain ends.protected Terrain(StatusType type, int turnsToGo, java.lang.String langStart, java.lang.String langEnd)
public void setTurns(int turns)
public void applyEffect(PixelmonWrapper user, PixelmonWrapper target)
EffectBase
applyEffect
in class StatusBase
user
- The move's user.target
- The move's target.public abstract Terrain getNewInstance()
@Nonnull public abstract Terrain getTerrainType()
public abstract Element getTypingForTerrain()
public void applyRepeatedEffect(GlobalStatusController global)
GlobalStatusBase
applyRepeatedEffect
in class GlobalStatusBase
global
- The battle's global status controller.public int getRemainingTurns()
protected void applyRepeatedEffect(BattleController bc)
bc
- The battle that the weather is in.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.protected boolean affectsPokemon(PixelmonWrapper pw)
pw
- The Pokémon to check for being affected.protected abstract int countBenefits(PixelmonWrapper user, PixelmonWrapper target)
user
- The Pokémon using the terrain move.target
- The Pokémon to count benefits for.public java.lang.String toString()
toString
in class java.lang.Object