1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
Commit Graph

9 Commits

Author SHA1 Message Date
Henning Koehler
02b5a5e830 Make bonus stacking configurable + fix duplicate propagation/inheritance (#433)
Addresses several related problems:
* Propagation / unpropagation of duplicate bonuses is inconsistent, causing bugs
* Duplicate bonuses never stack, which is not always intended behaviour (e.g. multiple copies of resource generating artifacts)
* Different bonuses always stack, which is not always intended behaviour (e.g. Angel + Archangel morale bonuses)

This is addressed as follows:
* Duplicate bonuses are never eliminated during propagation/inheritance.
* Unpropagation eliminates only a single copy of duplicated bonus
* Bonus receives a new field stacking that determines stacking behaviour:
* * empty string = no stacking with duplicates (default)
* * "ALWAYS" = stacks with duplicates & everything else
* * some other value = no stacking with bonuses with same stacking value
Also Morale/Luck window now hides non-stacking bonuses.
2018-03-27 14:54:58 +07:00
AlexVinS
0e3f59294c fix for #1779
"val" of SPELLCASTER bonus = spell level. Set it to expert for archangel.
2014-05-18 16:52:54 +04:00
Ivan Savenko
c6cc6e6301 Large changeset, first part of editing H3 objects via mods feature. Changes:
- loading of all objects (including H3 objects) will be directed by mod handlers
- common base for all handlers accessible from mod system (IHanderBase)
- json format changes: use struct with string ID's instead of vector

- fixed some gcc/clang errors and warnings
- fixed several cases of memory leaks and invalid memory access (mostly related to usage of bonus system and/or identifiers resolution)

Note that right now loading is much slower than before due to excessive json validation (or not fast enough validator)
2013-04-21 12:49:26 +00:00
Ivan Savenko
0cf969d508 - console logger by default uses same format as previously (no extra data)
- a lot of changes in configs;
- - update to creature format - abilities are now json structure
- - multiple bugfixes revealed by validation
- made schemas a bit more strict
- creatures data can be replaced via mods
- it is possible to validate vcmi configs using schemas (disabled)
2013-04-11 19:24:14 +00:00
alexvins
856c7feeba [refactor]
* creature config use string ids now
+ support string subtype id in short bonus format
* crexp parser: less magic nombers
2013-02-23 22:48:22 +00:00
DjWarmonger
b554af25d3 - Compile fix
- Fixed Basilisk spawning at Hive
- Fixed double-shot of Marksman
2013-02-11 17:23:55 +00:00
DjWarmonger
140786a04b - Drain Life now has % effect depending on bonus value
- Stack can use more than 2 attacks. Additional attacks can now be seperated as "ONLY_MELEE_FIGHT and "ONLY_DISTANCE_FIGHT".
2013-02-08 09:22:10 +00:00
mateuszb
f1c78e3260 * creature ID refactoring
* double week creatures are configurable now
2013-02-07 17:34:50 +00:00
Ivan Savenko
8824f5e2d5 - H3 creatures use subset of mod creature format (todo - unify code)
- creatures configs moved into confg/creatures files, similar to factions.
 - creatures ID's use same camelCase format as the rest of the game
2012-12-22 16:47:12 +00:00