action conditions - magemonkeystudio/divinity GitHub Wiki

🧱 Action Conditions

Conditions are optional checks that run before actions execute. If conditions fail, the action sequence will be interrupted — or rerouted using actions-on-fail.


✅ Available Condition Types

Condition Description
ENTITY_TYPE Checks if the target’s entity type matches a given name (e.g. ZOMBIE, PLAYER)
ENTITY_HEALTH Checks the target’s health (supports percentage checks like >50%)
VAULT_BALANCE Checks if a player has enough money (requires Vault)
PERMISSION Checks if a player has a specific permission node
WORLD_TIME Compares the in-game world time (e.g. >12000 for night)

🧪 Example

conditions:
  list:
    - '[ENTITY_HEALTH] ~amount: >50%; ~target: near;'
    - '[ENTITY_TYPE] ~name: SKELETON; ~target: near;'
  actions-on-fail: 'fail-fallback'

🛠 Tips

  • Use ~target: to specify which target the condition applies to.
  • Use % on ~amount: to compare health as a percent.
  • Prefix permission with - to check that a permission is not present.

🔗 Related