Table of Contents

Class AttributeThresholdCondition

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

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

When Absolute, the attribute's final value is compared directly against the configured absolute threshold.
When Percentage, the attribute's position within its defined range [MinValue, MaxValue] is expressed as a percentage (0–100) and compared against the configured percentage threshold. Requires the attribute 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.

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

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

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.