{
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "title": "VCMI map header format",
  "description": "Part of map in json format, defines core settings of the map",
  "required": [
    "defeatIconIndex",
    "defeatString",
    "victoryIconIndex",
    "victoryString"
  ],
  "additionalProperties": false,
  "properties": {
    "defeatIconIndex": {
      "type": "number"
    },
    "defeatString": {
      "type": "string"
    },
    "victoryIconIndex": {
      "type": "number"
    },
    "victoryString": {
      "type": "string"
    },
    "triggeredEvents": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": false,
        "required": [
            "condition",
            "message",
            "effect"
          ],
        "properties": {
          "condition": {
            "type": "array"
          },
          "description": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "effect": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "messageToSend"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "messageToSend": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}