Table of Contents

Struct EvaluationContext

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

Lightweight value type passed to Evaluate(EvaluationContext) on every evaluation. Struct allocation keeps GC pressure at zero even under high tick frequency.

All fields are public for direct assignment via object-initializer syntax. Conditions must treat the context as read-only — mutations are silently discarded (pass-by-value semantics).

public struct EvaluationContext

Fields

EventPayload

Optional payload from the triggering event. null for tick-based or timer-based evaluation.

public object EventPayload

Field Value

object

Holder

The entity that holds (owns) the effect (e.g., modifier or ability) being evaluated.

public EntityCore Holder

Field Value

EntityCore

Performer

The entity that applied/casted the effect (e.g., modifier or ability). May be null or equal to Holder for self-applied effects.

public EntityCore Performer

Field Value

EntityCore

Methods

TryGetPayload<T>(out T)

Attempts to cast EventPayload to T.

public bool TryGetPayload<T>(out T payload)

Parameters

payload T

Returns

bool

true if the payload is a non-null T; otherwise false.

Type Parameters

T