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

218 Commits

Author SHA1 Message Date
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
9762e8493a Add TRANSMUTATION_IMMUNITY bonus 2025-06-15 14:36:29 +03:00
Ivan Savenko
0e2463f9c4 Improvements to skeleton transformer logic 2025-06-15 14:36:29 +03:00
Ivan Savenko
0979f409c7 Fix build 2025-06-15 14:36:29 +03:00
Ivan Savenko
ab0f6ed8cd Simplified hero creature specialties logic 2025-06-15 14:36:29 +03:00
Ivan Savenko
4e47894e7a Somewhat configurable spell schools 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
a305ed28bb Support for loading custom bonuses, slightly less hardcoded Skeleton
Transformer
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
527885de21 Added VULNERABLE_FROM_BACK bonus 2025-06-15 14:36:29 +03:00
Ivan Savenko
ae22de3ccf Implemented configurable FEAR ability 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
ce5ee6e1df Merge pull request #5769 from IvanSavenko/mysticism
Percentage-based mana regeneration
2025-06-04 21:11:45 +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
07dcdc1f85 Percentage-based mana regeneration
Hota-like mysticism.

Bonus FULL_MANA_REGENERATION (Wizard well) has been replaced with
MANA_PERCENTAGE_REGENERATION bonus. Wizard well now has new bonus with
100% value.
2025-06-03 19:38:54 +03:00
Ivan Savenko
139f41c9b2 Implement STACK_EXPERIENCE_GAIN_PERCENT bonus
Suggested on Discord

- implements STACK_EXPERIENCE_GAIN_PERCENT that modifies stack
experience received by units after combat
- removed "EXPERIENCE" primary skill. Changes to experience are now
applied through separate netpack
2025-06-02 21:21:20 +03:00
Ivan Savenko
3f4ff58a5e Merged bonus names with bonus descriptions, since they are never used
separately
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
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
SoundSSGood
a750adf705 Bonus type ARTIFACT_CHARGE 2025-05-16 23:20:09 +02:00
SoundSSGood
9bbebd62e9 GrowUpArtifact pack 2025-05-16 23:20:09 +02:00
Ivan Savenko
1165dadfd4 Merge pull request #5701 from IvanSavenko/bonus_docs
Update documentation for bonuses and fix creature type limiter
2025-05-14 11:53:05 +03:00
Ivan Savenko
f26dca2026 Merge pull request #5708 from kdmcser/limit_fix
OppositeLimiter fix and boat creation fix when loading map
2025-05-14 11:52:15 +03:00
Ivan Savenko
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
kdmcser
c464e953e2 Merge branch 'develop' into limit_fix 2025-05-13 00:59:25 +08:00
kdmcser
ab46a16322 fix OppositeSideLimiter treat UNFLAGGABLE as opposite of NEUTRAL 2025-05-13 00:58:10 +08:00
kdmcser
7543fee02c fix OppositeSideLimiter error 2025-05-12 00:46:06 +08:00
Ivan Savenko
3d170bb1f4 Fix creature type limiter not considering upgrades of upgrades 2025-05-10 19:09:08 +03:00
Ivan Savenko
700eeb6bd4 Implemented HERO_SPELL_CASTS_PER_COMBAT_TURN bonus 2025-05-08 00:25:07 +03:00
Ivan Savenko
668bc57210 Merge pull request #5661 from kdmcser/crash_fix2
fix crash when creature level is 0
2025-04-30 13:38:25 +03:00
kdmcser
9310ff3b7a fix crash when creature level is 0 2025-04-30 00:10:21 +08:00
Ivan Savenko
f70ad2c15b Reorganized artifact-related classes
- files now generally contain only 1 class (except for tightly coupled
classes)
- files are now located in lib/entities/artifact directory
- removed excessive includes

No changes to functionality
2025-04-29 13:29:08 +03:00
Ivan Savenko
04c9e27ccd Fix discovered bugs from develop branch 2025-04-27 15:53:03 +03:00
Ivan Savenko
829739da24 Reduce usage of implicit conversions to int 2025-04-27 14:57:31 +03:00
Ivan Savenko
e6a8e5d4bd Correctly restore bonus system on deserialization 2025-04-27 14:57:31 +03:00
Ivan Savenko
3921b9e214 Merge pull request #5650 from kdmcser/limiter
fix crash when bonus limiter is empty in OwnerUpdater
2025-04-27 13:38:18 +03:00
kdmcser
a17f59b704 fix crash when bonus limiter is empty in OwnerUpdater 2025-04-26 02:15:25 +08:00
Ivan Savenko
1cb5f36ccb Fix handling of creature-specific limiters in noneOf limiter on hero
For example, if hero has specialty that provides primary skill bonuses
with "noneOf" limiter that contains limiter that can only be evaluated
in creature context (such as creature level or native terrain), limiter
itself would evaluate to DISCARD, and then will be inverted to ACCEPT by
noneOf limiter. As result, this would give hero bonus to primary skill
even though it is clearly intended to only target creatures.

This introduces NOT_APPLICABLE limiter decision that is not inverted by
noneOf limiter
2025-04-13 23:31:37 +03:00
Ivan Savenko
2b812be9cd Correctly show results of CreatureTerrainLimiter outside of combat 2025-04-13 22:23:12 +03:00
Ivan Savenko
896a7ec88e Better support for Adela specialty (+new modding functionality for it)
Fixes Adela specialty that was apparently broken back in #1518 and
replaced with logic that was clearly not tested - it was neither
functional, nor it was following H3 behavior.

- `HAS_ANOTHER_BONUS_LIMITER` now accepts `null` in place of bonus type,
for cases when limiting is needed by bonus source or bonus subtype. This
allows Adela Bless specialty to always work, irregardless of which
bonuses are provided by Bless.
- Implemented `DIVIDE_STACK_LEVEL` updater that functions same as
`TIMES_STACK_LEVEL`, but it divides bonus value, instead of multiplying
it (to make Adela specialty weaker for high-tier units, as in H3)
- Implemented `TIMES_HERO_LEVEL_DIVIDE_STACK_LEVEL` updater that
combines two existing updaters, to implement `val * heroLevel /
unitLevel` formula needed for Adela specialty
- Removed deprecated `ARMY_MOVEMENT` updater. Its functionality has
already been removed in 1.6.X releases, and it was remaining only as a
placeholder
- Updated modding documentation to account for these changes & to remove
some TODO's

Fixed regression from #777 that could led to either duplicated bonuses
or to multiple application of updaters. It introduced double-recursion -
node parents were gathered recursively, and then bonuses were also
collected recursively within each parent. This created situation where
updater could be applied different number of times. For example, hero
bonus that is propagated to unit in combat could be selected directly,
or via hero->combat unit chain, or via hero->garrison unit->combat unit
chains, leading to different calls to updaters if updater handles
garrison unit node type
2025-04-13 16:24:51 +03:00
Ivan Savenko
f3ca06c3d0 Merge pull request #5593 from kdmcser/limiter
make OwnerUpdater not hardcode OppositeSideLimiter
2025-04-12 10:53:31 +03:00
kdmcser
75aa89ae6e not use mutex 2025-04-11 22:52:20 +08:00
kdmcser
afd64daf04 make OwnerUpdater not hardcode OppositeSideLimiter 2025-03-28 23:06:03 +08:00
Ivan Savenko
eb3b51a6cf Remove save compatibility with 1.5.X 2025-03-18 11:35:15 +00:00
Ivan Savenko
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
Ivan Savenko
0548f325e4 Merge branch 'master' into 'develop' 2025-02-21 13:59:34 +00:00