2014-03-17 16:11:10 +03:00
|
|
|
{
|
2014-03-07 16:21:09 +03:00
|
|
|
|
|
|
|
"type":"object",
|
|
|
|
"$schema": "http://json-schema.org/draft-04/schema",
|
|
|
|
|
|
|
|
"title" : "VCMI spell format",
|
|
|
|
"description" : "Format used to define new spells in VCMI",
|
|
|
|
|
|
|
|
|
2014-03-17 16:11:10 +03:00
|
|
|
"definitions" : {
|
2014-11-26 21:25:13 +02:00
|
|
|
"animationQueue":{
|
|
|
|
"type": "array",
|
|
|
|
"items":{
|
2014-11-27 15:51:16 +02:00
|
|
|
"anyOf":[
|
2015-03-22 12:49:14 +02:00
|
|
|
{
|
|
|
|
//dummy animation, pause, Value - frame count
|
|
|
|
"type": "number"
|
|
|
|
},
|
2014-11-27 15:51:16 +02:00
|
|
|
{
|
|
|
|
//assumed verticalPosition: top
|
|
|
|
"type": "string",
|
2016-11-02 19:11:01 +02:00
|
|
|
"format": "defFile"
|
2014-11-27 15:51:16 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties":{
|
|
|
|
"verticalPosition": {"type":"string", "enum":["top","bottom"]},
|
|
|
|
"defName": {"type":"string", "format": "defFile"}
|
2016-11-02 19:11:01 +02:00
|
|
|
},
|
|
|
|
"additionalProperties" : false
|
2014-11-27 15:51:16 +02:00
|
|
|
}
|
2016-11-02 19:11:01 +02:00
|
|
|
]
|
|
|
|
}
|
2014-11-26 21:25:13 +02:00
|
|
|
},
|
|
|
|
"animation":{
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties" : false,
|
|
|
|
"properties":{
|
2016-11-02 19:11:01 +02:00
|
|
|
"affect":{"$ref" : "#/definitions/animationQueue"},
|
|
|
|
"hit":{"$ref" : "#/definitions/animationQueue"},
|
2014-11-26 21:25:13 +02:00
|
|
|
"cast":{"$ref" : "#/definitions/animationQueue"},
|
|
|
|
"projectile":{
|
|
|
|
"type":"array",
|
|
|
|
"items":{
|
|
|
|
"type": "object",
|
|
|
|
"properties":{
|
|
|
|
"minimumAngle": {"type":"number", "minimum" : 0},
|
|
|
|
"defName": {"type":"string", "format": "defFile"}
|
2016-11-02 19:11:01 +02:00
|
|
|
},
|
|
|
|
"additionalProperties" : false
|
2014-11-26 21:25:13 +02:00
|
|
|
}
|
2016-11-02 19:11:01 +02:00
|
|
|
}
|
|
|
|
}
|
2014-11-26 21:25:13 +02:00
|
|
|
},
|
2014-03-17 16:11:10 +03:00
|
|
|
"flags" :{
|
|
|
|
"type" : "object",
|
|
|
|
"additionalProperties" : {
|
|
|
|
"type":"boolean"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"levelInfo":{
|
|
|
|
"type": "object",
|
|
|
|
"required":["range","description","cost","power","aiValue","range"],
|
|
|
|
|
|
|
|
"additionalProperties" : false,
|
|
|
|
"properties":{
|
|
|
|
"description":{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Localizable description. Use {xxx} for formatting"
|
|
|
|
},
|
|
|
|
"cost":{
|
|
|
|
"type": "number",
|
|
|
|
"description":"Cost in mana points"
|
|
|
|
},
|
|
|
|
"power":{
|
2018-10-30 23:30:56 +02:00
|
|
|
"type": "number"
|
2014-03-17 16:11:10 +03:00
|
|
|
},
|
|
|
|
"aiValue":{
|
2018-10-30 23:30:56 +02:00
|
|
|
"type": "number"
|
2014-03-17 16:11:10 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
"range":{
|
|
|
|
"type": "string",
|
|
|
|
"description": "spell range description in SRSL"
|
|
|
|
},
|
|
|
|
"effects":{
|
|
|
|
"type": "object",
|
2016-11-02 19:11:01 +02:00
|
|
|
"description": "Timed effects (updated by prolongation)",
|
|
|
|
"additionalProperties" : {
|
2018-10-30 23:30:56 +02:00
|
|
|
"$ref" : "bonus.json"
|
2016-11-02 19:11:01 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"cumulativeEffects":{
|
|
|
|
"type": "object",
|
|
|
|
"description": "Timed effects (updated by unique bonus)",
|
2014-03-17 16:11:10 +03:00
|
|
|
"additionalProperties" : {
|
2018-10-30 23:30:56 +02:00
|
|
|
"$ref" : "bonus.json"
|
2014-03-17 16:11:10 +03:00
|
|
|
}
|
|
|
|
},
|
2017-07-20 06:08:49 +02:00
|
|
|
"battleEffects":{
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties" : {
|
|
|
|
"type": "object"
|
|
|
|
}
|
|
|
|
},
|
2014-03-17 16:11:10 +03:00
|
|
|
"targetModifier":{
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": false,
|
|
|
|
"properties":{
|
|
|
|
"smart":{
|
|
|
|
"type": "boolean",
|
|
|
|
"description": "true: friendly/hostile based on positiveness; false: all targets"
|
2014-11-13 12:37:42 +02:00
|
|
|
},
|
|
|
|
"clearTarget":
|
|
|
|
{
|
|
|
|
"type": "boolean",
|
|
|
|
"description": "LOCATION target only. Target hex/tile must be clear"
|
|
|
|
},
|
|
|
|
"clearAffected":
|
|
|
|
{
|
|
|
|
"type": "boolean",
|
|
|
|
"description": "LOCATION target only. All affected hexes/tile must be clear"
|
2016-11-02 19:11:01 +02:00
|
|
|
}
|
2014-03-17 16:11:10 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-11-27 23:36:14 +02:00
|
|
|
},
|
2016-11-02 19:11:01 +02:00
|
|
|
|
2014-11-27 23:36:14 +02:00
|
|
|
"texts":{
|
|
|
|
"type": "object",
|
2016-11-02 19:11:01 +02:00
|
|
|
|
|
|
|
|
2014-11-27 23:36:14 +02:00
|
|
|
"additionalProperties" : false
|
2014-03-17 16:11:10 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"required" : ["type", "name", "school", "level", "power","gainChance","flags","levels"],
|
|
|
|
"additionalProperties" : false,
|
|
|
|
|
|
|
|
"properties": {
|
|
|
|
"index":{
|
|
|
|
"type": "number",
|
|
|
|
"description": "numeric id of spell required only for original spells, prohibited for new spells"
|
|
|
|
},
|
|
|
|
"type":{
|
|
|
|
"type": "string",
|
|
|
|
"enum": ["adventure", "combat", "ability"],
|
|
|
|
"description":"Spell type"
|
|
|
|
},
|
|
|
|
"name":{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Localizable name"
|
|
|
|
|
|
|
|
},
|
|
|
|
"school":{
|
|
|
|
"type": "object",
|
|
|
|
"description": "Spell schools",
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
|
|
|
"properties":{
|
|
|
|
|
|
|
|
"air":{"type": "boolean"},
|
|
|
|
"fire":{"type": "boolean"},
|
|
|
|
"earth":{"type": "boolean"},
|
|
|
|
"water":{"type": "boolean"}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
"level":{
|
|
|
|
"type": "number",
|
|
|
|
"description": "Spell level",
|
|
|
|
"minimum" : 0,
|
|
|
|
"maximum" : 5
|
|
|
|
},
|
|
|
|
|
|
|
|
"power":{
|
|
|
|
"type": "number",
|
2018-10-30 23:30:56 +02:00
|
|
|
"description": "Base power"
|
2014-03-17 16:11:10 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
"defaultGainChance":{
|
|
|
|
"type": "number",
|
|
|
|
"description": "Gain chance by default for all factions"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
"gainChance":{
|
|
|
|
"type": "object",
|
|
|
|
"description": "Chance in % to gain for faction. NOTE: this field is merged with faction config",
|
|
|
|
"additionalProperties" : {
|
2014-11-26 21:25:13 +02:00
|
|
|
"type": "number",
|
|
|
|
"minimum" : 0
|
|
|
|
}
|
2014-03-17 16:11:10 +03:00
|
|
|
},
|
|
|
|
"targetType":{
|
|
|
|
"type": "string",
|
2014-11-13 12:37:42 +02:00
|
|
|
"description": "NO_TARGET - instant cast no aiming, default; CREATURE - target is unit; OBSTACLE - target is OBSTACLE; LOCATION - target is location",
|
|
|
|
"enum": ["NO_TARGET","CREATURE","OBSTACLE","LOCATION"]
|
2014-03-17 16:11:10 +03:00
|
|
|
},
|
|
|
|
"counters":{
|
|
|
|
"$ref" : "#/definitions/flags",
|
|
|
|
"description": "Flags structure ids of countering spells"
|
|
|
|
},
|
|
|
|
"flags":{
|
|
|
|
"type": "object",
|
|
|
|
"description": "Various flags",
|
|
|
|
"additionalProperties" : false,
|
|
|
|
"properties":{
|
|
|
|
"indifferent": {
|
|
|
|
"type":"boolean",
|
|
|
|
"description": "Spell is indifferent for target"
|
|
|
|
},
|
|
|
|
"negative": {
|
|
|
|
"type":"boolean",
|
|
|
|
"description": "Spell is negative for target"
|
|
|
|
},
|
|
|
|
"positive": {
|
|
|
|
"type":"boolean",
|
|
|
|
"description": "Spell is positive for target"
|
|
|
|
},
|
|
|
|
"damage": {
|
|
|
|
"type":"boolean",
|
|
|
|
"description": "Spell does damage (direct or indirect)"
|
|
|
|
},
|
|
|
|
"offensive": {
|
|
|
|
"type":"boolean",
|
|
|
|
"description": "Spell does direct damage (implicitly sets damage and negative)"
|
|
|
|
},
|
|
|
|
"rising":{
|
|
|
|
"type":"boolean",
|
|
|
|
"description": "Rising spell (implicitly sets positive)"
|
|
|
|
},
|
|
|
|
"special":{
|
|
|
|
"type": "boolean",
|
|
|
|
"description": "Special spell. Can be given only by Bonus::SPELL"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"immunity":{
|
|
|
|
"$ref" : "#/definitions/flags",
|
|
|
|
"description": "flags structure of bonus names, any one of these bonus grants immunity"
|
|
|
|
},
|
|
|
|
"absoluteImmunity":{
|
|
|
|
"$ref" : "#/definitions/flags",
|
2014-03-23 15:59:03 +03:00
|
|
|
"description": "flags structure of bonus names. Any one of these bonus grants immunity, can't be negated"
|
2014-03-17 16:11:10 +03:00
|
|
|
},
|
|
|
|
"limit":{
|
|
|
|
"$ref" : "#/definitions/flags",
|
2014-05-18 16:22:02 +03:00
|
|
|
"description": "flags structure of bonus names, presence of all bonuses required to be affected by."
|
|
|
|
},
|
|
|
|
"absoluteLimit":{
|
|
|
|
"$ref" : "#/definitions/flags",
|
|
|
|
"description": "flags structure of bonus names, presence of all bonuses required to be affected by, can't be negated."
|
2014-03-17 16:11:10 +03:00
|
|
|
},
|
2017-07-20 06:08:49 +02:00
|
|
|
"targetCondition":{
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties" : true
|
|
|
|
},
|
2014-11-26 21:25:13 +02:00
|
|
|
"animation":{"$ref": "#/definitions/animation"},
|
2016-11-02 19:11:01 +02:00
|
|
|
|
2014-03-17 16:11:10 +03:00
|
|
|
"graphics":{
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties" : false,
|
|
|
|
"properties":{
|
|
|
|
"iconImmune":{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Resourse path of icon for SPELL_IMMUNITY bonus (relative to DATA or SPRITES)",
|
|
|
|
"format" : "imageFile"
|
|
|
|
},
|
|
|
|
"iconScenarioBonus":{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Resourse path of icon for scenario bonus" ,
|
|
|
|
"format" : "imageFile"
|
|
|
|
},
|
|
|
|
"iconEffect":{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Resourse path of icon for spell effects during battle" ,
|
|
|
|
"format" : "imageFile"
|
|
|
|
},
|
|
|
|
"iconBook":{
|
|
|
|
"type": "string",
|
|
|
|
"description":"Resourse path of icon for spellbook" ,
|
|
|
|
"format" : "imageFile"
|
|
|
|
},
|
|
|
|
"iconScroll":{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Resourse path of icon for spell scrolls",
|
|
|
|
"format": "imageFile"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
"sounds":{
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties" : false,
|
|
|
|
"properties":{
|
|
|
|
"cast":{
|
|
|
|
"type": "string",
|
|
|
|
"description": "Resourse path of cast sound"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"levels":{
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties" : false,
|
|
|
|
"required" : ["none", "basic", "advanced", "expert"],
|
|
|
|
|
2016-11-02 19:11:01 +02:00
|
|
|
"properties":{
|
2014-05-18 17:47:18 +03:00
|
|
|
"base":{
|
|
|
|
"type": "object",
|
|
|
|
"description": "will be merged with all levels",
|
|
|
|
"additionalProperties": true
|
|
|
|
},
|
|
|
|
"none":{
|
|
|
|
"$ref" : "#/definitions/levelInfo"
|
|
|
|
},
|
|
|
|
"basic":{
|
|
|
|
"$ref" : "#/definitions/levelInfo"
|
|
|
|
},
|
|
|
|
"advanced":{
|
|
|
|
"$ref" : "#/definitions/levelInfo"
|
|
|
|
},
|
|
|
|
"expert":{
|
|
|
|
"$ref" : "#/definitions/levelInfo"
|
|
|
|
}
|
|
|
|
}
|
2014-03-17 16:11:10 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|