1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00
Commit Graph

522 Commits

Author SHA1 Message Date
Mircea TheHonestCTO
b3d65ffc44 nullkiller2: Ivan PR review: Remove invalid attack position validation log and return empty attackable tiles 2025-11-15 17:47:44 +01:00
Mircea TheHonestCTO
0ee10c9213 Merge branch 'develop' into feature/nullkiller2 2025-11-15 17:15:46 +01:00
Andrej Dudenhefner
3b68389d67 extend isMeleeAttacker() == false to all war machines 2025-11-11 19:55:39 +01:00
Andrej Dudenhefner
7c4b7aa3f0 Move isMeleeAttacker to Unit 2025-11-11 19:38:48 +01:00
Andrej Dudenhefner
3b72a74161 Add isMeleeAttacker to Unit 2025-11-11 19:38:47 +01:00
Ivan Savenko
2191e51d48 Implemeted HATES_TRAIT bonus, similar to HATE, but targets any unit with
specific bonus
2025-11-02 11:09:42 +02:00
Mircea TheHonestCTO
31cd821066 Merge branch 'develop' into feature/nullkiller2 2025-10-15 11:59:08 +02:00
Simeon Manolov
91101d26fa Remove std::vector inheritance 2025-10-05 10:34:06 +03:00
Mircea TheHonestCTO
b077dd5d2b CBattleInfoCallback.cpp adjust comment 2025-09-01 07:10:47 +02:00
Mircea TheHonestCTO
0efd7ea47c CBattleInfoCallback.cpp comment: point to fix #6016 for the graceful error log 2025-09-01 05:02:34 +02:00
Mircea TheHonestCTO
84211e9936 Temporary fix for #6080 until the proper solution. Attempt to attack from invalid position! 2025-08-30 17:20:31 +02:00
Opuszek
10a4a3adee Fixes build warning in Potential Targets 2025-08-24 14:42:42 +02:00
Opuszek
6b97fc306d fix berserk 2025-07-22 23:28:53 +02:00
Opuszek
ac3991b899 Rename a misleading method 2025-07-22 21:33:46 +02:00
Ivan Savenko
e12765dca0 Fix sonar warnings, convert spaces -> tabs 2025-07-09 17:52:51 +03:00
Laserlicht
ca8cfaf0ad Merge branch 'develop' into max_range_spell 2025-07-08 11:36:23 +02:00
Laserlicht
b6e8731329 code review 2025-07-08 10:34:11 +02:00
Ivan Savenko
46072a1d60 Merge pull request #5896 from IvanSavenko/code_reorganize
Split large source files into smaller files per 1 class
2025-07-08 10:47:13 +03:00
Ivan Savenko
8721bdd728 Split CCreatureSet file on .h/.cpp per class basis 2025-07-07 19:12:31 +03:00
Ivan Savenko
200850f56f Add COMBAT_MANA_BONUS for Skyship 2025-07-06 15:36:51 +03:00
Laserlicht
13a2b8781e Merge branch 'vcmi:develop' into max_range_spell 2025-07-03 23:25:06 +02:00
Ivan Savenko
1daf9d3a44 Fix possible crash on hovering over inaccessible hexes on other side of
the battlefield when war machine is making turn
2025-07-01 13:35:30 +03:00
Ivan Savenko
6ac57a7cfc Improvements to bonus system node types / propagators
- Node type is now set on construction and never changes
- Added army propagator that also checks for TOWN and HERO
- Renamed existing propagators to be in sync with enumeration
2025-06-25 17:34:20 +03:00
Laserlicht
9bfe3a8195 max range for spellcaster 2025-06-25 15:50:31 +02:00
Ivan Savenko
1e3e2f665c Remove strange & unused double-selector logic 2025-06-24 12:06:23 +03:00
Ivan Savenko
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
Ivan Savenko
0ad4e80c7d Rework and simplify logic of attaching heroes to bonus system 2025-06-17 14:37:25 +03:00
Ivan Savenko
527885de21 Added VULNERABLE_FROM_BACK bonus 2025-06-15 14:36:29 +03:00
Ivan Savenko
42317e7128 Block attempts to attack unit behind obstacle in UI 2025-05-29 11:24:24 +03:00
Ivan Savenko
afb22e52eb Add some diagnostics for inablilty to place all stacks on battlefield 2025-05-29 11:24:24 +03:00
Ivan Savenko
2d80443d8f Merge pull request #5739 from IvanSavenko/battleai_fix
Fix handling of double-wide creatures by BattleAI
2025-05-25 11:26:01 +03:00
Ivan Savenko
8255a4b9ae CGameHandler no longer inherits CGameInfoCallback, reduce direct access
to gamestate
2025-05-23 14:17:25 +03:00
Ivan Savenko
5c4ce61d57 Fix handling of double-wide creatures by BattleAI
One of recently added sanity checks was causing crashes during BattleAI
decision-making.

Actual reason turned out to be due to invalid requests generated by
BattleAI when attempting to attack enemy unit from behind with double-
wide unit.

This change should make BattleAI correctly estimate such attacks
2025-05-23 14:00:47 +03:00
Ivan Savenko
3f83ad1b40 Merge pull request #5726 from IvanSavenko/breath
Configurable multi-hex attacks
2025-05-21 17:10:59 +03:00
Dydzio
c216936a59 Allow fleeing while having shackles of war when other side got no hero 2025-05-20 20:40:06 +02: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
4d4da0454f map objects hierarchy now uses IGameInfoCallback 2025-05-14 18:33:20 +03:00
Ivan Savenko
6f20235d07 Merge CPrivilegedInfoCallback into CGameInfoCallback 2025-05-14 13:42:20 +03:00
Ivan Savenko
716da918f8 Completely remove IGameCallback class
- CClient now inherits directly from CPrivilegedInfoCallback, like
IGameCallback did before. However CClient no longer needs dummy
implementation of IGameEventCallback
- CGObjectInstance hierarchy now uses CPrivilegedInfoCallback for
callback. Actual events can only be emitted in calls that receive
IGameEventCallback pointer, e.g. heroVisit
- CGameHandler now inherits directly from both CPrivilegedInfoCallback
and IGameEventCallback as it did before via IGameCallback
2025-05-14 13:39:41 +03:00
Ivan Savenko
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
Ivan Savenko
700eeb6bd4 Implemented HERO_SPELL_CASTS_PER_COMBAT_TURN bonus 2025-05-08 00:25:07 +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
4e8e85e3e4 Fix issues reported by Sonar, review fixes 2025-04-27 14:57:31 +03:00
Ivan Savenko
ce436bd63e Fix regressions in combat 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
f03cc06176 Battle Info uses ObjectInstanceID's instead of pointers 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
71bc1054d0 BattleStart pack now uses unique_ptr 2025-04-27 14:57:30 +03:00