{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Ability Definitions",
  "type": "object",
  "additionalProperties": false,
  "required": ["schemaVersion", "abilities"],
  "properties": {
    "schemaVersion": {
      "type": "integer",
      "minimum": 1
    },
    "abilities": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "name", "targeting", "cost", "power", "statusEffectsOnHit"],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "targeting": {
            "type": "object",
            "additionalProperties": false,
            "required": ["mode", "range", "requiresLos"],
            "properties": {
              "mode": {
                "type": "string",
                "minLength": 1
              },
              "range": {
                "type": "number"
              },
              "requiresLos": {
                "type": "boolean"
              }
            }
          },
          "cost": {
            "type": "object",
            "additionalProperties": false,
            "required": ["mp", "ap"],
            "properties": {
              "mp": {
                "type": "number"
              },
              "ap": {
                "type": "number"
              }
            }
          },
          "power": {
            "type": "object",
            "additionalProperties": false,
            "required": ["formula", "base", "scalingStat", "scaling"],
            "properties": {
              "formula": {
                "type": "string",
                "minLength": 1
              },
              "base": {
                "type": "number"
              },
              "scalingStat": {
                "type": "string",
                "minLength": 1
              },
              "scaling": {
                "type": "number"
              }
            }
          },
          "statusEffectsOnHit": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    }
  }
}
