Namespace ElectricDrill.AstraHealth.Damage.CalculationPipeline
Classes
- ApplyBarrierStep
Damage step that consumes target barrier (temporary shields). It doesn't remove health.
- ApplyCriticalMultiplierStep
Damage step that applies critical hit multipliers when the current damage is flagged as critical.
- ApplyDamageCapStep
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.
- ApplyDamageFloorStep
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 <= 0or 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.
- ApplyDefenseStep
Damage step that applies defensive calculations based on the damage type's defensive and piercing stats and configured mitigation and penetration functions.
- ApplyFlatDmgModifiersStep
Damage step that applies flat damage modifiers (both positive increments and negative reductions) based on configured generic flat damage modifiers & source/type flat damage modifiers. This step should typically be applied AFTER percentage-based modifications.
- ApplyPercentageDmgModifiersStep
Damage step that applies generic and configured damage source/type modifiers (for example weaknesses and resistances) to the current damage amount.
- DamageCalculationStrategySO
ScriptableObject that defines a configurable damage calculation pipeline. The pipeline is composed of ordered DamageStep instances executed sequentially.
Optionally, a pre-strategy and/or post-strategy can be configured to run another DamageCalculationStrategySO before or after this strategy's own steps. This enables composition without duplicating the default pipeline: a custom strategy can delegate to the global default pipeline (or any other strategy) and then apply additional steps on top.
- DamageInfo
Container for damage pipeline state while a damage calculation is executed. Holds the amounts being transformed, the source/type metadata and accumulated prevention reasons.
- DamageMitigationCalculator
Pure, stateless helpers that compute damage after defensive and damage reduction functions are applied. Callers are responsible for validating their DamageTypeSO configuration (for example, the consistency warnings in ApplyDefenseStep).
- DamageStep
Base class for a single step in the damage calculation pipeline. A DamageStep performs a focused transformation on a DamageInfo instance (for example applying defenses, barriers or modifiers).