Record Class DynamaxShieldRaidStrategy
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.raids.dynamax.strategy.DynamaxShieldRaidStrategy
- All Implemented Interfaces:
RaidStrategy,ShieldRaidStrategy
public record DynamaxShieldRaidStrategy(float damageMultiplier, float flatDamageReduction, Set<StatusType> blockedStatuses)
extends Record
implements ShieldRaidStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<DynamaxShieldRaidStrategy> -
Constructor Summary
ConstructorsConstructorDescriptionDynamaxShieldRaidStrategy(float damageMultiplier, float flatDamageReduction, List<StatusType> blockedStatuses) DynamaxShieldRaidStrategy(float damageMultiplier, float flatDamageReduction, Set<StatusType> blockedStatuses) Creates an instance of aDynamaxShieldRaidStrategyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockedStatusesrecord component.booleancanTarget(BattleParticipant boss, PixelmonWrapper user, Attack attack) floatReturns the value of thedamageMultiplierrecord component.final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of theflatDamageReductionrecord component.final inthashCode()Returns a hash code value for this object.floatmodifyDamage(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType) voidonFailedAttack(BattleParticipant boss, PixelmonWrapper user, Attack attack) voidonOHKO(BattleParticipant boss, PixelmonWrapper user, Attack attack) voidonRaidStart(BattleParticipant boss) Called when the raid boss participant is initialized for battle.voidonShieldsRaisedFromDamage(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType) voidvoidshieldsHit(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType) booleanshouldBlockStatus(BattleParticipant boss, StatusBase status) booleanshouldFail(BattleParticipant boss, Attack attack) booleanbooleanshouldRaiseShieldsFromDamage(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType) 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.RaidStrategy
onBattleAction, onBossAttack, onPokemonFainted, onPokemonSwitchIn, onRaidEnd, onTakeTurn, onUseAttackPost, shouldKeepFaintedPokemon, shouldSkipTurnAgainstOpponentMethods inherited from interface com.pixelmonmod.pixelmon.battles.raids.strategy.ShieldRaidStrategy
areShieldsUp, blocksTriggeringDamage, onAddStatus, onBossDamaged, onTargeted, onTurnEnd, onUseAttackOther, shieldState, update
-
Field Details
-
CODEC
-
-
Constructor Details
-
DynamaxShieldRaidStrategy
public DynamaxShieldRaidStrategy(float damageMultiplier, float flatDamageReduction, List<StatusType> blockedStatuses) -
DynamaxShieldRaidStrategy
public DynamaxShieldRaidStrategy(float damageMultiplier, float flatDamageReduction, Set<StatusType> blockedStatuses) Creates an instance of aDynamaxShieldRaidStrategyrecord class.- Parameters:
damageMultiplier- the value for thedamageMultiplierrecord componentflatDamageReduction- the value for theflatDamageReductionrecord componentblockedStatuses- the value for theblockedStatusesrecord 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.
-
shouldRaiseShields
- Specified by:
shouldRaiseShieldsin interfaceShieldRaidStrategy
-
shouldRaiseShieldsFromDamage
public boolean shouldRaiseShieldsFromDamage(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType) - Specified by:
shouldRaiseShieldsFromDamagein interfaceShieldRaidStrategy
-
raiseShields
- Specified by:
raiseShieldsin interfaceShieldRaidStrategy
-
onShieldsRaisedFromDamage
public void onShieldsRaisedFromDamage(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType) - Specified by:
onShieldsRaisedFromDamagein interfaceShieldRaidStrategy
-
modifyDamage
public float modifyDamage(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType) - Specified by:
modifyDamagein interfaceShieldRaidStrategy
-
shieldsHit
public void shieldsHit(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType) - Specified by:
shieldsHitin interfaceShieldRaidStrategy
-
onOHKO
- Specified by:
onOHKOin interfaceShieldRaidStrategy
-
shouldFail
- Specified by:
shouldFailin interfaceShieldRaidStrategy
-
onFailedAttack
- Specified by:
onFailedAttackin interfaceShieldRaidStrategy
-
canTarget
- Specified by:
canTargetin interfaceShieldRaidStrategy
-
shouldBlockStatus
- Specified by:
shouldBlockStatusin interfaceShieldRaidStrategy
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
damageMultiplier
public float damageMultiplier()Returns the value of thedamageMultiplierrecord component.- Returns:
- the value of the
damageMultiplierrecord component
-
flatDamageReduction
public float flatDamageReduction()Returns the value of theflatDamageReductionrecord component.- Returns:
- the value of the
flatDamageReductionrecord component
-
blockedStatuses
Returns the value of theblockedStatusesrecord component.- Returns:
- the value of the
blockedStatusesrecord component
-