Record Class TeraShieldRaidStrategy
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.raids.tera.strategy.TeraShieldRaidStrategy
- All Implemented Interfaces:
RaidStrategy,ShieldRaidStrategy
public record TeraShieldRaidStrategy(float shieldHpThreshold, int shieldTimeThresholdSeconds, float shieldHealth, int shieldSegments, float normalDamageMultiplier, float terastallizedDamageMultiplier, float matchingTeraDamageMultiplier)
extends Record
implements ShieldRaidStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<TeraShieldRaidStrategy> -
Constructor Summary
ConstructorsConstructorDescriptionTeraShieldRaidStrategy(float shieldHpThreshold, int shieldTimeThresholdSeconds, float shieldHealth, int shieldSegments, float normalDamageMultiplier, float terastallizedDamageMultiplier, float matchingTeraDamageMultiplier) Creates an instance of aTeraShieldRaidStrategyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancanTarget(BattleParticipant boss, PixelmonWrapper user, Attack attack) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of thematchingTeraDamageMultiplierrecord component.floatmodifyDamage(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType) floatReturns the value of thenormalDamageMultiplierrecord component.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.booleanonUseAttackOther(BattleParticipant boss, BattleParticipant user, PixelmonWrapper attacker, Attack attack) Called when another participant attempts to use an attack while the raid boss is present.voidfloatReturns the value of theshieldHealthrecord component.floatReturns the value of theshieldHpThresholdrecord component.intReturns the value of theshieldSegmentsrecord component.voidshieldsHit(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType) intReturns the value of theshieldTimeThresholdSecondsrecord component.booleanshouldBlockStatus(BattleParticipant boss, StatusBase status) booleanshouldFail(BattleParticipant boss, Attack attack) booleanbooleanshouldRaiseShieldsFromDamage(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType) floatReturns the value of theterastallizedDamageMultiplierrecord component.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, onAddStatus, onBossDamaged, onShieldsRaisedFromDamage, onTargeted, onTurnEnd, shieldState, update
-
Field Details
-
CODEC
-
-
Constructor Details
-
TeraShieldRaidStrategy
public TeraShieldRaidStrategy(float shieldHpThreshold, int shieldTimeThresholdSeconds, float shieldHealth, int shieldSegments, float normalDamageMultiplier, float terastallizedDamageMultiplier, float matchingTeraDamageMultiplier) Creates an instance of aTeraShieldRaidStrategyrecord class.- Parameters:
shieldHpThreshold- the value for theshieldHpThresholdrecord componentshieldTimeThresholdSeconds- the value for theshieldTimeThresholdSecondsrecord componentshieldHealth- the value for theshieldHealthrecord componentshieldSegments- the value for theshieldSegmentsrecord componentnormalDamageMultiplier- the value for thenormalDamageMultiplierrecord componentterastallizedDamageMultiplier- the value for theterastallizedDamageMultiplierrecord componentmatchingTeraDamageMultiplier- the value for thematchingTeraDamageMultiplierrecord 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.
-
onUseAttackOther
public boolean onUseAttackOther(BattleParticipant boss, BattleParticipant user, PixelmonWrapper attacker, Attack attack) Description copied from interface:RaidStrategyCalled when another participant attempts to use an attack while the raid boss is present.Return
truewhen the strategy handled or blocked the attack. This prevents later strategies in the composite from also handling the same attack.- Specified by:
onUseAttackOtherin interfaceRaidStrategy- Specified by:
onUseAttackOtherin interfaceShieldRaidStrategy- Parameters:
boss- The raid boss participant.user- The participant using the attack.attacker- The Pokemon using the attack.attack- The attack being used.- Returns:
- Whether this strategy handled or blocked the attack.
-
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
-
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
-
blocksTriggeringDamage
- Specified by:
blocksTriggeringDamagein 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. All components in this record class are compared with '=='. -
shieldHpThreshold
public float shieldHpThreshold()Returns the value of theshieldHpThresholdrecord component.- Returns:
- the value of the
shieldHpThresholdrecord component
-
shieldTimeThresholdSeconds
public int shieldTimeThresholdSeconds()Returns the value of theshieldTimeThresholdSecondsrecord component.- Returns:
- the value of the
shieldTimeThresholdSecondsrecord component
-
shieldHealth
public float shieldHealth()Returns the value of theshieldHealthrecord component.- Returns:
- the value of the
shieldHealthrecord component
-
shieldSegments
public int shieldSegments()Returns the value of theshieldSegmentsrecord component.- Returns:
- the value of the
shieldSegmentsrecord component
-
normalDamageMultiplier
public float normalDamageMultiplier()Returns the value of thenormalDamageMultiplierrecord component.- Returns:
- the value of the
normalDamageMultiplierrecord component
-
terastallizedDamageMultiplier
public float terastallizedDamageMultiplier()Returns the value of theterastallizedDamageMultiplierrecord component.- Returns:
- the value of the
terastallizedDamageMultiplierrecord component
-
matchingTeraDamageMultiplier
public float matchingTeraDamageMultiplier()Returns the value of thematchingTeraDamageMultiplierrecord component.- Returns:
- the value of the
matchingTeraDamageMultiplierrecord component
-