Table of Contents

Class IntValueChangeModuloCondition

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

Condition that checks an int value projected from EventPayload against a modulo rule.

Returns false when the payload does not implement IHasValueChange<T> for int, or when ElectricDrill.AstraRpgFramework.Conditions.IntValueChangeModuloCondition._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<int>))]
public class IntValueChangeModuloCondition : Condition
Inheritance
object
IntValueChangeModuloCondition

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.