Table of Contents

Interface IDamageable

Namespace
ElectricDrill.AstraHealth.Damage
Assembly
com.electricdrill.astra-health.Runtime.dll

Implemented by entities that can receive damage. The TakeDamage(PreDamageContext) method accepts a PreDamageContext record describing a pending damage attempt and returns a DamageResolutionContext describing whether the damage was applied or prevented and additional details.

public interface IDamageable

Methods

TakeDamage(PreDamageContext)

Process an incoming damage request and return a resolution object.

Implementations should run the damage processing pipeline (pre-phase, reduction, defensive checks, barriers, health application) or delegate to the centralized pipeline host used in the project. The provided preDamage describes the intent (amount, type, source, critical flags, target/dealer).

The returned DamageResolutionContext must reflect the final outcome:

Implementations SHOULD NOT throw for normal prevention cases; use the prevention reasons and the returned resolution to communicate why the damage didn't apply.

DamageResolutionContext TakeDamage(PreDamageContext preDamage)

Parameters

preDamage PreDamageContext

Immutable description of the pending damage attempt.

Returns

DamageResolutionContext

A DamageResolutionContext describing the final outcome and details.