1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-21 22:33:43 +02:00

259 Commits

Author SHA1 Message Date
Ivan Savenko
3f83ad1b40
Merge pull request #5726 from IvanSavenko/breath
Configurable multi-hex attacks
2025-05-21 17:10:59 +03:00
Ivan Savenko
07662a070f
Merge pull request #5724 from IvanSavenko/randomization
Better randomization logic
2025-05-21 13:50:28 +03:00
Ivan Savenko
323231fc30
Merge pull request #5720 from SoundSSGood/artifact-charges
Charged artifacts
2025-05-21 13:49:14 +03:00
Ivan Savenko
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
Ivan Savenko
cc274c4d34 GameRandomizer is now in lib, add implementation 2025-05-19 18:51:42 +03:00
Ivan Savenko
9ae4a72f4c
Merge pull request #5721 from IvanSavenko/stackexp_fix
Fix game not awarding stack experience after combat
2025-05-19 14:44:20 +03:00
SoundSSGood
e85b1d4c1c suggested changes 2025-05-17 19:01:04 +02:00
Ivan Savenko
45a587bc5b Fix game not awarding stack experience after combat
- Added missing `visitTyped` overloads.
- Throw runtime error if `visitTyped` is called on raw CPack, to avoid
such silent errors in future
2025-05-17 18:03:44 +03:00
SoundSSGood
f614a8a7f5 Discharging conditions 2025-05-16 23:26:42 +02:00
SoundSSGood
fcc9b8ecfa Artifacts discharging 2025-05-16 23:24:36 +02:00
SoundSSGood
9bbebd62e9 GrowUpArtifact pack 2025-05-16 23:20:09 +02:00
Ivan Savenko
456525109e Replaced undescriptive bool true/false with more clear enum for
absolute/relative change via netpacks
2025-05-16 17:21:39 +03:00
Ivan Savenko
f7d08a7288
Merge pull request #5700 from IvanSavenko/gamestate_pack_visitor
Remove CPack::applyGs method in favor of GameStatePackVisitor class
2025-05-14 11:53:15 +03:00
Ivan Savenko
4b30336d03 Fix issues detected by Sonar 2025-05-11 19:50:57 +03:00
Ivan Savenko
86b832be67 Remove CPack::applyGs method in favor of GameStatePackVisitor class 2025-05-10 17:51:35 +03:00
Ivan Savenko
6b6199d3a4 Implemented giving bonuses to commanders 2025-05-07 22:49:22 +03:00
Ivan Savenko
4b77140f4a Implemented playerGlobal visit mode for objects like cartographer 2025-05-06 18:53:43 +03:00
Ivan Savenko
62e774c91e Add new rewards for configurable objects 2025-05-06 17:28:11 +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
279d89f971
Merge pull request #5659 from IvanSavenko/artifact_split
Reorganized artifact-related classes
2025-04-30 13:23:41 +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
5550edeb9a Fix inability of unit to cast spell after receiving morale 2025-04-29 12:12:51 +03:00
Ivan Savenko
a8a74888f7 Fix attaching of hero to bonus system (old bug?) 2025-04-27 14:57:31 +03:00
Ivan Savenko
4e8e85e3e4 Fix issues reported by Sonar, review fixes 2025-04-27 14:57:31 +03:00
Ivan Savenko
4d57a8ed36 Prefer to pass CGameState as reference instead of pointer 2025-04-27 14:57:31 +03:00
Ivan Savenko
a43c3fcb31 Restore save compatibility with 1.6 2025-04-27 14:57:31 +03:00
Ivan Savenko
77845f74bc Stability & regression fixes 2025-04-27 14:57:31 +03:00
Ivan Savenko
f025a3a932 Review & cleanup hiding / displaying map objects 2025-04-27 14:57:31 +03:00
Ivan Savenko
f5f8ed192b Fix random map generation 2025-04-27 14:57:31 +03:00
Ivan Savenko
912c2eae94 Fix regressions 2025-04-27 14:57:31 +03:00
Ivan Savenko
e6a8e5d4bd Correctly restore bonus system on deserialization 2025-04-27 14:57:31 +03:00
Ivan Savenko
93b18ee94b Fix some issues detected by Sonar & code review, fix build 2025-04-27 14:57:31 +03:00
Ivan Savenko
586620a290 Basic code review, remove unused code from serializers 2025-04-27 14:57:31 +03:00
Ivan Savenko
d1d2cf4189 Fix crashes on game start, gamestate now derives from GameCallbackHolder 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
4ed13409c2 Remove serialization of raw pointers from serialization 2025-04-27 14:57:31 +03:00
Ivan Savenko
9e6397d1f9 Remove pointer to boat from CGHeroInstance 2025-04-27 14:57:30 +03:00
Ivan Savenko
331debaa3f Removed pointers from PlayerState 2025-04-27 14:57:30 +03:00
Ivan Savenko
6d65641a43 Gamestate is now passed as shared pointer 2025-04-27 14:57:30 +03:00
Ivan Savenko
cd7732456a Remove pointer to objects from TerrainTile 2025-04-27 14:57:30 +03:00
Ivan Savenko
63d00b080e Removed pointer to army from StackInstance 2025-04-27 14:57:30 +03:00
Ivan Savenko
ab11d2b075 Remove quests from CMap, now solely owned by quest objects 2025-04-27 14:57:30 +03:00
Ivan Savenko
d9aabb47e6 Remove pointers to hero instances from HeroPool class 2025-04-27 14:57:30 +03:00
Ivan Savenko
71bc1054d0 BattleStart pack now uses unique_ptr 2025-04-27 14:57:30 +03:00
Ivan Savenko
c02a8a84fd Stacks of armed instance are now unique_ptr 2025-04-27 14:57:30 +03:00
Ivan Savenko
bdae7285ae Objects list is now private member of CMap 2025-04-27 14:57:30 +03:00
Ivan Savenko
745040def3 Access to heroes storage in CMap is now done via public methods 2025-04-27 14:57:30 +03:00
Ivan Savenko
1f502c0548 CMap towns and heroes on map fields are now private 2025-04-27 14:57:30 +03:00
Ivan Savenko
0ada2a5ebd Map objects now use shared_ptr (game) 2025-04-27 14:57:30 +03:00
Ivan Savenko
2ca1748e96 Artifact instances are now owned solely by CMap 2025-04-27 14:57:30 +03:00