Difference between revisions of "List of bonus limiters"

From VCMI Project Wiki
Jump to: navigation, search
(Created page with "=Predefined Limiters= The limiters take no parameters: * SHOOTER_ONLY * DRAGON_NATURE * IS_UNDEAD =Customizable Limiters=")
 
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
=Predefined Limiters=
+
==Predefined Limiters==
 
The limiters take no parameters:
 
The limiters take no parameters:
 
* SHOOTER_ONLY
 
* SHOOTER_ONLY
 
* DRAGON_NATURE
 
* DRAGON_NATURE
 
* IS_UNDEAD
 
* IS_UNDEAD
=Customizable Limiters=
+
* CREATURE_NATIVE_TERRAIN
 +
* OPPOSITE_SIDE
 +
 
 +
Example:
 +
<syntaxhighlight lang="javascript">
 +
"limiters" : [ "SHOOTER_ONLY" ]
 +
</syntaxhighlight>
 +
 
 +
==Customizable Limiters==
 +
===HAS_ANOTHER_BONUS_LIMITER===
 +
Parameters:
 +
* Bonus type
 +
* (optional) bonus subtype
 +
* (optional) bonus sourceType and sourceId in struct
 +
* example: (from Adele's bless):
 +
<syntaxhighlight lang="javascript">
 +
"limiters" : [
 +
{
 +
"type" : "HAS_ANOTHER_BONUS_LIMITER",
 +
"parameters" : [
 +
"GENERAL_DAMAGE_PREMY",
 +
1,
 +
{
 +
"type" : "SPELL_EFFECT",
 +
"id" : "spell.bless"
 +
}
 +
]
 +
}
 +
],
 +
</syntaxhighlight>
 +
===CREATURE_TYPE_LIMITER===
 +
Parameters:
 +
* Creature id (string)
 +
* (optional) include upgrades - default is false
 +
===CREATURE_ALIGNMENT_LIMITER===
 +
Parameters:
 +
* Alignment identifier
 +
===CREATURE_FACTION_LIMITER===
 +
Parameters:
 +
* Faction identifier
 +
===CREATURE_TERRAIN_LIMITER===
 +
Parameters:
 +
* Terrain identifier
 +
 
 +
Example:
 +
<syntaxhighlight lang="javascript">
 +
"limiters": [ {
 +
"type":"CREATURE_TYPE_LIMITER",
 +
"parameters": [ "angel", true ]
 +
} ],
 +
</syntaxhighlight>
 +
<syntaxhighlight lang="javascript">
 +
"limiters" : [ {
 +
"type" : "CREATURE_TERRAIN_LIMITER",
 +
"parameters" : ["sand"]
 +
} ]
 +
</syntaxhighlight>
 +
 
 +
==Aggregate Limiters==
 +
The following limiters must be specified as the first element of a list, and operate on the remaining limiters in that list:
 +
* allOf (default when no aggregate limiter is specified)
 +
* anyOf
 +
* noneOf
 +
 
 +
Example:
 +
<syntaxhighlight lang="javascript">
 +
"limiters" : [
 +
    "noneOf",
 +
    "IS_UNDEAD",
 +
    {
 +
        "type" : "HAS_ANOTHER_BONUS_LIMITER",
 +
        "parameters" : [ "SIEGE_WEAPON" ]
 +
    }
 +
]
 +
</syntaxhighlight>
 +
{{Bonuses}}

Latest revision as of 09:14, 23 March 2023

Predefined Limiters

The limiters take no parameters:

  • SHOOTER_ONLY
  • DRAGON_NATURE
  • IS_UNDEAD
  • CREATURE_NATIVE_TERRAIN
  • OPPOSITE_SIDE

Example:

"limiters" : [ "SHOOTER_ONLY" ]

Customizable Limiters

HAS_ANOTHER_BONUS_LIMITER

Parameters:

  • Bonus type
  • (optional) bonus subtype
  • (optional) bonus sourceType and sourceId in struct
  • example: (from Adele's bless):
	"limiters" : [
		{
			"type" : "HAS_ANOTHER_BONUS_LIMITER",
			"parameters" : [
				"GENERAL_DAMAGE_PREMY",
				1,
				{
					"type" : "SPELL_EFFECT",
					"id" : "spell.bless"
				}
				]
		}
	],

CREATURE_TYPE_LIMITER

Parameters:

  • Creature id (string)
  • (optional) include upgrades - default is false

CREATURE_ALIGNMENT_LIMITER

Parameters:

  • Alignment identifier

CREATURE_FACTION_LIMITER

Parameters:

  • Faction identifier

CREATURE_TERRAIN_LIMITER

Parameters:

  • Terrain identifier

Example:

"limiters": [ {
	"type":"CREATURE_TYPE_LIMITER",
	"parameters": [ "angel", true ]
} ],
"limiters" : [ {
	"type" : "CREATURE_TERRAIN_LIMITER",
	"parameters" : ["sand"]
} ]

Aggregate Limiters

The following limiters must be specified as the first element of a list, and operate on the remaining limiters in that list:

  • allOf (default when no aggregate limiter is specified)
  • anyOf
  • noneOf

Example:

"limiters" : [
    "noneOf",
    "IS_UNDEAD",
    {
        "type" : "HAS_ANOTHER_BONUS_LIMITER",
        "parameters" : [ "SIEGE_WEAPON" ]
    }
]

Bonus string constants

Additional links