{
  "format": "encounterra.homebrew",
  "schemaVersion": "0.1",
  "package": {
    "id": "d70ba198-7fca-4a83-bbca-8342f2050c80",
    "name": "Emberbound Adept — The Twofold Flame",
    "version": "0.1.3"
  },
  "requires": {
    "ruleset": "dnd-2024",
    "srdCatalog": "5.2.1-encounterra.1"
  },
  "definitions": [
    {
      "kind": "hero",
      "id": "emberbound-adept",
      "name": "Emberbound Adept",
      "stats": {
        "level": 8,
        "hitPoints": 54,
        "armorClass": 15,
        "speedFeet": 30,
        "size": "medium",
        "creatureType": "humanoid",
        "abilityScores": {
          "strength": 10,
          "dexterity": 14,
          "constitution": 14,
          "intelligence": 18,
          "wisdom": 12,
          "charisma": 10
        },
        "savingThrows": {
          "strength": 0,
          "dexterity": 2,
          "constitution": 2,
          "intelligence": 7,
          "wisdom": 4,
          "charisma": 0
        },
        "difficultyClass": 15,
        "spellAttackBonus": 7
      },
      "resources": [
        {
          "id": "daily-burst",
          "maximum": 1,
          "refresh": "longRest"
        },
        {
          "id": "spell-slots",
          "kind": "spellSlots",
          "slots": { "3": 2, "4": 1 },
          "refresh": "longRest"
        }
      ],
      "choices": [
        {
          "id": "element",
          "name": "Bound element",
          "default": "fire",
          "options": [
            {
              "id": "fire",
              "grants": [
                {
                  "ref": "#fire-training",
                  "args": {
                    "accuracy": 7
                  }
                }
              ]
            },
            {
              "id": "cold",
              "grants": [
                {
                  "ref": "#cold-training",
                  "args": {
                    "accuracy": 7
                  }
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "kind": "ability",
      "id": "fire-training",
      "name": "Flame Training",
      "parameters": {
        "accuracy": {
          "valueType": "integer",
          "minimum": 0,
          "maximum": 20
        }
      },
      "grants": [
        {
          "ref": "#fire-lance",
          "args": {
            "accuracy": {
              "param": "accuracy"
            }
          }
        },
        "#cinder-burst"
      ]
    },
    {
      "kind": "ability",
      "id": "cold-training",
      "name": "Frost Training",
      "parameters": {
        "accuracy": {
          "valueType": "integer",
          "minimum": 0,
          "maximum": 20
        }
      },
      "grants": [
        {
          "ref": "#cold-lance",
          "args": {
            "accuracy": {
              "param": "accuracy"
            }
          }
        },
        "#rime-burst"
      ]
    },
    {
      "kind": "spell",
      "id": "fire-lance",
      "school": "evocation",
      "name": "Fire Lance",
      "level": 0,
      "activation": "action",
      "parameters": {
        "accuracy": {
          "valueType": "integer",
          "minimum": 0,
          "maximum": 20
        }
      },
      "target": {
        "side": "enemy",
        "rangeFeet": 120
      },
      "resolution": {
        "kind": "attack",
        "attackType": "ranged",
        "attackBonus": {
          "param": "accuracy"
        },
        "onHit": {
          "op": "damage",
          "amount": {
            "dice": {
              "count": 2,
              "sides": 10
            }
          },
          "damageType": "fire"
        }
      }
    },
    {
      "kind": "spell",
      "id": "cold-lance",
      "name": "Cold Lance",
      "extends": "#fire-lance",
      "replace": {
        "resolution": {
          "kind": "attack",
          "attackType": "ranged",
          "attackBonus": {
            "param": "accuracy"
          },
          "onHit": {
            "op": "damage",
            "amount": {
              "dice": {
                "count": 2,
                "sides": 10
              }
            },
            "damageType": "cold"
          }
        }
      }
    },
    {
      "kind": "spell",
      "id": "cinder-burst",
      "school": "evocation",
      "name": "Cinder Burst",
      "level": 3,
      "activation": "action",
      "target": {
        "side": "any",
        "mode": "all",
        "area": {
          "shape": "radius",
          "sizeFeet": 15
        }
      },
      "resolution": {
        "kind": "savingThrow",
        "ability": "dexterity",
        "dc": 15,
        "halfOnSave": true,
        "damage": {
          "dice": {
          "count": { "kind": "add", "operands": [3, { "kind": "castLevel" }] },
            "sides": 6
          },
          "damageType": "fire"
        }
      },
      "payments": [
        {
          "id": "daily",
          "mode": "daily",
          "resource": "daily-burst",
          "cost": 1
        },
        {
          "id": "third-level-slot",
          "mode": "spellSlot",
          "resource": "spell-slots",
          "slotLevel": 3
        },
        {
          "id": "fourth-level-slot",
          "mode": "spellSlot",
          "resource": "spell-slots",
          "slotLevel": 4
        }
      ]
    },
    {
      "kind": "spell",
      "id": "rime-burst",
      "name": "Rime Burst",
      "extends": "#cinder-burst",
      "replace": {
        "resolution": {
          "kind": "savingThrow",
          "ability": "dexterity",
          "dc": 15,
          "halfOnSave": true,
          "damage": {
            "dice": {
              "count": { "kind": "add", "operands": [3, { "kind": "castLevel" }] },
              "sides": 6
            },
            "damageType": "cold"
          }
        }
      }
    }
  ]
}
