Difference between revisions of "Bonus Format"

From VCMI Project Wiki
Jump to: navigation, search
m
(Full format)
Line 10: Line 10:
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
 
{
 
{
"type": "BONUS_TYPE",
+
"type": "BONUS_TYPE",
"subtype": 0,
+
"subtype": 0,
"val" : 0,
+
"val" : 0,
"valueType", "VALUE_TYPE",
+
"valueType", "VALUE_TYPE",
"addInfo" : 0,
+
"addInfo" : 0,
  
"duration" : "BONUS_DURATION",
+
"duration" : "BONUS_DURATION",
"turns" : 0,
+
"turns" : 0,
  
"sourceType" : "SOURCE_TYPE",
+
"sourceType" : "SOURCE_TYPE",
"sourceID" : 0,
+
"sourceID" : 0,
"effectRange" : "EFFECT_RANGE",
+
"effectRange" : "EFFECT_RANGE",
"limiter" : ["LIMITER_TYPE", optional_parameters (...)]
+
"limiter" : ["LIMITER_TYPE", optional_parameters (...)]
"propagator" : ["PROPAGATOR_TYPE", optional_parameters (...)]
+
"propagator" : ["PROPAGATOR_TYPE", optional_parameters (...)]
"description" : ""
+
"description" : ""
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
== Bonus string constants ==
 +
*[[Bonus Format]]
 +
*[[List of all bonus types]]
 +
*[[List of bonus value types]]
 +
*[[List of bonus range types]]
 +
*[[List of bonus duration types]]
 +
*[[List of bonus sources]]
 +
*[[List of bonus limiters]]
 +
*[[List of bonus propagators]]
 +
 +
= Additional links =
 
[[Bonus system]]
 
[[Bonus system]]

Revision as of 12:57, 24 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" : ""
}

Bonus string constants

Additional links

Bonus system