パッケージ simulation.action
クラス AttackAction
java.lang.Object
simulation.action.AttackAction
Describes a single discrete damage-dealing action performed by a character.
Instances are passed to
CombatSimulator.performAction(String, AttackAction)
and consumed by DamageCalculator to produce a final damage value.
Key responsibilities:
- Carries the talent motion value (
damagePercent), scaling stat, element, andActionTypeneeded by the damage formula. - Specifies ICD group and gauge units for elemental aura application.
- Controls animation duration so that
advanceTimecorrectly consumes cast time after each action. - Supports custom Lunar mechanics via
isLunarConsideredandlunarReactionType.
-
コンストラクタの概要
コンストラクタコンストラクタ説明AttackAction(String name, double damagePercent, Element element, StatType scalingStat) Minimal constructor.AttackAction(String name, double damagePercent, Element element, StatType scalingStat, StatType bonusStat) Constructor with bonus stat override.AttackAction(String name, double damagePercent, Element element, StatType scalingStat, StatType bonusStat, double duration) Constructor with bonus stat and custom animation duration.AttackAction(String name, double damagePercent, Element element, StatType scalingStat, StatType bonusStat, double duration, boolean useSnapshot) Constructor with snapshot control.AttackAction(String name, double damagePercent, Element element, StatType scalingStat, StatType bonusStat, double duration, boolean useSnapshot, ActionType actionType) Full constructor used internally by all shorter overloads.AttackAction(String name, double damagePercent, Element element, StatType scalingStat, StatType bonusStat, double duration, ActionType actionType) Constructor with explicitActionType. -
メソッドの概要
修飾子とタイプメソッド説明voidaddBonusStat(StatType type, double value) Adds an extra per-action stat bonus that is applied only when this action is calculated.Returns the ability category of this action (NORMAL, SKILL, BURST, etc.).doubleReturns the animation duration used to advance simulation time after the action.Returns the secondary DMG bonus stat specific to this action's ability type (e.g.doubleReturns the talent multiplier as a decimal (e.g.Returns the debug formula string for this action, ornullif not set.doubleReturns the defense ignore fraction applied during damage calculation.Returns the element of this hit, used for aura application and reaction checks.推奨されていません。Returns the map of per-action extra stat bonuses set viaaddBonusStat(model.type.StatType, double).doubleReturns the elemental gauge units applied by this hit when ICD permits.Returns the ICD tag used to group hits into independent ICD sequences.Returns the ICD type used to evaluate element application eligibility.Returns the Lunar reaction sub-type for this action, ornullif none.double推奨されていません。UsegetDamagePercent()instead.getName()Returns the display name of this action (e.g.Returns the primary stat this action scales from (e.g.doubleResolves the numeric value of the scaling stat from the providedStatsContainer.booleanReturns whether this action is classified as Burst damage for bonus interactions.booleanReturns whether this action is classified as Skill damage for bonus interactions.booleanReturns whether this action is considered part of the Lunar damage system.booleanReturns whether this action uses snapshotted stats from cast time.voidsetAnimationDuration(double duration) Overrides the animation duration for this action.voidsetCountsAsBurstDmg(boolean countsAsBurstDmg) Marks this action as counting as Burst damage for weapon / artifact interactions that specifically trigger on Burst hits (e.g.voidsetCountsAsSkillDmg(boolean countsAsSkillDmg) Marks this action as counting as Skill damage for weapon / artifact interactions that specifically trigger on Skill hits (e.g.voidsetDebugFormula(String debugFormula) Stores a human-readable formula string used in HTML report tooltips and debug logs.voidsetDefenseIgnore(double val) Sets the defense ignore fraction for this action (range 0.0–1.0).voidSets the ICD parameters for elemental application tracking.voidsetLunarConsidered(boolean b) Marks whether this action participates in the custom Lunar damage system.voidsetLunarReactionType(String type) Sets the Lunar reaction sub-type (e.g.
-
コンストラクタの詳細
-
AttackAction
Minimal constructor. Uses 0.5 s animation, no bonus stat, no snapshot,ActionType.OTHER.- パラメータ:
name- display name of the actiondamagePercent- talent multiplier as a decimal (e.g.7.21for 721%)element- elemental infusion of the hitscalingStat- stat used as the base for scaling (usuallyBASE_ATK)
-
AttackAction
public AttackAction(String name, double damagePercent, Element element, StatType scalingStat, StatType bonusStat) Constructor with bonus stat override. Uses 0.5 s animation, no snapshot,ActionType.OTHER.- パラメータ:
name- display name of the actiondamagePercent- talent multiplier as a decimalelement- elemental infusion of the hitscalingStat- base scaling statbonusStat- additional DMG bonus stat to include (e.g.BURST_DMG_BONUS)
-
AttackAction
public AttackAction(String name, double damagePercent, Element element, StatType scalingStat, StatType bonusStat, double duration) Constructor with bonus stat and custom animation duration. No snapshot,ActionType.OTHER.- パラメータ:
name- display name of the actiondamagePercent- talent multiplier as a decimalelement- elemental infusion of the hitscalingStat- base scaling statbonusStat- additional DMG bonus statduration- animation duration in seconds
-
AttackAction
public AttackAction(String name, double damagePercent, Element element, StatType scalingStat, StatType bonusStat, double duration, boolean useSnapshot) Constructor with snapshot control. UsesActionType.OTHER.- パラメータ:
name- display name of the actiondamagePercent- talent multiplier as a decimalelement- elemental infusion of the hitscalingStat- base scaling statbonusStat- additional DMG bonus statduration- animation duration in secondsuseSnapshot- iftrue, stats are snapshotted at cast time rather than re-evaluated at damage time
-
AttackAction
public AttackAction(String name, double damagePercent, Element element, StatType scalingStat, StatType bonusStat, double duration, ActionType actionType) Constructor with explicitActionType. No snapshot.- パラメータ:
name- display name of the actiondamagePercent- talent multiplier as a decimalelement- elemental infusion of the hitscalingStat- base scaling statbonusStat- additional DMG bonus statduration- animation duration in secondsactionType- the ability category (NORMAL, SKILL, BURST, etc.)
-
AttackAction
public AttackAction(String name, double damagePercent, Element element, StatType scalingStat, StatType bonusStat, double duration, boolean useSnapshot, ActionType actionType) Full constructor used internally by all shorter overloads. Initializes ICD toICDType.Standard/ICDTag.Nonewith 1.0 GU.- パラメータ:
name- display name of the actiondamagePercent- talent multiplier as a decimalelement- elemental infusion of the hitscalingStat- base scaling statbonusStat- additional DMG bonus statduration- animation duration in secondsuseSnapshot- whether stats are snapshotted at cast timeactionType- the ability category
-
-
メソッドの詳細
-
setAnimationDuration
public void setAnimationDuration(double duration) Overrides the animation duration for this action. The simulator advances time by this value after the action resolves, factoring in ATK SPD for NORMAL / CHARGE actions.- パラメータ:
duration- animation duration in seconds
-
setLunarConsidered
public void setLunarConsidered(boolean b) Marks whether this action participates in the custom Lunar damage system. Whentrue, the simulator may fire a syntheticReactionResultfor Lunar-specific hooks before normal damage calculation.- パラメータ:
b-trueto enable Lunar consideration
-
isLunarConsidered
public boolean isLunarConsidered()Returns whether this action is considered part of the Lunar damage system.- 戻り値:
trueif Lunar hooks are active for this action
-
setLunarReactionType
Sets the Lunar reaction sub-type (e.g."Charged","Bloom","Crystallize") and implicitly enablesisLunarConsidered. This causes the simulator to notify reaction listeners with a synthetic"Lunar-<type>"result before the normal damage step.- パラメータ:
type- the Lunar reaction sub-type string, ornullto clear
-
getLunarReactionType
Returns the Lunar reaction sub-type for this action, ornullif none.- 戻り値:
- the Lunar reaction type string
-
addBonusStat
Adds an extra per-action stat bonus that is applied only when this action is calculated. Useful for constellation or passive bonuses scoped to a specific hit. Multiple calls for the sameStatTypeaccumulate additively.- パラメータ:
type- the stat to modifyvalue- the additive amount to add
-
getExtraBonuses
Returns the map of per-action extra stat bonuses set viaaddBonusStat(model.type.StatType, double).- 戻り値:
- an unmodifiable view of the extra bonus map
-
setCountsAsBurstDmg
public void setCountsAsBurstDmg(boolean countsAsBurstDmg) Marks this action as counting as Burst damage for weapon / artifact interactions that specifically trigger on Burst hits (e.g. The Catch).- パラメータ:
countsAsBurstDmg-trueto enable Burst damage classification
-
isCountsAsBurstDmg
public boolean isCountsAsBurstDmg()Returns whether this action is classified as Burst damage for bonus interactions.- 戻り値:
trueif this action counts as Burst damage
-
setCountsAsSkillDmg
public void setCountsAsSkillDmg(boolean countsAsSkillDmg) Marks this action as counting as Skill damage for weapon / artifact interactions that specifically trigger on Skill hits (e.g. Wolf-Fang).- パラメータ:
countsAsSkillDmg-trueto enable Skill damage classification
-
isCountsAsSkillDmg
public boolean isCountsAsSkillDmg()Returns whether this action is classified as Skill damage for bonus interactions.- 戻り値:
trueif this action counts as Skill damage
-
setICD
Sets the ICD parameters for elemental application tracking. Calls toICDManageruse these values to determine whether this hit actually applies an elemental gauge to the enemy. -
getICDType
Returns the ICD type used to evaluate element application eligibility.- 戻り値:
- the
ICDType
-
getICDTag
Returns the ICD tag used to group hits into independent ICD sequences.- 戻り値:
- the
ICDTag
-
getGaugeUnits
public double getGaugeUnits()Returns the elemental gauge units applied by this hit when ICD permits.- 戻り値:
- gauge units (GU)
-
isUseSnapshot
public boolean isUseSnapshot()Returns whether this action uses snapshotted stats from cast time. Whentrue, buffs that expire before the hit still contribute.- 戻り値:
trueif stats are snapshotted at cast time
-
getAnimationDuration
public double getAnimationDuration()Returns the animation duration used to advance simulation time after the action.- 戻り値:
- animation duration in seconds
-
getName
Returns the display name of this action (e.g."Musou no Hitotachi").- 戻り値:
- action name
-
getDamagePercent
public double getDamagePercent()Returns the talent multiplier as a decimal (e.g.7.21represents 721%).- 戻り値:
- damage percent / motion value
-
getElement
Returns the element of this hit, used for aura application and reaction checks.- 戻り値:
- hit element
-
getScalingStat
Returns the primary stat this action scales from (e.g.BASE_ATK).- 戻り値:
- the scaling
StatType
-
getBonusStat
Returns the secondary DMG bonus stat specific to this action's ability type (e.g.BURST_DMG_BONUS), ornullif none.- 戻り値:
- the bonus
StatType, ornull
-
getElementType
推奨されていません。UsegetElement()instead.Deprecated compatibility method. Always returnsnull.- 戻り値:
null
-
getActionType
Returns the ability category of this action (NORMAL, SKILL, BURST, etc.).- 戻り値:
- the
ActionType
-
getMotionValue
public double getMotionValue()推奨されていません。UsegetDamagePercent()instead.Compatibility alias forgetDamagePercent().- 戻り値:
- the damage percent / motion value
-
getScalingStatValue
Resolves the numeric value of the scaling stat from the providedStatsContainer. Handles ATK, HP, and DEF stat families; falls back to total ATK for unknown stats.- パラメータ:
stats- the stat container to resolve from- 戻り値:
- the resolved numeric stat value
-
setDefenseIgnore
public void setDefenseIgnore(double val) Sets the defense ignore fraction for this action (range 0.0–1.0). Used for constellation effects such as Raiden C2.- パラメータ:
val- defense ignore value (0.0 = none, 1.0 = full ignore)
-
getDefenseIgnore
public double getDefenseIgnore()Returns the defense ignore fraction applied during damage calculation.- 戻り値:
- defense ignore value (0.0–1.0)
-
setDebugFormula
Stores a human-readable formula string used in HTML report tooltips and debug logs.- パラメータ:
debugFormula- the formula string to attach
-
getDebugFormula
Returns the debug formula string for this action, ornullif not set.- 戻り値:
- debug formula string
-
getElement()instead.