obstacle.json 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {
  2. "type" : "object",
  3. "$schema" : "http://json-schema.org/draft-04/schema",
  4. "title" : "VCMI obstacle format",
  5. "description" : "Format used to define new obstacles in VCMI",
  6. "required" : [ "animation", "width", "height", "blockedTiles" ],
  7. "anyOf" : [
  8. {
  9. "required" : [ "allowedTerrains" ]
  10. },
  11. {
  12. "required" : [ "specialBattlefields" ]
  13. }
  14. ],
  15. "additionalProperties" : false,
  16. "properties" : {
  17. "allowedTerrains" : {
  18. "type" : "array",
  19. "description" : "List of terrains on which this obstacle can be used",
  20. "items" : { "type" : "string" }
  21. },
  22. "specialBattlefields" : {
  23. "type" : "array",
  24. "description" : "List of special battlefields on which this obstacle can be used",
  25. "items" : { "type" : "string" }
  26. },
  27. "absolute" : {
  28. "type" : "boolean",
  29. "description" : "Should be used absolute or relative coordinates for obstacle. There is possible only one absolute obstacle"
  30. },
  31. "width" : {
  32. "type" : "number",
  33. "description" : "Width of obstacle"
  34. },
  35. "height" : {
  36. "type" : "number",
  37. "description" : "height of obstacle"
  38. },
  39. "blockedTiles" : {
  40. "type" : "array",
  41. "description" : "Blocked hexes - absolute or relative hex id",
  42. "items" : { "type" : "number" }
  43. },
  44. "animation" : {
  45. "type" : "string",
  46. "description" : "Image resource",
  47. "anyOf" : [
  48. { "format" : "animationFile" },
  49. { "format" : "imageFile" }
  50. ]
  51. },
  52. "foreground" : {
  53. "type" : "boolean",
  54. "description" : "If set to true, obstacle will appear in front of units or other battlefield objects"
  55. }
  56. }
  57. }