{
  "$defs": {
    "HitBox": {
      "additionalProperties": false,
      "description": "One box.",
      "properties": {
        "always": {
          "description": "Active whatever is played: a hurtbox of the body.",
          "type": "boolean"
        },
        "bone": {
          "$ref": "#/$defs/Id",
          "description": "The bone that carries it, by the identifier `rig.json` gives it."
        },
        "data": {
          "additionalProperties": {
            "format": "double",
            "type": "number"
          },
          "description": "Numbers the game reads, by name: damage, knockback, what it needs.",
          "type": "object"
        },
        "id": {
          "$ref": "#/$defs/Id"
        },
        "kind": {
          "$ref": "#/$defs/HitKind",
          "default": "hit"
        },
        "name": {
          "description": "What the game calls it; each box of a file has its own.",
          "type": "string"
        },
        "points": {
          "description": "Its corners in the space of its bone, in order around it: three or more.",
          "items": {
            "items": {
              "format": "float",
              "type": "number"
            },
            "maxItems": 2,
            "minItems": 2,
            "type": "array"
          },
          "type": "array"
        },
        "ranges": {
          "description": "Where it is active, besides `always`.",
          "items": {
            "$ref": "#/$defs/HitRange"
          },
          "type": "array"
        }
      },
      "required": [
        "id",
        "name",
        "bone",
        "points"
      ],
      "type": "object"
    },
    "HitKind": {
      "description": "What a box is for.",
      "oneOf": [
        {
          "const": "hit",
          "description": "What strikes: a fist, a blade, during an attack.",
          "type": "string"
        },
        {
          "const": "hurt",
          "description": "What can be struck: the body.",
          "type": "string"
        },
        {
          "const": "push",
          "description": "What other characters cannot walk through.",
          "type": "string"
        }
      ]
    },
    "HitRange": {
      "additionalProperties": false,
      "description": "A part of an animation where a box is active.",
      "properties": {
        "animation": {
          "$ref": "#/$defs/Id",
          "description": "The animation, by the identifier `rig.json` gives it."
        },
        "end": {
          "description": "…to this one, both included.",
          "format": "float",
          "type": "number"
        },
        "events": {
          "description": "The runtime tells an event when the range starts and when it ends.",
          "type": "boolean"
        },
        "start": {
          "description": "From this time, in seconds from the start of the animation…",
          "format": "float",
          "type": "number"
        }
      },
      "required": [
        "animation",
        "start",
        "end"
      ],
      "type": "object"
    },
    "HitVersion": {
      "description": "The versions of the format of boxes.",
      "oneOf": [
        {
          "const": "0.1",
          "description": "The first: polygons on bones, active always or on ranges of animations.",
          "type": "string"
        }
      ]
    },
    "Id": {
      "description": "An identifier that never changes: a ULID, 26 letters and digits.",
      "pattern": "^[0-7][0-9A-HJKMNP-TV-Z]{25}$",
      "type": "string"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "`hit.json`.",
  "properties": {
    "boxes": {
      "items": {
        "$ref": "#/$defs/HitBox"
      },
      "type": "array"
    },
    "format_version": {
      "$ref": "#/$defs/HitVersion"
    }
  },
  "required": [
    "format_version",
    "boxes"
  ],
  "title": "pantin hit, format 0.1",
  "type": "object"
}
