Conditions determine whether a power can be activated or not based on many different variables.
Conditions have ID, to be invoked in powers, triggers and condition themselves.
Multiple condition IDs are also acceptable, and treated as AND operation (all conditions must be met).
Basic command to modify conditions on an item:
/rpgitem condition [operation] [item] [params]
Available operations:
add
Add a condition with detailed parametersremove
Remove a conditionlist
List all conditionsprop
List detailed parameters of a specific condition, or modify it with additional parameters
E.g.,
/rpgitem condition add set-sword rpgitems:andcondition id:set-armor conditions:arm-helmet,arm-chest,arm-legs,arm-boot
Other general attributes:
isCritical
Whentrue
, and if such condition is not met, abort the whole power execution process.isStatic
Whentrue
, condition value will not change in a single execution process, even following powers may change it, it's still considered met.
Return true only if all conditions are met.
Return true when one of the conditions is met.
Return true when an odd number of conditions are met.
- Note: You need to set
isStatic
tofalse
.
Return true when the item is in correct inventory slot.
Available slot options:
ARMOR
HAND
BACKPACK
BELT
INVENTORY
HELMET
CHESTPLATE
LEGGINGS
BOOTS
MAIN_HAND
OFF_HAND
Example:
/rpgitem condition add myhelmet rpgitems:slotcondition id:wear critical:true slots:HELMET
Return true in the chance of N percent.
Return true when damageType is matched.
Return true when item durability is within range.
Return true when item is equipped in correct slot.
Return true when scoreboard value is within range or have corresponding tag.
TBD
Return true when last power is correctly executed.