Magic

Magic

190k Downloads

CheckTriggers Improvements to add the same functionality as CheckRequirements

I0nTech opened this issue ยท 1 comments

commented

CheckTrigger currently can only check for a single trigger without any trigger requirements

CheckTrigger:
  trigger: sometrigger

Unlike CheckRequirements, where requirements can be defined like:

Class: CheckRequirements
  requirements:
      - variables:
         - variable: somevariable
           min: 0.5
         - variable: anothervariable
            max: 3

Suggestion: Add CheckTriggers or update CheckTrigger to check for triggers like

Class: CheckTriggers
    triggers:
      - trigger: damage
        damage_types: physical,projectile,magic,explosion
        min_health: 2
      - trigger: left_click

to allow for more complex spell behaviors

commented

I've managed to have some success doing this already, I have the following in a spell:

        - class: CheckTrigger
          trigger: damage
          damage_type: lightning
          min_damage: 2.0

which only runs its actions when triggered by the correct damage type, and above the minimum damage threshold. Unsure how to go about doing 'damage_types' plural, which could be useful, but it works for singular damage types (max_damage is also a thing I believe)