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
FieldsModifier and TypeFieldDescriptionbooleanprotected booleanWhether this weather was created due to the current weather in the overworld.protected StringThe lang string to display each turn the weather is in effect.protected StringThe lang string to display when the weather ends.protected StringThe lang string to display when the weather starts.protected intThe amount of turns of the weather remaining.protected EnumHeldItemsThe held item that increases the duration of the weather.Fields inherited from class com.pixelmonmod.pixelmon.battles.status.StatusBase
battleTurnGained, turnGained, typeFields inherited from class com.pixelmonmod.pixelmon.battles.attacks.EffectBase
modifiers -
Constructor Summary
ConstructorsConstructorDescriptionWeather(StatusType type, int turnsToGo, EnumHeldItems weatherRock, String langStart, String langContinue, String langEnd, boolean extreme, boolean isOverworldWeather) Initializes a weather condition. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyEffect(PixelmonWrapper user, PixelmonWrapper target) Causes various effects during the move.protected voidTriggers at the end of every turn.voidTriggers at the end of every turn.protected abstract intcountBenefits(PixelmonWrapper user, PixelmonWrapper target) Counts the number of ways that the target Pokémon benefits from the weather.booleanprotected abstract WeathergetNewInstance(int turns) Gets a new instance of the subclass.intvoidsetRemainingTurns(int remainingTurns) Set the amount of remaining turns the weather will last.voidsetStartTurns(PixelmonWrapper user) Sets the number of turns that the weather will last for according to the user.toString()voidweightEffect(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, isWeatherMethods 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, stopsSwitchingMethods 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, 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:EffectBaseCauses various effects during the move.- Overrides:
applyEffectin 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.
-
setRemainingTurns
public void setRemainingTurns(int remainingTurns) Set the amount of remaining turns the weather will last. -
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:GlobalStatusBaseTriggers at the end of every turn.- Overrides:
applyRepeatedEffectin 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:EffectBaseDetermines a weight for the move that has this effect. Used for battle AI.- Overrides:
weightEffectin 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
-