1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-30 08:57:00 +02:00
vcmi/config/schemas/bonus.json
Konstantin 7e9a15c20b vcmi: add PERCENT_TO_TARGET_SOURCE value type
It will break saves!!!

Added a new value type to bonuses which allows to add percentage
only to one foreign bonus source, for example, to add percentage to all
bonuses from secondary skills from hero special.
2023-03-16 16:46:41 +03:00

159 lines
3.0 KiB
JSON

{
"type":"object",
"$schema": "http://json-schema.org/draft-04/schema",
"title" : "VCMI bonus system format",
"description" : "Subsection of several formats, used to add generic bonuses to objects",
"required": ["type"],
"definitions" :
{
"nestedLimiter" : {
"anyOf" : [
{
"type" : "string",
"description" : "parameterless limiter or boolean operator at start of array"
},
{
"type" : "object",
"additionalProperties" : false,
"properties" : {
"type" : {
"type" : "string",
"description" : "type"
},
"parameters" : {
"type" : "array",
"description" : "parameters",
"additionalItems" : true
}
}
},
{
"type" : "array",
"additionalItems" : {
"$ref" : "#/definitions/nestedLimiter",
"description" : "nested limiters optionally prefixed with boolean operator"
}
}
]
}
},
"additionalProperties" : false,
"properties":{
"addInfo": {
"anyOf" : [
{ "type" : "string" },
{ "type" : "number" },
{
"type" : "array",
"items" : {
"anyof" : [
{ "type" : "string" },
{ "type" : "number" }
]
}
}
],
"description": "addInfo"
},
"description": {
"type":"string",
"description": "description"
},
"duration": {
"anyOf" : [
{ "type": "string"},
{ "type": "array", "items": {"type": "string"} }
],
"description": "duration"
},
"effectRange": {
"type":"string",
"description": "effectRange"
},
"limiters" : {
"$ref" : "#/definitions/nestedLimiter",
"description" : "limiter"
},
"propagator": {
"description": "propagator",
"anyOf" : [
{
"type" : "string"
},
{
"type":"array",
"items": {
"type":"string",
"description": "0"
}
}
]
},
"updater" : {
"anyOf" : [
{
"type" : "string"
},
{
"description" : "updater",
"type" : "object",
"required" : ["type", "parameters"],
"additionalProperties" : false,
"properties" : {
"type" : {
"type" : "string",
"description" : "type"
},
"parameters": {
"type" : "array",
"description" : "parameters",
"additionalItems" : true
}
}
}
]
},
"sourceID": {
"type":"number",
"description": "sourceID"
},
"sourceType": {
"type":"string",
"description": "sourceType"
},
"targetSourceType": {
"type":"string",
"description": "targetSourceType"
},
"stacking" : {
"type" : "string",
"description" : "stacking"
},
"subtype": {
"anyOf" : [
{ "type" : "string" },
{ "type" : "number" }
],
"description": "subtype"
},
"turns": {
"type":"number",
"description": "turns"
},
"type": {
"type":"string",
"description": "type"
},
"val": {
"type":"number",
"description": "val"
},
"valueType": {
"type":"string",
"description": "valueType"
}
}
}