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

102 Commits

Author SHA1 Message Date
bc4a1b06fc Fix crash on moving double-wide units in some obstacle configurations 2025-07-01 13:03:25 +03:00
c00ce0eaae Fix damage estimation in UI when target has VULNERABLE_FROM_BACK bonus 2025-06-24 11:18:40 +03:00
1ac8080cbf Implemented new unit actions panel in combat
Alternative actions submod from extras is now deprecated and will have
no effect.

As long as screen width allows, game will now display additional panel
with all possible unit actions.

Panel will also display spells that can be cast by unit, allowing small
version of unit spellbook (total limit of actions is 12, but some are
used for creature actions, so unit spells are limited to 7-9)
2025-06-19 19:29:01 +03:00
298ec472bf Split BattleInterfaceClasses into smaller files 2025-06-18 17:29:20 +03:00
42317e7128 Block attempts to attack unit behind obstacle in UI 2025-05-29 11:24:24 +03:00
797f8f06a6 Allow moving double-wide unit 1 tile backwards 2025-05-20 18:13:29 +03:00
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
63d00b080e Removed pointer to army from StackInstance 2025-04-27 14:57:30 +03:00
2f149b59ca Fix unit spellcasting when defending in a hotseat pvp battle
Check interface of player that is currently acting in combat, not player
that is making turn on map
2025-04-11 00:33:21 +03: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
ecdd394bb1 Use BattleHex as const ref wherever possible
Minor Fixes
Drop unused function from BattleHexArray
2025-01-21 13:23:17 +01:00
dbe82b94f6 Changes following review:
- shared_ptr for destructibleEnemyTurns instead of raw pointer
- drop implicit int conversion for BattleHex class
  and implement toInt() instead
- implement necessary operators in BattleHex
- adjust code to work properly with JSON serializer
2025-01-08 07:24:43 +01:00
a99274d72e BattleHexArray - new container for BattleHexes 2025-01-06 23:18:18 +01:00
95a07ee5cb Use bonus system cache whenever possible 2024-12-21 18:47:11 +00:00
1e9d089fd8 Fix shooting being priority action for dead creature hexes with targeting empty hexes enabled 2024-12-03 18:04:41 +01:00
50b412b35b Better handling of default cursor action for SPELL_LIKE_ATTACK 2024-09-22 21:14:24 +02:00
dc56047661 Add hex highlight for SPELL_LIKE_ATTACK in casting mode & minor cleanup 2024-09-22 20:38:49 +02:00
bb69ab1a1a Fix assert and condition for counting spell hexes 2024-09-22 18:25:18 +02:00
1a2d349267 Initial unconditionally working version 2024-09-22 15:07:44 +02: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
434a2fb0fb Explicitly specify to use ranged or melee attack for damage estimation 2024-07-29 17:13:31 +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
6119898932 Add some useful comments 2024-07-15 09:39:22 +02:00
3836f132d3 Fix alternative actions to support more than 2 actions + simplify logic 2024-07-15 00:41:05 +02:00
278e8ac65e Do not show preview for ranged retaliation - not implemented in lib 2024-05-10 19:51:36 +00:00
d094a17298 Added simple damage preview for retaliations 2024-05-10 19:40:33 +00:00
a9866bb5c6 Added RandomGeneratorUtil::nextItemWeighted convenience method 2024-01-31 00:17:40 +02:00
24d25730ad Changed checks for null with checks for hasValue 2024-01-20 16:41:10 +02:00
0d0d3d8c80 Renamed speed -> getMovementRange, remove misleading default parameter 2024-01-14 17:14:36 +02:00
85de3143ff Fixed Genie spellcasting logic to account for spell immunities 2023-12-24 01:13:19 +02:00
e21e3f8386 Do not display "Spell Cancelled" message on right-click when no stack is
active
2023-11-27 14:09:08 +02:00
3b27e07385 #3003 - fix hypnotize 2023-11-03 13:50:16 +02:00
3880ea58b9 Merge branch 'josch/dos2unix' into develop 2023-10-22 18:39:03 +03:00
77facf9387 Implement missing functions, fixes linking errors 2023-10-22 16:54:56 +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
e8453916cf Merge remote-tracking branch 'vcmi/beta' into develop 2023-09-08 18:49:06 +03:00
d7fb2bcf83 Show message on cancelling spell in combat 2023-09-06 21:54:26 +03:00
41210c1dbf Client-side support for multiple battles 2023-09-06 16:03:47 +03:00
e554a2766d BattleActions: do not pass unnecessary targetStack
It was unused for everything except teleport, so pass it only wher we
attempt to teleport.

Reworking sacrifice is out of scope from beta
2023-08-31 23:44:00 +03:00
695a51d8c8 Merge remote-tracking branch 'vcmi/beta' into develop 2023-08-28 21:19:53 +03:00
cba9ddd66a Update client/battle/BattleActionsController.cpp
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
2023-08-27 23:01:04 +02:00
e1eb245565 Better default stack action handling + "F shortcut" mode fixes 2023-08-27 17:33:10 +02:00
013417fb7e Code cleanup 2023-08-21 17:55:49 +03:00
1bf6bbd9b6 Significantly simplified threading model in battles 2023-07-18 19:55:59 +03:00
ec55ec76b6 Show cursor (including attack direction) when swiping in battle 2023-06-05 19:20:18 +03:00