Record Class DynamaxCheerRaidStrategy
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.raids.dynamax.strategy.DynamaxCheerRaidStrategy
- All Implemented Interfaces:
CheerRaidStrategy,RaidStrategy
public record DynamaxCheerRaidStrategy(float cheerSuccessChance)
extends Record
implements CheerRaidStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<DynamaxCheerRaidStrategy> -
Constructor Summary
ConstructorsConstructorDescriptionDynamaxCheerRaidStrategy(float cheerSuccessChance) Creates an instance of aDynamaxCheerRaidStrategyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCheer(BattleParticipant cheerer) voidcheer(BattleParticipant boss, BattleParticipant cheerer) voidcheerFailed(BattleParticipant cheerer) floatReturns the value of thecheerSuccessChancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanonBattleAction(BattleParticipant boss, BattleParticipant actor, BattleAction action) Called when an opposing participant selects a battle action that the raid boss may handle.booleanrollCheerSuccess(BattleParticipant cheerer) final StringtoString()Returns a string representation of this record class.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.CheerRaidStrategy
onTakeTurnMethods inherited from interface com.pixelmonmod.pixelmon.battles.raids.strategy.RaidStrategy
onAddStatus, onBossAttack, onBossDamaged, onPokemonFainted, onPokemonSwitchIn, onRaidEnd, onRaidStart, onTargeted, onTurnEnd, onUseAttackOther, onUseAttackPost, shouldKeepFaintedPokemon, shouldSkipTurnAgainstOpponent, update
-
Field Details
-
CODEC
-
-
Constructor Details
-
DynamaxCheerRaidStrategy
public DynamaxCheerRaidStrategy(float cheerSuccessChance) Creates an instance of aDynamaxCheerRaidStrategyrecord class.- Parameters:
cheerSuccessChance- the value for thecheerSuccessChancerecord 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.
-
canCheer
- Specified by:
canCheerin interfaceCheerRaidStrategy
-
rollCheerSuccess
- Specified by:
rollCheerSuccessin interfaceCheerRaidStrategy
-
cheer
- Specified by:
cheerin interfaceCheerRaidStrategy
-
cheerFailed
- Specified by:
cheerFailedin interfaceCheerRaidStrategy
-
onBattleAction
Description copied from interface:RaidStrategyCalled when an opposing participant selects a battle action that the raid boss may handle.- Specified by:
onBattleActionin interfaceRaidStrategy- Parameters:
boss- The raid boss participant.actor- The participant selecting the action.action- The selected action.- Returns:
trueif this strategy handled the action.
-
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 '=='. -
cheerSuccessChance
public float cheerSuccessChance()Returns the value of thecheerSuccessChancerecord component.- Returns:
- the value of the
cheerSuccessChancerecord component
-