Class ApplyDamageCapStep
- Assembly
- com.electricdrill.astra-health.Runtime.dll
Damage step that enforces an upper bound (cap) on the current damage amount.
At runtime the step looks for a component implementing IDamageCap on the Target. If found and the current damage exceeds the cap, the amount is clamped down. If no IDamageCap component is present, the step is a no-op.
[Serializable]
public class ApplyDamageCapStep : DamageStep
- Inheritance
-
objectApplyDamageCapStep
- Inherited Members
Properties
DisplayName
Human-readable name shown in editors and logs for this step. Implementations should return a short descriptive label.
public override string DisplayName { get; }
Property Value
- string
Methods
ProcessStep(DamageInfo)
Clamps Current to the value returned by GetDamageCap() when a provider is found on the target. A cap value <= 0 is treated as misconfiguration and ignored.
public override DamageInfo ProcessStep(DamageInfo data)
Parameters
dataDamageInfoCurrent damage pipeline data.
Returns
- DamageInfo
The same
datainstance, potentially with a reduced current amount.