mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Merge branch 'vcmi:develop' into max_range_spell
This commit is contained in:
@@ -128,6 +128,21 @@ Parameters:
|
||||
|
||||
For reference on tiles indexes see image below:
|
||||
|
||||
### HAS_CHARGES_LIMITER
|
||||
|
||||
Currently works only with spells. Sets the cost of use in charges
|
||||
|
||||
Parameters:
|
||||
|
||||
- use cost (charges)
|
||||
|
||||
```json
|
||||
"limiters" : [ {
|
||||
"type" : "HAS_CHARGES_LIMITER",
|
||||
"parameters" : [2]
|
||||
} ]
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Aggregate Limiters
|
||||
|
||||
@@ -1,10 +1,22 @@
|
||||
# Bonus Propagators
|
||||
|
||||
Propagators allow to propagate bonus effect "upwards". For example, they can be used to make unit ability battle-wide, or to provide some bonuses to hero. See [Bonus System Guide](../Guides/Bonus_System.md) for more information.
|
||||
|
||||
## Available propagators
|
||||
|
||||
- BATTLE_WIDE: Affects both sides during battle
|
||||
- VISITED_TOWN_AND_VISITOR: Used with Legion artifacts (town visited by hero)
|
||||
- PLAYER_PROPAGATOR: Bonus will affect all objects owned by player. Used by Statue of Legion.
|
||||
- HERO: Bonus will be transferred to hero (for example from stacks in his army).
|
||||
- TEAM_PROPAGATOR: Bonus will affect all objects owned by player and his allies.
|
||||
- GLOBAL_EFFECT: This effect will influence all creatures, heroes and towns on the map.
|
||||
- `ARMY`: Propagators that allow bonuses to be transferred to an army. It is typically used by creature abilities to affect the army that the creature is part of.
|
||||
- `HERO`: Similar to `ARMY`, but works only with armies led by heroes.
|
||||
- `TOWN`: Similar to `ARMY`, but only affects units that are part of the town garrison.
|
||||
- `TOWN_AND_VISITOR`: Propagator that allows the town and the visiting hero to interact. It can be used to propagate the effects of town buildings to the visiting hero outside of combat or the effects of the hero to the town (e.g. Legion artifacts)
|
||||
- `BATTLE_WIDE` - Propagator that allows bonuses to affect all entities in battles. It is typically used for creature abilities or artifacts that need to affect either both sides or only the enemy side in combat.
|
||||
- `PLAYER`: The bonus affects all objects owned by the player. Used by the Statue of Legion.
|
||||
- `TEAM`: The bonus affects all objects owned by the player and their allies.
|
||||
- `GLOBAL_EFFECT`: This effect influences all creatures, towns and recruited heroes on the map.
|
||||
|
||||
## Deprecated propagators
|
||||
|
||||
These propagators are still supported, but in future they may be removed.
|
||||
|
||||
- `VISITED_TOWN_AND_VISITOR`: Replaced by `TOWN_AND_VISITOR`
|
||||
- `PLAYER_PROPAGATOR`: Replaced by `PLAYER`
|
||||
- `TEAM_PROPAGATOR`: Replaced by `TEAM`
|
||||
|
||||
@@ -84,19 +84,78 @@ Usage:
|
||||
|
||||
Effect: Updates val to `val = clamp(val * floor(stackSize / stepSize), minimum, maximum)`, where stackSize is total number of creatures in current unit stack
|
||||
|
||||
Parameters `minimum` and `maximum` are optional and can be dropped if not needed
|
||||
Example of short form with default parameters:
|
||||
|
||||
Example:
|
||||
```json
|
||||
"updater" : "TIMES_STACK_SIZE"
|
||||
```
|
||||
|
||||
Example of long form with custom parameters:
|
||||
|
||||
```json
|
||||
"updater" : {
|
||||
"type" : "TIMES_STACK_SIZE",
|
||||
|
||||
// Optional, by default - unlimited
|
||||
"minimum" : 0,
|
||||
|
||||
// Optional, by default - unlimited
|
||||
"maximum" : 100,
|
||||
|
||||
// Optional, by default - 1
|
||||
"stepSize" : 2
|
||||
}
|
||||
```
|
||||
|
||||
## TIMES_ARMY_SIZE
|
||||
|
||||
Effect: Updates val to `val = clamp(val * floor(stackSize / stepSize), minimum, maximum)`, where stackSize is total number of creatures in hero army that fulful filter
|
||||
|
||||
Parameters:
|
||||
|
||||
- `minimum`: minimum possible value of the bonus value. Unlimited by default
|
||||
- `maximum`: maximum possible value of the bonus value. Unlimited by default
|
||||
- `stepSize`: number of units needed to increase updater multiplier by 1
|
||||
- `filteredCreature`: identifier of specific unit to filter
|
||||
- `filteredLevel`: level of units that need to be counted. Redundant if `filteredCreature` is used
|
||||
- `filteredFaction`: faction of units that need to be counted. Redundant if `filteredCreature` is used
|
||||
|
||||
Filtering for specific unit:
|
||||
|
||||
```json
|
||||
"updater" : {
|
||||
"type" : "TIMES_ARMY_SIZE",
|
||||
"filteredCreature" : "pikeman",
|
||||
|
||||
// Optional, by default - unlimited
|
||||
"minimum" : 0,
|
||||
|
||||
// Optional, by default - unlimited
|
||||
"maximum" : 100,
|
||||
|
||||
// Optional, by default - 1
|
||||
"stepSize" : 2
|
||||
}
|
||||
```
|
||||
|
||||
Filtering for specific faction:
|
||||
|
||||
```json
|
||||
"updater" : {
|
||||
"type" : "TIMES_STACK_SIZE",
|
||||
"filteredFaction" : "castle"
|
||||
}
|
||||
```
|
||||
|
||||
Filtering for specific unit level:
|
||||
|
||||
```json
|
||||
"updater" : {
|
||||
"type" : "TIMES_STACK_SIZE",
|
||||
"filteredLevel" : 2
|
||||
}
|
||||
```
|
||||
|
||||
## BONUS_OWNER_UPDATER
|
||||
|
||||
Helper updater for proper functionality of `OPPOSITE_SIDE` limiter
|
||||
|
||||
@@ -128,6 +128,10 @@ In order to make functional creature you also need:
|
||||
"iconSmall" : "",
|
||||
// Large icon for this creature, used for example in town screen
|
||||
"iconLarge" : "",
|
||||
|
||||
// Optional. Images of creatures when attacked on adventure map
|
||||
"mapAttackFromRight": "",
|
||||
"mapAttackFromLeft": "",
|
||||
|
||||
// animation parameters
|
||||
|
||||
|
||||
@@ -177,11 +177,11 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
||||
// Background scenery for town screen, size must be 800x374
|
||||
"townBackground": "",
|
||||
|
||||
// Small scenery for window in mage guild screen
|
||||
"guildWindow": "",
|
||||
// Small scenery for window in mage guild screen; each element of array is for seperate mage guild level image (if only one element, then this will always used)
|
||||
"guildWindow": [""],
|
||||
|
||||
// Background image for window in mage guild screen
|
||||
"guildBackground" : "",
|
||||
// Background image for window in mage guild screen; each element of array is for seperate mage guild level image (if only one element, then this will always used)
|
||||
"guildBackground" : [""],
|
||||
|
||||
// Video for tavern window
|
||||
"tavernVideo" : "",
|
||||
@@ -250,7 +250,19 @@ Each town requires a set of buildings (Around 30-45 buildings)
|
||||
"primaryResource" : "gems",
|
||||
|
||||
// maximum level of mage guild
|
||||
"mageGuild" : 4,
|
||||
"mageGuild" : 5,
|
||||
|
||||
// Coordinates of spell images in mage guild screen. Should contain the maximum level of mage guild amount of elements. Example are HoMM3 defaults:
|
||||
"guildSpellPositions" : [
|
||||
[ { "x": 222, "y": 445 }, { "x": 312, "y": 445 }, { "x": 402, "y": 445 }, { "x": 520, "y": 445 }, { "x": 610, "y": 445 }, { "x": 700, "y": 445 } ],
|
||||
[ { "x": 48, "y": 53 }, { "x": 48, "y": 147 }, { "x": 48, "y": 241 }, { "x": 48, "y": 335 }, { "x": 48, "y": 429 } ],
|
||||
[ { "x": 570, "y": 82 }, { "x": 672, "y": 82 }, { "x": 570, "y": 157 }, { "x": 672, "y": 157 } ],
|
||||
[ { "x": 183, "y": 42 }, { "x": 183, "y": 148 }, { "x": 183, "y": 253 } ],
|
||||
[ { "x": 491, "y": 325 }, { "x": 591, "y": 325 } ]
|
||||
],
|
||||
|
||||
// Coordinates of window image in mage guild screen. Example is HoMM3 default:
|
||||
"guildWindowPosition": { "x": 332, "y": 76 },
|
||||
|
||||
// Identifier of spell that will create effects for town moat during siege
|
||||
"moatAbility" : "castleMoat"
|
||||
|
||||
Reference in New Issue
Block a user