Class IsOwnedByCondition
- Namespace
- ElectricDrill.AstraRpgFramework.Conditions
- Assembly
- com.electricdrill.astra-rpg-framework.Runtime.dll
Experimental — this API may still change.
Condition that evaluates to true when the entity resolved from Owned is
owned, directly or transitively, by the entity resolved from Owner
(see IsOwnedBy(EntityCore)). Returns false when either slot is null.
[Serializable]
[TypeSelectableMenu("Leaf/Entity")]
public class IsOwnedByCondition : Condition
- Inheritance
-
objectIsOwnedByCondition
Properties
Owned
The entity slot expected to be (transitively) owned.
public ConditionTarget Owned { get; }
Property Value
Owner
The entity slot expected to be the owner.
public ConditionTarget Owner { get; }
Property Value
Methods
Create(ConditionTarget, ConditionTarget)
Creates an IsOwnedByCondition comparing the supplied entity slots.
public static IsOwnedByCondition Create(ConditionTarget owned, ConditionTarget owner)
Parameters
ownedConditionTargetownerConditionTarget
Returns
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.