1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00
Commit Graph

7885 Commits

Author SHA1 Message Date
Ivan Savenko
797646cc05 Quests in map now use shared_ptr instead of const ptr 2025-04-27 14:57:30 +03:00
Ivan Savenko
417ea6451a Remove ConstTransitivePtr from hero and town instances 2025-04-27 14:57:30 +03:00
Ivan Savenko
3921b9e214 Merge pull request #5650 from kdmcser/limiter
fix crash when bonus limiter is empty in OwnerUpdater
2025-04-27 13:38:18 +03:00
Ivan Savenko
baae88cf59 Merge pull request #5646 from MichalZr6/necromancy_fix
Fix bug when no casualties but 1 skeleton is raised
2025-04-27 13:37:53 +03:00
Ivan Savenko
be554f4260 Merge pull request #5641 from kdmcser/chinese_encoding
fix Chinese encoding problem in GBK
2025-04-27 13:37:26 +03:00
kdmcser
a17f59b704 fix crash when bonus limiter is empty in OwnerUpdater 2025-04-26 02:15:25 +08:00
Michał Zaremba
63906c4446 Fix bug when no casualties but 1 skeleton is raised 2025-04-23 13:45:21 +02:00
kdmcser
84202ee64f fix compile error 2025-04-20 00:34:18 +08:00
kdmcser
c3c8b5048a extract functions of string <-> boost::filesystem::path to TextOperations.h 2025-04-20 00:23:41 +08:00
kdmcser
8d25748dba add define for Windows
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-04-19 23:48:21 +08:00
kdmcser
e308b2149a fix compile error 2025-04-19 13:44:48 +08:00
kdmcser
ea3947df4f fix Chinese encoding problem in GBK 2025-04-19 13:30:31 +08:00
Ivan Savenko
ce89a0d21b Merge pull request #5609 from SoundSSGood/end-of-battle-infowindows
End of battle infowindows refactoring
2025-04-15 22:50:35 +03:00
Ivan Savenko
204b13fc07 Merge pull request #5608 from Laserlicht/campaigneditor
campaign editor
2025-04-15 17:55:13 +03:00
Ivan Savenko
db2e4c5f6d Include bonus from artifacts to Ballista damage, unify code 2025-04-14 15:50:10 +03:00
Ivan Savenko
1cb5f36ccb Fix handling of creature-specific limiters in noneOf limiter on hero
For example, if hero has specialty that provides primary skill bonuses
with "noneOf" limiter that contains limiter that can only be evaluated
in creature context (such as creature level or native terrain), limiter
itself would evaluate to DISCARD, and then will be inverted to ACCEPT by
noneOf limiter. As result, this would give hero bonus to primary skill
even though it is clearly intended to only target creatures.

This introduces NOT_APPLICABLE limiter decision that is not inverted by
noneOf limiter
2025-04-13 23:31:37 +03:00
Ivan Savenko
83099f9288 Fix crash on initializing off-map hero 2025-04-13 23:15:49 +03:00
Ivan Savenko
38a9dc83ba Fix bonuses from battlefield not showing up in creature window 2025-04-13 23:15:15 +03:00
Ivan Savenko
6d8bf24f94 Invalidate hero bonuses on moving to another terrain 2025-04-13 22:23:36 +03:00
Ivan Savenko
2b812be9cd Correctly show results of CreatureTerrainLimiter outside of combat 2025-04-13 22:23:12 +03:00
Ivan Savenko
975d9aedc9 Merge branch 'vcmi/beta' into 'vcmi/develop' 2025-04-13 18:53:54 +03:00
Ivan Savenko
896a7ec88e Better support for Adela specialty (+new modding functionality for it)
Fixes Adela specialty that was apparently broken back in #1518 and
replaced with logic that was clearly not tested - it was neither
functional, nor it was following H3 behavior.

- `HAS_ANOTHER_BONUS_LIMITER` now accepts `null` in place of bonus type,
for cases when limiting is needed by bonus source or bonus subtype. This
allows Adela Bless specialty to always work, irregardless of which
bonuses are provided by Bless.
- Implemented `DIVIDE_STACK_LEVEL` updater that functions same as
`TIMES_STACK_LEVEL`, but it divides bonus value, instead of multiplying
it (to make Adela specialty weaker for high-tier units, as in H3)
- Implemented `TIMES_HERO_LEVEL_DIVIDE_STACK_LEVEL` updater that
combines two existing updaters, to implement `val * heroLevel /
unitLevel` formula needed for Adela specialty
- Removed deprecated `ARMY_MOVEMENT` updater. Its functionality has
already been removed in 1.6.X releases, and it was remaining only as a
placeholder
- Updated modding documentation to account for these changes & to remove
some TODO's

