1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

129 Commits

Author SHA1 Message Date
Michał Zaremba
be736eb1b2 fix for insert@/modify@ in JsonUtils::merge; minor typo fixes 2025-08-22 15:53:00 +02:00
Ivan Savenko
6328e4b4f8 Merge pull request #6002 from kdmcser/opening_battle_spells
Add addInfo support for OPENING_BATTLE_SPELL to set spell level
2025-08-14 11:19:53 +03:00
kdmcser
594ae27cb5 support setting spell master level in OPENING_BATTLE_SPELLS 2025-08-11 02:13:36 +08:00
Ivan Savenko
78b39688c5 Improvements for json validation for mods
- Implemented validation for `targetCondition` in spells
- Implemented validation for `mapObject` in towns/heroes
- Fixed validation of zone connections in RMG
- Added workarounds to prevent assertions triggering on invalid mods
- Erase 'base' entries from json before validation (but after applying
them to derived keys)

Should have no effect on mod behavior/support, but may cause new
detections for mods that were broken in either 1.6 or 1.7
2025-08-05 19:40:18 +03:00
Michał Zaremba
c419a3c41a Fix typo in error message 2025-08-01 00:59:15 +02:00
Ivan Savenko
aeddeb2612 Fix loading of subtypes for HAS_ANOTHER_BONUS limiter 2025-07-14 21:04:46 +03:00
Ivan Savenko
c4cb794760 Add workaround for mods that use "true" (string) instead of real bool 2025-07-14 21:04:26 +03:00
Ivan Savenko
5caf43a63c Merge pull request #5900 from IvanSavenko/bonus_limiters
Bonus limiters refactoring
2025-07-09 11:12:11 +03:00
Ivan Savenko
09ac0f1806 Merge pull request #5851 from Laserlicht/max_range_spell
max range for spell cast
2025-07-09 11:05:37 +03:00
Ivan Savenko
4af7949571 Bonus limiters refactoring
- Split massive `parseLimiter` method in smaller chunks
- Added alternative format for limiters with named parameters instead of
unclear `parameters` entry that often leads to bugs in mods. Old format
is still available.
- Added detailed validation for limiter format
- Converted vcmi json's to use new format
- Removed parameter-less `CREATURE_FACTION` and `SAME_FACTION` limiter.
They are unused in mods and have unclear use-case that can be replaced
by other limiters
- Expanded documentation on limiter types

All mods that were supported before should still be supported
2025-07-08 13:01:08 +03:00
Laserlicht
cf32f00472 hide bonus 2025-07-08 11:59:16 +02:00
Laserlicht
ca8cfaf0ad Merge branch 'develop' into max_range_spell 2025-07-08 11:36:23 +02:00
Ivan Savenko
8721bdd728 Split CCreatureSet file on .h/.cpp per class basis 2025-07-07 19:12:31 +03:00
Laserlicht
13a2b8781e Merge branch 'vcmi:develop' into max_range_spell 2025-07-03 23:25:06 +02:00
SoundSSGood
6752ab3a75 HAS_CHARGES_LIMITER 2025-06-30 18:39:57 +02:00
Ivan Savenko
135768e763 Added TIMES_ARMY_SIZE updater 2025-06-26 15:10:55 +03:00
Laserlicht
9bfe3a8195 max range for spellcaster 2025-06-25 15:50:31 +02:00
Ivan Savenko
2d24c28996 Fix potential edge cases in TIMES_STACK_SIZE updater 2025-06-24 11:31:38 +03:00
Ivan Savenko
5456e245a3 Add mod version validation 2025-06-18 09:39:22 +03:00
Ivan Savenko
da0841dc9c Fix parsing of HAS_ANOTHER_BONUS_LIMITER parameters 2025-06-17 16:58:23 +03:00
Ivan Savenko
463c404a83 Use bonus only as shared_ptr to avoid memory corruption 2025-06-16 16:22:21 +03:00
Ivan Savenko
464865f20d Fix possible crashes on attempt to parse bonus 2025-06-15 23:54:43 +03:00
Ivan Savenko
c279da0798 Minimize hardcoded logic for campaigns. Support for hota h3c's 2025-06-15 17:01:29 +03:00
Ivan Savenko
a842dfb3c4 Support for defining new campaign regions in mods, for hota h3c 2025-06-15 17:01:29 +03:00
Ivan Savenko
87d5347e50 Implement if check for json schemas 2025-06-15 17:01:15 +03:00
Ivan Savenko
2b43d415a9 Fix docs, update spell immunity usage of addinfo, fix sonar 2025-06-15 14:37:18 +03:00
Ivan Savenko
f5c037137b Fix translations, fix Sonar 2025-06-15 14:37:17 +03:00
Ivan Savenko
bc48337445 Implement async requests for bonus types 2025-06-15 14:36:29 +03:00
Ivan Savenko
022b0f731c Fix configs, update docs, resolve discovered regressions 2025-06-15 14:36:29 +03:00
Ivan Savenko
bbe6c415c2 Add TIMES_STACK_SIZE updater 2025-06-15 14:36:29 +03:00
Ivan Savenko
d2178f8831 Simplify Necromancy code, update docs 2025-06-15 14:36:29 +03:00
Ivan Savenko
e0de65d56c Reworked & fixed DARKNESS bonuses and lookout tower / skyship logic 2025-06-15 14:36:29 +03:00
Ivan Savenko
51832c4fb9 Preparation for user-defined bonus types 2025-06-15 14:36:29 +03:00
Ivan Savenko
342705921d remove old bonus conversion logic 2025-06-15 14:36:29 +03:00
Ivan Savenko
43844e2371 Merge pull request #5770 from IvanSavenko/const_bonus
Make bonus limiters/updaters/propagators const
2025-06-04 21:12:06 +03:00
Ivan Savenko
20f0b51912 Make bonus limiters/updaters/propagators const
All pointers held by bonus itself are now const.

