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
-
objectLifestealAmountSelector
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
modeLifestealBasisModeWhich basis to use (Initial, Step, Final).
stepTypeNamestringAssembly-qualified or simple type name of the pipeline step to sample when Step is used.
stepPointStepValuePointWhether 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
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
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
amountsDamageAmountContextDamageAmountContext instance containing initial, current and per-step records.
Returns
- long
The selected damage value to compute lifesteal from.