Fixed regression from #777 that could led to either duplicated bonuses
or to multiple application of updaters. It introduced double-recursion -
node parents were gathered recursively, and then bonuses were also
collected recursively within each parent. This created situation where
updater could be applied different number of times. For example, hero
bonus that is propagated to unit in combat could be selected directly,
or via hero->combat unit chain, or via hero->garrison unit->combat unit
chains, leading to different calls to updaters if updater handles
garrison unit node type
2025-04-13 16:24:51 +03:00
Ivan Savenko
439c9a7888 Merge pull request #5622 from IvanSavenko/hypno_fix
Fix hypnotize spell
2025-04-13 16:21:14 +03:00
Laserlicht
100f3606db code review 2025-04-12 13:39:08 +02:00
Ivan Savenko
f3ca06c3d0 Merge pull request #5593 from kdmcser/limiter
make OwnerUpdater not hardcode OppositeSideLimiter
2025-04-12 10:53:31 +03:00
Ivan Savenko
56fde609a8 Merge pull request #5616 from IvanSavenko/spellicon_fix
Fix loading of spell immunity icons for corresponding bonus
2025-04-12 10:51:02 +03:00
Ivan Savenko
9f07c13c1e Merge pull request #5618 from IvanSavenko/battle_fix
Fixes for recently reported combat issues
2025-04-12 10:49:48 +03:00
Ivan Savenko
1f70f27b2d Fix hypnotize spell
- Fix testing for Hypnotized status
- Fix handling of three-headed & all-around attack (Cerberi / Hydras)
while hypnotized
2025-04-11 18:01:49 +03:00
kdmcser
75aa89ae6e not use mutex 2025-04-11 22:52:20 +08:00
Ivan Savenko
dcb7a9e9f3 Fixes to locale/unicode handling
- Fixes crash on opening spellbook (recent regression)
- Fix crash if `haystack` string is shorter than `needle`
- Levenstein distance computation is now case-insensitive
- Text similarity computation now assumes utf-8 strings, not ascii
- Fix corruption of utf-8 string on life drain
2025-04-11 16:27:26 +03:00
Laserlicht
47cfe01141 seperate identifier 2025-04-11 00:49:26 +02:00
Ivan Savenko
b6c341f7c0 Likely fix for inability to shoot if there was adjacent cloned unit 2025-04-11 00:35:11 +03:00
Laserlicht
562b3f777d code review (second batch) 2025-04-10 21:41:22 +02:00
Ivan Savenko
e51ba74214 Fix loading of spell immunity icons for corresponding bonus 2025-04-10 22:24:22 +03:00
Laserlicht
5b74f7f19e code review (first batch) 2025-04-10 21:04:24 +02:00
Ivan Savenko
0b437e8b1d Merge pull request #5611 from GeorgeK1ng/custom_directories
Allow changing default directories in Windows
2025-04-10 17:31:41 +03:00
Ivan Savenko
2c8f562182 Merge pull request #5603 from MichalZr6/locale_fix
Fix crash when setting up locale on Android
2025-04-09 17:25:28 +03:00
SoundSSGood
60afbbe20f Necromancy & Eagle eye infowindows 2025-04-09 10:13:10 +02:00
George King
5b5b2f158d Change getDefaultUserDataPath to const 2025-04-07 18:51:12 +02:00
George King
f802c5f717 Simplified getPathFromConfigOrDefault 2025-04-07 17:50:46 +02:00
George King
fa1386748e Moved dirs.json load to constructor 2025-04-07 17:32:45 +02:00
SoundSSGood
603672ff51 revert some changes 2025-04-07 17:00:24 +02:00
George King
a9b23ae028 Fix build 2025-04-07 16:51:25 +02:00
George King
d2e5fdce56 Various tweaks 2025-04-07 16:37:51 +02:00
George King
451f22a22f Update lib/VCMIDirs.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-04-07 10:21:31 +02:00
George King
2df2d48b4a Update lib/VCMIDirs.cpp
Co-authored-by: Andrey Filipenkov <kambaladecapitator@gmail.com>
2025-04-07 09:55:47 +02:00
George King
5c83e54a9e Update lib/VCMIDirs.cpp
Co-authored-by: Andrey Filipenkov <kambaladecapitator@gmail.com>
2025-04-07 09:53:27 +02:00
George King
a08e923934 Allow changing default directories in Windows 2025-04-06 22:14:51 +02:00
George King
37ec51527c Allow changing default directories in Windows 2025-04-06 22:13:04 +02:00
Ivan Savenko
dcbf12ef26 Fix rare crash on merging two stacks in town garrison with stack
artifacts equipped
2025-04-06 18:44:44 +03:00