Ivan Savenko
65fc50d33b
Simplified building ID logic
...
- Replaced overcomplicated and broken math on dwelling ID's with fixed
enum
- Fixed broken 2nd upgrades and 8th dwelling
- Removed no longer used enumeration values from building ID's
2024-12-25 19:16:21 +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
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
Ivan Savenko
b0d8068493
fix "transport artifact" victory condition triggering as
...
victory for human players even when artifact was transported by enemy AI
if "standard victory" is also enabled
2024-12-10 12:58:52 +00: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
Ivan Savenko
d3af9f1c67
Removed pointer to VLC entity from CStackBasicDescriptor
2024-10-30 16:47:02 +00:00
Ivan Savenko
c98ac01e7a
Replaced public artType member of ArtifactInstance with getter
2024-10-30 16:47:01 +00:00
Ivan Savenko
04ca8aca9f
Update tests
2024-10-30 16:22:12 +00:00
Ivan Savenko
08fbcd5239
TerrainTile now uses identifiers instead of pointers to VLC
2024-10-30 16:22:11 +00: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
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
Ivan Savenko
786f80871e
Replace more usages of pointers to packs with references
2024-10-07 14:59:14 +00:00
Ivan Savenko
cef7466c71
Merge pull request #4643 from SoundSSGood/CArtHandler-refactoring
...
CArtifactSet tidy up
2024-10-01 16:26:32 +03:00
Laserlicht
1558cbdfa9
turn timer and simturn change on load
2024-09-28 13:45:04 +02:00
SoundSSGood
b9ae7f1138
CMap put move and remove artifact method
2024-09-23 23:30:38 +03:00
Ivan Savenko
0058c9ba2e
Fix crash on transfer of multiple artifacts in a backpack to another
...
hero on starting next campaign scenario without hero that held these
artifacts before
2024-09-22 20:31:52 +00:00
Ivan Savenko
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
SoundSSGood
30fa2846aa
ArtifactUtils::createArtifact ArtifactUtils::createNewArtifactInstance unified
2024-09-04 21:25:55 +03:00
Ivan Savenko
d0b3bb95b2
Change gamestate initialization order - list of owned objects must be
...
initialized before connecting towns with visiting heroes, but after
generateion of starting heroes
2024-08-29 13:18:33 +00:00
Ivan Savenko
d4ba7e12b0
Fix regressions
2024-08-28 13:03:45 +00:00
Ivan Savenko
e5f1d60298
Add save compatibility
2024-08-28 13:03:44 +00:00
Ivan Savenko
020f1d1f46
Moved rumors generation to NewTurnProcessor
2024-08-28 13:03:15 +00:00
Ivan Savenko
d49a61645c
All objects that can be owned by player now implement IOwnableObject
2024-08-28 12:51:28 +00:00
Ivan Savenko
a481f07daf
PlayerState now stores all objects owned by player
2024-08-28 12:51:27 +00:00
Ivan Savenko
0fd9dbf240
Unified income handling, added IOwnableObject interface
2024-08-28 12:40:44 +00:00
Ivan Savenko
01396b62b7
Extracted handling of type ID's from serializer into a separate class
2024-08-26 19:48:46 +00:00
Ivan Savenko
232a759db7
Remove type registration from library pack applying
2024-08-26 19:48:46 +00:00
Ivan Savenko
11e8b04ac5
Merge pull request #4463 from SoundSSGood/IMarket-refactoring
...
IMarket refactoring
2024-08-26 22:48:23 +03:00
Ivan Savenko
3d39963a1c
Merge branch 'master' into 'develop'
2024-08-26 14:01:00 +00:00
Ivan Savenko
4386339354
Fix crash on rmg generation (regression from previous commit)
2024-08-21 18:19:58 +00:00
SoundSSGood
58bb2b58e3
IMarket suggestions
...
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-08-20 18:49:48 +03:00
SoundSSGood
39bb6d5f39
IMarket now able to store artifacts
2024-08-20 18:49:47 +03:00
Ivan Savenko
be42a8c58b
Try to fix saving of corrupted random maps
2024-08-15 16:03:00 +00:00
Laserlicht
b693ce120a
code review
2024-08-14 22:36:54 +02:00
Laserlicht
a42afa2910
code review
2024-08-14 21:51:08 +02:00
Laserlicht
39aaa6fe32
data to clipboard; simplify types
2024-08-14 21:01:37 +02:00
Laserlicht
81b1704e39
Merge branch 'vcmi:develop' into extended_statistic
2024-08-14 20:32:47 +02:00
Laserlicht
ec2163b974
add val; stat at end turn; events
2024-08-14 19:24:40 +02:00
Ivan Savenko
49c5f650f7
Merge pull request #4437 from IvanSavenko/battle_sides
...
Unified handling of battle sides ID's
2024-08-14 18:37:05 +03:00
Ivan Savenko
5c7c4a7810
Merge pull request #4443 from IvanSavenko/fix_sonar
...
Fix miscellaneous issues discovered by Sonar
2024-08-14 17:12:27 +03:00
Ivan Savenko
38311244a4
Merge pull request #4402 from Laserlicht/8th_creature
...
support for 8th creature (Factory)
2024-08-14 17:04:32 +03:00
Laserlicht
e83a30ea11
darkened; added values
2024-08-14 02:49:54 +02:00
Laserlicht
cac778ffed
fix
2024-08-13 00:50:10 +02:00
Laserlicht
47330653da
basic diagram functionality
2024-08-12 21:47:59 +02:00
Ivan Savenko
97f1a310df
Fix miscellaneous issues discovered by Sonar
2024-08-12 18:26:30 +00:00