Difference between revisions of "Bonus Format"
From VCMI Project Wiki
m (synhighlight) |
|||
Line 1: | Line 1: | ||
Enumerative parameters are described in HeroBonus.h file. | Enumerative parameters are described in HeroBonus.h file. | ||
===Short format=== | ===Short format=== | ||
− | < | + | <syntaxhighlight lang="cpp"> |
{ | { | ||
["BONUS_TYPE", val, subtype, additionalInfo] | ["BONUS_TYPE", val, subtype, additionalInfo] | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
===Full format=== | ===Full format=== | ||
All parameters but type are optional. | All parameters but type are optional. | ||
− | < | + | <syntaxhighlight lang="cpp"> |
{ | { | ||
"type": "BONUS_TYPE", | "type": "BONUS_TYPE", | ||
− | "subtype: 0, | + | "subtype": 0, |
"val" : 0, | "val" : 0, | ||
"valueType", "VALUE_TYPE", | "valueType", "VALUE_TYPE", | ||
Line 26: | Line 26: | ||
"description" : "" | "description" : "" | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
[[Bonus system]] | [[Bonus system]] |
Revision as of 11:33, 14 December 2012
Enumerative parameters are described in HeroBonus.h file.
Short format
{
["BONUS_TYPE", val, subtype, additionalInfo]
}
Full format
All parameters but type are optional.
{
"type": "BONUS_TYPE",
"subtype": 0,
"val" : 0,
"valueType", "VALUE_TYPE",
"addInfo" : 0,
"duration" : "BONUS_DURATION",
"turns" : 0,
"sourceType" : "SOURCE_TYPE",
"sourceID" : 0,
"effectRange" : "EFFECT_RANGE",
"limiter" : ["LIMITER_TYPE", optional_parameters (...)]
"propagator" : ["PROPAGATOR_TYPE", optional_parameters (...)]
"description" : ""
}