{
  "format": "encounterra.homebrew",
  "schemaVersion": "0.1",
  "package": {
    "id": "1c4dc752-5fb0-4efb-a11f-f77233a1e76d",
    "name": "Umbral Dragon - Dream-Eater Breath Showcase",
    "version": "0.1.1"
  },
  "requires": { "ruleset": "dnd-2024", "srdCatalog": "5.2.1-encounterra.1" },
  "definitions": [
    {
      "kind": "monster", "id": "umbral-dragon", "name": "Umbral Dragon (Breath Showcase)",
      "stats": {
        "challengeRating": "10", "hitPoints": 158, "armorClass": 17,
        "speedFeet": 40, "flySpeedFeet": 80, "darkvisionFeet": 120,
        "size": "large", "creatureType": "dragon",
        "abilityScores": { "strength": 21, "dexterity": 12, "constitution": 19, "intelligence": 13, "wisdom": 14, "charisma": 17 },
        "savingThrows": { "strength": 5, "dexterity": 5, "constitution": 8, "intelligence": 1, "wisdom": 6, "charisma": 7 },
        "difficultyClass": 16, "resistances": ["necrotic"]
      },
      "resources": [{ "id": "breath", "name": "Umbral Breath", "maximum": 1, "refresh": "longRest" }],
      "actions": ["#rending-assault", "#thought-shearing-breath"],
      "choices": [{
        "id": "breath-shape", "name": "Breath shape", "default": "cone",
        "options": [
          { "id": "cone", "name": "30-foot cone", "grants": ["#umbral-breath"] },
          { "id": "line", "name": "60-foot line", "grants": ["#umbral-line"] }
        ]
      }],
      "rules": [{
        "id": "recharge-breath", "event": "turn.start",
        "do": [{
          "op": "restoreResource", "resource": "breath",
          "amount": { "kind": "max", "operands": [0, {
            "kind": "subtract", "operands": [{ "kind": "dice", "dice": { "count": 1, "sides": 6 } }, 4]
          }] }
        }]
      }]
    },
    {
      "kind": "action", "id": "rending-assault", "name": "Rending Assault",
      "activation": { "economy": "action", "countsAs": "multiattack" },
      "target": { "side": "enemy", "rangeFeet": 10 },
      "resolution": { "kind": "sequence", "steps": [
        { "kind": "reference", "ref": "#umbral-bite" },
        { "repeat": 2, "resolve": { "kind": "reference", "ref": "#umbral-claw" } }
      ] }
    },
    {
      "kind": "action", "id": "umbral-bite", "name": "Umbral Bite",
      "resolution": { "kind": "attack", "attackBonus": 9, "damage": [
        { "dice": { "count": 2, "sides": 10 }, "bonus": 5, "damageType": "piercing" },
        { "dice": { "count": 1, "sides": 6 }, "damageType": "necrotic" }
      ] }
    },
    {
      "kind": "action", "id": "umbral-claw", "name": "Umbral Claw",
      "resolution": { "kind": "attack", "attackBonus": 9,
        "damage": { "dice": { "count": 2, "sides": 6 }, "bonus": 5, "damageType": "slashing" }
      }
    },
    {
      "kind": "action", "id": "umbral-breath", "name": "Umbral Breath (Cone)",
      "activation": "action", "resource": { "ref": "breath", "cost": 1 },
      "target": { "side": "any", "mode": "all", "area": { "shape": "cone", "sizeFeet": 30 } },
      "resolution": { "kind": "savingThrow", "ability": "dexterity", "dc": 16, "halfOnSave": true,
        "damage": { "dice": { "count": 8, "sides": 8 }, "damageType": "necrotic" }
      }
    },
    {
      "kind": "action", "id": "thought-shearing-breath", "name": "Thought-Shearing Breath",
      "activation": "action", "magical": true, "resource": { "ref": "breath", "cost": 1 },
      "target": { "side": "any", "mode": "all", "area": { "shape": "cone", "sizeFeet": 30 } },
      "resolution": { "kind": "savingThrow", "ability": "intelligence", "dc": 16,
        "onFailure": [
          { "op": "damage", "amount": { "dice": { "count": 5, "sides": 8 } }, "damageType": "psychic" },
          { "op": "applyCondition", "condition": "stunned", "duration": "repeatSaveEndOfTurn", "maxTargetTurns": 10,
            "repeatSave": { "ability": "intelligence", "dc": 16 } }
        ]
      }
    },
    {
      "kind": "action", "id": "umbral-line", "name": "Umbral Breath (Line)",
      "extends": "#umbral-breath",
      "replace": { "target": { "side": "any", "mode": "all", "area": { "shape": "line", "sizeFeet": 60, "widthFeet": 5 } } }
    }
  ]
}
