public abstract class Weather extends GlobalStatusBase
Modifier and Type | Field and Description |
---|---|
boolean |
extreme |
protected boolean |
isOverworldWeather
Whether this weather was created due to the current weather in the overworld.
|
protected java.lang.String |
langContinue
The lang string to display each turn the weather is in effect.
|
protected java.lang.String |
langEnd
The lang string to display when the weather ends.
|
protected java.lang.String |
langStart
The lang string to display when the weather starts.
|
protected int |
turnsToGo
The amount of turns of the weather remaining.
|
protected EnumHeldItems |
weatherRock
The held item that increases the duration of the weather.
|
type
modifiers
Constructor and Description |
---|
Weather(StatusType type,
int turnsToGo,
EnumHeldItems weatherRock,
java.lang.String langStart,
java.lang.String langContinue,
java.lang.String langEnd,
boolean extreme,
boolean isOverworldWeather)
Initializes a weather condition.
|
Modifier and Type | Method and Description |
---|---|
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 weather.
|
boolean |
getIsOverworldWeather() |
java.lang.String |
getLangContinue() |
protected abstract Weather |
getNewInstance(int turns)
Gets a new instance of the subclass.
|
int |
getRemainingTurns() |
void |
setStartTurns(PixelmonWrapper user)
Sets the number of turns that the weather will last for according to the user.
|
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
protected EnumHeldItems weatherRock
protected transient java.lang.String langStart
protected transient java.lang.String langContinue
protected transient java.lang.String langEnd
public transient boolean extreme
protected transient boolean isOverworldWeather
public Weather(StatusType type, int turnsToGo, EnumHeldItems weatherRock, java.lang.String langStart, java.lang.String langContinue, java.lang.String langEnd, boolean extreme, boolean isOverworldWeather)
type
- The weather's type.weatherRock
- The held item that increases the duration of the weather.langStart
- The lang string to display when the weather starts.langContinue
- The lang string to display each turn the weather is in effect.langEnd
- The lang string to display when the weather ends.public void applyEffect(PixelmonWrapper user, PixelmonWrapper target)
EffectBase
applyEffect
in class StatusBase
user
- The move's user.target
- The move's target.public void setStartTurns(PixelmonWrapper user)
user
- The Pokémon initiating the weather.public int getRemainingTurns()
public boolean getIsOverworldWeather()
protected abstract Weather getNewInstance(int turns)
turns
- The number of turns that the weather will last for.public void applyRepeatedEffect(GlobalStatusController global)
GlobalStatusBase
applyRepeatedEffect
in class GlobalStatusBase
global
- The battle's global status controller.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 abstract int countBenefits(PixelmonWrapper user, PixelmonWrapper target)
user
- The Pokémon using the weather move.target
- The Pokémon to count benefits for.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getLangContinue()