Class PreHealContext.PreHealInfoStepBuilder
- Namespace
- ElectricDrill.AstraHealth.Heal
- Assembly
- com.electricdrill.astra-health.Runtime.dll
Concrete builder implementing the fluent step interfaces to construct a PreHealContext.
public sealed class PreHealContext.PreHealInfoStepBuilder : PreHealContext.HealInfoAmount, PreHealContext.HealInfoSource, PreHealContext.HealInfoTarget
- Inheritance
-
objectPreHealContext.PreHealInfoStepBuilder
- Implements
Methods
Build()
Build and return the configured PreHealContext.
public PreHealContext Build()
Returns
WithAmount(long)
Set the base heal amount.
public PreHealContext.HealInfoSource WithAmount(long amount)
Parameters
amountlong
Returns
WithCriticalMultiplier(double)
Set the critical heal multiplier. Values <= 0 will be normalized to 1.0 by the constructor.
public PreHealContext.PreHealInfoStepBuilder WithCriticalMultiplier(double multiplier)
Parameters
multiplierdouble
Returns
WithIgnore(bool)
Set the initial Ignore flag for the built context.
Defaults to false. Listeners may still mutate the flag after dispatch.
public PreHealContext.PreHealInfoStepBuilder WithIgnore(bool ignore)
Parameters
ignorebool
Returns
WithInstigator(IEffectInstigator)
Set the specific cause of this heal — for example an ability definition, a modifier definition or instance, or a passive. Use this to allow downstream listeners to identify the exact origin beyond entity (WithPerformer(EntityCore)) and category (WithSource(HealSourceSO)).
public PreHealContext.PreHealInfoStepBuilder WithInstigator(IEffectInstigator instigator)
Parameters
instigatorIEffectInstigator
Returns
WithIsCritical(bool)
Mark the built PreHealContext as critical or not.
public PreHealContext.PreHealInfoStepBuilder WithIsCritical(bool isCritical)
Parameters
isCriticalbool
Returns
WithIsReactable(bool)
Set the reactability flag for the built context.
Pass false when building a context for a secondary effect (a passive that heals
in reaction to another event) so that reactive systems do not respond to it and infinite
chains are prevented. Defaults to true.
public PreHealContext.PreHealInfoStepBuilder WithIsReactable(bool isReactable)
Parameters
isReactablebool
Returns
WithPerformer(EntityCore)
Set the entity that performed the heal. Optional — pass null or omit entirely
when no specific entity is the performer (e.g. system-initiated resurrection or
passive regeneration without an actor entity).
public PreHealContext.PreHealInfoStepBuilder WithPerformer(EntityCore performer)
Parameters
performerEntityCore
Returns
WithSource(HealSourceSO)
Set the heal source category.
public PreHealContext.HealInfoTarget WithSource(HealSourceSO healSource)
Parameters
healSourceHealSourceSO
Returns
WithTarget(EntityCore)
Set the target entity.
public PreHealContext.PreHealInfoStepBuilder WithTarget(EntityCore target)
Parameters
targetEntityCore