Record Class DynamaxShockwaveStrategy
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.raids.dynamax.strategy.DynamaxShockwaveStrategy
- All Implemented Interfaces:
RaidStrategy,ShockwaveRaidStrategy
public record DynamaxShockwaveStrategy(float shockwaveChance)
extends Record
implements ShockwaveRaidStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<DynamaxShockwaveStrategy> -
Constructor Summary
ConstructorsConstructorDescriptionDynamaxShockwaveStrategy(float shockwaveChance) Creates an instance of aDynamaxShockwaveStrategyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of theshockwaveChancerecord component.booleanshouldUseShockwave(BattleParticipant boss, PixelmonWrapper bossPokemon) final StringtoString()Returns a string representation of this record class.type()Gets the registered type used to serialize and deserialize this strategy.voiduseShockwave(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.RaidStrategy
onAddStatus, onBattleAction, onBossDamaged, onPokemonFainted, onPokemonSwitchIn, onRaidEnd, onRaidStart, onTakeTurn, onTargeted, onTurnEnd, onUseAttackOther, onUseAttackPost, shouldKeepFaintedPokemon, shouldSkipTurnAgainstOpponent, updateMethods inherited from interface com.pixelmonmod.pixelmon.battles.raids.strategy.ShockwaveRaidStrategy
onBossAttack
-
Field Details
-
CODEC
-
-
Constructor Details
-
DynamaxShockwaveStrategy
public DynamaxShockwaveStrategy(float shockwaveChance) Creates an instance of aDynamaxShockwaveStrategyrecord class.- Parameters:
shockwaveChance- the value for theshockwaveChancerecord 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.
-
shouldUseShockwave
- Specified by:
shouldUseShockwavein interfaceShockwaveRaidStrategy
-
useShockwave
- Specified by:
useShockwavein interfaceShockwaveRaidStrategy
-
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 '=='. -
shockwaveChance
public float shockwaveChance()Returns the value of theshockwaveChancerecord component.- Returns:
- the value of the
shockwaveChancerecord component
-