Change Resource With Status Effects#
Since v1.0.0
Changes the value of a power that either uses the Resource power type, or has a built-in cooldown, based on the status effects applied on the entity.
Type ID: voile:change_resource_with_status_effects
Warning
This action type is very niche and may be changed in the future.
Fields#
Field | Type | Default | Description |
---|---|---|---|
resource |
Identifier | The namespace and ID of the power that uses the Resource (Power Type) or has a built-in cooldown. | |
category |
String | The category of status effects to check for. Can be beneficial , harmful , or neutral . |
|
change |
Integer | 1 |
Each status effect of the given category adds this value to the resource (won't go below min or above max of the Resource (Power Type)). |
operation |
String | "add" |
Determines if the action should add or set the value of the resource. Accepts "add" or "set" . |
Examples#
"entity_action": {
"type": "voile:change_resource_with_status_effects",
"resource": "namespace:example",
"category": "harmful"
}
This example will add 1 for each harmful status effect applied on the entity to the namespace:example
(data/namespace/powers/example.json
) power that uses the Resource (Power Type).
"entity_action": {
"type": "voile:change_resource_with_status_effects",
"resource": "namespace:example",
"category": "beneficial",
"change": 2,
"operation": "set"
}
This example will set the value of the namespace:example
(data/namespace/powers/example.json
) power to 2 times the amount of beneficial status effects applied on the entity.