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

952 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
263ba46da6 Merge branch 'develop' into cheats 2025-05-22 21:33:29 +02:00
e90d8c318d Configurable multi-hex attacks
- Added bonus type MULTIHEX_UNIT_ATTACK - configurable version of Dragon
Breath.
- Added bonus type MULTIHEX_ENEMY_ATTACK - configurable version of
Cerberi multi-headed attack that only hits enemies
- Added bonus type MULTIHEX_ANIMATION - optional bonus that does not
affects gameplay, but allows to define in which cases game should use
alternative attack animation.
- All existing multi-hex attack bonuses other than ATTACKS_ALL_ADJACENT
are presumable deprecated, but will be supported for now.
- It is now possible to precisely configure which hexes are targeted by
MULTIHEX_XXX bonuses. See docs for details.
- Unified logic of all multi-hex attacks, all existing bonuses are now
implemented as specific case of MULTIHEX_XXX bonus
- Added tests to cover Cerberi attack logic, and fixed incorrect edge
case of Dragon Breath
2025-05-20 15:08:59 +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
4d57a8ed36 Prefer to pass CGameState as reference instead of pointer 2025-04-27 14:57:31 +03:00
417ea6451a Remove ConstTransitivePtr from hero and town instances 2025-04-27 14:57:30 +03:00
f0a9c95075 ArtInfoWindow on client. Client side 2025-04-06 13:47:32 +02:00
7a3e1409d0 Remove old boost includes and defines 2025-03-19 08:03:56 +00:00
844dfb1604 Removed usage of boost::thread from vcmi, except for AI 2025-03-02 14:33:11 +00:00
a8a6be7ac1 Fix potential compatibility with C++20 / C++23 mode
This fixes several issues with compatibility with C++20. C++23 was also
tested, but apparently it does not have any additional breaking changes
compared to C++20 (or we don't have those).

VCMI still uses C++17 as before - goal is only to make potential
transition easier.

There were 2 cases that are deprecated in C++20 that we use:
- Floating point operations on enums are deprecated
- `this` can no longer be captured when using default capture by value
`[=]`

Both of those should now be replaced with code that works fine in both C+
+17 and in C++20 mode
2025-03-02 14:11:48 +00:00
e5a095a237 Remove main menu global. Now accessed via GameInstance 2025-03-01 21:16:41 +00: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
7dfb499edf replace boost locks with std 2025-02-28 15:25:58 +01:00
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +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
ffd37a8fa8 Removed CGI in favor of VLC. Map handle is for now global variable 2025-02-21 16:53:14 +00:00
f657e85305 Integrated CClientState into GameEngine class 2025-02-21 16:53:14 +00:00
cacceda950 Renamed CGuiHandler to GameEngine
- class CGuiHandler is now called GameEngine to better describe its
functionality
- renamed global GH to more clear ENGINE
- GH/ENGINE is now unique_ptr to make construction / deconstruction
order more clear and to allow interface / implementation split
- CGuiHandler.cpp/h is now called GameEngine.cpp/h and located in root
directory of client dir
2025-02-21 16:53:13 +00:00
811df5f8c1 Update status window on receiving secondary skill to update hero stats 2025-02-19 17:36:02 +00:00
54606fbe95 fix #5427 2025-02-14 21:49:43 +01:00
cf44186a11 Fix crash on accepting turn in MP with settings window open 2025-02-01 12:23:22 +00:00
d54d498d5f Don't play new building sound twice on auto-built buildings 2025-01-26 15:50:26 +00:00
ca3e88ea30 Fix crash on loading saved game 2025-01-26 11:16:53 +00:00
722d68643f Merge pull request #5306 from IvanSavenko/xbrz_foreground
[1.6.4?] Move xbrz upscaling from foreground thread to background
2025-01-25 17:23:46 +02:00
5ea4014589 Merge pull request #5304 from IvanSavenko/oneway_ai
Enable one-way monoliths for AI
2025-01-25 13:42:31 +02: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
668bf63fc0 Remove access to internal surface of Canvas 2025-01-21 21:15:21 +00:00
82b81a7853 Added better error reporting for unclear crashes 2025-01-19 12:39:22 +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
e9be46af98 Merge branch 'develop' into timed_events_objects_removal 2024-12-03 17:27:24 +01:00
452762cd78 change datetime format 2024-10-30 23:23:56 +01:00
a54f4e1bd1 change autosave folder name; align autosave folder 2024-10-30 21:18:55 +01: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
679181c103 Implemented serialization of local player state in json form 2024-10-08 20:04:32 +00:00
654f5a9100 Merge pull request #4691 from PolishUser/hero-recruitment-sound
Add 'newBuilding' sound upon hero recruitment in towns
2024-10-01 15:28:33 +03:00
c2ddf8e06a Add 'newBuilding' sound upon hero recruitment in towns 2024-09-28 23:54:51 +02:00
3bff68958e Change deleted objects format to use ObjectInstanceID 2024-09-28 22:58:05 +02:00
230893f423 Merge branch 'develop' into any-hex-shooting 2024-09-23 16:57:27 +02:00
e93a060500 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-09-23 14:25:53 +00:00
bb69ab1a1a Fix assert and condition for counting spell hexes 2024-09-22 18:25:18 +02:00
3e1968c201 Wait for inactive player in hotseat to answer dialog before starting
battle
2024-09-19 15:30:51 +00:00
e843af24bf Fix broken popping of top interfaces when town was opened during multiplayer game 2024-09-11 23:00:06 +02:00
ee64928454 Merge pull request #4448 from smanolloff/split-client+develop
Split vcmiclient in two
2024-09-02 15:34:05 +03:00
82c37573fa Removed save compatibility with 1.4
All save compatibility checks targeting 1.4 saves have now been removed.
Saves from 1.5 can still be loaded in 1.6

Implemeted few TODO's in serialization that were postponed to avoid
breaking save compatibility in MP for 1.5.X releases.

Fixed missed case for loading black market object from 1.5 saves
2024-08-29 18:51:53 +00:00
408a632002 Deprecate artifact-related building types 2024-08-28 13:50:08 +00:00
e9131538dd Merge branch 'develop' into split-client+develop 2024-08-27 03:05:07 +03:00