Compare Resources
Compares the value of a power that uses the Resource (Power Type) or a power type that has a built-in cooldown (using remaining ticks as the value) with another power.
Type ID: origins-math:compare_resources
Fields
| Field | Type | Default | Description |
|---|---|---|---|
left_resource |
Identifier | The namespace and ID of the power that uses the Resource (Power Type) or has a built-in cooldown. | |
comparison |
Comparison | Determines how the value of left_resource should be compared to right_resource. |
|
right_resource |
Identifier | The namespace and ID of the power that uses the Resource (Power Type) or has a built-in cooldown. |
Examples
"condition": {
"type": "origins-math:compare_resources",
"left_resource": "example:a_simple_resource",
"comparison": ">=",
"right_resource": "example:another_simple_resource"
}
This example will check if the player's example:a_simple_resource resource has a greater or equal value to example:another_simple_resource resource.