Class LongValueChangeModuloCondition
- Namespace
- ElectricDrill.AstraRpgFramework.Conditions
- Assembly
- com.electricdrill.astra-rpg-framework.Runtime.dll
Condition that checks a long value projected from EventPayload against a modulo rule.
Returns false when the payload does not implement IHasValueChange<T> for
long, or when ElectricDrill.AstraRpgFramework.Conditions.LongValueChangeModuloCondition._divisor is not positive. Both the projected value and the
expected remainder are normalized into the range [0, divisor - 1] before comparison.
[Serializable]
[TypeSelectableMenu("Leaf/ValueChange")]
[ConditionPayload(typeof(IHasValueChange<long>))]
public class LongValueChangeModuloCondition : Condition
- Inheritance
-
objectLongValueChangeModuloCondition
Methods
Evaluate(EvaluationContext)
Evaluates this condition against the provided context.
public override bool Evaluate(EvaluationContext ctx)
Parameters
ctxEvaluationContextContextual data available to the condition (holder, performer, payload).
Returns
- bool
trueif the condition is satisfied; otherwisefalse.