A cached reference to the source name to avoid recurring database lookups
Does this ActiveEffect correspond to a significant status effect ID?
Is there some system logic that makes this active effect ineligible for application?
Does this Active Effect currently modify an Actor?
Describe whether the ActiveEffect has a temporary duration based on combat turns or rounds.
A cached property for obtaining the source name
Prepare derived data related to active effect duration
Apply this ActiveEffect to a provided Actor. TODO: This method is poorly conceived. Its functionality is static, applying a provided change to an Actor TODO: When we revisit this in Active Effects V2 this should become an Actor method, or a static method
The Actor to whom this effect should be applied
The change data being applied
The resulting applied value
Get the name of the source of the Active Effect
Format a round+turn combination as a decimal
The round number
The turn number
The decimal representation
Format a number of rounds and turns into a human-readable duration label
The number of rounds
The number of turns
The formatted label
Cast a raw EffectChangeData change string to the desired data type.
The raw string value
The target data type that the raw value should be cast to match
The parsed delta cast to the target data type
Cast a raw EffectChangeData change string to an Array of an inner type.
The raw string value
The target data type of inner array elements
The parsed delta cast as a typed array
Parse serialized JSON, or retain the raw string.
A raw serialized string
The parsed value, or the original value if parsing failed
Apply an ActiveEffect that uses an ADD application mode. The way that effects are added depends on the data type of the current value.
If the current value is null, the change value is assigned directly. If the current type is a string, the change value is concatenated. If the current type is a number, the change value is cast to numeric and added. If the current type is an array, the change value is appended to the existing array if it matches in type.
The Actor to whom this effect should be applied
The change data being applied
The current value being modified
The parsed value of the change object
An object which accumulates changes to be applied
Apply an ActiveEffect that uses a MULTIPLY application mode. Changes which MULTIPLY must be numeric to allow for multiplication.
The Actor to whom this effect should be applied
The change data being applied
The current value being modified
The parsed value of the change object
An object which accumulates changes to be applied
Apply an ActiveEffect that uses an OVERRIDE application mode. Numeric data is overridden by numbers, while other data types are overridden by any value
The Actor to whom this effect should be applied
The change data being applied
The current value being modified
The parsed value of the change object
An object which accumulates changes to be applied
Apply an ActiveEffect that uses an UPGRADE, or DOWNGRADE application mode. Changes which UPGRADE or DOWNGRADE must be numeric to allow for comparison.
The Actor to whom this effect should be applied
The change data being applied
The current value being modified
The parsed value of the change object
An object which accumulates changes to be applied
Apply an ActiveEffect that uses a CUSTOM application mode.
The Actor to whom this effect should be applied
The change data being applied
The current value being modified
The parsed value of the change object
An object which accumulates changes to be applied
Dispatch changes to a significant status effect to active Tokens on the Scene.
The status effect ID being applied, from CONFIG.specialStatusEffects
Is the special status effect now active?
Display changes to active effects as scrolling Token status text.
Is the active effect currently enabled?
The client-side ActiveEffect document which extends the common BaseActiveEffect model. Each ActiveEffect belongs to the effects collection of its parent Document. Each ActiveEffect contains a ActiveEffectData object which provides its source data.
ClientDocumentMixin
{@link documents.Actor} The Actor document which contains ActiveEffect embedded documents
{@link documents.Item} The Item document which contains ActiveEffect embedded documents