Table of Contents

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
object
PreHealContext.PreHealInfoStepBuilder
Implements

Methods

Build()

Build and return the configured PreHealContext.

public PreHealContext Build()

Returns

PreHealContext

WithAmount(long)

Set the base heal amount.

public PreHealContext.HealInfoSource WithAmount(long amount)

Parameters

amount long

Returns

PreHealContext.HealInfoSource

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

multiplier double

Returns

PreHealContext.PreHealInfoStepBuilder

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

ignore bool

Returns

PreHealContext.PreHealInfoStepBuilder

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

instigator IEffectInstigator

Returns

PreHealContext.PreHealInfoStepBuilder

WithIsCritical(bool)

Mark the built PreHealContext as critical or not.

public PreHealContext.PreHealInfoStepBuilder WithIsCritical(bool isCritical)

Parameters

isCritical bool

Returns

PreHealContext.PreHealInfoStepBuilder

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

isReactable bool

Returns

PreHealContext.PreHealInfoStepBuilder

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

performer EntityCore

Returns

PreHealContext.PreHealInfoStepBuilder

WithSource(HealSourceSO)

Set the heal source category.

public PreHealContext.HealInfoTarget WithSource(HealSourceSO healSource)

Parameters

healSource HealSourceSO

Returns

PreHealContext.HealInfoTarget

WithTarget(EntityCore)

Set the target entity.

public PreHealContext.PreHealInfoStepBuilder WithTarget(EntityCore target)

Parameters

target EntityCore

Returns

PreHealContext.PreHealInfoStepBuilder