mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-10 00:43:59 +02:00
879aaba980
Looks like website only recognizes javascript & json, and is not aware of jsonc or json5. Will result in small regression on Github web view - comments will show up as red (since comments are not part of json format), but syntax highlight would work both on website and on Github. Alternative is using javascript for syntax highlight, however syntax highlighter for json looks better on both website and Github (since it uses separate highlighting for json keys, separate from strings in values)
1.8 KiB
1.8 KiB
Bonus Limiters
Predefined Limiters
The limiters take no parameters:
- SHOOTER_ONLY
- DRAGON_NATURE
- IS_UNDEAD
- CREATURE_NATIVE_TERRAIN
- CREATURE_FACTION
- SAME_FACTION
- CREATURES_ONLY
- 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_LEVEL_LIMITER
If parameters is empty, level limiter works as CREATURES_ONLY limiter
Parameters:
- Minimal level
- Maximal level
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"]
} ]
UNIT_ON_HEXES
Parameters:
- List of affected battlefield hexes
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" ]
}
]