Record Class TeraReviveRaidStrategy
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.raids.tera.strategy.TeraReviveRaidStrategy
- All Implemented Interfaces:
RaidStrategy,ReviveRaidStrategy
public record TeraReviveRaidStrategy(int baseReviveSeconds, int extraSecondsPerFaint, int maxReviveSeconds)
extends Record
implements ReviveRaidStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<TeraReviveRaidStrategy> -
Constructor Summary
ConstructorsConstructorDescriptionTeraReviveRaidStrategy(int baseReviveSeconds, int extraSecondsPerFaint, int maxReviveSeconds) Creates an instance of aTeraReviveRaidStrategyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebaseReviveSecondsrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of theextraSecondsPerFaintrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxReviveSecondsrecord component.voidonPokemonFainted(BattleParticipant boss, PixelmonWrapper fainted) Called when a Pokemon on the opposing side faints during the raid.voidonTurnEnd(BattleParticipant boss) Called when a battle turn ends for the raid boss participant.voidrevive(BattleParticipant opponent) booleanshouldKeepFaintedPokemon(BattleParticipant boss, BattleParticipant opponent, PixelmonWrapper fainted) Called when an opponent faints and the battle controller is deciding whether the fainted Pokemon should remain active instead of being removed.booleanshouldRevive(BattleParticipant opponent) booleanshouldSkipTurnAgainstOpponent(BattleParticipant boss, BattleParticipant opponent, PixelmonWrapper bossPokemon) Called when the raid boss's lane participant is deciding whether to skip its turn against a specific opponent.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, onRaidStart, onTakeTurn, onTargeted, onUseAttackOther, onUseAttackPost
-
Field Details
-
CODEC
-
-
Constructor Details
-
TeraReviveRaidStrategy
public TeraReviveRaidStrategy() -
TeraReviveRaidStrategy
public TeraReviveRaidStrategy(int baseReviveSeconds, int extraSecondsPerFaint, int maxReviveSeconds) Creates an instance of aTeraReviveRaidStrategyrecord class.- Parameters:
baseReviveSeconds- the value for thebaseReviveSecondsrecord componentextraSecondsPerFaint- the value for theextraSecondsPerFaintrecord componentmaxReviveSeconds- the value for themaxReviveSecondsrecord 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.
-
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- Specified by:
updatein interfaceReviveRaidStrategy- 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- Specified by:
onTurnEndin interfaceReviveRaidStrategy- 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.
-
shouldKeepFaintedPokemon
public boolean shouldKeepFaintedPokemon(BattleParticipant boss, BattleParticipant opponent, PixelmonWrapper fainted) Description copied from interface:RaidStrategyCalled when an opponent faints and the battle controller is deciding whether the fainted Pokemon should remain active instead of being removed.- Specified by:
shouldKeepFaintedPokemonin interfaceRaidStrategy- Parameters:
boss- The raid boss participant.opponent- The participant whose Pokemon fainted.fainted- The fainted Pokemon.- Returns:
trueif the fainted Pokemon should remain active.
-
shouldSkipTurnAgainstOpponent
public boolean shouldSkipTurnAgainstOpponent(BattleParticipant boss, BattleParticipant opponent, PixelmonWrapper bossPokemon) Description copied from interface:RaidStrategyCalled when the raid boss's lane participant is deciding whether to skip its turn against a specific opponent.- Specified by:
shouldSkipTurnAgainstOpponentin interfaceRaidStrategy- Parameters:
boss- The raid boss participant.opponent- The opposing lane participant.bossPokemon- The boss Pokemon in that lane.- Returns:
trueif the boss should skip this lane turn.
-
shouldRevive
- Specified by:
shouldRevivein interfaceReviveRaidStrategy
-
revive
- Specified by:
revivein interfaceReviveRaidStrategy
-
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 '=='. -
baseReviveSeconds
public int baseReviveSeconds()Returns the value of thebaseReviveSecondsrecord component.- Returns:
- the value of the
baseReviveSecondsrecord component
-
extraSecondsPerFaint
public int extraSecondsPerFaint()Returns the value of theextraSecondsPerFaintrecord component.- Returns:
- the value of the
extraSecondsPerFaintrecord component
-
maxReviveSeconds
public int maxReviveSeconds()Returns the value of themaxReviveSecondsrecord component.- Returns:
- the value of the
maxReviveSecondsrecord component
-