1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00
Commit Graph

47 Commits

Author SHA1 Message Date
829739da24 Reduce usage of implicit conversions to int 2025-04-27 14:57:31 +03:00
4d57a8ed36 Prefer to pass CGameState as reference instead of pointer 2025-04-27 14:57:31 +03:00
c02a8a84fd Stacks of armed instance are now unique_ptr 2025-04-27 14:57:30 +03:00
1f502c0548 CMap towns and heroes on map fields are now private 2025-04-27 14:57:30 +03:00
0ada2a5ebd Map objects now use shared_ptr (game) 2025-04-27 14:57:30 +03:00
417ea6451a Remove ConstTransitivePtr from hero and town instances 2025-04-27 14:57:30 +03:00
62cb5412ff CGameState::map is now a private, unique_ptr with accessors 2025-03-08 14:05:14 +00:00
82506d5eff Removed ConstTransitivePtr from StackLocation 2025-03-08 14:04:51 +00:00
9f713a0914 Rename int3::valid to isValid for consistency 2025-03-03 10:46:00 +00:00
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
6b387e5d17 Fix integer overflow when total resource amount is above (int max / 100) 2025-01-20 11:17:32 +00:00
dea1eba20b Rework and optimize turnInfo used by pathfinder 2025-01-04 15:09:50 +00:00
7be31c94f2 Fixes from code review 2024-12-05 21:16:06 +01:00
e9be46af98 Merge branch 'develop' into timed_events_objects_removal 2024-12-03 17:27:24 +01:00
f74cd32147 Moved weekly income bonus for AI to game settings 2024-11-26 18:43:25 +00:00
a70f5de8c6 Merge remote-tracking branch 'upstream/develop' into develop 2024-11-07 14:35:13 +01:00
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
04ca8aca9f Update tests 2024-10-30 16:22:12 +00:00
533806df6d Merge remote-tracking branch 'upstream/develop' into develop 2024-10-11 19:07:56 +02:00
115439f16a Fix town events not actually giving offered creatures 2024-10-11 15:01:18 +00:00
61fba1fedd Merge remote-tracking branch 'upstream/develop' into develop 2024-10-10 17:23:39 +02: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
9a40577994 Merge remote-tracking branch 'upstream/develop' into develop 2024-10-08 16:15:22 +02:00
c0f5c7c0ea Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
3bff68958e Change deleted objects format to use ObjectInstanceID 2024-09-28 22:58:05 +02:00
0589403ea3 Remove deleted objects from timed events data 2024-09-28 21:24:13 +02:00
9004b88c7e Mapping of deletable coordinates to objects on map start 2024-09-26 20:05:46 +02:00
cf5ce96aeb Backend implementation of object removal possibility by timed map events 2024-09-23 21:45:50 +02:00
27aed74397 Merge remote-tracking branch 'upstream/develop' into develop 2024-09-18 14:52:24 +02:00
8917c753bd adjust town event handling after introducing 8th creature in town 2024-09-16 20:16:36 +02:00
065125e770 Merge remote-tracking branch 'upstream/develop' into develop 2024-09-10 14:57:27 +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
dd5a34d994 Merge remote-tracking branch 'upstream/develop' into develop 2024-09-05 15:54:03 +02:00
7a0726bcff Apply x2 bonus only to creature growth of affected creature on new month 2024-09-04 19:46:15 +00:00
5ee7061ab7 Merge remote-tracking branch 'upstream/develop' into develop 2024-09-02 17:27:08 +02:00
df5d143822 Difficulty-cheats
Added the difficulty-dependent resource-cheats from the original game.
2024-09-01 01:33:31 +02:00
21fc80a315 Growth of town garrison in neutral towns now uses H3 logic 2024-08-29 15:22:31 +00:00
37658478fa Move timed events to NewTurnProcessor 2024-08-28 13:03:26 +00:00
ce1e0b8875 Moved NewTurn pack generation to NewTurnProcessor 2024-08-28 13:03:24 +00:00
10a9d777c7 Moved mana and movement points refresh to NewTurnProcessor 2024-08-28 13:03:15 +00:00
c09c414f5a Moved roll for week type to NewTurnProcessor 2024-08-28 13:03:15 +00:00
020f1d1f46 Moved rumors generation to NewTurnProcessor 2024-08-28 13:03:15 +00:00
691a1a666d Moved most of town growth handling to NewTurnProcessor 2024-08-28 13:03:13 +00:00
d49a61645c All objects that can be owned by player now implement IOwnableObject 2024-08-28 12:51:28 +00:00
a481f07daf PlayerState now stores all objects owned by player 2024-08-28 12:51:27 +00:00
0fd9dbf240 Unified income handling, added IOwnableObject interface 2024-08-28 12:40:44 +00:00
189cb1c762 Moved most of daily income handling to a separate method 2024-08-28 12:40:44 +00:00