Class ResurrectionContext
- Namespace
- ElectricDrill.AstraHealth.Events.Contexts
- Assembly
- com.electricdrill.astra-health.Runtime.dll
Contains information about an entity resurrection event. All heal-related details (target, source, healer, amounts) are accessible via ReceivedHeal, which is the result of the internal Heal(PreHealContext) call performed during resurrection.
public class ResurrectionContext : IHasEntity, IHasTarget, IHasValueChange<long>, IHasInstigator
- Inheritance
-
objectResurrectionContext
- Implements
-
IHasEntityIHasTargetIHasValueChange<long>IHasInstigator
Constructors
ResurrectionContext(long, ReceivedHealContext)
Initializes a new instance of ResurrectionContext.
public ResurrectionContext(long previousHp, ReceivedHealContext receivedHeal)
Parameters
previousHplongThe HP before resurrection.
receivedHealReceivedHealContextThe result of the heal applied during resurrection.
Properties
AbsAmount
The net HP gained during resurrection (NewValue - PreviousValue).
public long AbsAmount { get; }
Property Value
- long
Entity
The entity that was resurrected. Same as Target in this case.
public EntityCore Entity { get; }
Property Value
- EntityCore
Instigator
The specific thing that caused this resurrection — propagated from the originating
ReceivedHealContext. May be null if unspecified.
public IEffectInstigator Instigator { get; }
Property Value
- IEffectInstigator
NewValue
The HP the entity was resurrected with (after all heal modifiers), as an absolute value. Computed as PreviousValue + ReceivedHeal.HealAmount.NetAmount.
public long NewValue { get; }
Property Value
- long
PreviousValue
The HP the entity had before resurrection (typically at or below the death threshold).
public long PreviousValue { get; }
Property Value
- long
ReceivedHeal
The full result of the heal performed during resurrection, including amounts, source and healer.
public ReceivedHealContext ReceivedHeal { get; }
Property Value
Target
The entity that was resurrected. Convenience accessor for ReceivedHeal.Target.
public EntityCore Target { get; }
Property Value
- EntityCore