1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00
Commit Graph

178 Commits

Author SHA1 Message Date
Opuszek
709f456ef5 Fixes mirror spell reflecting berserk 2025-07-10 18:02:39 +02:00
Ivan Savenko
ac06f3d557 Merge pull request #5897 from Opuszek/fix_magic_mirror_spell
Fix magic_mirror spell
2025-07-09 12:37:33 +03:00
Opuszek
7135005d89 fix problems 2025-07-08 16:20:09 +02:00
Laserlicht
b6e8731329 code review 2025-07-08 10:34:11 +02:00
Opuszek
00d5c3bca1 Update lib/spells/BattleSpellMechanics.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-07-08 10:04:36 +02:00
Opuszek
c78e8aa69f Update lib/spells/BattleSpellMechanics.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-07-08 10:04:23 +02:00
Opuszek
1393ac0420 Update lib/spells/BattleSpellMechanics.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-07-08 10:02:48 +02:00
Opuszek
7fc25319ee Update lib/spells/BattleSpellMechanics.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-07-08 10:02:37 +02:00
Opuszek
4eaa337eb3 Update lib/spells/BattleSpellMechanics.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-07-08 10:00:27 +02:00
Opuszek
94ad9d536b Update lib/spells/BattleSpellMechanics.cpp
Fixes a lambda's captured values in BattleSpellMechanics.

Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-07-07 21:11:57 +02:00
Opuszek
f7bd9de59f fixes formatting 2025-07-07 21:00:42 +02:00
Opuszek
c472427d8c Fix magic_mirror spell 2025-07-07 18:09:23 +02:00
Laserlicht
547ebbd08e fix doublewide 2025-07-04 00:37:14 +02:00
Laserlicht
9bfe3a8195 max range for spellcaster 2025-06-25 15:50:31 +02:00
Ivan Savenko
3c6aa9085c Mana channeling no longer activates if unit is dead 2025-06-16 13:23:41 +03:00
Ivan Savenko
4957657ceb Fix attempt to play unit spellcasting animation for spells cast by hero 2025-05-29 11:24:24 +03:00
MichalZr6
ecdd394bb1 Use BattleHex as const ref wherever possible
Minor Fixes
Drop unused function from BattleHexArray
2025-01-21 13:23:17 +01:00
Ivan Savenko
48473b18f6 move checks for invincible bonus to UnitState & cache 2025-01-10 21:15:37 +00:00
Ivan Savenko
40bff74195 Use small vector for unit list 2025-01-10 18:58:46 +00:00
MichalZr6
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
MichalZr6
4031006317 Drop battle elapsed time measurement, restore avHexes.
Github validation report fixes.
2025-01-06 23:28:47 +01:00
MichalZr6
dad6437661 Refactor BattleHex, remake the use of precomputed neighbouring tiles containers.
- Moved short, frequently used functions to the BattleHex header for inlining
- Made BattleHex a class with a private hex value
- Moved getClosestTile implementation back to BattleHex
- Enabled access to static precomputed data in BattleHexArray via BattleHex
(note: circular dependency prevented static precomputed containers being directly placed in BattleHex)
2025-01-06 23:28:46 +01:00
MichalZr6
5f799d41b3 Use cached neighbouring tiles where possible 2025-01-06 23:18:19 +01:00
MichalZr6
a99274d72e BattleHexArray - new container for BattleHexes 2025-01-06 23:18:18 +01:00
Laserlicht
1960d66971 fix INVINCIBLE 2024-12-01 12:25:27 +01:00
Ivan Savenko
c0f5c7c0ea Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
Laserlicht
e6cb87abac cast only on self 2024-09-28 17:32:53 +02:00
Laserlicht
899d3a14a0 only blocking non positive spells; counterstrike 2024-09-21 23:50:35 +02:00
Laserlicht
b36c05df1d INVINCIBLE bonus 2024-09-19 03:14:45 +02:00
Ivan Savenko
49c5f650f7 Merge pull request #4437 from IvanSavenko/battle_sides
Unified handling of battle sides ID's
2024-08-14 18:37:05 +03:00
Ivan Savenko
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
Ivan Savenko
a4fa409d1f Parse spell range on load instead of on every cast attempt 2024-08-10 12:22:21 +00:00
Ivan Savenko
63bcf7d83c Replaced most of usages of CRandomGenerator with vstd::RNG in library 2024-07-16 13:13:07 +00:00
Ivan Savenko
60a51e98de Remove usage of std::function from CRandomGenerator 2024-07-16 13:13:07 +00:00
Ivan Savenko
a9866bb5c6 Added RandomGeneratorUtil::nextItemWeighted convenience method 2024-01-31 00:17:40 +02:00
Ivan Savenko
1194419884 Added option to allow self-casting 2024-01-16 15:13:00 +02:00
Ivan Savenko
c839b397e8 Block self-casting, e.g. Archangels can't resurrect themselves 2024-01-15 23:16:53 +02:00
Ivan Savenko
5cbf5031ea move SetStackEffect to a separate file 2023-10-24 01:27:52 +03:00
Ivan Savenko
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00
Ivan Savenko
b394158dc9 Bonus Source ID now uses metaidentifier 2023-10-22 16:55:18 +03:00
Ivan Savenko
9fa7a93fb0 Properly pass battleID in all battle netpack's 2023-09-06 16:03:47 +03:00
Andrii Danylchenko
ba9998ac66 BattleAI: fast targets optimization 2023-08-08 20:10:29 +03:00
Ivan Savenko
56d69e790b Renamed MetaString methods to more logical names 2023-06-20 19:37:27 +03:00
Konstantin
05eccbc2bb vcmi: split bonus to enumerator and HeroBonus.h 2023-05-03 18:01:06 +03:00
Konstantin P
b472c89276 vcmi: make some CStack properties private
There is a getters for this properties already available
2023-04-27 20:58:49 +03:00
Konstantin
7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
nordsoft
5419de3468 Fix getCasterUnitId 2023-04-13 02:18:12 +04:00
Konstantin
a639bd2606 spells: rework isMagical()
Now it is a flag of a spell, and not a target condition.
This fixes resistance to bind effect
2023-03-31 01:01:25 +03:00
Konstantin
97fc424e98 vcmi: modernize lib/spells (except adventure one, needs major rework) 2023-02-12 21:23:00 +03:00
Ivan Savenko
9248e06ae0 Demon summon is now a spell. DEMON_SUMMONING bonus has been removed 2022-12-22 23:11:55 +02:00