Class ApplyDamageFloorStep
- Assembly
- com.electricdrill.astra-health.Runtime.dll
Damage step that enforces a lower bound (floor) on the current damage amount.
At runtime the step looks for a component implementing IDamageFloor on the Target. If found and the current damage is below the floor, the amount is raised. If no IDamageFloor component is present, the step is a no-op.
Note: The base Process(DamageInfo) method skips steps when
Current <= 0 or when the damage has already been prevented. This means
the floor cannot revive damage that was fully absorbed by a previous step.
To guarantee a minimum damage amount, place this step before steps that
might reduce the value to zero.
[Serializable]
public class ApplyDamageFloorStep : DamageStep
- Inheritance
-
objectApplyDamageFloorStep
- 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)
Raises Current to the value returned by GetDamageFloor() when a provider is found on the target and the current amount is below the floor. A floor 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 an increased current amount.