Table of Contents

Class LifestealAmountSelector

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

Selects which damage amount will be used as the basis for lifesteal calculations.

[Serializable]
public class LifestealAmountSelector
Inheritance
object
LifestealAmountSelector

Constructors

LifestealAmountSelector()

Initializes a new instance of LifestealAmountSelector using default values.

public LifestealAmountSelector()

LifestealAmountSelector(LifestealBasisMode, string, StepValuePoint)

Initializes a new instance of LifestealAmountSelector with the specified selection mode, optional pipeline step type name and step value point.

public LifestealAmountSelector(LifestealBasisMode mode, string stepTypeName, StepValuePoint stepPoint)

Parameters

mode LifestealBasisMode

Which basis to use (Initial, Step, Final).

stepTypeName string

Assembly-qualified or simple type name of the pipeline step to sample when Step is used.

stepPoint StepValuePoint

Whether to use the pre-step or post-step value when sampling a step.

Properties

Mode

Gets or sets the basis mode used to select the damage amount for lifesteal.

public LifestealBasisMode Mode { get; set; }

Property Value

LifestealBasisMode

StepPoint

Gets or sets whether to use the pre-step or post-step recorded value when sampling a pipeline step.

public StepValuePoint StepPoint { get; set; }

Property Value

StepValuePoint

StepType

Gets or sets the System.Type of the pipeline step to sample when Mode is Step. Setting this property stores the assembly-qualified name; getting the property resolves the stored name to a runtime System.Type.

public Type StepType { get; set; }

Property Value

Type

Methods

Evaluate(DamageAmountContext)

Evaluates the damage amounts and returns the long value that should be used for lifesteal according to this selector.

public long Evaluate(DamageAmountContext amounts)

Parameters

amounts DamageAmountContext

DamageAmountContext instance containing initial, current and per-step records.

Returns

long

The selected damage value to compute lifesteal from.