Konstantin P
1522ed85e2
vcmi: make "noneOf" selector more restrictive
...
It should do "or-not" instead of "and-not".
2023-09-13 17:09:59 +03:00
Konstantin P
499339bfd1
CI: fix mingw packages
2023-09-13 17:08:21 +03:00
Konstantin
e554a2766d
BattleActions: do not pass unnecessary targetStack
...
It was unused for everything except teleport, so pass it only wher we
attempt to teleport.
Reworking sacrifice is out of scope from beta
2023-08-31 23:44:00 +03:00
Konstantin P
08967efd91
Teleport: check immunities in applicable()
...
Attempt to fix #2677
2023-08-31 19:58:46 +03:00
Konstantin P
6988b288ba
Rect: fix serialization
2023-07-14 11:39:04 +03:00
Konstantin P
118b68349a
CCreatureHandler: fix positive morale
2023-07-14 11:33:21 +03:00
Konstantin
e82acf4840
CGHeroInstance: always add obligatory skills
...
Fixes #2198
2023-05-31 20:03:59 +03:00
Konstantin
e60a4318c3
vcmi: a bunch of forward definitions
2023-05-07 20:37:32 +03:00
Konstantin P
057a33c508
SpellSchool: use identifier instead of int
...
Needs redifinition of MAGIC_SCHOOL_SKILL in all mods
2023-05-07 20:37:32 +03:00
Konstantin P
8600e3035a
IBonusBearer: split cached methods
2023-05-05 21:30:45 +03:00
Konstantin P
f2827834c0
vcmi: bump serialization version
2023-05-05 21:30:45 +03:00
Konstantin P
45ca449f2c
vcmi: more optionals in bonuses
2023-05-05 21:30:45 +03:00
Konstantin P
9e1cdc410f
vcmi: replace school bonuses to unified ones
...
Except immunity now
2023-05-05 21:30:45 +03:00
Konstantin P
8764765dcf
Bonus: complex duration as bitset
...
Fixes #2125
2023-05-05 21:30:45 +03:00
Konstantin P
e9a90a8cbf
Serializer: serialize small bitsets (32 bits)
2023-05-05 21:30:45 +03:00
Konstantin P
6ff83e6f16
tests: test nonMagical effects
2023-05-05 18:57:40 +03:00
Konstantin P
75948a5dd7
tests: add ResistanceCondition test
2023-05-05 18:57:40 +03:00
Konstantin
3d46ee3182
TargetCondition: units with 100% MR is immune
...
Spells should not consider units with 100% MR as valid targets.
2023-05-05 18:57:40 +03:00
Konstantin P
c216292f1e
CHeroHandler: remove confusing map
...
This map should not be used, it does not have values anymore
2023-05-05 18:57:40 +03:00
Konstantin
b0d2787e86
vcmi: remove DIRECT_DAMAGE_IMMUNITY bonus
...
Replace by SPELL_DAMAGE_REDUCTION bonus with 100 value
2023-05-05 18:57:40 +03:00
Konstantin P
5841c716fd
vcmi: 100% damage reduction is damage immunity
2023-05-05 18:57:11 +03:00
Konstantin P
0cbc2e458c
CBonusSystemNode: remove description
...
It was almost unused, but this change is save-breaking
2023-05-05 18:57:11 +03:00
Konstantin P
d0e6205688
CBonusSystemNode: make some properties private
2023-05-05 18:57:11 +03:00
Konstantin
05eccbc2bb
vcmi: split bonus to enumerator and HeroBonus.h
2023-05-03 18:01:06 +03:00
Konstantin
fbc05c70ac
vcmi: camelCase methods of new classes
...
Also use EGameSettings for clamping morale and luck
2023-05-02 12:09:13 +03:00
Konstantin
a6de9097be
vcmi: rename HeroBonus.h to Bonus.h
2023-05-02 11:20:58 +03:00
Konstantin
3df5a8e415
vcmi: split selectors from HeroBonus.h
2023-05-02 00:54:53 +03:00
Konstantin
29c76fb9bf
HeroBonus: split BonusList
2023-05-02 00:54:53 +03:00
Konstantin
48bcfe74f7
HeroBonus: move TBonusSubtype from GameConstants.h
2023-05-02 00:54:53 +03:00
Konstantin
ce37380e99
HeroBonus: remove unused template
2023-05-02 00:54:53 +03:00
Konstantin
4866c2fe5c
vcmi: split IBonusBearer
2023-05-02 00:54:53 +03:00
Konstantin
b6eb2dc060
vcmi: rename IFactionMember and ICreature
2023-05-02 00:54:53 +03:00
Konstantin
1d34c73c2d
vcmi: split CBonusSystemNode, BonusParams and prop
...
More splitting of HeroBonus.h
2023-05-02 00:54:53 +03:00
Konstantin
713e3004df
vcmi: rename updater and limiter files
2023-05-02 00:53:51 +03:00
Konstantin
4894280c6b
HeroBonus: remove unused function
2023-05-02 00:53:51 +03:00
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 and nordsoft
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 and Nordsoft91
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