Class DamageCap
- Namespace
- ElectricDrill.AstraHealth.Damage.Bounds
- Assembly
- com.electricdrill.astra-health.Runtime.dll
MonoBehaviour that provides an upper bound on the damage this entity can receive per hit. Attach it alongside ElectricDrill.AstraHealth.Damage.Bounds.DamageCap.EntityHealth on any entity that needs a damage cap.
Configure via the Inspector by choosing a DamageBoundSource:
- FixedValue — a constant
longvalue. - HealthScaling — inline health metric + percentage.
- ScalingComponent — any ElectricDrill.AstraRpgFramework.Scaling.ScalingComponentSO asset.
[RequireComponent(typeof(EntityCore))]
public class DamageCap : MonoBehaviour, IDamageCap
- Inheritance
-
objectDamageCap
- Implements
Methods
GetDamageCap()
Returns the maximum damage value allowed for a single hit on this entity. The pipeline step will clamp the current damage to at most this value.
public long GetDamageCap()
Returns
- long
A positive
longrepresenting the damage cap.