1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00
vcmi/config/schemas/obstacle.json

58 lines
1.5 KiB
JSON
Raw Normal View History

{
2023-05-19 20:14:01 +02:00
"type" : "object",
"$schema" : "http://json-schema.org/draft-04/schema",
"title" : "VCMI obstacle format",
"description" : "Format used to define new obstacles in VCMI",
"required" : [ "animation", "width", "height", "blockedTiles" ],
"anyOf" : [
{
"required" : [ "allowedTerrains" ]
},
{
"required" : [ "specialBattlefields" ]
}
],
"additionalProperties" : false,
2023-05-19 20:14:01 +02:00
"properties" : {
"allowedTerrains" : {
"type" : "array",
"description" : "List of terrains on which this obstacle can be used",
2023-05-19 20:14:01 +02:00
"items" : { "type" : "string" }
},
2023-05-19 20:14:01 +02:00
"specialBattlefields" : {
"type" : "array",
"description" : "List of special battlefields on which this obstacle can be used",
2023-05-19 20:14:01 +02:00
"items" : { "type" : "string" }
},
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:14:01 +02:00
"width" : {
"type" : "number",
"description" : "Width of obstacle"
},
2023-05-19 20:14:01 +02:00
"height" : {
"type" : "number",
"description" : "height of obstacle"
},
2023-05-19 20:14:01 +02:00
"blockedTiles" : {
"type" : "array",
"description" : "Blocked hexes - absolute or relative hex id",
"items" : { "type" : "number" }
},
2023-05-19 20:14:01 +02:00
"animation" : {
"type" : "string",
"description" : "Image resource",
"anyOf" : [
{ "format" : "defFile" },
{ "format" : "imageFile" }
]
},
"foreground" : {
"type" : "boolean",
"description" : "If set to true, obstacle will appear in front of units or other battlefield objects"
}
}
}