1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

154 Commits

Author SHA1 Message Date
1e3e2f665c Remove strange & unused double-selector logic 2025-06-24 12:06:23 +03:00
298ec472bf Split BattleInterfaceClasses into smaller files 2025-06-18 17:29:20 +03:00
527885de21 Added VULNERABLE_FROM_BACK bonus 2025-06-15 14:36:29 +03: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
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
829739da24 Reduce usage of implicit conversions to int 2025-04-27 14:57:31 +03:00
63d00b080e Removed pointer to army from StackInstance 2025-04-27 14:57:30 +03:00
4ee3cda9d8 fix health bar for commander 2025-04-11 01:08:25 +02:00
f7df5409a3 better fix 2025-03-10 20:14:49 +01:00
ff2d45673b fix health bar edge case 2025-03-10 19:19:16 +01: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
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +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
2d7535eb00 Merge pull request #5395 from IvanSavenko/xbrz_effects
Implemented bloodlust, clone, and petrify effects for xbrz mode
2025-02-14 14:33:13 +02:00
28a8d4f4a1 Implemented bloodlust, clone, and petrify effects for xbrz mode 2025-02-14 11:01:20 +00:00
ca5471aa55 fix incorrect health calculation 2025-02-08 23:20:09 +01:00
d98ce78c34 add setting for hp bar 2025-02-08 22:48:21 +01:00
a8211d12de Combat Health Bar 2025-02-08 22:22:22 +01:00
cca4c0888c In-memory assets generation
All assets generation (large spellbook, terrain animations, etc) are now
done in memory and used as it, without saving to disk.

This should slightly improve load times since there is no encode png /
decode png, and should help with avoiding strange bug when vcmi fails to
load recently saved assets.

If needed, such assets can be force-dumped on disk using already
existing console command
2025-01-30 22:21:38 +00:00
ecdd394bb1 Use BattleHex as const ref wherever possible
Minor Fixes
Drop unused function from BattleHexArray
2025-01-21 13:23:17 +01:00
a99274d72e BattleHexArray - new container for BattleHexes 2025-01-06 23:18:18 +01:00
dfe6e04464 Implemented semi-transparent spell effects 2024-11-17 19:48:16 +00:00
19db016473 Merge pull request #4654 from dydzio0614/any-hex-shooting
Allow targeting empty hex by shooters with multi-tile SPELL_LIKE_ABILITY
2024-09-27 19:23:33 +03:00
ff50536568 Fix positioning of stack amount text 2024-09-27 12:05:26 +00:00
248cff49a4 Moved fonts handling from Graphics to RenderHandler class 2024-09-23 15:43:11 +00:00
f90405a41d Highlight stacks affected by SPELL_LIKE_ATTACK in spellcast mode 2024-09-22 20:48:18 +02:00
2d08e18f6a Implemented generation of combat unit number window for xbrz mode 2024-09-12 21:22:41 +00:00
36c1ed670f Support for configurable town fortifications
Removed most of hardcoded checks for fort level or for presence of fort/
citadel/castle buildings.

It is now possible to define which parts of town fortifications are
provided by town buildings

Configuration for H3-like fortifications is provided in
buildingsLibrary.json and will be used automatically by mods as long as
mods have buidings named "fort", "citadel" and "castle".

Alternatively, mods can separately define:
- hitpoints of walls (shared value for all sections)
- hitpoints of central, upper and lower towers (separate values)
- presence of moat
- shooters for each tower (separate values)
2024-08-28 19:42:14 +00:00
1aa391fdf8 Split CGeneralTextHandler file into 1 file per class form
All text processing code is now located in lib/texts.
No changes other than code being moved around and adjustment of includes

Moved without changes:
Languages.h           -> texts/Languages.h
MetaString.*          -> texts/MetaString.*
TextOperations.*      -> texts/TextOperations.*

Split into parts:
CGeneralTextHandler.* -> texts/CGeneralTextHandler.*
                      -> texts/CLegacyConfigParser.*
                      -> texts/TextLocalizationContainer.*
                      -> texts/TextIdentifier.h
2024-07-20 12:55:17 +00: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
d502850054 Add network thread termination logic for adventure map animations 2024-05-18 12:15:48 +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
d27b854cb1 Reorganized music, video and sound players:
- All XXXplayers are now in client/media directory
- Reogranized code on one class per file basis
- Extracted interfaces from handlers. Handlers now implement
corresponding interface.
- CCS now only stores pointer to an interface
2024-05-15 17:05:12 +00:00
a9866bb5c6 Added RandomGeneratorUtil::nextItemWeighted convenience method 2024-01-31 00:17:40 +02:00
3084cb2e46 fix battle text position
fix space
2024-01-20 14:35:21 +01:00
d309a00025 Extra fix: fix amount position in battle creature labels 2024-01-07 21:45:39 +01:00
a9005da01e Merge pull request #3366 from Laserlicht/battle_informations
Battle stacks informations
2023-12-28 12:39:26 +02:00
7a541c7a42 implement spells 2023-12-23 14:51:26 +01:00
0b4cf14a3d basic functionality 2023-12-23 03:06:48 +01:00
56e1265097 use stacks 2023-12-22 22:26:35 +01:00
0a8b81b2c4 Fix deactivation of current stack if player does not acts in time 2023-12-22 22:46:09 +02:00
d06ae15c6e Fix teleporting animation 2023-11-27 14:08:49 +02:00
3880ea58b9 Merge branch 'josch/dos2unix' into develop 2023-10-22 18:39:03 +03:00
ac925bb786 Renamed new types for consistency with code style 2023-10-22 16:55:19 +03:00
80e6485965 MetaIdentifier now uses std::variant internally 2023-10-22 16:55:19 +03:00
b394158dc9 Bonus Source ID now uses metaidentifier 2023-10-22 16:55:18 +03:00
77facf9387 Implement missing functions, fixes linking errors 2023-10-22 16:54:56 +03:00