パッケージ simulation.event
クラス PeriodicDamageEvent
java.lang.Object
simulation.event.PeriodicDamageEvent
- すべての実装されたインタフェース:
TimerEvent
A
TimerEvent that fires a repeating AttackAction at a fixed interval
for a defined duration, optionally running an additional callback on each tick.
Typical use-cases: field DoT effects such as Beidou's Stormbreaker lightning, Fischl's Oz shots, Xiangling's Pyronado hits, or any ability that deals repeated damage ticks while another character is on-field.
The event completes when currentTime >= startTime + duration.
-
コンストラクタの概要
コンストラクタコンストラクタ説明PeriodicDamageEvent(String sourceName, AttackAction tickAction, double startTime, double interval, double duration) Constructs a periodic damage event without an additional callback.PeriodicDamageEvent(String sourceName, AttackAction tickAction, double startTime, double interval, double duration, Consumer<CombatSimulator> onTick) Constructs a periodic damage event with an additional per-tick callback. -
メソッドの概要
修飾子とタイプメソッド説明doubleReturns the simulation time at which this event's nextTimerEvent.tick(simulation.CombatSimulator)should fire.booleanisFinished(double currentTime) Returnstruewhen the current simulation time has reached or passed the end of this event's duration (startTime + duration).voidtick(CombatSimulator sim) Executes the tick action viaCombatSimulator.performActionWithoutTimeAdvance(String, AttackAction), then invokes the optional callback, and advancesnextTickTimeby the interval.
-
コンストラクタの詳細
-
PeriodicDamageEvent
public PeriodicDamageEvent(String sourceName, AttackAction tickAction, double startTime, double interval, double duration) Constructs a periodic damage event without an additional callback.- パラメータ:
sourceName- the name of the character owning this event (used for damage attribution)tickAction- theAttackActionto execute on each tick; may benullto skip damage but still run the callbackstartTime- the simulation time of the first tickinterval- the time in seconds between consecutive ticksduration- the total duration in seconds; the event finishes whencurrentTime >= startTime + duration
-
PeriodicDamageEvent
public PeriodicDamageEvent(String sourceName, AttackAction tickAction, double startTime, double interval, double duration, Consumer<CombatSimulator> onTick) Constructs a periodic damage event with an additional per-tick callback.- パラメータ:
sourceName- the name of the character owning this eventtickAction- theAttackActionto execute on each tick; may benullstartTime- the simulation time of the first tickinterval- the time in seconds between consecutive ticksduration- the total duration in secondsonTick- optional callback invoked after damage on each tick (e.g. applying a DEF shred); may benull
-
-
メソッドの詳細
-
getNextTickTime
public double getNextTickTime()Returns the simulation time at which this event's nextTimerEvent.tick(simulation.CombatSimulator)should fire.- 定義:
getNextTickTimeインタフェース内TimerEvent- 戻り値:
- next tick time in seconds
-
tick
Executes the tick action viaCombatSimulator.performActionWithoutTimeAdvance(String, AttackAction), then invokes the optional callback, and advancesnextTickTimeby the interval.- 定義:
tickインタフェース内TimerEvent- パラメータ:
sim- theCombatSimulatormanaging this event
-
isFinished
public boolean isFinished(double currentTime) Returnstruewhen the current simulation time has reached or passed the end of this event's duration (startTime + duration).- 定義:
isFinishedインタフェース内TimerEvent- パラメータ:
currentTime- the current simulation time in seconds- 戻り値:
trueif the event has expired
-