Commit Graph
100 Commits
Author SHA1 Message Date
Konstantin 34c1d4f3e9 vcmi: move CBonusProxy and friends to new file
To decouple HeroBonus.h more
2023-05-02 00:53:51 +03:00
Konstantin a2d4c72016 vcmi: morale and luck now also IFactionMember
Not all bonus bearers have morale and luck, only faction members
2023-05-02 00:53:51 +03:00
Konstantin e37f798a68 vcmi: split bonus updaters 2023-05-02 00:53:50 +03:00
Konstantin 416faf521e vcmi: move limiters outside of HeroBonus.cpp
This will help for recompilation.
2023-05-02 00:53:50 +03:00
Konstantin 6fa1b2b19f vcmi: move bonuses to its own folder 2023-05-02 00:53:50 +03:00
Konstantin P 03b8ce2d4c HeroBonus: remove unused functions 2023-05-02 00:53:50 +03:00
Konstantin P 4b2a09dae7 FactionMember: move code around 2023-05-02 00:53:50 +03:00
Konstantin 1f54a1474c vcmi: remove SHval (replace by simple val) 2023-05-02 00:53:50 +03:00
Konstantin af25ad0866 vcmi: split creatures and faction members 2023-05-02 00:53:50 +03:00
Konstantin f4f0fd5945 vcmi: magicResistance is IFactionMember property
It is no reason to keep it inside IBonusBearer
2023-05-02 00:53:50 +03:00
Konstantin 4f7035d3ff vcmi: add IFactionMember abstract class 2023-05-02 00:53:50 +03:00
Konstantin 86f5d6de69 vcmi: modernize headers 2023-04-30 13:35:54 +03:00
Konstantin 88f8694825 tests: fix modhandler assert 2023-04-27 20:59:55 +03:00
Konstantin 15d933d354 tests: disable settings.init()
This will remove debug assertion than will prevent any test
from running in debug mode
2023-04-27 20:59:55 +03:00
Konstantin 2a8f9629ae tests: attempt to fix build without lua 2023-04-27 20:59:55 +03:00
Konstantin P f03819fba2 vcmi: disable lua for GCC 2023-04-27 20:59:55 +03:00
Konstantin P 00487e3257 vcmi: disable -Wvirtual-move-assign from tests 2023-04-27 20:59:55 +03:00
Konstantin P 0d8e59a172 tests: add test directories to core loader
Fixes all tests loading
2023-04-27 20:59:55 +03:00
Konstantin P d14c951005 CBattleInfoCallbackTest: fix catch-value 2023-04-27 20:59:55 +03:00
Konstantin P 54e4db3819 vcmi: fix abandoned mine resource loading
It was overshadowed by local variable
2023-04-27 20:59:55 +03:00
Konstantin P 608c30c3d3 vcmi: add formation inside test map 2023-04-27 20:59:55 +03:00
Konstantin P a5d85e70c0 vcmi: do not run tests on CI yet 2023-04-27 20:59:55 +03:00
Konstantin P c6fbb8b30d tests: fix faction test 2023-04-27 20:59:55 +03:00
Konstantin P 705d7164ae vcmi: fix heal and teleport tests 2023-04-27 20:59:55 +03:00
Konstantin P e5f78a8997 vcmi: fix tests with latest develop 2023-04-27 20:59:55 +03:00
Konstantin c400e83874 vcmi: fixup cast in Heal effect 2023-04-27 20:59:55 +03:00
Konstantin 7c56fbd16b vcmi: fix test building for 1.2 2023-04-27 20:59:55 +03:00
Konstantin 924b456b0f vcmi: fix unit tests for latest develop 2023-04-27 20:59:55 +03:00
Konstantin 65eed5339f vcmi: actually enable unit tests 2023-04-27 20:59:55 +03:00
Konstantin 74656b9f96 vcmi: disable MapComparer team check for now 2023-04-27 20:59:55 +03:00
Konstantin 91c7c93d07 vcmi: fix MapComparer appearance check 2023-04-27 20:59:55 +03:00
Konstantin bcf8ca1268 vcmi: fix map format for teams number 2023-04-27 20:59:55 +03:00
Konstantin d31a3362af vcmi: map objects test passed
It is weird, because some objects should have mod scope now, and some not
We need to fix this, and rework test if necessary - its data is too huge now.
2023-04-27 20:59:55 +03:00
Konstantin bd7faddb55 vcmi: more verbose JSON compare 2023-04-27 20:59:55 +03:00
Konstantin 015f55cd82 vcmi: fix building tests without scripts 2023-04-27 20:59:55 +03:00
Konstantin 276bd5eebf vcmi: fix healing effect tests 2023-04-27 20:59:55 +03:00
Konstantin 42984396ff all: fix ImmunityNegationConditionTest 2023-04-27 20:59:55 +03:00
Konstantin 56601a0c2a vcmi: entity tests passed 2023-04-27 20:59:55 +03:00
Konstantin 2680046dd0 vcmi: make tests builds at least 2023-04-27 20:59:55 +03:00
Konstantin cf2304d8c7 vcmi: new commits in submodules 2023-04-27 20:59:55 +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 P 4e18a3d579 CSerializer: fix debug assertion
Fix compilation in debug mode
2023-04-20 01:27:15 +04:00
Konstantin P 7c4badc890 CSerializer: fix debug assertion
Fix compilation in debug mode
2023-04-19 13:00:51 +03:00
Konstantin P d94ce22e70 vcmi: fix terrain penalties
Fixes #2028
2023-04-19 12:41:54 +03:00
Konstantin 4a79e2ccd9 CSerializer: fix any_cast 2023-04-18 23:29:47 +03:00
Konstantin a1e8d95028 vcmi: rework CArtHandler 2023-04-17 12:32:47 +03:00
Konstantin 54eb550eb9 vcmi: remove unused functions now 2023-04-17 00:43:13 +03:00
Konstantin 7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
Konstantin 0d35606a44 vcmi: use std::variant 2023-04-17 00:43:13 +03:00
Konstantin 8dcb041917 vcmi: use std::any 2023-04-17 00:43:13 +03:00
Konstantin 25783066e8 vcmi: use std::any_cast 2023-04-17 00:43:13 +03:00
Konstantin P f11fa8f0c8 Teleport: can trigger obstacles now 2023-04-13 11:24:19 +03:00
Konstantin P 384ee99834 vcmi: configurable teleport v2
1. Redesign wall and teleport penalty using shortest path
This will avoid OH3 exploits with teleport inside walls