To support OppositeSideLimiter (the only stateful limiter) bonuses now
hold their player owner instead.

No changes in functionality or mods
2025-06-03 19:39:28 +03:00
Ivan Savenko
b28fc7c096 Fix false-positive conflicts with append/appendItems syntax
Should no longer result in false positives. True positives when entire
list is being replaced (1.6-style) or if same item is modified should
still be reported
2025-06-02 21:35:11 +03:00
George King
75672587b2 Fix appendItems 2025-05-28 15:32:44 +02:00
Ivan Savenko
0945654672 Give custom descriptions to unclear H3 abilities and artifacts 2025-05-25 11:56:54 +03:00
Ivan Savenko
25e57542be Merge pull request #5725 from IvanSavenko/bonus_description
Custom descriptions and icons for creature abilities
2025-05-23 14:02:34 +03:00
Ivan Savenko
6fe3666abb Fix validation of addInfo of bonuses
- Added missing docs on addInfo of some bonuses
- Unified naming in docs to match json keys
- Removed addInfo from bonuses that don't actually support it
- Added loading of addInfo to bonuses that support it
2025-05-22 19:00:18 +03:00
Ivan Savenko
3f83ad1b40 Merge pull request #5726 from IvanSavenko/breath
Configurable multi-hex attacks
2025-05-21 17:10:59 +03:00
Ivan Savenko
25655184d3 Add support for custom icons & descriptions for bonuses 2025-05-21 14:57:10 +03:00
Ivan Savenko
e90d8c318d Configurable multi-hex attacks
- Added bonus type MULTIHEX_UNIT_ATTACK - configurable version of Dragon
Breath.
- Added bonus type MULTIHEX_ENEMY_ATTACK - configurable version of
Cerberi multi-headed attack that only hits enemies
- Added bonus type MULTIHEX_ANIMATION - optional bonus that does not
affects gameplay, but allows to define in which cases game should use
alternative attack animation.
- All existing multi-hex attack bonuses other than ATTACKS_ALL_ADJACENT
are presumable deprecated, but will be supported for now.
- It is now possible to precisely configure which hexes are targeted by
MULTIHEX_XXX bonuses. See docs for details.
- Unified logic of all multi-hex attacks, all existing bonuses are now
implemented as specific case of MULTIHEX_XXX bonus
- Added tests to cover Cerberi attack logic, and fixed incorrect edge
case of Dragon Breath
2025-05-20 15:08:59 +03:00
Ivan Savenko
95ac124dc9 Bonus-aware addInfo loading 2025-05-20 14:56:22 +03:00
Ivan Savenko
cc274c4d34 GameRandomizer is now in lib, add implementation 2025-05-19 18:51:42 +03:00
Ivan Savenko
54a46b77a9 Extract library entity randomization logic to separate class 2025-05-19 18:51:42 +03:00
Ivan Savenko
4d4da0454f map objects hierarchy now uses IGameInfoCallback 2025-05-14 18:33:20 +03:00
Ivan Savenko
6f20235d07 Merge CPrivilegedInfoCallback into CGameInfoCallback 2025-05-14 13:42:20 +03:00
Ivan Savenko
716da918f8 Completely remove IGameCallback class
- CClient now inherits directly from CPrivilegedInfoCallback, like
IGameCallback did before. However CClient no longer needs dummy
implementation of IGameEventCallback
- CGObjectInstance hierarchy now uses CPrivilegedInfoCallback for
callback. Actual events can only be emitted in calls that receive
IGameEventCallback pointer, e.g. heroVisit
- CGameHandler now inherits directly from both CPrivilegedInfoCallback
and IGameEventCallback as it did before via IGameCallback
2025-05-14 13:39:41 +03:00