Record Class DynamaxProgressRaidStrategy
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.raids.dynamax.strategy.DynamaxProgressRaidStrategy
- All Implemented Interfaces:
RaidStrategy
public record DynamaxProgressRaidStrategy(int lives, int turnLimit, float desperateHpThreshold)
extends Record
implements RaidStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<DynamaxProgressRaidStrategy> -
Constructor Summary
ConstructorsConstructorDescriptionDynamaxProgressRaidStrategy(int lives, int turnLimit, float desperateHpThreshold) Creates an instance of aDynamaxProgressRaidStrategyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thedesperateHpThresholdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intlives()Returns the value of thelivesrecord component.voidonPokemonFainted(BattleParticipant boss, PixelmonWrapper fainted) Called when a Pokemon on the opposing side faints during the raid.voidonRaidStart(BattleParticipant boss) Called when the raid boss participant is initialized for battle.voidonTurnEnd(BattleParticipant boss) Called when a battle turn ends for the raid boss participant.final StringtoString()Returns a string representation of this record class.intReturns the value of theturnLimitrecord component.type()Gets the registered type used to serialize and deserialize this strategy.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.pixelmonmod.pixelmon.battles.raids.strategy.RaidStrategy
onAddStatus, onBattleAction, onBossAttack, onBossDamaged, onPokemonSwitchIn, onRaidEnd, onTakeTurn, onTargeted, onUseAttackOther, onUseAttackPost, shouldKeepFaintedPokemon, shouldSkipTurnAgainstOpponent, update
-
Field Details
-
CODEC
-
-
Constructor Details
-
DynamaxProgressRaidStrategy
public DynamaxProgressRaidStrategy(int lives, int turnLimit, float desperateHpThreshold) Creates an instance of aDynamaxProgressRaidStrategyrecord class.- Parameters:
lives- the value for thelivesrecord componentturnLimit- the value for theturnLimitrecord componentdesperateHpThreshold- the value for thedesperateHpThresholdrecord component
-
-
Method Details
-
type
Description copied from interface:RaidStrategyGets the registered type used to serialize and deserialize this strategy.- Specified by:
typein interfaceRaidStrategy- Returns:
- The strategy type.
-
onRaidStart
Description copied from interface:RaidStrategyCalled when the raid boss participant is initialized for battle.Use this hook for battle-local setup such as boss modification, applying gimmicks, initializing context state, or preparing cached values.
- Specified by:
onRaidStartin interfaceRaidStrategy- Parameters:
boss- The raid boss participant.
-
onTurnEnd
Description copied from interface:RaidStrategyCalled when a battle turn ends for the raid boss participant.- Specified by:
onTurnEndin interfaceRaidStrategy- Parameters:
boss- The raid boss participant.
-
onPokemonFainted
Description copied from interface:RaidStrategyCalled when a Pokemon on the opposing side faints during the raid.- Specified by:
onPokemonFaintedin interfaceRaidStrategy- Parameters:
boss- The raid boss participant.fainted- The Pokemon that fainted.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
lives
public int lives()Returns the value of thelivesrecord component.- Returns:
- the value of the
livesrecord component
-
turnLimit
public int turnLimit()Returns the value of theturnLimitrecord component.- Returns:
- the value of the
turnLimitrecord component
-
desperateHpThreshold
public float desperateHpThreshold()Returns the value of thedesperateHpThresholdrecord component.- Returns:
- the value of the
desperateHpThresholdrecord component
-