1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00
Commit Graph

23 Commits

Author SHA1 Message Date
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
07662a070f Merge pull request #5724 from IvanSavenko/randomization
Better randomization logic
2025-05-21 13:50:28 +03:00
cc274c4d34 GameRandomizer is now in lib, add implementation 2025-05-19 18:51:42 +03:00
fcc9b8ecfa Artifacts discharging 2025-05-16 23:24:36 +02:00
9bbebd62e9 GrowUpArtifact pack 2025-05-16 23:20:09 +02:00
86b832be67 Remove CPack::applyGs method in favor of GameStatePackVisitor class 2025-05-10 17:51:35 +03:00
283adc37d7 Unit stack rebalancing rework
- CStackInstance::count is now private with accessor methods
- CStackInstance::experience renamed to totalExperience and now stores
total stack experience (multiplied by stack size) to reduce rounding
errors
- CStackInstance::totalExperience is now private with accessors methods
- stack experience is now automatically reallocated on stack management
- Removed buggy BulkSmartRebalanceStacks pack, that mostly duplicates
BulkRebalanceStacks
- Renamed BulkSmartSplitStack to BulkSplitAndRebalanceStack to drop
unclear "smart" in name
- Reworked split-and-rebalance logic to correctly reallocate stack
experience
2025-05-01 18:18:30 +03:00
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
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
2b286378e8 Remove logic for banks in 1.5 format 2025-03-19 08:02:39 +00:00
09db3e4bef Reworked resource piles loading to fix wog maps with mithril 2025-01-25 11:40:21 +00:00
1f0847660b possibility to delete unsupported saves 2024-10-31 21:57:20 +01:00
8a5ac73438 Basic support for configurable flaggable objects
Converted CGLighthouse class into FlaggableMapObject

Bonus provided by Lighthouse/Flaggable is now defined in config and is
accessible to mods.
2024-10-25 16:48:10 +00:00
10ad0fc760 Split CHeroHandler.cpp/.h into 1 file per class
All parts of CHeroHandler.cpp are now in lib/entities/hero
Adjusted includes to use new paths
No functionality changes
2024-10-13 14:01:09 +00:00
679181c103 Implemented serialization of local player state in json form 2024-10-08 20:04:32 +00:00
d929bfb9d1 rename; introduce factor 2024-09-28 15:05:13 +02:00
a9327b3fa3 netpacks 2024-09-27 22:47:22 +02:00
8225eb454e Added GameSettings to gamestate, potentially allowing to define game
settings per map (or in random map template)
2024-09-05 15:16:27 +00:00
327ff01471 Implemented explicitly visitable town buildings, e.g. hota mana vortex
Added flag `manualHeroVisit` flag to town building. If this flag is set,
then building will only be activated on click and will not give its
effect on hero recrutiment, hero visit, or new day.

This allows implementing changes to Mana Vortex from HotA
2024-09-03 16:31:07 +00:00
e15ea4fc75 BulkEraseArtifacts network pack 2024-08-29 20:22:08 +03:00
f765f212bb Restore save compatibility 2024-08-26 20:52:37 +00:00
ac271c09b9 Add mechanism to provide save compatibility if class is removed or
addded
2024-08-26 20:06:36 +00:00
77faa14119 Added explicit indexing of type indexes for serialization 2024-08-26 20:06:35 +00:00