2013-04-02 20:06:43 +03:00
|
|
|
{
|
2023-05-19 20:14:01 +02:00
|
|
|
"type" : "object",
|
|
|
|
"$schema" : "http://json-schema.org/draft-04/schema",
|
2013-04-02 20:06:43 +03:00
|
|
|
"title" : "VCMI bonus system format",
|
|
|
|
"description" : "Subsection of several formats, used to add generic bonuses to objects",
|
2023-05-19 20:14:01 +02:00
|
|
|
"required" : ["type"],
|
2018-04-01 13:17:34 +02:00
|
|
|
"definitions" :
|
|
|
|
{
|
|
|
|
"nestedLimiter" : {
|
|
|
|
"anyOf" : [
|
|
|
|
{
|
|
|
|
"type" : "string",
|
2024-06-27 12:41:43 +02:00
|
|
|
"enum" : [ "SHOOTER_ONLY", "DRAGON_NATURE", "IS_UNDEAD", "CREATURE_NATIVE_TERRAIN", "CREATURE_FACTION", "SAME_FACTION", "CREATURES_ONLY", "OPPOSITE_SIDE" ],
|
2018-04-01 13:17:34 +02:00
|
|
|
"description" : "parameterless limiter or boolean operator at start of array"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type" : "object",
|
|
|
|
"additionalProperties" : false,
|
|
|
|
"properties" : {
|
|
|
|
"type" : {
|
|
|
|
"type" : "string",
|
2024-06-27 12:41:43 +02:00
|
|
|
"enum" : [ "CREATURE_TYPE_LIMITER", "HAS_ANOTHER_BONUS_LIMITER", "CREATURE_ALIGNMENT_LIMITER", "FACTION_LIMITER", "CREATURE_LEVEL_LIMITER", "CREATURE_TERRAIN_LIMITER", "UNIT_ON_HEXES" ],
|
2018-04-01 13:17:34 +02:00
|
|
|
"description" : "type"
|
|
|
|
},
|
|
|
|
"parameters" : {
|
|
|
|
"type" : "array",
|
|
|
|
"description" : "parameters",
|
|
|
|
"additionalItems" : true
|
2018-10-30 23:30:56 +02:00
|
|
|
}
|
2018-04-01 13:17:34 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type" : "array",
|
|
|
|
"additionalItems" : {
|
|
|
|
"$ref" : "#/definitions/nestedLimiter",
|
|
|
|
"description" : "nested limiters optionally prefixed with boolean operator"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2013-04-11 22:24:14 +03:00
|
|
|
"additionalProperties" : false,
|
2023-05-19 20:14:01 +02:00
|
|
|
"properties" : {
|
|
|
|
"type" : {
|
|
|
|
"type" : "string",
|
|
|
|
"description" : "type"
|
2023-05-19 20:04:31 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"subtype" : {
|
2023-10-05 15:13:52 +02:00
|
|
|
"type" : "string",
|
2023-05-19 20:14:01 +02:00
|
|
|
"description" : "subtype"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"sourceID" : {
|
|
|
|
"type" : "number",
|
|
|
|
"description" : "sourceID"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"sourceType" : {
|
|
|
|
"type" : "string",
|
2024-06-27 12:41:43 +02:00
|
|
|
"enum" : [ "ARTIFACT", "ARTIFACT_INSTANCE", "OBJECT_TYPE", "OBJECT_INSTANCE", "CREATURE_ABILITY", "TERRAIN_NATIVE", "TERRAIN_OVERLAY", "SPELL_EFFECT", "TOWN_STRUCTURE", "HERO_BASE_SKILL", "SECONDARY_SKILL", "HERO_SPECIAL", "ARMY", "CAMPAIGN_BONUS", "STACK_EXPERIENCE", "COMMANDER", "GLOBAL", "OTHER", ],
|
2023-05-19 20:14:01 +02:00
|
|
|
"description" : "sourceType"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"targetSourceType" : {
|
|
|
|
"type" : "string",
|
2024-06-27 12:41:43 +02:00
|
|
|
"enum" : [ "ARTIFACT", "ARTIFACT_INSTANCE", "OBJECT_TYPE", "OBJECT_INSTANCE", "CREATURE_ABILITY", "TERRAIN_NATIVE", "TERRAIN_OVERLAY", "SPELL_EFFECT", "TOWN_STRUCTURE", "HERO_BASE_SKILL", "SECONDARY_SKILL", "HERO_SPECIAL", "ARMY", "CAMPAIGN_BONUS", "STACK_EXPERIENCE", "COMMANDER", "GLOBAL", "OTHER", ],
|
2023-05-19 20:14:01 +02:00
|
|
|
"description" : "targetSourceType"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"propagator" : {
|
|
|
|
"description" : "propagator",
|
2024-06-27 12:41:43 +02:00
|
|
|
"type" : "string",
|
|
|
|
"enum" : [ "BATTLE_WIDE", "VISITED_TOWN_AND_VISITOR", "PLAYER_PROPAGATOR", "HERO", "TEAM_PROPAGATOR", "GLOBAL_EFFECT" ]
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
2017-09-11 02:36:02 +02:00
|
|
|
"updater" : {
|
2017-09-19 00:08:28 +02:00
|
|
|
"anyOf" : [
|
|
|
|
{
|
2024-06-27 12:41:43 +02:00
|
|
|
"type" : "string",
|
|
|
|
"enum" : [ "TIMES_HERO_LEVEL", "TIMES_STACK_LEVEL", "ARMY_MOVEMENT", "BONUS_OWNER_UPDATER" ]
|
2017-09-11 02:36:02 +02:00
|
|
|
},
|
2017-09-19 00:08:28 +02:00
|
|
|
{
|
|
|
|
"description" : "updater",
|
|
|
|
"type" : "object",
|
2023-03-09 12:05:47 +02:00
|
|
|
"required" : ["type", "parameters"],
|
|
|
|
"additionalProperties" : false,
|
|
|
|
"properties" : {
|
|
|
|
"type" : {
|
|
|
|
"type" : "string",
|
2024-06-27 12:41:43 +02:00
|
|
|
"enum" : [ "GROWS_WITH_LEVEL", "ARMY_MOVEMENT" ],
|
2023-03-09 12:05:47 +02:00
|
|
|
"description" : "type"
|
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"parameters" : {
|
2023-03-09 12:05:47 +02:00
|
|
|
"type" : "array",
|
|
|
|
"description" : "parameters",
|
|
|
|
"additionalItems" : true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"propagationUpdater" : {
|
|
|
|
"anyOf" : [
|
|
|
|
{
|
2024-06-27 12:41:43 +02:00
|
|
|
"type" : "string",
|
|
|
|
"enum" : [ "TIMES_HERO_LEVEL", "TIMES_STACK_LEVEL", "ARMY_MOVEMENT", "BONUS_OWNER_UPDATER" ]
|
2023-03-09 12:05:47 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"description" : "propagationUpdater",
|
|
|
|
"type" : "object",
|
2017-09-19 00:08:28 +02:00
|
|
|
"required" : ["type", "parameters"],
|
|
|
|
"additionalProperties" : false,
|
|
|
|
"properties" : {
|
|
|
|
"type" : {
|
|
|
|
"type" : "string",
|
2024-06-27 12:41:43 +02:00
|
|
|
"enum" : [ "GROWS_WITH_LEVEL", "ARMY_MOVEMENT" ],
|
2017-09-19 00:08:28 +02:00
|
|
|
"description" : "type"
|
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"parameters" : {
|
2017-09-19 00:08:28 +02:00
|
|
|
"type" : "array",
|
|
|
|
"description" : "parameters",
|
|
|
|
"additionalItems" : true
|
|
|
|
}
|
|
|
|
}
|
2017-09-11 02:36:02 +02:00
|
|
|
}
|
2017-09-19 00:08:28 +02:00
|
|
|
]
|
2017-09-11 02:36:02 +02:00
|
|
|
},
|
2023-05-19 20:04:31 +02:00
|
|
|
"limiters" : {
|
|
|
|
"$ref" : "#/definitions/nestedLimiter",
|
|
|
|
"description" : "limiter"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"effectRange" : {
|
|
|
|
"type" : "string",
|
2024-06-27 12:41:43 +02:00
|
|
|
"enum" : [ "NO_LIMIT", "ONLY_DISTANCE_FIGHT", "ONLY_MELEE_FIGHT" ],
|
2023-05-19 20:14:01 +02:00
|
|
|
"description" : "effectRange"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"val" : {
|
|
|
|
"type" : "number",
|
|
|
|
"description" : "val"
|
2023-02-15 21:19:35 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"valueType" : {
|
|
|
|
"type" : "string",
|
2024-06-27 12:41:43 +02:00
|
|
|
"enum" : ["ADDITIVE_VALUE", "BASE_NUMBER", "PERCENT_TO_ALL", "PERCENT_TO_BASE", "PERCENT_TO_SOURCE", "PERCENT_TO_TARGET_TYPE", "INDEPENDENT_MAX", "INDEPENDENT_MIN" ],
|
2023-05-19 20:14:01 +02:00
|
|
|
"description" : "valueType"
|
2018-03-27 09:54:58 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"addInfo" : {
|
2013-04-02 20:06:43 +03:00
|
|
|
"anyOf" : [
|
|
|
|
{ "type" : "string" },
|
2023-05-19 20:04:31 +02:00
|
|
|
{ "type" : "number" },
|
|
|
|
{
|
|
|
|
"type" : "array",
|
|
|
|
"items" : {
|
|
|
|
"anyof" : [
|
|
|
|
{ "type" : "string" },
|
|
|
|
{ "type" : "number" }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2013-04-02 20:06:43 +03:00
|
|
|
],
|
2023-05-19 20:14:01 +02:00
|
|
|
"description" : "addInfo"
|
2023-05-19 20:04:31 +02:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"duration" : {
|
2023-09-12 18:58:15 +02:00
|
|
|
"anyOf" : [
|
2024-06-27 12:41:43 +02:00
|
|
|
{
|
|
|
|
"type" : "string",
|
|
|
|
"enum" : ["PERMANENT", "ONE_BATTLE", "ONE_DAY", "ONE_WEEK", "N_TURNS", "N_DAYS", "UNTIL_BEING_ATTACKED", "UNTIL_ATTACK", "STACK_GETS_TURN", "COMMANDER_KILLED", "UNTIL_OWN_ATTACK" ]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type" : "array",
|
|
|
|
"items" : {
|
|
|
|
"type" : "string",
|
|
|
|
"enum" : ["PERMANENT", "ONE_BATTLE", "ONE_DAY", "ONE_WEEK", "N_TURNS", "N_DAYS", "UNTIL_BEING_ATTACKED", "UNTIL_ATTACK", "STACK_GETS_TURN", "COMMANDER_KILLED", "UNTIL_OWN_ATTACK" ]
|
|
|
|
}
|
|
|
|
}
|
2023-09-12 18:58:15 +02:00
|
|
|
],
|
2023-05-19 20:14:01 +02:00
|
|
|
"description" : "duration"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"turns" : {
|
|
|
|
"type" : "number",
|
|
|
|
"description" : "turns"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
2023-05-19 20:04:31 +02:00
|
|
|
"stacking" : {
|
|
|
|
"type" : "string",
|
|
|
|
"description" : "stacking"
|
2013-04-02 20:06:43 +03:00
|
|
|
},
|
2023-05-19 20:14:01 +02:00
|
|
|
"description" : {
|
2024-08-14 15:39:40 +02:00
|
|
|
"anyOf" : [
|
|
|
|
{ "type" : "string" },
|
|
|
|
{ "type" : "number" }
|
|
|
|
],
|
2023-05-19 20:14:01 +02:00
|
|
|
"description" : "description"
|
2013-04-02 20:06:43 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|