{
  "format": "hellarena.project/1",
  "name": "Cripta do Selo",
  "description": "Small example: a spell, a potion that casts it, a key, a guard that drops the potion, and a two-room map with rules.",
  "license": "hellarena-credito",
  "assets": [
    {
      "kind": "spell",
      "key": "sopro_vital",
      "name": "Sopro Vital",
      "draft": {
        "v": 1,
        "name": "Sopro Vital",
        "school": "nature",
        "target": "self",
        "delivery": "instant",
        "effects": [
          {
            "kind": "heal",
            "power": "strong"
          }
        ],
        "cast": 1,
        "cooldown": 20,
        "range": 0,
        "icon": "renew.png",
        "sound": "renew"
      }
    },
    {
      "kind": "spell",
      "key": "lanca_de_sal",
      "name": "Lança de Sal",
      "draft": {
        "v": 1,
        "name": "Lança de Sal",
        "school": "frost",
        "target": "direction",
        "delivery": "projectile",
        "speed": "fast",
        "effects": [
          {
            "kind": "damage",
            "power": "normal"
          },
          {
            "kind": "slow",
            "amount": 40,
            "duration": 3
          }
        ],
        "cast": 1.5,
        "cooldown": 0,
        "range": 30,
        "vfx": {
          "particles": "snow",
          "color": "#9fd8ff"
        }
      }
    },
    {
      "kind": "item",
      "key": "pocao_vital",
      "name": "Poção Vital",
      "draft": {
        "v": 1,
        "name": "Poção Vital",
        "kind": "consumable",
        "quality": "uncommon",
        "icon": "🧪",
        "use": "spell:sopro_vital@1.0.0",
        "stack": 5,
        "sell": 10
      }
    },
    {
      "kind": "item",
      "key": "chave_selo",
      "name": "Chave do Selo",
      "draft": {
        "v": 1,
        "name": "Chave do Selo",
        "kind": "key",
        "quality": "rare",
        "description": "Abre o selo da cripta."
      }
    },
    {
      "kind": "creature",
      "key": "guarda",
      "name": "Guarda da Cripta",
      "draft": {
        "v": 1,
        "name": "Guarda da Cripta",
        "family": "sorrak",
        "look": "sorrak",
        "level": 5,
        "rank": "normal",
        "role": "balanced",
        "temper": "guerreiro",
        "abilities": [
          "charge"
        ],
        "powers": [],
        "spellRefs": [
          "spell:lanca_de_sal@1.0.0"
        ],
        "drops": [
          {
            "item": "item:pocao_vital@1.0.0",
            "chance": 0.5,
            "count": [
              1,
              2
            ]
          }
        ],
        "money": [
          2,
          8
        ],
        "lore": {
          "where": "Cripta do Selo",
          "why": "Vigiam a chave do selo desde que a cidade afundou."
        }
      }
    },
    {
      "kind": "map",
      "key": "cripta_do_selo",
      "name": "Cripta do Selo",
      "draft": {
        "v": 1,
        "name": "Cripta do Selo",
        "start": "salao",
        "combat": "active",
        "rooms": [
          {
            "id": "salao",
            "name": "Salão",
            "w": 14,
            "h": 10,
            "cells": "###############............##............##............##............##............##............##............##............###############",
            "props": [
              {
                "kind": "torch",
                "x": 3,
                "y": 1
              },
              {
                "kind": "barrel",
                "x": 6,
                "y": 2
              }
            ],
            "doors": [
              {
                "x": 12,
                "y": 5,
                "to": "cripta",
                "label": "Cripta"
              }
            ],
            "spawns": [
              {
                "x": 2,
                "y": 5,
                "ref": "player"
              }
            ],
            "regions": [],
            "gates": [],
            "chests": []
          },
          {
            "id": "cripta",
            "name": "Cripta",
            "w": 14,
            "h": 10,
            "cells": "###############............##............##............##............##............##............##............##............###############",
            "props": [],
            "doors": [
              {
                "x": 1,
                "y": 5,
                "to": "salao",
                "label": "Salão"
              }
            ],
            "spawns": [
              {
                "x": 9,
                "y": 4,
                "ref": "creature:guarda@1.0.0",
                "respawn": "never",
                "tag": "guarda"
              },
              {
                "x": 9,
                "y": 6,
                "ref": "creature:guarda@1.0.0",
                "respawn": "never",
                "tag": "guarda"
              }
            ],
            "regions": [
              {
                "name": "fundo",
                "x": 10,
                "y": 1,
                "w": 3,
                "h": 8
              }
            ],
            "gates": [],
            "chests": [
              {
                "x": 12,
                "y": 2,
                "drops": [
                  {
                    "item": "item:chave_selo@1.0.0",
                    "chance": 1
                  }
                ],
                "money": [
                  10,
                  30
                ]
              }
            ]
          }
        ],
        "rules": {
          "vars": {
            "guardas": 0
          },
          "rules": [
            {
              "id": "inicio",
              "on": {
                "kind": "start"
              },
              "do": [
                {
                  "kind": "showText",
                  "text": "A chave do selo está na cripta. Os guardas não vão deixar."
                },
                {
                  "kind": "setObjective",
                  "id": "guardas",
                  "text": "Derrote os guardas ({guardas}/2)"
                }
              ]
            },
            {
              "id": "um_guarda",
              "on": {
                "kind": "unitDies",
                "arg": "guarda"
              },
              "do": [
                {
                  "kind": "setVar",
                  "name": "guardas",
                  "add": 1
                }
              ]
            },
            {
              "id": "livre",
              "on": {
                "kind": "groupCleared",
                "arg": "guarda"
              },
              "once": true,
              "do": [
                {
                  "kind": "completeObjective",
                  "id": "guardas"
                },
                {
                  "kind": "setObjective",
                  "id": "chave",
                  "text": "Abra o baú e pegue a chave"
                }
              ]
            },
            {
              "id": "chave",
              "on": {
                "kind": "itemTaken",
                "arg": "item:chave_selo@1.0.0"
              },
              "once": true,
              "do": [
                {
                  "kind": "completeObjective",
                  "id": "chave"
                },
                {
                  "kind": "endSession",
                  "result": "win",
                  "text": "O selo é seu."
                }
              ]
            }
          ]
        }
      }
    }
  ]
}
