{
  "format": "keyrota-rotation",
  "version": 1,
  "title": "Syntax check: every condition and flag",
  "specID": 0,
  "ignoreMainIcon": true,
  "enemies": {"range": 8, "combatOnly": true},
  "notes": [
    "A syntax sample, not a rotation for combat: spell IDs are not set (0).",
    "It uses every kind of condition, every slot flag, numbered references and a rule without conditions."
  ],
  "resources": ["PlayerHP", "TargetHP", "Energy", "Combo_Points"],
  "auras": [
    {"n": 1, "alias": "Dot", "label": "A debuff on the target", "spell": 0, "note": "aura 1"},
    {"n": 2, "alias": "Proc", "label": "A buff with stacks", "spell": 0}
  ],
  "slots": [
    {"n": 1, "alias": "Manual_Button", "label": "Pressed only by you (M)", "spell": 0, "manual": true},
    {"n": 2, "alias": "Charges_Spell", "label": "A spell with charges", "spell": 0},
    {"n": 3, "alias": "Glow_Spell", "label": "A spell whose button glows", "spell": 0},
    {"n": 4, "alias": "Off_Gcd", "label": "Off the GCD (O)", "spell": 0, "offGcd": true},
    {
      "n": 5,
      "alias": "Queued_Macro",
      "label": "Off the GCD in the queue window (OQ)",
      "spell": 0,
      "offGcd": true,
      "queue": true
    },
    {"n": 6, "alias": "Channel_Spell", "label": "Channeled (C)", "spell": 0, "channel": true},
    {"n": 7, "alias": "Burst_Spell", "label": "A cooldown on the Burst button", "spell": 0},
    {"n": 8, "alias": "Ground_Spell", "label": "A ground-targeted spell (macro @player)", "spell": 0},
    {"n": 9, "alias": "Defensive", "label": "A defensive", "spell": 0, "show": "combat"},
    {"n": 10, "alias": "Filler", "label": "A filler", "spell": 0}
  ],
  "rules": [
    {"use": "Manual_Button", "name": "1: no conditions, M slot (skipped)"},
    {
      "use": "Defensive",
      "name": "2: health and the defensives toggle",
      "when": [{"all": ["defensives == 1", "PlayerHP <= 35"]}]
    },
    {
      "use": "Charges_Spell",
      "name": "3: charges",
      "when": [
        {"all": ["Charges_Spell.charges >= 2"], "comment": "both charges"},
        {
          "all": ["Charges_Spell.charges == 1", "Charges_Spell.cd <= 20"],
          "comment": "the second one is almost back"
        }
      ]
    },
    {
      "use": "Glow_Spell",
      "name": "4: glow and distance",
      "when": [{"all": ["Glow_Spell.glow", "target.distance <= 8"]}]
    },
    {"use": "Off_Gcd", "name": "5: stacks", "when": [{"all": ["Proc.up", "Proc.stacks >= 3"]}]},
    {
      "use": "Queued_Macro",
      "name": "6: aura down and the enemy count",
      "when": [{"all": ["Proc.down", "enemies >= 2"]}]
    },
    {
      "use": "Channel_Spell",
      "name": "7: no glow, ready, movement",
      "when": [{"all": ["Glow_Spell.noglow", "Channel_Spell.ready", "movement == 0"]}]
    },
    {
      "use": "slot7",
      "name": "8: Burst in Auto mode, or Single mode on 3+",
      "when": [
        {"all": ["cd == 1", "aoe == 0", "st == 0", "Combo_Points >= 50", "Off_Gcd.oncd"]},
        {"all": ["st == 1", "enemies >= 3", "resource3 >= 40"]}
      ]
    },
    {
      "use": "Ground_Spell",
      "name": "9: ground toggle and Multiple mode",
      "when": [{"all": ["ground_spells == 1", "aoe == 1"]}]
    },
    {
      "use": "Filler",
      "name": "10: DoT refresh by number, target health",
      "when": [
        {"all": ["buff1.down", "TargetHP >= 50"]},
        {"all": ["Dot.up and Dot.duration <= 30"], "comment": "two conditions in one string"},
        {"all": ["Combo_Points<65", "Energy>=30"], "comment": "spaces around operators are optional"}
      ]
    }
  ],
  "footer": ["End of the syntax sample."]
}
