Table of Contents

Class StatThresholdCondition

Namespace
ElectricDrill.AstraRpgFramework.Conditions
Assembly
com.electricdrill.astra-rpg-framework.Runtime.dll

Condition that checks a stat on the resolved target entity against a threshold.

When Absolute, the stat's final value is compared directly against ElectricDrill.AstraRpgFramework.Conditions.StatThresholdCondition._thresholdAbsolute.
When Percentage, the stat's position within its defined range [MinValue, MaxValue] is expressed as a percentage (0–100) and compared against ElectricDrill.AstraRpgFramework.Conditions.StatThresholdCondition._thresholdPercentage. Requires the stat to have HasMaxValue = true; returns false otherwise. When HasMinValue = false, 0 is used as the implicit minimum. Returns false if the effective range (MaxValue − MinValue) is zero to avoid division by zero.

Negative MinValue is fully supported: a stat with MinValue = −100 and MaxValue = 100 at value 0 evaluates to 50 %.

[Serializable]
[TypeSelectableMenu("Leaf/Attr. & Stat")]
public class StatThresholdCondition : Condition
Inheritance
object
StatThresholdCondition

Methods

Evaluate(EvaluationContext)

Evaluates this condition against the provided context.

public override bool Evaluate(EvaluationContext ctx)

Parameters

ctx EvaluationContext

Contextual data available to the condition (holder, performer, payload).

Returns

bool

true if the condition is satisfied; otherwise false.