{
  "format": "keyrota-rotation",
  "version": 1,
  "title": "語法檢查：所有條件與旗標",
  "specID": 0,
  "ignoreMainIcon": true,
  "enemies": {"range": 8, "combatOnly": true},
  "notes": ["語法範例，不是實戰循環：法術 ID 未設定（0）。", "其中包含所有條件類型、所有欄位旗標、按編號引用與一條無條件規則。"],
  "resources": ["PlayerHP", "TargetHP", "Energy", "Combo_Points"],
  "auras": [
    {"n": 1, "alias": "Dot", "label": "目標身上的減益", "spell": 0, "note": "光環 1"},
    {"n": 2, "alias": "Proc", "label": "可疊層的增益", "spell": 0}
  ],
  "slots": [
    {"n": 1, "alias": "Manual_Button", "label": "只由你按（M）", "spell": 0, "manual": true},
    {"n": 2, "alias": "Charges_Spell", "label": "有充能的法術", "spell": 0},
    {"n": 3, "alias": "Glow_Spell", "label": "按鈕會發光的法術", "spell": 0},
    {"n": 4, "alias": "Off_Gcd", "label": "不佔 GCD（O）", "spell": 0, "offGcd": true},
    {"n": 5, "alias": "Queued_Macro", "label": "不佔 GCD，在佇列視窗（OQ）", "spell": 0, "offGcd": true, "queue": true},
    {"n": 6, "alias": "Channel_Spell", "label": "引導（C）", "spell": 0, "channel": true},
    {"n": 7, "alias": "Burst_Spell", "label": "由 Burst 按鈕控制的冷卻技能", "spell": 0},
    {"n": 8, "alias": "Ground_Spell", "label": "地面目標法術（巨集 @player）", "spell": 0},
    {"n": 9, "alias": "Defensive", "label": "防禦技能", "spell": 0, "show": "combat"},
    {"n": 10, "alias": "Filler", "label": "填充技能", "spell": 0}
  ],
  "rules": [
    {"use": "Manual_Button", "name": "1：無條件，M 欄位（跳過）"},
    {"use": "Defensive", "name": "2：生命力與防禦開關", "when": [{"all": ["defensives == 1", "PlayerHP <= 35"]}]},
    {
      "use": "Charges_Spell",
      "name": "3：充能",
      "when": [
        {"all": ["Charges_Spell.charges >= 2"], "comment": "兩層充能"},
        {"all": ["Charges_Spell.charges == 1", "Charges_Spell.cd <= 20"], "comment": "第二層快好了"}
      ]
    },
    {"use": "Glow_Spell", "name": "4：發光與距離", "when": [{"all": ["Glow_Spell.glow", "target.distance <= 8"]}]},
    {"use": "Off_Gcd", "name": "5：層數", "when": [{"all": ["Proc.up", "Proc.stacks >= 3"]}]},
    {"use": "Queued_Macro", "name": "6：光環不存在與敵人數量", "when": [{"all": ["Proc.down", "enemies >= 2"]}]},
    {
      "use": "Channel_Spell",
      "name": "7：不發光、就緒、移動",
      "when": [{"all": ["Glow_Spell.noglow", "Channel_Spell.ready", "movement == 0"]}]
    },
    {
      "use": "slot7",
      "name": "8：「自動」模式下的 Burst，或 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：「地面法術」開關與「範圍」模式",
      "when": [{"all": ["ground_spells == 1", "aoe == 1"]}]
    },
    {
      "use": "Filler",
      "name": "10：按編號刷新 DoT，目標生命力",
      "when": [
        {"all": ["buff1.down", "TargetHP >= 50"]},
        {"all": ["Dot.up and Dot.duration <= 30"], "comment": "一個字串裡寫兩個條件"},
        {"all": ["Combo_Points<65", "Energy>=30"], "comment": "運算子兩邊的空格可寫可不寫"}
      ]
    }
  ],
  "footer": ["語法範例結束。"]
}
