Introduction
Stat Modifiers are objects that change how a Stat behaves either for a set amount of time, until removed, or permanently.
Fields#
| Name | Description |
|---|---|
| Affects Stat Id | Stat to target with this modifier |
| Requirements | If not blank this condition must be true in order to apply the modifier |
| Applies | Set how to apply this modifier |
| Lifespan | Lifetime in seconds/turns |
| Whole Increments | If checked change is applied only after a full second/turn, otherwise it is applied over the course of each second/turn |
| Target | Set which part of the stat to change |
| Change Type | Set how to change the targeted value |
| Value | Value to use for change |
| Source Id | Id of this object's source |
| On Deactivated | Event raised when modifier is deactivated |
| On Life Changed | Event raised when remain life changed |
Properties#
| Name | Description |
|---|---|
| appliedValue | Get/Set the applied value of the modifier |
| instanceId | Id of this object instance |
| lifeRemaining | Get/Set the number of seconds left before this modifier dies |
| originalSetValue | Get/Set the targets value before modifier was applied |
Methods#
| Name | Description |
|---|---|
| Activate | Activate the object |
| Clone | Create a clone of this object |
| Deactivate | Deactivate the object |
| GetDescription | Returns a friendly string description of this object |
| GetDisplayValue | Returns a friend string of the applied value |
| GetStat | Get the stat this modifier is applied to |
| Matches | Check if this objects data matches that of another object |
| Shutdown | Shutdown this object |
| ResetLifespan | Reset livespan to original value |