1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00
Commit Graph

16 Commits

Author SHA1 Message Date
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
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
c21913f661 Fixed initialization of move points and mana for dismissed heroes 2024-01-15 23:16:48 +02:00
35ee8c1397 Only apply normal mana regen for retreated heroes in taverns (h3 logic) 2023-11-12 19:30:33 +02:00
03e1169781 Reduced number of accesses to CGObjectInstance::subID 2023-11-01 14:43:20 +02:00
ef0eb8e930 Merge pull request #2772 from wb180/tavernPoolHeroesFix
Remove(reduce durations) of bonuses for tavern heroes
2023-09-07 10:54:44 +03:00
47f5dd14fa Remove(reduce durations) of bonuses for tavern heroes 2023-09-06 09:12:23 +03:00
a30e7ba321 Remove bitmasks of PlayerColor's. Add encode/decode methods 2023-09-04 18:56:16 +03:00
ee8adbe85f Update tavern on end of 7th turn of player in question
Allows removal of "retreat after 7th day" workaround and as result -
more straightforward code
2023-08-24 23:34:33 +03:00
72210afc92 Do not attempt to reset movement for inactive heroes in pool 2023-07-27 15:51:38 +03:00
463efea7bb Fix hero retreating handling & code cleanup 2023-07-15 19:55:30 +03:00
cb16636fce Implemented preserving hero on retreat on 7th day after end of turn 2023-07-15 19:55:30 +03:00
9a38d8ea97 Implemented tavern slot selection using rules similar to H3 2023-07-15 19:55:30 +03:00
a2d2ecc96f Roll first for hero class, and then - for actual hero for tavern 2023-07-15 19:55:30 +03:00
f8187ce1d8 Fix regressions 2023-07-15 19:55:30 +03:00
19ace6a849 Moved hero pool logic to the separate files 2023-07-15 19:55:29 +03:00