Class Weather
java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.EffectBase
com.pixelmonmod.pixelmon.battles.status.StatusBase
com.pixelmonmod.pixelmon.battles.status.GlobalStatusBase
com.pixelmonmod.pixelmon.battles.status.Weather
A type of weather condition in battle.
-
Field Summary
Modifier and TypeFieldDescriptionboolean
protected boolean
Whether this weather was created due to the current weather in the overworld.protected String
The lang string to display each turn the weather is in effect.protected String
The lang string to display when the weather ends.protected String
The lang string to display when the weather starts.protected int
The amount of turns of the weather remaining.protected EnumHeldItems
The held item that increases the duration of the weather.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
ConstructorDescriptionWeather
(StatusType type, int turnsToGo, EnumHeldItems weatherRock, String langStart, String langContinue, String langEnd, boolean extreme, boolean isOverworldWeather) Initializes a weather condition. -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyEffect
(PixelmonWrapper user, PixelmonWrapper target) Causes various effects during the move.protected void
Triggers at the end of every turn.void
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
protected abstract Weather
getNewInstance
(int turns) Gets a new instance of the subclass.int
void
setStartTurns
(PixelmonWrapper user) Sets the number of turns that the weather will last for according to the user.toString()
void
weightEffect
(PixelmonWrapper pw, MoveChoice userChoice, List<MoveChoice> userChoices, List<MoveChoice> bestUserChoices, List<MoveChoice> opponentChoices, List<MoveChoice> bestOpponentChoices) Determines a weight for the move that has this effect.Methods inherited from class com.pixelmonmod.pixelmon.battles.status.GlobalStatusBase
applyEffectAfterStatus, ignoreWeather, isTerrain, isWeather
Methods inherited from class com.pixelmonmod.pixelmon.battles.status.StatusBase
adjustCritStage, allowsStatChange, applyBeforeEffect, 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
-
Field Details
-
turnsToGo
protected transient int turnsToGoThe amount of turns of the weather remaining. -
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. -
extreme
public transient boolean extreme -
isOverworldWeather
protected transient boolean isOverworldWeatherWhether this weather was created due to the current weather in the overworld.
-
-
Constructor Details
-
Weather
public Weather(StatusType type, int turnsToGo, EnumHeldItems weatherRock, String langStart, String langContinue, String langEnd, boolean extreme, boolean isOverworldWeather) Initializes a weather condition.- Parameters:
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.
-
-
Method Details
-
applyEffect
Description copied from class:EffectBase
Causes various effects during the move.- Overrides:
applyEffect
in classStatusBase
- Parameters:
user
- The move's user.target
- The move's target.
-
setStartTurns
Sets the number of turns that the weather will last for according to the user.- Parameters:
user
- The Pokémon initiating the weather.
-
getRemainingTurns
public int getRemainingTurns()- Returns:
- The number of turns remaining for this status.
-
getIsOverworldWeather
public boolean getIsOverworldWeather() -
getNewInstance
Gets a new instance of the subclass.- Parameters:
turns
- The number of turns that the weather will last for.- Returns:
- A new instance of the subclass.
-
applyRepeatedEffect
Description copied from class:GlobalStatusBase
Triggers at the end of every turn.- Overrides:
applyRepeatedEffect
in classGlobalStatusBase
- Parameters:
global
- The battle's global status controller.
-
applyRepeatedEffect
Triggers at the end of every turn.- Parameters:
bc
- The battle that the weather is in.
-
weightEffect
public void weightEffect(PixelmonWrapper pw, MoveChoice userChoice, List<MoveChoice> userChoices, List<MoveChoice> bestUserChoices, List<MoveChoice> opponentChoices, List<MoveChoice> bestOpponentChoices) Description copied from class:EffectBase
Determines a weight for the move that has this effect. Used for battle AI.- Overrides:
weightEffect
in classEffectBase
- Parameters:
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.
-
countBenefits
Counts the number of ways that the target Pokémon benefits from the weather.- Parameters:
user
- The Pokémon using the weather move.target
- The Pokémon to count benefits for.- Returns:
- The number of ways that the target Pokémon benefits from the weather.
-
toString
-
getLangContinue
-