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

550 Commits

Author SHA1 Message Date
f893c80192 Move UpgradeInfo class to header and source files 2024-12-19 14:13:09 +01:00
af9445c16f Fixes following review 2024-12-17 22:34:06 +01:00
d8d3948ac3 Fix AI to use hillFort all available upgrades. UpgradeInfo refactor. 2024-12-17 22:34:06 +01:00
be2327d000 Removed no longer used or redundant constants 2024-11-28 12:11:13 +00:00
56ee307b3a Extend AI garrison troop removal logic to all RoE campaigns to emulate
H3 logic
2024-11-17 17:38:54 +00:00
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
c98ac01e7a Replaced public artType member of ArtifactInstance with getter 2024-10-30 16:47:01 +00:00
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
a8f8c3f4b1 Replaced most of accesses to CGObjectInstance::pos with anchorPoint() 2024-10-09 15:43:46 +00:00
503b87561e Converted all h3 banks to rewardable, remove most of hardcoded checks 2024-09-12 12:11:18 +00: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
01396b62b7 Extracted handling of type ID's from serializer into a separate class 2024-08-26 19:48:46 +00:00
b84af1a6de Significantly simplify packs applying
Apparently our logic for packs applying with types registration is
overcomplicated and by now completely unnecessary - it became redundant
after introduction of visitor pattern.
2024-08-26 19:48:46 +00:00
2e3e6b1553 market->getObjInstanceID() 2024-08-21 01:01:23 +03:00
58bb2b58e3 IMarket suggestions
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-08-20 18:49:48 +03:00
fd45b5144d IMarket serializeable 2024-08-20 18:49:47 +03:00
2a05fbdd50 Unified handling of battle sides ID's
- Replaced BattleSide namespace-enum with enum class
- Merged two different BattleSide enum's into one
- Merged BattlePerspective enum into BattleSide enum
- Changed all places that use integers to represent battle side to use
BattleSide enum
- Added BattleSideArray convenience wrapper for std::array that is
always 2-elements in size and allows access to its elements using
BattleSide enum
2024-08-11 20:54:44 +00:00
4aa73b40c9 Split CTownHandler into smaller chunks 2024-07-21 18:21:48 +00:00
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
3bea383b59 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-21 12:58:36 +00:00
9c05e80315 Fix Admiral's Hat whirlpool immunity. Reduce usage of
convertFromVisitablePos
2024-06-11 14:31:11 +00:00
b8beb4fb13 Fixes for various minor issues detected by Sonar Cloud 2024-06-01 11:48:30 +00:00
f3de2cfe1c Removed broken & unused serialization of player interface and AI 2024-05-17 16:35:53 +00:00
62d15ed23c Merge pull request #3820 from IvanSavenko/bugfixing
Bugfixing
2024-04-23 13:03:36 +03:00
a46e022421 Fixed format string 2024-04-22 13:48:56 +03:00
438ec08d72 AI will only ignore garrisons in 'Steadwick Fall' mission (H3 logic) 2024-04-22 11:14:58 +03:00
21dff9413e Merge pull request #3786 from IvanSavenko/instant_movement
Instant movement
2024-04-22 11:08:00 +03:00
d5a2ad1be8 Allow sending requests to move across multiple tiles at once 2024-04-20 12:28:50 +03:00
19453aab41 Add handling for yes/no dialogs that can be safely skipped by player 2024-04-17 01:08:27 +02:00
03786fb63b VCAI will now check whether it actually has enough gold to buy a hero 2024-04-06 15:59:08 +03:00
c23953eac5 Remove custom casts 2024-02-14 12:56:37 +02:00
7f58333ef9 quick combat vs ai 2024-01-25 23:44:41 +01:00
0c07384293 Refactoring of serialization versioning handling
- Removed 'version' field from serialize() method
- Handler classes - Binary(De)Serializer now have 'version' field
- Serialization versioning now uses named enum

Save compatibility with 1.4.X saves should be intact
2024-01-20 20:34:51 +02:00
2c4cad7d9c Slight simplification of bonus system node class 2024-01-19 13:54:49 +02:00
cca08e29da Remove duplicate semicolons 2024-01-16 19:02:39 +00:00
bc781c28e0 Remove trailing semicolon from NET_EVENT_HANDLER macro 2024-01-14 14:49:25 +00:00
f3277b7953 Define each identifier in a dedicated statement 2024-01-10 00:22:23 +00:00
4a7fa9bf8c Simplified CTypeList class 2023-11-08 22:05:36 +02:00
6b81012f31 Use variant identifier in netpacks where applicable 2023-11-08 14:00:23 +02:00
8346d71c98 Remove more subID access 2023-11-01 14:44:05 +02:00
7107b3202f Merge pull request #3069 from SoundSSGood/artifact-location-id
ArtifactLocation now use ID for artHolder identification
2023-11-01 14:41:36 +02:00
ab2f6abb87 ArtifactLocation now use ID for artHolder identification part2 2023-10-29 17:46:13 +02:00
61fc236d79 ArtifactLocation now use ID for artHolder identification part1 2023-10-29 17:46:13 +02:00
5cbc75d3b7 Merge remote-tracking branch 'upstream/develop' into develop 2023-10-29 13:35:37 +00:00
bcaa2e5966 AI/VCAI/VCAI.cpp: Remove "e" from "throw" statement to rethrow the original exception.
The original exception object should be rethrown
2023-10-27 14:29:44 +00:00
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00
a1a5bc28c2 convert line endings from CRLF (Windows) to LF (Linux/Unix)
Mixed line endings cause problems when exporting patches with
git-format-patch and then trying to "git am" a patch with mixed and
non-matching line endings. In such a situation git will fail to apply
the patch.

This commit runs the dos2unix tools on the remaining files with CRLF
(\r\n) line endings to convert them to line-feeds (\n) only.

Files that are Windows specific like *.vcxproj and *.props files were
not converted.

Closes: #3073
2023-10-19 16:23:21 +02:00
46e4d862a5 Fix AI recruitment 2023-10-04 17:47:12 +03:00
39a92cdde3 Add query for dwellings dialog 2023-10-04 17:47:12 +03:00