1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-15 22:16:37 +02:00

168 Commits

Author SHA1 Message Date
Ivan Savenko
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
Ivan Savenko
283adc37d7 Unit stack rebalancing rework
- CStackInstance::count is now private with accessor methods
- CStackInstance::experience renamed to totalExperience and now stores
total stack experience (multiplied by stack size) to reduce rounding
errors
- CStackInstance::totalExperience is now private with accessors methods
- stack experience is now automatically reallocated on stack management
- Removed buggy BulkSmartRebalanceStacks pack, that mostly duplicates
BulkRebalanceStacks
- Renamed BulkSmartSplitStack to BulkSplitAndRebalanceStack to drop
unclear "smart" in name
- Reworked split-and-rebalance logic to correctly reallocate stack
experience
2025-05-01 18:18:30 +03:00
Ivan Savenko
f70ad2c15b Reorganized artifact-related classes
- files now generally contain only 1 class (except for tightly coupled
classes)
- files are now located in lib/entities/artifact directory
- removed excessive includes

No changes to functionality
2025-04-29 13:29:08 +03:00
Ivan Savenko
829739da24 Reduce usage of implicit conversions to int 2025-04-27 14:57:31 +03:00
Ivan Savenko
d34b47bb20 Remove pointers from artifacts 2025-04-27 14:57:31 +03:00
Ivan Savenko
63d00b080e Removed pointer to army from StackInstance 2025-04-27 14:57:30 +03:00
Ivan Savenko
db2e4c5f6d Include bonus from artifacts to Ballista damage, unify code 2025-04-14 15:50:10 +03:00
Ivan Savenko
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
Ivan Savenko
07a46ed03b Configurable icons for bonuses
It is now possible for mods (e.g. vcmi extras) to provide custom icons
for bonuses subtypes or for custom bonuses values without requiring
hardcoded check in vcmi.

All existing hardcoded checks have been removed.

Bonuses config json from mods is now actually loaded.
2025-02-28 14:51:32 +00:00
Ivan Savenko
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
Ivan Savenko
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
Ivan Savenko
ffd37a8fa8 Removed CGI in favor of VLC. Map handle is for now global variable 2025-02-21 16:53:14 +00:00
Ivan Savenko
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
Ivan Savenko
0548f325e4 Merge branch 'master' into 'develop' 2025-02-21 13:59:34 +00:00
Laserlicht
e9dc9f81b8 text fixes 2025-02-15 16:46:41 +01:00
Ivan Savenko
f4a218285f Fix display of remaining spell duration for creatures 2025-02-06 14:19:34 +00:00
Ivan Savenko
d72b743ce5
Merge pull request #5350 from MichalZr6/fix_miniHillFort
Fix creating buttons in Stack Window when upgrade is unavailable
2025-02-04 01:02:50 +02:00
Ivan Savenko
b36f5e4026 Merge branch 'beta' into 'develop' 2025-02-03 16:29:10 +00:00
Ivan Savenko
386679294f Fix crash on stack being affected by spell with battle-wide propagator 2025-02-01 12:23:22 +00:00
Ivan Savenko
d3131ea365 Merge branch 'beta' into 'develop' 2025-01-31 16:33:12 +00:00
MichalZr6
358189d9c3 Fix creating buttons for unavailable upgrades 2025-01-30 16:00:22 +01:00
Ivan Savenko
9cf75713d0 Fix possible crash on opening unit window if unit has both ability and
artifact bonus
2025-01-19 16:08:29 +00:00
Ivan Savenko
59cdd46490 Possible fix for crash on opening creature/commander window 2025-01-18 19:45:34 +00:00
Ivan Savenko
aabd92451c Merge branch master into develop 2024-12-27 13:29:44 +00:00
Laserlicht
7a4afc46a2 fix OPENING_BATTLE_SPELL 2024-12-22 21:23:31 +01:00
Ivan Savenko
03eba171fa
Merge pull request #5086 from kdmcser/commander_no_melee_penalty
Ensure the commander has no melee penalty when gaining the SHOOT ability
2024-12-21 16:02:26 +02:00
MichalZr6
f893c80192 Move UpgradeInfo class to header and source files 2024-12-19 14:13:09 +01:00
MichalZr6
af9445c16f Fixes following review 2024-12-17 22:34:06 +01:00
MichalZr6
d8d3948ac3 Fix AI to use hillFort all available upgrades. UpgradeInfo refactor. 2024-12-17 22:34:06 +01:00
kdmcser
c7b22b1b28 add multi-bonuses support for creature speical skills 2024-12-15 02:40:54 +08:00
Laserlicht
bb2f016f49 text fixes 2024-11-30 00:41:09 +01:00
Ivan Savenko
df0c53af41
Merge pull request #4864 from Laserlicht/creature_window_rework
Creature window rework
2024-11-15 19:13:58 +02:00
Laserlicht
e73cb7f45b
Update client/windows/CCreatureWindow.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-11-13 20:03:20 +01:00
Ivan Savenko
e7bea6c3b8
Merge pull request #4852 from IvanSavenko/remove_vlc_entities_serialization
Remove remaining pointers to VLC entities from serializer
2024-11-06 22:01:11 +02:00
Laserlicht
988d36bd13 sorted 2024-11-02 15:46:20 +01:00
Laserlicht
74b4fbfceb small fix 2024-11-02 15:19:39 +01:00
Laserlicht
0ab4b66026 better approach for scrollbar 2024-11-02 15:16:38 +01:00
Laserlicht
9009dffebd add "other" for bonus display 2024-11-02 14:51:33 +01:00
Laserlicht
17ee363d8d changed bonus source text pos 2024-11-02 14:37:21 +01:00
Laserlicht
5a72a65b31 add labels 2024-11-02 13:59:09 +01:00
Laserlicht
440e9a6575 assign colors for bonuses 2024-11-02 13:05:10 +01:00
Laserlicht
3038e5140a add color frames; remove scrollbar 2024-11-01 19:02:51 +01:00
kodobi
2678665f67 Resolve merge conflict 2024-10-30 18:48:09 +01:00
kodobi
44f479be89
Merge branch 'vcmi:develop' into bugfix/fix-ballista-damage-range-display 2024-10-30 18:41:29 +01:00
kodobi
0a0692061d Merge branch 'bugfix/fix-ballista-damage-range-display' of https://github.com/kodobi/vcmi into bugfix/fix-ballista-damage-range-display 2024-10-30 18:39:11 +01:00
kodobi
b82444ba43 Fix ballista damage range display
- Adjusted the displayed damage range of ballista to reflect the changes in hero/es attack skill like in OH3.
- Added checks to ensure the battle interface and relevant heroes are valid before calculating damage.
2024-10-30 18:35:35 +01:00
Ivan Savenko
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
Ivan Savenko
f12119f86c
Merge pull request #4812 from SoundSSGood/secSkillPlace
[Hota] SeafaringAcademy. Initial PR
2024-10-30 13:33:39 +02:00
kodobi
389f8b678b Fix ballista damage range display
- Adjusted the displayed damage range of ballista to reflect the changes in hero/es attack skill like in OH3.
- Added checks to ensure the battle interface and relevant heroes are valid before calculating damage.
- Correctly retrieve the ballista status from the hero's war machine slot.
2024-10-29 20:44:31 +01:00
Ivan Savenko
72b0062ae3 Better integration of wog commanders translation 2024-10-26 14:21:05 +00:00