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
godric3
9e9f118b09
another attempt of using CGHeroInstance::NO_PATROLLING
in map editor
2024-10-29 21:41:42 +01:00
godric3
ed087b7a5b
Use max ui32 value instead of -1 for NO_PATROLLING
2024-10-29 18:34:02 +01:00
godric3
da5bae301a
try to fix build, use plain -1
in place of CGHeroInstance::NO_PATROLLING
2024-10-28 22:46:48 +01:00
godric3
56efb82b2e
try to fix build, separate definition of NO_PATROLLING in CGHeroInstance
2024-10-28 21:49:25 +01:00
godric3
a9e04428c8
Possibility to set hero patrol radius in map editor
2024-10-28 18:30:30 +01:00
Xilmi
2b99414793
Using hero's stats instead of level to determine their role.
...
Since there are custom maps/campaigns in which heroes have pretty high base-stats even at level 1.
2024-10-21 09:37:44 +02:00
Xilmi
5d6877e06d
Merge remote-tracking branch 'upstream/develop' into develop
2024-10-20 00:49:17 +02:00
Ivan Savenko
604e3b5c67
Merge pull request #4763 from IvanSavenko/herohandler_split
...
Split CHeroHandler.cpp/.h into 1 file per class
2024-10-14 19:05:48 +03:00
Ivan Savenko
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
Ivan Savenko
ad7f0416a7
Added overloaded version of getObjectHandler to CGHeroInstance
2024-10-13 13:06:31 +00:00
Xilmi
533806df6d
Merge remote-tracking branch 'upstream/develop' into develop
2024-10-11 19:07:56 +02:00
Ivan Savenko
e221cdccab
Fix initialization of hero type in map editor
2024-10-11 15:01:55 +00:00
Xilmi
61fba1fedd
Merge remote-tracking branch 'upstream/develop' into develop
2024-10-10 17:23:39 +02:00
Ivan Savenko
3dd4fa2528
Reduce usage of pointers to VLC entities
...
Final goal (of multiple PR's) is to remove all remaining pointers from
serializeable game state, and replace them with either identifiers or
with shared/unique pointers.
CGTownInstance::town and CGHeroInstance::type members have been removed.
Now this data is computed dynamically using subID member.
VLC entity of a town can now be accessed via following methods:
- getFactionID() returns ID of a faction
- getFaction() returns pointer to a faction
- getTown() returns pointer to a town
VLC entity of a hero can now be accessed via following methods:
- getHeroTypeID() returns ID of a hero
- getHeroClassID() returns ID of a hero class
- getHeroType() returns pointer to a hero
- getHeroClass() returns pointer to a hero class
2024-10-10 12:28:08 +00:00
Ivan Savenko
a8f8c3f4b1
Replaced most of accesses to CGObjectInstance::pos with anchorPoint()
2024-10-09 15:43:46 +00:00
Xilmi
9a40577994
Merge remote-tracking branch 'upstream/develop' into develop
2024-10-08 16:15:22 +02:00
Ivan Savenko
c0f5c7c0ea
Replace pointer with reference in pack apply functions
2024-10-07 14:59:46 +00:00
Xilmi
3d9892f6b3
Merge remote-tracking branch 'upstream/develop' into develop
2024-10-01 16:08:57 +02:00
Xilmi
1d831022e8
Merge remote-tracking branch 'upstream/develop' into develop
2024-09-25 14:08:34 +02:00
SoundSSGood
586a32a616
CArtifactSet cleanup
2024-09-23 23:39:19 +03:00
SoundSSGood
b9ae7f1138
CMap put move and remove artifact method
2024-09-23 23:30:38 +03:00
Ivan Savenko
e93a060500
Merge branch 'vcmi/beta' into 'vcmi/develop'
2024-09-23 14:25:53 +00:00
Dydzio
7979f62f82
Add status bar movement points info for own hero on adventure map or hero list
2024-09-17 21:38:28 +02:00
Xilmi
a1a03d4b74
Merge remote-tracking branch 'upstream/develop' into develop
2024-09-12 14:54:39 +02:00
Ivan Savenko
39a2c29c97
Removed creatureBank flag from battle, battles now receive BattleLayout
...
struct that defines how units are placed in combat
2024-09-12 12:11:18 +00:00