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

263 Commits

Author SHA1 Message Date
139f41c9b2 Implement STACK_EXPERIENCE_GAIN_PERCENT bonus
Suggested on Discord

- implements STACK_EXPERIENCE_GAIN_PERCENT that modifies stack
experience received by units after combat
- removed "EXPERIENCE" primary skill. Changes to experience are now
applied through separate netpack
2025-06-02 21:21:20 +03:00
d102f660a0 color filter cheats 2025-05-19 02:48:13 +02:00
2c17c2d5b7 Rework CCallback <-> CClient interaction
- callback is now part of lib instead of weird class that is shared by
client and AI while being part of client
- callback interacts with client class via minimal interface class
- removed no longer used unlockGsWhileWaiting field
2025-05-12 22:07:10 +03:00
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
d3de0d525f Removed GameEngine::curInt member
- event processing is now initiated by GameEngine instead of weird chain
engine -> player interface -> engine
- introduced GameEngineUser interface (implemented by GameInstance) to
remove mutual depedency between GameEngine and GameInstance (some
technically still remains for now, in form of some free functions)
2025-03-01 21:16:40 +00:00
156de5b17e Added GameInstance class
- available as global GAME
- integrates LOCPLINT (CPlayerInterface)
- integrates CGI->mh (CMapHandler)
- integrates CSH (CServerHandler)
2025-02-21 16:54:06 +00:00
32391dc7a9 Pathfinder cache is now stored separately per playerBlocked
- human player will now use pathfinder settings from config (as before)
- nullkiller AI will now use its own, modified settings
- added option to configure NKAI usage of monolith to config
- fixed pathfinder costs not updating on receiving levelup
2025-01-23 15:28:44 +00:00
ac8104d56d SonarCloud recomendations.
Code review follow-up:
- Replace std::vector with boost::small_vector
- Rename function merge to insert
2025-01-06 23:28:45 +01:00
a99274d72e BattleHexArray - new container for BattleHexes 2025-01-06 23:18:18 +01:00
d8d3948ac3 Fix AI to use hillFort all available upgrades. UpgradeInfo refactor. 2024-12-17 22:34:06 +01:00
3bff68958e Change deleted objects format to use ObjectInstanceID 2024-09-28 22:58:05 +02: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
b7391f49f6 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-08-05 10:36:10 +00:00
5f0e6f7ce1 Close all dialogs on start of new turn in MP 2024-07-29 17:13:31 +00:00
ff5ddd76b7 suggestions 2024-07-16 00:03:06 +03:00
b42c6dbf44 fixed regressions 2024-07-09 14:27:05 +03:00
ef1fbffad4 ArtifactsUIController class 2024-07-09 14:27:05 +03:00
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
df83fa33a1 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-05-31 09:34:21 +00:00
9bfe000724 Added semi-workaround method for network thread shutdown:
Currently closing game while network thread is waiting for something is
very bug-prone, since network thread may resume during shutdown and
access partially destroyed client state.

Now if exit has been requested, the very first step would be semi-
graceful shutdown of network thread (via exception throwing). This may
in theory skip some cleanup in non-RAII code, but since game is shutting
down this does not matters much.

This logic applies to:
- shutting down while network thread is waiting for dialogs
- shuttind down while network thread waiting for animations in combat
2024-05-18 11:04:10 +00:00
f3de2cfe1c Removed broken & unused serialization of player interface and AI 2024-05-17 16:35:53 +00:00
26ffa3342b Fix locked UI on starting multiplayer game 2024-04-29 17:02:27 +03:00
19453aab41 Add handling for yes/no dialogs that can be safely skipped by player 2024-04-17 01:08:27 +02:00
cad0d5db16 consider unlimited replay (or not) 2024-01-27 15:02:03 +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
864462b84a Reduce excessive updates of garrisons. Fixes selection reset in simturns 2023-11-09 00:01:48 +02: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
d7d435dcb7 Add game pause 2023-10-08 16:03:57 +02:00
39a92cdde3 Add query for dwellings dialog 2023-10-04 17:47:12 +03:00
898733eed7 Added Query to track visit duration for Taverns and Markets 2023-10-04 17:47:12 +03:00
0dcfd6e65c Removed optional locking in waitWhileDialog method 2023-09-27 18:44:08 +03:00
d6b9fa8fbd Replaced CPlayerInterface::pim with CGuiHandler::interfaceLock
- Removed CPlayerInterface::pim since this lock does not actually
protects LOCPLINT but rather entire game UI state
- added more logical CGuiHandler::interfaceLock
- interface lock is now non-recursive and is locked only once by initial
caller that want to access GUI
2023-09-27 18:33:52 +03:00
8c0d78f1d9 Added initiator-player to packs that add/remove/move objects 2023-09-19 19:24:34 +03:00
219f81d28b Added explicit "PlayerEndsTurn" netpack
- PlayerEndsTurn pack is now sent when player ends turn
- YourTurn pack has been renamed to PlayerStartsTurn for consistency
- PlayerStartsTurn will no longer replace list of acting players
- PlayerEndsGame and PlayerEndsTurn will remove player from acting list
2023-09-18 20:55:01 +03:00
c8e6a7cd27 Fixed most common cases of movement actions 2023-09-16 20:07:26 +03:00
80b80a0ae6 Minor cleanup of hero movemen code 2023-09-16 20:07:26 +03:00
347ce01dbe Moved hero movement logic to a new class from PlayerInterface 2023-09-16 20:07:26 +03:00
1b810b5b93 combined arts assembling fixed 2023-09-07 11:54:52 +03:00
f39fbe5151 Merge pull request #2757 from IvanSavenko/filesystem_refactor
Filesystem refactor - part 1
2023-09-07 10:51:02 +03:00
41210c1dbf Client-side support for multiple battles 2023-09-06 16:03:47 +03:00
036df2e0ad Support multiple battles in AI 2023-09-06 16:03:46 +03:00
8dfdfffd87 Use ResourcePath for audio files 2023-09-04 18:22:34 +03:00
98f7ed9dfd Implement player start turn query 2023-08-28 18:56:36 +04:00
62cd8b12d4 Converted several namespace enums to enum class 2023-08-25 13:38:02 +03:00
013417fb7e Code cleanup 2023-08-21 17:55:49 +03:00
aed8c411fc Minor rework & cleanup of combat replays 2023-07-27 19:25:55 +03:00
cefbe5152e Merge pull request #2359 from IvanSavenko/crashfixing
Fix crashes from 1.2.1 statistics on Google Play
2023-07-21 15:44:37 +03:00
556763fb7b Fixed handling of tactics 2023-07-18 22:02:35 +03:00