Record Class TeraProgressRaidStrategy
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.raids.tera.strategy.TeraProgressRaidStrategy
- All Implemented Interfaces:
RaidStrategy
public record TeraProgressRaidStrategy(int timeLimitSeconds, int faintTimePenaltySeconds)
extends Record
implements RaidStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<TeraProgressRaidStrategy> -
Constructor Summary
ConstructorsConstructorDescriptionTeraProgressRaidStrategy(int timeLimitSeconds, int faintTimePenaltySeconds) Creates an instance of aTeraProgressRaidStrategyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefaintTimePenaltySecondsrecord component.final inthashCode()Returns a hash code value for this object.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.intReturns the value of thetimeLimitSecondsrecord component.final StringtoString()Returns a string representation of this record class.type()Gets the registered type used to serialize and deserialize this strategy.voidupdate(BattleParticipant boss) Called from the raid boss participant tick.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, onTurnEnd, onUseAttackOther, onUseAttackPost, shouldKeepFaintedPokemon, shouldSkipTurnAgainstOpponent
-
Field Details
-
CODEC
-
-
Constructor Details
-
TeraProgressRaidStrategy
public TeraProgressRaidStrategy(int timeLimitSeconds, int faintTimePenaltySeconds) Creates an instance of aTeraProgressRaidStrategyrecord class.- Parameters:
timeLimitSeconds- the value for thetimeLimitSecondsrecord componentfaintTimePenaltySeconds- the value for thefaintTimePenaltySecondsrecord 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.
-
update
Description copied from interface:RaidStrategyCalled from the raid boss participant tick.Use this for real-time behavior that is not tied to turn boundaries, such as Tera Raid timers or delayed revival.
- Specified by:
updatein 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 '=='. -
timeLimitSeconds
public int timeLimitSeconds()Returns the value of thetimeLimitSecondsrecord component.- Returns:
- the value of the
timeLimitSecondsrecord component
-
faintTimePenaltySeconds
public int faintTimePenaltySeconds()Returns the value of thefaintTimePenaltySecondsrecord component.- Returns:
- the value of the
faintTimePenaltySecondsrecord component
-