Stat Condition
A Stat Condition checks whether a Stat satisfies a specified condition.
It is used by condition-based Processors and Injectors to determine whether a particular operation should be executed.
| Kind | Checks | Compared with |
|---|---|---|
| Single Stat | one Stat | a constant |
| Single Stat (Dynamic) | one Stat | another Stat |
| Multi Stat | several Stats together (distance, dot, difference…) | a constant |
| Multi Stat (Dynamic) | several Stats | other Stats |
Example
The ChainHook CdDegenerator Trigger shown below uses a Stat Condition to activate only when the ChainHook Cooldown is greater than 0.
Custom conditions
Derive from the condition type that matches the inputs you need:
| Base class | Evaluation method |
|---|---|
SingleStatCondition | IsSatisfying(IStatBase stat, IActorProvider actorProvider, int environmentId, bool canLog) |
DynamicSingleStatCondition | IsSatisfying(IStatBase stat, IActorProvider actorProvider, int environmentId, bool canLog) |
MultiStatCondition | IsSatisfying(IList<IStatBase> stats, IActorProvider actorProvider, bool canLog) |
DynamicMultiStatCondition | IsSatisfying(IList<IStatBase> stats, IActorProvider actorProvider, int environmentId, bool canLog) |
Return whether the check passes, and forward canLog to any nested adapters, conditions or Stat lookups. The caller's gate and the asset's own Misc/name filter control debug output; see Log Filtering. A complete implementation is shown in Multi Stat (Dynamic).