Record Class TeraReviveRaidStrategy

java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.raids.tera.strategy.TeraReviveRaidStrategy
All Implemented Interfaces:
RaidStrategy, ReviveRaidStrategy

public record TeraReviveRaidStrategy(int baseReviveSeconds, int extraSecondsPerFaint, int maxReviveSeconds) extends Record implements ReviveRaidStrategy
  • Field Details

  • Constructor Details

    • TeraReviveRaidStrategy

      public TeraReviveRaidStrategy()
    • TeraReviveRaidStrategy

      public TeraReviveRaidStrategy(int baseReviveSeconds, int extraSecondsPerFaint, int maxReviveSeconds)
      Creates an instance of a TeraReviveRaidStrategy record class.
      Parameters:
      baseReviveSeconds - the value for the baseReviveSeconds record component
      extraSecondsPerFaint - the value for the extraSecondsPerFaint record component
      maxReviveSeconds - the value for the maxReviveSeconds 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.
    • update

      public void update(BattleParticipant boss)
      Description copied from interface: RaidStrategy
      Called from the raid boss participant tick.

      Use this for real-time behavior that is not tied to turn boundaries, such as Tera Raid timers or delayed revival.

      Specified by:
      update in interface RaidStrategy
      Specified by:
      update in interface ReviveRaidStrategy
      Parameters:
      boss - The raid boss participant.
    • onTurnEnd

      public void onTurnEnd(BattleParticipant boss)
      Description copied from interface: RaidStrategy
      Called when a battle turn ends for the raid boss participant.
      Specified by:
      onTurnEnd in interface RaidStrategy
      Specified by:
      onTurnEnd in interface ReviveRaidStrategy
      Parameters:
      boss - The raid boss participant.
    • onPokemonFainted

      public void onPokemonFainted(BattleParticipant boss, PixelmonWrapper fainted)
      Description copied from interface: RaidStrategy
      Called when a Pokemon on the opposing side faints during the raid.
      Specified by:
      onPokemonFainted in interface RaidStrategy
      Parameters:
      boss - The raid boss participant.
      fainted - The Pokemon that fainted.
    • shouldKeepFaintedPokemon

      public boolean shouldKeepFaintedPokemon(BattleParticipant boss, BattleParticipant opponent, PixelmonWrapper fainted)
      Description copied from interface: RaidStrategy
      Called when an opponent faints and the battle controller is deciding whether the fainted Pokemon should remain active instead of being removed.
      Specified by:
      shouldKeepFaintedPokemon in interface RaidStrategy
      Parameters:
      boss - The raid boss participant.
      opponent - The participant whose Pokemon fainted.
      fainted - The fainted Pokemon.
      Returns:
      true if the fainted Pokemon should remain active.
    • shouldSkipTurnAgainstOpponent

      public boolean shouldSkipTurnAgainstOpponent(BattleParticipant boss, BattleParticipant opponent, PixelmonWrapper bossPokemon)
      Description copied from interface: RaidStrategy
      Called when the raid boss's lane participant is deciding whether to skip its turn against a specific opponent.
      Specified by:
      shouldSkipTurnAgainstOpponent in interface RaidStrategy
      Parameters:
      boss - The raid boss participant.
      opponent - The opposing lane participant.
      bossPokemon - The boss Pokemon in that lane.
      Returns:
      true if the boss should skip this lane turn.
    • shouldRevive

      public boolean shouldRevive(BattleParticipant opponent)
      Specified by:
      shouldRevive in interface ReviveRaidStrategy
    • revive

      public void revive(BattleParticipant opponent)
      Specified by:
      revive in interface ReviveRaidStrategy
    • 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.
    • baseReviveSeconds

      public int baseReviveSeconds()
      Returns the value of the baseReviveSeconds record component.
      Returns:
      the value of the baseReviveSeconds record component
    • extraSecondsPerFaint

      public int extraSecondsPerFaint()
      Returns the value of the extraSecondsPerFaint record component.
      Returns:
      the value of the extraSecondsPerFaint record component
    • maxReviveSeconds

      public int maxReviveSeconds()
      Returns the value of the maxReviveSeconds record component.
      Returns:
      the value of the maxReviveSeconds record component