パッケージ mechanics.buff
クラス ActiveCharacterBuff
java.lang.Object
mechanics.buff.Buff
mechanics.buff.ActiveCharacterBuff
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.
-
フィールドの概要
クラスから継承されたフィールド mechanics.buff.Buff
excludeChars, expirationTime, name, startTime, targetElement -
コンストラクタの概要
コンストラクタコンストラクタ説明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. -
メソッドの概要
修飾子とタイプメソッド説明protected voidapplyStats(StatsContainer stats, double currentTime) Applies the effect lambda only ifowneris the currently active character in the simulation.クラスから継承されたメソッド mechanics.buff.Buff
appliesToCharacter, apply, exclude, forElement, getName, isExpired
-
コンストラクタの詳細
-
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-duplicationduration- how long the buff lasts in simulation secondscurrentTime- simulation time at which the buff startssim- the combat simulator used to query the active characterowner- the character who must be on-field for the buff to applyeffect- lambda that writes stat bonuses into the provided container
-
-
メソッドの詳細
-
applyStats
Applies the effect lambda only ifowneris the currently active character in the simulation.- 定義:
applyStatsクラス内Buff- パラメータ:
stats- the stats container to modifycurrentTime- current simulation time in seconds (unused by this implementation)
-