Ivan Savenko
1690913ba4
Stack instance now stores non-serialized pointer to army
2025-05-05 16:09:21 +03:00
Ivan Savenko
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
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
829739da24
Reduce usage of implicit conversions to int
2025-04-27 14:57:31 +03:00
Ivan Savenko
4d57a8ed36
Prefer to pass CGameState as reference instead of pointer
2025-04-27 14:57:31 +03:00
Ivan Savenko
912c2eae94
Fix regressions
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
93b18ee94b
Fix some issues detected by Sonar & code review, fix build
2025-04-27 14:57:31 +03:00
Ivan Savenko
d1d2cf4189
Fix crashes on game start, gamestate now derives from GameCallbackHolder
2025-04-27 14:57:31 +03:00
Ivan Savenko
d34b47bb20
Remove pointers from artifacts
2025-04-27 14:57:31 +03:00
Ivan Savenko
9e6397d1f9
Remove pointer to boat from CGHeroInstance
2025-04-27 14:57:30 +03:00
Ivan Savenko
63d00b080e
Removed pointer to army from StackInstance
2025-04-27 14:57:30 +03:00
Ivan Savenko
745040def3
Access to heroes storage in CMap is now done via public methods
2025-04-27 14:57:30 +03:00
Ivan Savenko
0ada2a5ebd
Map objects now use shared_ptr (game)
2025-04-27 14:57:30 +03:00
Ivan Savenko
2ca1748e96
Artifact instances are now owned solely by CMap
2025-04-27 14:57:30 +03:00
Ivan Savenko
417ea6451a
Remove ConstTransitivePtr from hero and town instances
2025-04-27 14:57:30 +03:00
Michał Zaremba
63906c4446
Fix bug when no casualties but 1 skeleton is raised
2025-04-23 13:45:21 +02:00
SoundSSGood
60afbbe20f
Necromancy & Eagle eye infowindows
2025-04-09 10:13:10 +02:00
SoundSSGood
603672ff51
revert some changes
2025-04-07 17:00:24 +02:00
George King
474e044caf
Update lib/mapObjects/CGHeroInstance.cpp
...
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-03-22 18:25:30 +01:00
George King
cae84e0e77
Skill removal as reward
2025-03-22 17:16:46 +01:00
Ivan Savenko
62cb5412ff
CGameState::map is now a private, unique_ptr with accessors
2025-03-08 14:05:14 +00:00
Ivan Savenko
645b95ba02
Renamed LibClasses * VLC
to GameLibrary * LIBRARY
2025-02-21 16:54:56 +00:00
Ivan Savenko
2362c6da21
Fixes for multiple new issues from Sonar
2025-02-21 15:57:39 +00:00
Ivan Savenko
ec970c7b22
Support for configuring minimal cost for moving between tiles
...
- Added `movementCostBase` parameter to game config that defines minimal
amount of movement points that will be spent when moving from one tile
on another while offroad (and cost of Fly / Town Portal spells)
- Added `BASE_TILE_MOVEMENT_COST` bonus type that allows modifying
`movementCostBase` on per-hero basis
Example usage for hota-like pathfinding skill
```json
"tileCostReduction" : {
"type" : "BASE_TILE_MOVEMENT_COST",
"val" : -15
}
```
2025-02-03 22:52:33 +00:00
Ivan Savenko
e829d723b2
Replace global bonus tree change counter with per-node counter
2025-01-12 12:23:07 +00:00
Ivan Savenko
40bff74195
Use small vector for unit list
2025-01-10 18:58:46 +00:00
Ivan Savenko
73d1675ae3
Code cleanup, fixes to discovered regressions
2025-01-05 15:41:42 +00:00
Ivan Savenko
dea1eba20b
Rework and optimize turnInfo used by pathfinder
2025-01-04 15:09:50 +00:00
Ivan Savenko
919588f7ff
Added cache for common hero-based bonuses
2025-01-04 15:09:50 +00:00
Ivan Savenko
16cfb51f3e
Initial version of new bonus caching system
2025-01-04 15:09:50 +00:00
Ivan Savenko
e035cf9e63
Optimized getHeroStrength method
...
- replaced 4x access to bonus system with single access
- fixed formula for Diplomacy
- fxied formula for hero transfer in campaigns
- removed pointless sqrt(pow()) construct
2024-12-22 14:49:35 +00:00
Ivan Savenko
95a07ee5cb
Use bonus system cache whenever possible
2024-12-21 18:47:11 +00:00
Ivan Savenko
b8a04c6356
Avoid vector allocation when accessing game settings value
2024-12-21 14:43:09 +00:00
MichalZr6
f893c80192
Move UpgradeInfo class to header and source files
2024-12-19 14:13:09 +01:00
MichalZr6
af9445c16f
Fixes following review
2024-12-17 22:34:06 +01:00
MichalZr6
d8d3948ac3
Fix AI to use hillFort all available upgrades. UpgradeInfo refactor.
2024-12-17 22:34:06 +01:00
godric3
31e4937a8c
Editing hero primary skill in map editor should not be influenced by artifacts
2024-12-08 17:49:41 +01:00
Xilmi
b750937588
Merge remote-tracking branch 'upstream/develop' into develop
2024-11-25 18:49:45 +01:00
Ivan Savenko
1116c18af5
Fix Orrin as starting hero on some maps
...
Fixes a bug that led to Orrin being replaced with a different randomly
selected hero on maps where starting hero is not generated in town, but
pre-placed on map
2024-11-24 20:05:34 +00:00
Xilmi
65f2d0c44e
Merge remote-tracking branch 'upstream/develop' into develop
2024-11-21 23:14:03 +01:00
Ivan Savenko
0c4eb5156b
Put imprisoned heroes back to prison
2024-11-17 18:07:28 +00:00
Ivan Savenko
227e403e88
Fix crash on advancing to 3rd scenario of Birth of Barbarian campaign -
...
spellbook removal was not working correctly when hero does not keeps his
spells
2024-11-16 16:22:43 +00:00
Xilmi
e60a565942
Merge remote-tracking branch 'upstream/develop' into develop
2024-11-07 15:24:19 +01:00
Xilmi
a70f5de8c6
Merge remote-tracking branch 'upstream/develop' into develop
2024-11-07 14:35:13 +01:00
Ivan Savenko
b9ff192a91
Fix regressions from previous PR
2024-11-07 12:07:45 +00:00
Ivan Savenko
697d63d2b8
Reworked and fixed gendered hero sprites on adventure map
2024-11-07 10:39:23 +00:00
Xilmi
63097968d3
Merge remote-tracking branch 'upstream/develop' into develop
2024-10-31 12:29:37 +01:00
Ivan Savenko
d3af9f1c67
Removed pointer to VLC entity from CStackBasicDescriptor
2024-10-30 16:47:02 +00:00
Ivan Savenko
08fbcd5239
TerrainTile now uses identifiers instead of pointers to VLC
2024-10-30 16:22:11 +00:00