Is there some system logic that makes this active effect ineligible for application?
Provide forward-compatibility with other Document types which use img as their primary image or icon. We are likely to formally migrate this in the future, but for now this getter provides compatible read access.
Retrieve the Document that this ActiveEffect targets for modification.
Whether the Active Effect currently applying its changes to the target.
Does this Active Effect currently modify an Actor?
Describe whether the ActiveEffect has a temporary duration based on combat turns or rounds.
The source name of the Active Effect. The source is retrieved synchronously. Therefore "Unknown" (localized) is returned if the origin points to a document inside a compendium. Returns "None" (localized) if it has no origin, and "Unknown" (localized) if the origin cannot be resolved.
Update derived Active Effect duration data. Configure the remaining and label properties to be getters which lazily recompute only when necessary.
Compute derived data related to active effect duration.
{{ type: string, duration: number|null, remaining: number|null, label: string, [_worldTime]: number, [_combatTime]: number} }
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
Determine whether the ActiveEffect requires a duration update. True if the worldTime has changed for an effect whose duration is tracked in seconds. True if the combat turn has changed for an effect tracked in turns where the effect target is a combatant.
Display changes to active effects as scrolling Token status text.
Is the active effect currently enabled?
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
Retrieve the initial duration configuration.
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
{ActiveEffectDuration} duration Expanded effect duration data.