Record Class DynamaxAttackRaidStrategy
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.raids.dynamax.strategy.DynamaxAttackRaidStrategy
- All Implemented Interfaces:
AttackRaidStrategy,RaidStrategy
public record DynamaxAttackRaidStrategy(int attacksPerTurn)
extends Record
implements AttackRaidStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<DynamaxAttackRaidStrategy> -
Constructor Summary
ConstructorsConstructorDescriptionDynamaxAttackRaidStrategy(int attacksPerTurn) Creates an instance of aDynamaxAttackRaidStrategyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theattacksPerTurnrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Gets the registered type used to serialize and deserialize this strategy.voiduseAttacks(BattleParticipant boss, PixelmonWrapper bossPokemon) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.pixelmonmod.pixelmon.battles.raids.strategy.AttackRaidStrategy
onBossAttackMethods inherited from interface com.pixelmonmod.pixelmon.battles.raids.strategy.RaidStrategy
onAddStatus, onBattleAction, onBossDamaged, onPokemonFainted, onPokemonSwitchIn, onRaidEnd, onRaidStart, onTakeTurn, onTargeted, onTurnEnd, onUseAttackOther, onUseAttackPost, shouldKeepFaintedPokemon, shouldSkipTurnAgainstOpponent, update
-
Field Details
-
CODEC
-
-
Constructor Details
-
DynamaxAttackRaidStrategy
public DynamaxAttackRaidStrategy(int attacksPerTurn) Creates an instance of aDynamaxAttackRaidStrategyrecord class.- Parameters:
attacksPerTurn- the value for theattacksPerTurnrecord 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.
-
useAttacks
- Specified by:
useAttacksin interfaceAttackRaidStrategy
-
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 '=='. -
attacksPerTurn
public int attacksPerTurn()Returns the value of theattacksPerTurnrecord component.- Returns:
- the value of the
attacksPerTurnrecord component
-