2. Teleport is now configurable
2023-04-13 11:24:19 +03:00
Konstantin bc1aad3b26 vcmi: remove deprecated CStack::getCreature()
Function battle::Unit::unitType() does the same.
2023-04-13 11:24:19 +03:00
Konstantin d99d1509f6 Spell: remove unneeded virtual functions
We should not try to override pure virtual with pure virtual
2023-04-13 11:24:19 +03:00
Konstantin 03eb997137 CBattleInfoEssentials: add battleIsGatePassable()
This is a helper to check if gate is passable now or not.
2023-04-13 11:24:19 +03:00
Konstantin 8397bd91fb BattleActionsController: do not pass unused caster
This is unused, so, remove this parameter to prepare for teleport action
2023-04-13 11:24:19 +03:00
Konstantin 198df21ae3 vcmi: remove old landmine property 2023-04-13 11:24:19 +03:00
Konstantin 15031d2e16 vcmi: do not block interface on setup spells 2023-04-13 01:06:36 +03:00
Konstantin cb83a9371d vcmi: 1.2 compatibility to FACTION_LIMITER 2023-04-12 23:14:38 +03:00
Konstantin 9db2e2068e vcmi: fixup crash 2023-04-11 21:17:31 +04:00
Konstantin b82374c4a9 config: Orb of Vulnerability should block all resistances
Just set MAGIC_RESISTANCE and SPELL_RESISTANCE_AURA to 0
by INDEPENDENT_MIN, will work.
2023-04-10 22:07:22 +03:00
Konstantin 4da97682be vcmi: remove code duplication for native terrain 2023-04-10 19:28:17 +03:00
Konstantin 7b9e281f7d vcmi: bump serialization version 2023-04-10 19:28:16 +03:00
Konstantin fedf7d377c vcmi: remove TFaction
This is a huge change and will break save compatibility
2023-04-10 19:28:16 +03:00
Konstantin 452cebfdfd CPropagatorNodeType: replace default constructor
Parameter constructor did the same
2023-04-10 19:28:16 +03:00
Konstantin 09cbec7c75 HeroBonus: remove StackOwnerLimiter
It seems not to be used anywhere
2023-04-10 19:28:16 +03:00
Konstantin dd196f2aa8 vcmi: slightly rework limiters
1. Add vector to aggregates
2. Rework CreatureFactionLimiter to FactionLimiter
2023-04-10 19:28:16 +03:00
Konstantin 7326980bd4 vcmi: rename WithXXX to IXXXProvider 2023-04-10 19:28:16 +03:00
Konstantin bb1a5d9521 vcmi: remove configurable limiters from map
This limiters should be always initialized with parameters.
Add CREATURES_ONLY limiter to limit bonuses only to creatures
(no heroes).
2023-04-10 19:28:16 +03:00
Konstantin f8eba58003 vcmi: remove ALL_CREATURES propagator
Now unneded, because it handled by GLOBAL_EFFECT with
CREATURE_LEVEL_LIMITER (when range set to UINT_MIN and UINT_MAX).
2023-04-10 19:28:16 +03:00
Konstantin 9f8dcfc736 CCreatureHandler: load old stack exp as global effects
It is more robust and more logical.
2023-04-10 19:28:16 +03:00
Konstantin 0f5f4c69ec vcmi: specialize native terrain entity
Specialize native terrain entity for all object that have
native terrain. Allow creatures to take global bonuses into
account when checking for native terrain.
2023-04-10 19:28:16 +03:00
Konstantin 6d9859932b vcmi: add native terrain entity
Add interface which should be used on any object with native terrain

