Constructor
new ActiveEffect(data, parent)
- Source:
- Implements:
- See:
-
- Actor#effects
- Item#effects
Parameters:
Name | Type | Description |
---|---|---|
data |
ActiveEffectData | Data for the Active Effect |
parent |
Actor | Item | The parent Entity which owns the effect |
Members
_sourceName :string|null
- Source:
A cached reference to the source name to avoid recurring database lookups
Type:
- string | null
isTemporary :boolean
- Source:
Describe whether the ActiveEffect has a temporary duration based on combat turns or rounds.
Type:
- boolean
sheet :ActiveEffectConfig
- Source:
An instance of the ActiveEffectConfig sheet to use for this ActiveEffect instance. The reference to the sheet is cached so the same sheet instance is reused.
Type:
sourceName
- Source:
A cached property for obtaining the source name
Methods
(static) create(…args) → {ActiveEffect}
- Source:
A factory method which creates an ActiveEffect instance using the configured class.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
* |
<repeatable> |
Initialization arguments passed to the ActiveEffect constructor. |
Returns:
The constructed ActiveEffect instance.
- Type
- ActiveEffect
(async) _getSourceName()
- Source:
Get the name of the source of the Active Effect
apply(actor, change) → {*}
- Source:
Apply this ActiveEffect to a provided Actor.
Parameters:
Name | Type | Description |
---|---|---|
actor |
Actor | The Actor to whom this effect should be applied |
change |
ActiveEffectChange | The change data being applied |
Returns:
The resulting applied value
- Type
- *
(async) create(options) → {Promise.<Data>}
- Source:
- See:
A convenience method for creating an ActiveEffect instance within a parent Actor or Item.
Parameters:
Name | Type | Description |
---|---|---|
options |
Options | Configuration options which modify the request. |
Returns:
The created ActiveEffect data.
- Type
- Promise.<Data>
(async) delete(options) → {Promise.<string>}
- Source:
- See:
A convenience method for deleting an ActiveEffect instance in an parent Actor or Item.
Parameters:
Name | Type | Description |
---|---|---|
options |
Options | Configuration options which modify the request. |
Returns:
The deleted ActiveEffect _id.
- Type
- Promise.<string>
(async) update(data, options) → {Promise.<Data>}
- Source:
- See:
A convenience method for updating an ActiveEffect instance in an parent Actor or Item.
Parameters:
Name | Type | Description |
---|---|---|
data |
Data | Differential data with which to update the ActiveEffect. |
options |
Options | Configuration options which modify the request. |
Returns:
The updated ActiveEffect data.
- Type
- Promise.<Data>