Skip to content

Compare Resource

Entity Condition Type.

Compares the value of two powers that use the Resource (Power Type) or a power type that has a built-in cooldown (using remaining ticks as the value).

Type ID: apugli:compare_resource

Note

This condition requires the entity it's checking to have both powers. It will return false if this isn't met.

Fields

Field Type Default Description
resource The namespace and ID of a power that will be evaluated.
compare_to The namespace and ID of a power that will be compared to the power in the resource field.
comparison Comparison ">=" How the resource power's value which are the specified should be compared to the compare_to power's value.

Example

"condition": {
    "type": "apugli:compare_resource",
    "resource": "apugli:test_resource_one",
    "compare_to": "apugli:test_resource_two",
    "comparison": "<="
}
This example checks if an entity's value of apugli:test_resource_one resource power is less than or equal to the value of its apugli:test_resource_two resource power.