1. Now there is only one bonus: MOVEMENT, with 2 subtypes: 0 is sea, 1 is land
For movement value on land depends on creature speed we use a new
ARMY_MOVEMENT updater with global bonus. If we does not like such
dependency, we can just remove this updater from json.
2. All specialities and secondary skills for movement moved to new
system AFAIK
Now first aid is passive battle spell, and skill just bumps
specific spell power for this spell. Everything about healing
is handled into Heal spell effect.
Intelligence is converted to both global effect and skill bonus
Bonus name HERO_MANA_PER_TEN_KNOWLEDGE is a little weird, but works
like old SECONDARY_SKILL_PREMY bonus
- stoneskin/haste/prayer/weakness: didnt work because there were 2 bonus objects in buffer and they were filtered out as a possible duplicate (BattleInfo::addOrUpdateUnitBonus). it was fixed by making them a single bonus.
- disrupting-ray and weakness: had opposite effect, because of missing negation
- added a new specialty types: SPECIAL_ADD_VALUE_ENCHANT and SPECIAL_FIXED_VALUE_ENCHANT. this is to make possible specialties like Aenin (fixed specialty value added to spell value) and Melody (fixed value for spell regardless of anything). These specialties can be used in mods with any heroes.
- slayer spell effect calculations was fixed to include hero Coronius-style specialty.
- finally fixed description for Labetha Conflux hero, this is a OH3 bug described here https://heroes.thelazy.net/index.php/Labetha
Changes were tested and work as intended.
commit was made in cooperation with modder Misiokles
- 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)