Class ReceivedHealContext.ReceivedHealInfoStepBuilder
- Namespace
- ElectricDrill.AstraHealth.Heal
- Assembly
- com.electricdrill.astra-health.Runtime.dll
Concrete fluent builder used to assemble a ReceivedHealContext. Use Builder to start.
public sealed class ReceivedHealContext.ReceivedHealInfoStepBuilder : ReceivedHealContext.HealInfoAmount, ReceivedHealContext.HealInfoSource, ReceivedHealContext.HealInfoTarget
- Inheritance
-
objectReceivedHealContext.ReceivedHealInfoStepBuilder
- Implements
Properties
Builder
Starts a new builder for ReceivedHealContext.
public static ReceivedHealContext.HealInfoAmount Builder { get; }
Property Value
Methods
Build()
Build the final ReceivedHealContext instance.
public ReceivedHealContext Build()
Returns
WithAmount(HealAmountContext)
Set the resolved HealAmountContext.
public ReceivedHealContext.HealInfoSource WithAmount(HealAmountContext healAmount)
Parameters
healAmountHealAmountContext
Returns
WithHealer(EntityCore)
Set the entity that performed the heal. Optional — pass null or omit entirely
for system heals with no specific performer entity.
public ReceivedHealContext.ReceivedHealInfoStepBuilder WithHealer(EntityCore healer)
Parameters
healerEntityCore
Returns
WithInstigator(IEffectInstigator)
Optionally set the specific cause of this heal.
public ReceivedHealContext.ReceivedHealInfoStepBuilder WithInstigator(IEffectInstigator instigator)
Parameters
instigatorIEffectInstigator
Returns
WithIsCritical(bool)
Optionally mark the heal as critical.
public ReceivedHealContext.ReceivedHealInfoStepBuilder 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 so that reactive
systems do not respond to it. Defaults to true.
public ReceivedHealContext.ReceivedHealInfoStepBuilder WithIsReactable(bool isReactable)
Parameters
isReactablebool
Returns
WithOutcome(HealOutcome)
Set the HealOutcome for the built context. Defaults to Applied. Use Prevented when building a context that represents an ignored or cancelled heal.
public ReceivedHealContext.ReceivedHealInfoStepBuilder WithOutcome(HealOutcome outcome)
Parameters
outcomeHealOutcome
Returns
WithSource(HealSourceSO)
Set the HealSourceSO for the heal.
public ReceivedHealContext.HealInfoTarget WithSource(HealSourceSO healSource)
Parameters
healSourceHealSourceSO
Returns
WithTarget(EntityCore)
Set the entity that will receive the heal. Returns the builder for optional flags.
public ReceivedHealContext.ReceivedHealInfoStepBuilder WithTarget(EntityCore target)
Parameters
targetEntityCore