1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Fix potential edge cases in TIMES_STACK_SIZE updater

This commit is contained in:
Ivan Savenko
2025-06-24 11:31:38 +03:00
parent 0ebe9bd414
commit 2d24c28996
5 changed files with 17 additions and 7 deletions

View File

@@ -84,15 +84,25 @@ 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
}
```