Ivan Savenko
6f0108e462
Use ResourcePath for referencing texts and json's
2023-09-04 18:22:34 +03:00
Ivan Savenko
823ffa7a07
Always use ResourcePath for referencing images and animations
2023-09-04 18:22:34 +03:00
Konstantin P
08967efd91
Teleport: check immunities in applicable()
...
Attempt to fix #2677
2023-08-31 19:58:46 +03:00
Ivan Savenko
e54287ea5d
Converted remaining identifier to new system
2023-08-25 13:38:02 +03:00
Ivan Savenko
0240ee886d
Converted (almost) all namespace enum's to enum classes
2023-08-25 13:38:02 +03:00
Ivan Savenko
ec8d31bbfc
First step at unifying game identifiers code
2023-08-25 13:38:01 +03:00
Konstantin
d746a96d55
vcmi: use SpellSchool identifier instead of enum
...
Use identifier instead of enum inside callbacks. It is better and more
expandable solution.
2023-08-23 17:53:09 +03:00
Konstantin
344593e891
vcmi: made some CSpell properties private
...
There are getters for it.
2023-08-23 17:53:08 +03:00
Konstantin
8724181a0f
vcmi: spell resistance rework
...
Now instead of XXX_IMMUNITY bonuses we have 2 bonuses with spellSchool
subtype: SPELL_SCHOOL_IMMUNITY and NEGATIVE_EFFECT_IMMUNITY.
All previous bonuses of subtype 0 is covered by SPELL_SCHOOL_IMMUNITY,
and all previous bonuses of subtype 1 is covered by
NEGATIVE_EFFECT_IMMUNITY. Unit tests are updated accordingly.
2023-08-23 17:52:16 +03:00
Konstantin
c9bc3fd4e1
CSpellHandler: use getBonusBearer
...
Use getBonusBearer method and cachingStr method for optimization
2023-08-23 17:52:16 +03:00
Ivan Savenko
f13a53c1d9
Merge remote-tracking branch 'vcmi/beta' into develop
2023-08-12 17:28:47 +03:00
Andrii Danylchenko
ba9998ac66
BattleAI: fast targets optimization
2023-08-08 20:10:29 +03:00
Ivan Savenko
62fddca21e
Split massive CModHandler class/file into multiple parts:
...
- IdentifierStorage is now a separate handler in VLC
- Renamed ModHandler::Incompatibility exception to ModIncompatibility
- Extracted ModScope namespace from ModHandler
- Extracted ModUtilities namespace from ModHandler
- Split CModHandler.cpp on per-class basis
- Replaced some direct members with unique_ptr to reduce header includes
2023-07-30 22:17:47 +03:00
Tomasz Zieliński
9b649b0b79
Build fix
2023-07-18 10:55:26 +02:00
Tomasz Zieliński
025b0814c8
+ Handled banning spells and artifacts
...
+ Rename allowedSpell => allowedSpells
2023-07-17 17:21:28 +02:00
Ivan Savenko
0a27539fb5
Fixed crashes on loading with Tides of War mod
2023-07-15 16:09:44 +03:00
Ivan Savenko
08cfbe79cf
Added encapsulation for movement points access
2023-06-25 17:42:36 +03:00
Ivan Savenko
d8879f1e53
NewObject pack now receives visitable position instead of h3m position
2023-06-23 13:34:51 +03:00
Ivan Savenko
56d69e790b
Renamed MetaString methods to more logical names
2023-06-20 19:37:27 +03:00
Ivan Savenko
2636a0dcc3
Moved MetaString to a new file
2023-06-20 19:37:27 +03:00
Ivan Savenko
f35b3a0dc3
Replace MetaString operator << with member function
2023-06-20 19:37:27 +03:00
Ivan Savenko
ece9982ca0
Fix build
2023-06-16 18:11:45 +03:00
Ivan Savenko
fc190b14bb
Spell shrines can now be configured in json
2023-06-16 17:59:10 +03:00
Tomasz Zieliński
adec58f5bf
- Set fixed boat type for Tavern / Prison
...
- Move magical boat offset to static function
2023-06-15 17:53:18 +02:00
Ivan Savenko
d6a357fd17
Split some map object files into smaller files. Reduced includes usage.
2023-06-02 21:47:37 +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
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
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
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
05eccbc2bb
vcmi: split bonus to enumerator and HeroBonus.h
2023-05-03 18:01:06 +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
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
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
86f5d6de69
vcmi: modernize headers
2023-04-30 13:35:54 +03:00
Ivan Savenko
346b8a4619
Merge pull request #2079 from rilian-la-te/cstack-some-private
...
vcmi: make some CStack properties private
2023-04-28 22:18:20 +03:00
Konstantin
c400e83874
vcmi: fixup cast in Heal effect
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
nordsoft
de159df481
Rename boats
2023-04-20 21:20:51 +04:00
nordsoft
0a28262c15
Merge remote-tracking branch 'upstream/develop' into boats
...
# Conflicts:
# AI/VCAI/Pathfinding/AINodeStorage.cpp
2023-04-19 02:22:19 +04:00
nordsoft
59a1a19d4a
Summon boat for real boats only
2023-04-18 22:21:26 +04:00
nordsoft
ed798b06da
Prepare transport enum
2023-04-18 13:04:49 +04:00
Konstantin
7a5775a9f9
vcmi: use std::optional
2023-04-17 00:43:13 +03:00
Ivan Savenko
e3ed728193
Merge pull request #1932 from rilian-la-te/proper-teleport
...
VCMI: teleport redesign
2023-04-16 22:52:01 +03:00
Ivan Savenko
3738171b21
Refactoring of H3M loader to make HotA format support easier
...
- extracted low-level reader from MapFormatH3M class
- added separate structure to define version-specific values
- cleared up some H3M format edge cases
- replaced witch hut skill vector with set
- converted several fields to enum type
2023-04-15 17:20:38 +03:00
Ivan Savenko
44b83b2e11
Merge master -> develop
2023-04-14 16:51:35 +03:00
Ivan Savenko
9d31830c74
Fix check for Demon Summon targets
2023-04-13 21:17:35 +03:00
Ivan Savenko
1fab2e2e34
Do not allow rising of corpses below alive stack
2023-04-13 19:08:08 +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
nordsoft
5419de3468
Fix getCasterUnitId
2023-04-13 02:18:12 +04:00
Ivan Savenko
dfa2e2a349
Merge beta into develop
2023-04-11 19:37:35 +03:00
Ivan Savenko
ff66592fad
Merge pull request #1882 from rilian-la-te/native-terrain-refactor
...
Native terrain refactor
2023-04-11 02:14:37 +03:00
nordsoft
9371f013e9
Rename outer caster
2023-04-10 20:56:50 +04:00
Konstantin
fedf7d377c
vcmi: remove TFaction
...
This is a huge change and will break save compatibility
2023-04-10 19:28:16 +03:00
nordsoft
b9cabef179
Fixes issues related to spell mechanics
2023-04-10 17:08:24 +04:00
Konstantin
4f3c826196
vcmi: manaLimit should be spellcaster property
2023-04-10 15:35:21 +03:00
nordsoft
f550457d23
Added stdinc
2023-04-10 12:17:43 +04:00
nordsoft
56b0e900d8
Add outer caster class
2023-04-10 05:39:25 +04:00
nordsoft
fc310c6e79
Town portal fix
2023-04-10 01:46:37 +04:00
nordsoft
601e7e854f
Dimensions door fix
2023-04-10 01:37:46 +04:00
nordsoft
0093a44889
Added abstract method to caster interface
2023-04-10 01:31:41 +04:00
nordsoft
72b2a09f0b
Boat summon spell rewritten
2023-04-10 01:06:02 +04:00
Ivan Savenko
f211207f83
Merge pull request #1893 from trofi/fix-build-without-pch
...
Add missing include headers when building with -DENABLE_PCH=OFF
2023-04-08 21:45:47 +03:00
Ivan Savenko
84af64ce6b
Removed magical initialization of registry via static variables
2023-04-08 21:29:04 +03:00
Sergei Trofimovich
2885536bf5
Add missing include headers when building with -DENABLE_PCH=OFF
...
Example build failure is missing `VCMI_LIB_NAMESPACE_BEGIN` declaration:
[ 0%] Building CXX object lib/CMakeFiles/vcmi.dir/spells/ObstacleCasterProxy.cpp.o
In file included from lib/spells/ProxyCaster.h:13,
from lib/spells/ObstacleCasterProxy.h:11,
from lib/spells/ObstacleCasterProxy.cpp:11:
lib/../include/vcmi/spells/Caster.h:13:1: error: 'VCMI_LIB_NAMESPACE_BEGIN' does not name a type
13 | VCMI_LIB_NAMESPACE_BEGIN
| ^~~~~~~~~~~~~~~~~~~~~~~~
2023-04-07 10:25:11 +01:00
Konstantin
22dd97ad18
vcmi: use entilites when possible part 1
2023-04-04 23:02:54 +03:00
Ivan Savenko
c5225aab70
Fix serialization
2023-04-04 22:22:58 +03:00
Ivan Savenko
766fb066c6
Fix debug build
2023-04-03 15:15:51 +03:00
Konstantin
d8a237ba46
vcmi: add getTrigger method to obstacles
...
Fixes advanced remove obstacle spell
2023-03-31 01:01:26 +03:00
Konstantin
ecae600563
effects: Moat now includes battlefield bonus
...
This is an implementation which works exactly like in H3
2023-03-31 01:01:25 +03:00
Konstantin
eff41f66ed
vcmi: now obstacles can have disappearing anim
...
It is a reverse version of appearingAnimation.
2023-03-31 01:01:25 +03:00
Konstantin
3bbff0588d
CSpell: !isMagical() -> no sorcery and no generic spell dmg reduction
...
Other bonus are still applied.
2023-03-31 01:01:25 +03: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
aab5b47038
vcmi: setup moats using MoatAbility
...
Setup moats using moat ability, need playtest for now.
-3 to defence not added for now.
2023-03-31 01:01:25 +03:00
Konstantin
1100bc7a5b
obstacle: remove trigger animation and sound
...
It was not working anyway. Now it is handled by trigger ability.
Trigger ability hit animation + trigger ability cast sound.
2023-03-31 01:01:25 +03:00
Konstantin
cd1730b1fb
vcmi: remove obstacle caster logic
...
It is possible now to cast something via obstacle
Immune creatures should not trigger an obstacle trigger now
and should not reveal it.
2023-03-30 14:41:40 +03:00
Konstantin
db428faeeb
vcmi: allow obstacles to store another spells
...
It will be used as trigger spell, if set
If not set, it will be ignored
2023-03-30 14:41:40 +03:00
Konstantin
57c35f39ca
WIP: Moat placer
2023-03-30 14:41:40 +03:00
Konstantin
d90d00eeac
vcmi: rework ProxyCaster
...
Now ProxyCaster can be used without hero and can even cast something
with default values.
2023-03-30 14:41:40 +03:00
Ivan Savenko
b2f5042942
Merge pull request #1783 from vcmi/beta
...
Merge beta -> develop
2023-03-27 21:21:25 +03:00
Konstantin
26db14b7b4
vcmi: expert dispel now works mechanically correct
2023-03-26 21:25:26 +03:00
Konstantin
edc9812559
obstacle: correct logic as in OH3
...
Obstacle spells should not be cast if they are affected by native
terrain and enemy have at least one stack with native terrain
2023-03-26 21:22:38 +03:00
Konstantin
705afbb898
UnitEffect: it should not always assume smart
...
It is normal than non-smart spell will be cast on our units.
2023-03-26 21:19:49 +03:00
Konstantin
44a625aa6b
vcmi: check spell obstacles by type
2023-03-26 21:17:39 +03:00
Konstantin
e40b9c849d
vcmi: no open-code NO_APPROPRIATE_TARGET
2023-03-22 12:04:28 +03:00
Konstantin
0ffc440b53
vcmi: fix target condition regression
2023-03-21 19:19:34 +03:00
Konstantin
60b510617c
vcmi: fix target condition regression
2023-03-21 17:56:15 +03:00
Ivan Savenko
383387ef29
Integrated defaultMods into mod system
2023-03-16 17:55:09 +02:00
Konstantin
1e7875cb36
vcmi: selector-based target conditions
...
For now, allows us to define target conditions by selector and even
by minimal and maximal value of bonuses. Convert Bonus condition
to Selector condition.
Allow structures inside TargetCondition struct.
2023-03-16 16:46:42 +03:00
Konstantin
9205ef2c91
vcmi: skill-agnostic ballistics
...
Made ballistics by using spell action and more code is shared now.
2023-03-16 16:46:41 +03:00
Konstantin
84f53485e2
vcmi: skill-agnostic first aid
...
Now first aid is passive battle spell, and skill just bumps
specific spell power for this spell. Everything about healing
is handled into Heal spell effect.
2023-03-16 16:46:41 +03:00
Konstantin
96c40eb36e
vcmi: remove SPECIAL_BLESS_DAMAGE bonus
...
It is handled by HAS_ANOTHER_BONUS_LIMITER with SPELL_EFFECT limiter
with desired spell id (bless). Yes, bonus will come from HERO_SPECIAL,
but will work only for blessed with spell id creatures.
2023-03-16 16:46:41 +03:00
Konstantin
bc228a938a
vcmi: use enum class for EComponentType
...
There is really no reason not to use it
2023-03-11 21:41:57 +03:00
Ivan Savenko
7ef5163d9d
Merge pull request #1581 from IvanSavenko/map_render_rewrite
...
Adventure Map - rendering rewrite
2023-03-05 19:51:07 +02:00
Ivan Savenko
11e4d84749
Implemented View Earth / View Air spells
2023-03-05 17:48:02 +02:00
Ivan Savenko
4501036a04
Basic version of hero movement on map. Removed old code.
2023-03-05 17:48:02 +02:00
Ivan Savenko
623cae7d47
All translatable strings now have language identifier
2023-03-05 17:30:38 +02:00
Konstantin
bdd976cc1e
vcmi: modernize spell effects v2
2023-02-12 21:23:00 +03:00
Konstantin
97fc424e98
vcmi: modernize lib/spells (except adventure one, needs major rework)
2023-02-12 21:23:00 +03:00
Konstantin
e82cc56ddb
vcmi: modernize lib/spells/effects
2023-02-08 15:38:26 +03:00
Andrey Filipenkov
0bbf70f30a
show resurrect message in the battle log
2023-01-25 18:13:06 +03:00
Ivan Savenko
47c1803c42
Finalization of refactoring:
...
- Entity interface now has getNameTranslated & getNameTextID methods
- Entity interface no longer has getName method
- removed (most) usages of normalizeIndentifier workaround method
- all moddable objects have identifier in form of mod:name
- all moddable object register strings in form of mod.type.name
2023-01-20 15:18:36 +02:00
Ivan Savenko
fa6f7513e8
All heroes-related strings are passed through translator
2023-01-20 15:18:36 +02:00
Ivan Savenko
5da407e822
All spell texts are now passed through translator
2023-01-20 15:18:36 +02:00
Ivan Savenko
4a09dc0757
Fixed Adela's Bless specialty
2023-01-20 15:18:10 +02:00
Ivan Savenko
d0c292e2fd
Fix order of map indexes
2023-01-20 15:15:57 +02:00
Ivan Savenko
ccc6ebee0d
Cleared up gate blocking, Force Field can now block gates
2023-01-13 15:44:42 +02:00
Ivan Savenko
526de47ca4
Removed 0.98 compatibility
2023-01-13 13:00:07 +02:00
Ivan Savenko
500cf7f15d
EWallPart & EWallState are now enum class
2023-01-13 00:35:58 +02:00
Ivan Savenko
1fece0ce18
Merge pull request #1229 from IvanSavenko/battle_improvements
...
Battle: Fixing bugs & Implementation of missing features
2023-01-09 22:07:13 +02:00
Ivan Savenko
481f756b51
Fixes #1304 - correct battle log message on spellcast without kills
2023-01-07 19:52:57 +02:00
Ivan Savenko
6b2490903d
Fix casting of massive spells by creatures
2023-01-04 21:26:13 +02:00
Ivan Savenko
e1a244beb0
Fix crash on firewall cast attempt
2023-01-04 17:38:55 +02:00
Ivan Savenko
85d7b470d4
Access to quests texts is now processed via translator
2023-01-01 14:56:45 +02:00
Ivan Savenko
5d80457eda
Merge with vcmi/develop branch
2022-12-30 00:52:23 +02:00
Ivan Savenko
b8b1e07621
Fix serialization
2022-12-30 00:36:10 +02:00
Ivan Savenko
063b8732ff
Save compatibility with main branch
2022-12-25 18:07:08 +02:00
Ivan Savenko
325c29da0d
Merge remote-tracking branch 'vcmi/develop' into battle_improvements
2022-12-23 14:51:34 +02:00
Ivan Savenko
eb20a4b208
Merge remote-tracking branch 'vcmi/develop' into warnings_fix
2022-12-23 14:40:45 +02:00
Ivan Savenko
f073c676f9
Merge 1.1 release into develop
2022-12-23 14:17:18 +02:00
Ivan Savenko
9248e06ae0
Demon summon is now a spell. DEMON_SUMMONING bonus has been removed
2022-12-22 23:11:55 +02:00
Ivan Savenko
bab5922951
Spells can now define color muxer effect (e.g. Bloodlust & Petrify)
2022-12-22 00:25:35 +02:00
Ivan Savenko
23cb47b457
Fixed several scenarios with incorrect scope for requesting identifiers
2022-12-21 23:02:19 +04:00
Ivan Savenko
53f6b7bd32
Fix Ice Ring target selection
2022-12-18 20:23:19 +02:00
Ivan Savenko
52fc5b3c39
Exploded mines now send ACTIVATE flag to client to play effect
2022-12-17 19:37:00 +02:00
Ivan Savenko
deffba01b9
All battle effects are now fully client sided
2022-12-17 17:35:15 +02:00
Ivan Savenko
e791323502
Implemented placement sound for obstacles
2022-12-13 21:31:49 +02:00
Ivan Savenko
60a00b450e
Multiple fixes & improvements to animation ordering
2022-12-13 21:31:49 +02:00
Ivan Savenko
b3deea24e0
Earthquake spell: do not target already destroyed sections
2022-12-13 21:31:49 +02:00
Ivan Savenko
ac839ad26a
Changes to rest of the code according to review:
...
- renamed status bar method clearMatching -> clearIfMatching
- renamed class ColorShifterAddMul -> ColorShifterMultiplyAndAdd
- fixed missing return from function
- fixed potential access to deleted object
2022-12-11 23:43:43 +02:00
Ivan Savenko
25bceda4ea
Added convertToVisitablePos/convertFromVisitablePos to CGHeroInstance
...
This method replaces old convertPosition, but with more clear names and
without hardcoded magic constants.
2022-12-09 14:42:47 +02:00
Ivan Savenko
facf77b3ae
vstd::unique -> std::unique
2022-12-07 23:36:20 +02:00
Ivan Savenko
2855606a88
Enabled & fixed -Woverloaded-virtual warning from gcc/cland
...
- fixed almost all instances of overloaded-virtual warning
- cleared up inheritance & method overrides in code affected by warning
2022-12-07 21:50:45 +02:00
Ivan Savenko
d8742dac3f
Show correct error message on attempting to cast Remove Obstacle on
...
fields with no removable obstacles
2022-12-02 00:27:48 +02:00
Ivan Savenko
495e0b3657
Merge remote-tracking branch 'vcmi/develop' into battleint_refactor
2022-12-01 23:58:01 +02:00
Ivan Savenko
5094fab4d9
Refactoring of spell animations, multiple fixes for spell visuals
2022-12-01 22:06:42 +02:00
Ivan Savenko
861a6849f9
Added possibility to define per-town tower icon for battle queue in siege
2022-11-29 14:47:51 +02:00
nordsoft
750f160276
Fix advmap spell mechanics
2022-10-20 22:34:27 +04:00
Andrii Danylchenko
878aabd4d6
Merge pull request #981 from kambala-decapitator/fix-analyzer-warnings
...
Fix Clang Analyzer warnings
2022-09-29 19:23:24 +03:00
Andrey Filipenkov
802147c5b7
add some asserts that shouldn't fire
2022-09-26 14:06:55 +03:00
Andrey Filipenkov
ff635edc0b
wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
...
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
7e6ed0583c
disable all scripting code when configuring without scripting modules
2022-09-21 19:31:42 +03:00
DjWarmonger
7ba271edf1
Rotation rebase2 ( #912 )
...
* Instead of [x][y][z] coordinates, map will be stored as [z][x][y].
* Nullkiller AI can get it too.
* Use boost::multi_array instead of nested vectors
* In MapHandler too
* Rotate foreach algorithms, too
* VCAI gets rotated, too
2022-09-18 17:39:10 +03:00
DjWarmonger
3d2dc2335b
Switch ObjectTemplate to shared_ptr<const> ( #870 )
2022-09-11 16:13:53 +03:00