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 Details

  • Constructor Details

    • TeraShieldRaidStrategy

      public TeraShieldRaidStrategy(float shieldHpThreshold, int shieldTimeThresholdSeconds, float shieldHealth, int shieldSegments, float normalDamageMultiplier, float terastallizedDamageMultiplier, float matchingTeraDamageMultiplier)
      Creates an instance of a TeraShieldRaidStrategy record class.
      Parameters:
      shieldHpThreshold - the value for the shieldHpThreshold record component
      shieldTimeThresholdSeconds - the value for the shieldTimeThresholdSeconds record component
      shieldHealth - the value for the shieldHealth record component
      shieldSegments - the value for the shieldSegments record component
      normalDamageMultiplier - the value for the normalDamageMultiplier record component
      terastallizedDamageMultiplier - the value for the terastallizedDamageMultiplier record component
      matchingTeraDamageMultiplier - the value for the matchingTeraDamageMultiplier record component
  • Method Details

    • type

      public RaidStrategyType<?> type()
      Description copied from interface: RaidStrategy
      Gets the registered type used to serialize and deserialize this strategy.
      Specified by:
      type in interface RaidStrategy
      Returns:
      The strategy type.
    • onRaidStart

      public void onRaidStart(BattleParticipant boss)
      Description copied from interface: RaidStrategy
      Called 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:
      onRaidStart in interface RaidStrategy
      Parameters:
      boss - The raid boss participant.
    • onUseAttackOther

      public boolean onUseAttackOther(BattleParticipant boss, BattleParticipant user, PixelmonWrapper attacker, Attack attack)
      Description copied from interface: RaidStrategy
      Called when another participant attempts to use an attack while the raid boss is present.

      Return true when the strategy handled or blocked the attack. This prevents later strategies in the composite from also handling the same attack.

      Specified by:
      onUseAttackOther in interface RaidStrategy
      Specified by:
      onUseAttackOther in interface ShieldRaidStrategy
      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

      public boolean shouldRaiseShields(BattleParticipant boss)
      Specified by:
      shouldRaiseShields in interface ShieldRaidStrategy
    • shouldRaiseShieldsFromDamage

      public boolean shouldRaiseShieldsFromDamage(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType)
      Specified by:
      shouldRaiseShieldsFromDamage in interface ShieldRaidStrategy
    • raiseShields

      public void raiseShields(BattleParticipant boss)
      Specified by:
      raiseShields in interface ShieldRaidStrategy
    • modifyDamage

      public float modifyDamage(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType)
      Specified by:
      modifyDamage in interface ShieldRaidStrategy
    • shieldsHit

      public void shieldsHit(BattleParticipant boss, PixelmonWrapper attacker, float damage, DamageTypeEnum damageType)
      Specified by:
      shieldsHit in interface ShieldRaidStrategy
    • blocksTriggeringDamage

      public boolean blocksTriggeringDamage(BattleParticipant boss)
      Specified by:
      blocksTriggeringDamage in interface ShieldRaidStrategy
    • onOHKO

      public void onOHKO(BattleParticipant boss, PixelmonWrapper user, Attack attack)
      Specified by:
      onOHKO in interface ShieldRaidStrategy
    • shouldFail

      public boolean shouldFail(BattleParticipant boss, Attack attack)
      Specified by:
      shouldFail in interface ShieldRaidStrategy
    • onFailedAttack

      public void onFailedAttack(BattleParticipant boss, PixelmonWrapper user, Attack attack)
      Specified by:
      onFailedAttack in interface ShieldRaidStrategy
    • canTarget

      public boolean canTarget(BattleParticipant boss, PixelmonWrapper user, Attack attack)
      Specified by:
      canTarget in interface ShieldRaidStrategy
    • shouldBlockStatus

      public boolean shouldBlockStatus(BattleParticipant boss, StatusBase status)
      Specified by:
      shouldBlockStatus in interface ShieldRaidStrategy
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • shieldHpThreshold

      public float shieldHpThreshold()
      Returns the value of the shieldHpThreshold record component.
      Returns:
      the value of the shieldHpThreshold record component
    • shieldTimeThresholdSeconds

      public int shieldTimeThresholdSeconds()
      Returns the value of the shieldTimeThresholdSeconds record component.
      Returns:
      the value of the shieldTimeThresholdSeconds record component
    • shieldHealth

      public float shieldHealth()
      Returns the value of the shieldHealth record component.
      Returns:
      the value of the shieldHealth record component
    • shieldSegments

      public int shieldSegments()
      Returns the value of the shieldSegments record component.
      Returns:
      the value of the shieldSegments record component
    • normalDamageMultiplier

      public float normalDamageMultiplier()
      Returns the value of the normalDamageMultiplier record component.
      Returns:
      the value of the normalDamageMultiplier record component
    • terastallizedDamageMultiplier

      public float terastallizedDamageMultiplier()
      Returns the value of the terastallizedDamageMultiplier record component.
      Returns:
      the value of the terastallizedDamageMultiplier record component
    • matchingTeraDamageMultiplier

      public float matchingTeraDamageMultiplier()
      Returns the value of the matchingTeraDamageMultiplier record component.
      Returns:
      the value of the matchingTeraDamageMultiplier record component