2022-09-15 10:06:54 +02:00
|
|
|
{
|
2023-05-19 20:14:01 +02:00
|
|
|
"type" : "object",
|
|
|
|
"$schema" : "http://json-schema.org/draft-04/schema",
|
2022-09-15 10:06:54 +02:00
|
|
|
"title" : "VCMI obstacle format",
|
|
|
|
"description" : "Format used to define new obstacles in VCMI",
|
2023-06-06 14:53:14 +02:00
|
|
|
"required" : [ "animation", "width", "height", "blockedTiles" ],
|
|
|
|
"anyOf" : [
|
|
|
|
{
|
|
|
|
"required" : [ "allowedTerrains" ]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"required" : [ "specialBattlefields" ]
|
|
|
|
}
|
|
|
|
],
|
2022-09-15 10:06:54 +02:00
|
|
|
"additionalProperties" : false,
|
2023-05-19 20:14:01 +02:00
|
|
|
"properties" : {
|
|
|
|
"allowedTerrains" : {
|
|
|
|
"type" : "array",
|
2023-09-26 12:22:36 +02:00
|
|
|
"description" : "List of terrains on which this obstacle can be used",
|
2023-05-19 20:14:01 +02:00
|
|
|
"items" : { "type" : "string" }
|
2022-09-15 10:06:54 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"specialBattlefields" : {
|
|
|
|
"type" : "array",
|
2023-09-26 12:22:36 +02:00
|
|
|
"description" : "List of special battlefields on which this obstacle can be used",
|
2023-05-19 20:14:01 +02:00
|
|
|
"items" : { "type" : "string" }
|
2022-09-15 10:06:54 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"absolute" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"description" : "Should be used absolute or relative coordinates for obstacle. There is possible only one absolute obstacle"
|
2023-05-19 20:04:31 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"width" : {
|
|
|
|
"type" : "number",
|
2023-07-22 12:42:57 +02:00
|
|
|
"description" : "Width of obstacle"
|
2022-09-15 10:06:54 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"height" : {
|
|
|
|
"type" : "number",
|
2023-07-22 12:42:57 +02:00
|
|
|
"description" : "height of obstacle"
|
2022-09-15 10:06:54 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"blockedTiles" : {
|
|
|
|
"type" : "array",
|
|
|
|
"description" : "Blocked hexes - absolute or relative hex id",
|
|
|
|
"items" : { "type" : "number" }
|
2022-09-15 10:06:54 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"animation" : {
|
|
|
|
"type" : "string",
|
|
|
|
"description" : "Image resource",
|
2023-03-28 16:02:18 +02:00
|
|
|
"anyOf" : [
|
2024-02-19 17:50:59 +02:00
|
|
|
{ "format" : "animationFile" },
|
2023-03-28 16:02:18 +02:00
|
|
|
{ "format" : "imageFile" }
|
|
|
|
]
|
2022-09-15 10:06:54 +02:00
|
|
|
},
|
2023-06-06 14:53:14 +02:00
|
|
|
"foreground" : {
|
|
|
|
"type" : "boolean",
|
|
|
|
"description" : "If set to true, obstacle will appear in front of units or other battlefield objects"
|
2022-09-15 10:06:54 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|