So far, it is faction, hero, creature and battle stack
2023-04-10 19:28:16 +03:00
Konstantin 1760d2295c HeroBonus: add CreatureLevelLimiter 2023-04-10 19:28:16 +03:00
Konstantin 01f5571342 CGHeroInstance: remove old struct
Saves where struct is used is incompatible anyway
2023-04-10 19:28:16 +03:00
Konstantin 2eaecfd1ae ObstacleCasterProxy: beta branch 2023-04-10 15:41:58 +03:00
Konstantin 4f3c826196 vcmi: manaLimit should be spellcaster property 2023-04-10 15:35:21 +03:00
Konstantin 40bea35a26 CHeroWindow: fix picked art mana limit display 2023-04-10 15:35:21 +03:00
Konstantin 235fddaf4b vcmi: constexpr IDs 2023-04-09 19:54:41 +03:00
Konstantin 75a52953f2 vcmi: change gcc variant to build lua and no pch 2023-04-09 00:15:09 +03:00
Konstantin 50c9a57133 InfoBar: fix tiny selection with data 2023-04-08 01:44:08 +03:00
Konstantin f8c15f3a4b InfoBar: disable scrollbar 2023-04-07 20:50:47 +03:00
Konstantin a04d8b34f3 vcmi: fix rmg header levels
It was printed as char, not as int.
2023-04-06 12:48:53 +03:00
Konstantin dc7d0297a7 CGameHandler: fixup healing destination
If it contains hex, not unit, server complains.
Add actual unit there.
2023-04-06 00:21:21 +03:00
Konstantin 11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
Konstantin ee489f18d2 vcmi: PlayerState is now an Entity
This will reduce code duplication a little bit.
2023-04-05 01:22:04 +03:00
Konstantin 8968f0ef0e vcmi: change EAlignment to enum class 2023-04-05 01:22:04 +03:00
Konstantin 0c7dbea990 HeroBonus: remove unused function 2023-04-04 23:02:55 +03:00
Konstantin b7d6270272 vcmi: add getNativeTerrain method to factions 2023-04-04 23:02:55 +03:00
Konstantin e0715a76c8 vcmi: reduce CStack usage a little bit 2023-04-04 23:02:54 +03:00
Konstantin e946ddcfeb CGameHandler: obstacle trigger does not use CStack 2023-04-04 23:02:54 +03:00
Konstantin 22dd97ad18 vcmi: use entilites when possible part 1 2023-04-04 23:02:54 +03:00
Konstantin 4259d116e1 vcmi: move ServerSpellCastEnvironment in separate file
In theory, it should not know about CGameHandler
2023-04-04 23:02:54 +03:00
Konstantin 76bddf97bd gameConfig.json: add missing comma 2023-04-02 23:53:47 +03:00
Konstantin f41b2475fe vcmi: fix stack smash 2023-04-02 23:27:15 +03:00
Konstantin 41fa2367e5 launcher: update russian translation 2023-04-02 22:05:47 +03:00
Konstantin cabe228ebc CCreatureHandler: fix native terrain for any 2023-04-02 02:32:40 +03:00
Konstantin ff3e761f3b CTownHandler: remove hardcoded Cove grail
We have now exactly same definition in Json
2023-04-02 00:27:29 +03:00
Konstantin 3df5964847 CTownHandler: remove hardcoded Cove grail
We have now exactly same definition in Json
2023-04-01 03:14:35 +03:00