パッケージ mechanics.buff

クラス ActiveCharacterBuff

java.lang.Object
mechanics.buff.Buff
mechanics.buff.ActiveCharacterBuff

public class ActiveCharacterBuff extends Buff
A Buff that only applies its stat bonuses when a specific character is the currently active (on-field) character.

This is used for buffs whose description reads "while on the field", such as Ineffa's Reconstruction Protocol passive which gives EM to each party member only while they are active.

  • コンストラクタの詳細

    • ActiveCharacterBuff

      public ActiveCharacterBuff(String name, double duration, double currentTime, CombatSimulator sim, Character owner, Consumer<StatsContainer> effect)
      Creates a time-limited buff that is conditional on the owner being active.
      パラメータ:
      name - display name used for logging and de-duplication
      duration - how long the buff lasts in simulation seconds
      currentTime - simulation time at which the buff starts
      sim - the combat simulator used to query the active character
      owner - the character who must be on-field for the buff to apply
      effect - lambda that writes stat bonuses into the provided container
  • メソッドの詳細

    • applyStats

      protected void applyStats(StatsContainer stats, double currentTime)
      Applies the effect lambda only if owner is the currently active character in the simulation.
      定義:
      applyStats クラス内 Buff
      パラメータ:
      stats - the stats container to modify
      currentTime - current simulation time in seconds (unused by this implementation)