Table of Contents

Class ExactlyNCondition

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

Composite condition that evaluates to true when exactly ElectricDrill.AstraRpgFramework.Conditions.ExactlyNCondition._n child conditions are satisfied.

With N = 1 this is equivalent to an exclusive-OR (XOR) across all children. An empty condition list with N = 0 evaluates to true.

[Serializable]
[TypeSelectableMenu("Composites")]
public class ExactlyNCondition : Condition
Inheritance
object
ExactlyNCondition

Fields

Conditions

[SerializeReference]
[TypeSelectable]
[Tooltip("Child conditions evaluated by this exact-count composite.")]
public List<Condition> Conditions

Field Value

List<Condition>

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.