2024-07-16 20:29:20 +02:00
# Bonus Limiters
2023-08-13 00:17:38 +03:00
## Predefined Limiters
2025-07-08 13:00:53 +03:00
Simple limiters that take no parameters.
2023-08-13 00:17:38 +03:00
Example:
2024-12-04 16:50:01 +00:00
```json
2023-08-13 00:17:38 +03:00
"limiters" : [ "SHOOTER_ONLY" ]
```
2025-07-08 13:00:53 +03:00
### SHOOTER_ONLY
Bonus is active if affected unit is a shooter (has SHOOTER bonus)
### DRAGON_NATURE
Bonus is active if affected unit is a dragon (has DRAGON_NATURE bonus)
### IS_UNDEAD
Bonus is active if affected unit is an undead (has UNDEAD bonus)
### CREATURE_NATIVE_TERRAIN
Bonus is active if affected unit is on native terrain
### CREATURES_ONLY
Bonus is active only on units
### OPPOSITE_SIDE
Bonus is active only for opposite side for a battle-wide bonus. Requires `BONUS_OWNER_UPDATER` to be present on bonus
2023-08-13 00:17:38 +03:00
## Customizable Limiters
### HAS_ANOTHER_BONUS_LIMITER
2025-05-10 19:14:05 +03:00
Bonus is only active if affected entity has another bonus that meets conditions
2023-08-13 00:17:38 +03:00
Parameters:
2025-07-08 13:00:53 +03:00
- `bonusType` - type of bonus to check against
- `bonusSubtype` - subtype of bonus to check against (only used if bonus type is set)
- `bonusSourceType` - source type of bonus to check against
- `bonusSourceID` -source ID of bonus to check against (only used if bonus type is set)
2025-05-10 19:14:05 +03:00
2025-07-08 13:00:53 +03:00
All parameters are optional.
2025-05-10 19:14:05 +03:00
Examples:
- Adele specialty: active if unit has any bonus from Bless spell
2023-08-13 00:17:38 +03:00
2024-12-04 16:50:01 +00:00
```json
2023-08-13 00:17:38 +03:00
"limiters" : [
{
"type" : "HAS_ANOTHER_BONUS_LIMITER",
2025-07-08 13:00:53 +03:00
"bonusSourceType" : "SPELL_EFFECT", // look for bonus of type SPELL_EFFECT
"bonusSourceID" : "spell.bless" // ... from spell "Bless"
2023-08-13 00:17:38 +03:00
}
],
```
2025-05-10 19:14:05 +03:00
- Mutare specialty: active if unit has `DRAGON_NATURE` bonus
```json
"limiters" : [
{
2025-07-08 13:00:53 +03:00
"type" : "HAS_ANOTHER_BONUS_LIMITER",
"bonusType" : "DRAGON_NATURE"
2025-05-10 19:14:05 +03:00
}
],
```
2023-08-13 00:17:38 +03:00
### CREATURE_TYPE_LIMITER
2025-05-10 19:14:05 +03:00
Bonus is only active on creatures of specified type
2023-08-13 00:17:38 +03:00
Parameters:
2025-07-08 13:00:53 +03:00
- `creature` - ID of creature to check against
- `includeUpgrades` - whether creature that is upgrade of `creature` should also pass this limiter. If creature has multiple upgrades, or upgrades have their own upgrades, all such creatures will be affected. Special upgrades such as upgrades via specialties (Dragon, Gelu) are not affected
2025-05-10 19:14:05 +03:00
Example:
```json
2025-07-08 13:00:53 +03:00
"limiters": [
{
"type" : "CREATURE_TYPE_LIMITER",
"creature" : "angel",
"includeUpgrades" : true
}
],
2025-05-10 19:14:05 +03:00
```
2023-08-13 00:17:38 +03:00
### CREATURE_ALIGNMENT_LIMITER
2025-05-10 19:14:05 +03:00
Bonus is only active on creatures of factions of specified alignment
2023-08-13 00:17:38 +03:00
Parameters:
2025-07-08 13:00:53 +03:00
- `alignment` - ID of alignment that creature must have, `good` , `evil` , or `neutral`
```json
"limiters": [
{
"type" : "CREATURE_ALIGNMENT_LIMITER",
"alignment" : "evil"
}
],
```
2023-08-13 00:17:38 +03:00
2023-09-12 19:58:15 +03:00
### CREATURE_LEVEL_LIMITER
2025-07-08 13:00:53 +03:00
If parameters is empty, any creature will pass this limiter
2023-09-12 19:58:15 +03:00
Parameters:
2024-11-30 20:20:15 +00:00
2025-07-08 13:00:53 +03:00
- `minLevel` - minimal level that creature must have to pass limiter
- `maxlevel` - maximal level that creature must have to pass limiter
```json
"limiters": [
{
"type" : "CREATURE_LEVEL_LIMITER",
"minLevel" : 1,
"maxlevel" : 5
}
],
```
2023-09-12 19:58:15 +03:00
### FACTION_LIMITER
2023-08-13 00:17:38 +03:00
2025-07-08 13:00:53 +03:00
Also available as `CREATURE_FACTION_LIMITER`
2023-08-13 00:17:38 +03:00
Parameters:
2025-07-08 13:00:53 +03:00
- `faction` - faction that creature or hero must belong to
```json
"limiters": [
{
"type" : "FACTION_LIMITER",
"faction" : "castle"
}
],
```
2023-08-13 00:17:38 +03:00
### CREATURE_TERRAIN_LIMITER
Parameters:
2025-07-08 13:00:53 +03:00
- `terrain` - identifier of terrain on which this creature must be to pass this limiter. If not set, creature will pass this limiter if it is on native terrain
2023-08-13 00:17:38 +03:00
Example:
2024-12-04 16:50:01 +00:00
```json
2025-07-08 13:00:53 +03:00
"limiters" : [
{
"type" : "CREATURE_TERRAIN_LIMITER",
"terrain" : "sand"
}
]
2023-08-13 00:17:38 +03:00
```
2025-07-08 13:00:53 +03:00
### HAS_CHARGES_LIMITER
Currently works only with spells. Sets the cost of use in charges
2023-09-12 19:58:15 +03:00
Parameters:
2025-07-08 13:00:53 +03:00
- `cost` - use cost (charges)
2023-09-12 19:58:15 +03:00
2025-07-08 13:00:53 +03:00
```json
"limiters" : [
{
"type" : "HAS_CHARGES_LIMITER",
"cost" : 2
}
]
```
2025-05-20 16:29:14 +02:00
2025-07-08 13:00:53 +03:00
### UNIT_ON_HEXES
2025-05-20 16:29:14 +02:00
Parameters:
2025-07-08 13:00:53 +03:00
- `hexes` - List of affected battlefield hexes
2025-05-20 16:29:14 +02:00
```json
2025-07-08 13:00:53 +03:00
"limiters" : [
{
"type" : "UNIT_ON_HEXES",
"hexes" : [ 25, 50, 75 ]
}
]
2025-05-20 16:29:14 +02:00
```
2025-07-08 13:00:53 +03:00
For reference on tiles indexes see image below:
2025-05-10 19:14:05 +03:00

2023-08-13 00:17:38 +03:00
## Aggregate Limiters
2025-07-08 13:00:53 +03:00
The following limiters must be specified as the first element of a list, and operate on the remaining limiters in that list:
2023-08-13 00:17:38 +03:00
2025-07-08 13:00:53 +03:00
- `allOf` (default when no aggregate limiter is specified)
- `anyOf`
- `noneOf`
2023-08-13 00:17:38 +03:00
Example:
2024-12-04 16:50:01 +00:00
```json
2023-08-13 00:17:38 +03:00
"limiters" : [
"noneOf",
"IS_UNDEAD",
{
"type" : "HAS_ANOTHER_BONUS_LIMITER",
"parameters" : [ "SIEGE_WEAPON" ]
}
]
2024-11-30 20:20:15 +00:00
```