1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-10 00:43:59 +02:00
vcmi/docs/modders/Entities_Format/Battle_Obstacle_Format.md
Ivan Savenko 879aaba980 Use json instead of json5 for syntax highlight in docs
Looks like website only recognizes javascript & json, and is not aware
of jsonc or json5.

Will result in small regression on Github web view - comments will show
up as red (since comments are not part of json format), but syntax
highlight would work both on website and on Github.

Alternative is using javascript for syntax highlight, however syntax
highlighter for json looks better on both website and Github (since it
uses separate highlighting for json keys, separate from strings in
values)
2024-12-04 16:50:01 +00:00

823 B

Battle Obstacle Format

	// List of terrains on which this obstacle can be used
	"allowedTerrains" : []
	
	// List of special battlefields on which this obstacle can be used
	"specialBattlefields" : []
	
	// If set to true, this obstacle will use absolute coordinates. Only one such obstacle can appear on the battlefield
	"absolute" : false
	
	// Width of an obstacle, in hexes
	"width" : 1
	
	// Height of an obstacle, in hexes
	"height" : 1
	
	// List of tiles blocked by an obstacles. For non-absolute obstacles uses relative hex indices
	"blockedTiles" : [ 0, 20, 50 ]
	
	// For absolute obstacle - image with static obstacle. For non-absolute - animation with an obstacle
	"animation" : "",
	
	// If set to true, obstacle will appear in front of units or other battlefield objects
	"foreground" : false