Andrii Danylchenko
a7859dae39
Battle AI: archangels cast again
2023-08-13 09:08:30 +03:00
Ivan Savenko
537f9fa048
Merged master into develop
2023-08-03 23:38:32 +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
Ivan Savenko
aed8c411fc
Minor rework & cleanup of combat replays
2023-07-27 19:25:55 +03:00
DjWarmonger
b4c9b81a33
Update SideInBattle.cpp
2023-07-25 15:02:28 +03:00
Andrii Danylchenko
ec8898a0e7
#1965 - treat dwelling defenders as neutrals
2023-07-25 10:13:41 +03:00
SoundSSGood
9b5f6ec7cf
CArtifact getters setters
2023-07-05 15:48:08 +03:00
Ivan Savenko
85262cf4f5
Moved CGameState files into a separate directory
2023-06-26 17:15:59 +03:00
krs
27c488e62f
Small changes after review.
2023-06-23 20:05:15 +03:00
krs
756dd398c2
Added constant for BATTLE_SHOOTING_RANGE_DISTANCE
2023-06-23 19:13:39 +03:00
krs
e938152c1d
Fix for showing penalty limit in red for unlimited ranged archers
2023-06-23 19:13:39 +03:00
krs
33bbbefdeb
First working prototype that mimics rangedFullDamageLimit code
...
Next step is to create more generic functions that can be shared between the 2.
2023-06-23 19:13:39 +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
krs
56b8fb39f3
Removed neighbouringTilesWithDirection and using
...
allNeighbouringTiles
2023-06-11 18:40:47 +03:00
krs
b8ad5b41f3
UnitState has getRangedFullDamageDistance()
2023-06-11 18:40:47 +03:00
krs
c0591573bf
Working Version
2023-06-11 18:40:47 +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
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
34c1d4f3e9
vcmi: move CBonusProxy and friends to new file
...
To decouple HeroBonus.h more
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
4b2a09dae7
FactionMember: move code around
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
4f7035d3ff
vcmi: add IFactionMember abstract class
2023-05-02 00:53:50 +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
krs
1bb5077231
Renamed getMovementRange to ObtainMovementRange as per request
2023-04-26 21:56:20 +04:00
krs
e348193f7e
Tactics movement is limited to movement range
2023-04-26 21:56:20 +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
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
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
Ivan Savenko
506c3d29bc
Replaced vstd clamp with std version
2023-04-12 01:03:14 +03:00
Nordsoft91
3951bbb395
Merge pull request #1108 from Nordsoft91/battle-dialog
...
[HDMod features] Quick combat
2023-04-11 21:18:04 +04:00
Ivan Savenko
dfa2e2a349
Merge beta into develop
2023-04-11 19:37:35 +03:00
nordsoft
8e77b833d9
Merge remote-tracking branch 'upstream/develop' into battle-dialog
2023-04-11 15:54:08 +04:00
Ivan Savenko
7d92ef5f86
Merge pull request #1909 from vcmi/avoid-freeze-on-siege-selfblocking
...
BattleAI: avoid selfblocking on siege
2023-04-11 11:11:05 +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
bfc75ccd39
Merge remote-tracking branch 'upstream/develop' into battle-dialog
2023-04-11 02:22:42 +04:00
Konstantin
4da97682be
vcmi: remove code duplication for native terrain
2023-04-10 19:28:17 +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
7326980bd4
vcmi: rename WithXXX to IXXXProvider
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
4f3c826196
vcmi: manaLimit should be spellcaster property
2023-04-10 15:35:21 +03:00
nordsoft
0093a44889
Added abstract method to caster interface
2023-04-10 01:31:41 +04:00
Andrii Danylchenko
737c34b8c6
BattleAI: avoid selfblocking on siege
2023-04-09 16:22:37 +03:00
krs
dab07bdef9
Now unit range is shown in Tactics phase as well
...
A new parameter: isActiveStack was needed in battleGetAvailableHexes, so that we show the propper Tactics range.
2023-04-08 20:39:59 +03:00
nordsoft
ece8a2a41f
Merge branch 'battle-dialog' into battle-dialog2
...
# Conflicts:
# AI/BattleAI/BattleAI.h
# AI/StupidAI/StupidAI.h
# client/CPlayerInterface.cpp
# client/CPlayerInterface.h
# client/Client.cpp
# client/NetPacksClient.cpp
# client/battle/CBattleInterface.cpp
# client/battle/CBattleInterface.h
# client/battle/CBattleInterfaceClasses.cpp
# client/battle/CBattleInterfaceClasses.h
# config/schemas/settings.json
# lib/CGameInterface.h
# lib/IGameEventsReceiver.h
# lib/NetPacks.h
# lib/NetPacksLib.cpp
# lib/battle/BattleInfo.cpp
# server/CGameHandler.cpp
# server/CQuery.h
2023-04-06 19:53:52 +04:00
nordsoft
ce3028bd73
Intermediate commit
2023-04-06 19:34:07 +04:00
Konstantin
11b237a23c
vcmi: massive refactoring v1
2023-04-05 22:33:12 +03:00
Konstantin
e0715a76c8
vcmi: reduce CStack usage a little bit
2023-04-04 23:02:54 +03:00
Konstantin
d8a237ba46
vcmi: add getTrigger method to obstacles
...
Fixes advanced remove obstacle spell
2023-03-31 01:01:26 +03:00
Konstantin
179cee3e88
vcmi: add obstacle animation helper functions
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
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
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
847437bbfa
BattleInfo: update bonus tree when unit is moved
...
This is a semi-dirty hack to force uncaching a bonuses with
UnitOnHexLimiter
2023-03-30 12:51:59 +03:00
Konstantin
9a229d6e48
vcmi: really correct obstacle trigger
...
Now obstacle trigger really matches H3
2023-03-27 16:11:17 +03:00
Konstantin
8c1d6c8e13
CBattleInfoCallback: use obstacle only once
...
We should not affect creature by obstacle twice.
2023-03-27 15:45:41 +03:00
Konstantin
88a7b3141d
vcmi: really correct BFS
...
AFAIK, all is working as H3.
2023-03-27 15:45:41 +03:00
Konstantin
26db14b7b4
vcmi: expert dispel now works mechanically correct
2023-03-26 21:25:26 +03:00
Ivan Savenko
8fbeff2a02
Fix movement over lowered drawbridge in Fortress
2023-03-25 23:54:51 +02:00
Ivan Savenko
5288e3761e
Merge pull request #1764 from IvanSavenko/selectable_spellcaster
...
Implemented support for multi-spell casters
2023-03-25 20:08:47 +02:00
Ivan Savenko
9a19feaf4a
Fix spellcasters with massive spells
2023-03-25 01:23:49 +02:00
Ivan Savenko
dc099b2a35
Implemented support for multi-spell casters
2023-03-25 00:48:14 +02:00
Ivan Savenko
970981cfc9
Show information on potential kills in attack tooltip
2023-03-24 17:18:47 +02:00
Ivan Savenko
31147ac83b
refactoring: TDmgRange pair -> DamageRange struct
2023-03-23 17:49:33 +02:00
Ivan Savenko
a0e9e01b48
Renamed & reorganized all game mechanics settings names
2023-03-16 18:11:35 +02:00
Ivan Savenko
383387ef29
Integrated defaultMods into mod system
2023-03-16 17:55:09 +02:00
Konstantin
7f805768f0
battle: fixup siege crash
2023-03-16 16:47:06 +03:00
Konstantin
64ad7558c6
vcmi: skill-agnostic artillery
...
Now it should work for any creature and with any damage percentage.
2023-03-16 16:46:41 +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
f264c541fb
vcmi: skill-agnostic tactics
...
Tactics is split to 2 bonuses, and it is now possible to
block tactics without having tactics itself. But tactics
for two sides is not implemented, because it is huge rework
and not high priority for me now, I want to do basic
secondary skill rework first.
2023-03-16 16:46:41 +03:00
Konstantin
9ffd18c914
vcmi: skill-agnostic armorer
...
This is a skill-agnostic armorer, which can be used same as
armorer before.
2023-03-16 16:46:41 +03:00
Konstantin
0ed89e77d4
vcmi: replace archery and offence to new bonus
...
Add PERCENTAGE_DAMAGE_BOOST bonus, which will work exactly as old
archery or offence. Subtype is actually boolean which select
ranged (1) and melee (0)
2023-03-16 16:46:41 +03:00
Konstantin
62e579f672
vcmi: replace KINGx bonuses to one KING bonus
...
val = level of slayer which require to affect.
Can break saves.
2023-03-16 16:46:41 +03:00
Konstantin
1e73c2e1e6
vcmi: configurable charge
...
There is no reason not to make charge configurable.
Just do it.
2023-03-16 16:46:41 +03:00
krs
26bca26bd8
Enum is now in its own namespace, comments for enum values removed
...
Using Namespace Fix for linux compilation.
NO_OF_PHASES renamed to NUMBER_OF_PHASES, removed duplicate phase documentation
2023-03-01 21:21:20 +02:00
krs
7421fabf2c
BattlePhases enum moved to Unit.h
2023-03-01 21:21:20 +02:00
krs
0373febe6f
Refactoring 1st phase - Renaming's mainly
...
S'more small battle order refactoring.
2023-03-01 21:21:20 +02:00
Konstantin
cb26bedd17
fix #1621
2023-03-01 19:22:06 +03:00
Konstantin
93c2bbf9ab
vcmi: modernize lib/battle
2023-02-16 23:37:19 +03:00
Ivan Savenko
9678296875
Hero interaction is now battle action
2023-02-02 13:43:19 +02:00
Ivan Savenko
b1c67fbf47
Better formatting for enum
2023-02-02 13:25:55 +02:00
Ivan Savenko
9a30484183
Point and Rect now reside in library
2023-01-20 16:11:43 +02:00
Ivan Savenko
d2b837b116
All creature-related texts go through translator
2023-01-20 15:18:36 +02:00
Ivan Savenko
30d7bdc884
Moved tower damage computation to town instance
2023-01-20 15:18:10 +02:00
Ivan Savenko
b7c27e7d47
ios compilation fix
2023-01-20 15:18:10 +02:00
Ivan Savenko
789f4d6bc8
Formatting
2023-01-20 15:18:10 +02:00
Ivan Savenko
b86969909a
Fixes compilation due to changes in callback interface
2023-01-20 15:18:10 +02:00
Ivan Savenko
1418ce4678
Refactoring & fixes of damage calculation
2023-01-20 15:18:10 +02:00
Ivan Savenko
8cfde8fc5e
Fixed selection of dragon's breath attack against double-wide units
2023-01-20 15:15:44 +02:00
Ivan Savenko
b8c5a32b9b
Fix attack targeting selection for double-wide units
2023-01-20 15:15:44 +02:00
Ivan Savenko
e53e515aa7
Fix msvc compile
2023-01-18 01:04:50 +02:00
Ivan Savenko
17fc9d8d8f
Merge with vcmi/develop
2023-01-18 01:04:34 +02:00
Ivan Savenko
c400416058
Merge pull request #1409 from IvanSavenko/translate_terrain
...
Refactoring of terrain handlers
2023-01-18 00:12:31 +02:00
Dydzio
0e72ee9217
No longer relevant TODO removed
2023-01-18 02:05:30 +04:00
Dydzio
f64d6bc1bc
Add support for overwriting default range via additional info
2023-01-18 02:05:30 +04:00
Dydzio
01ce01d8f9
Add proper handling for 2-hex units + extract range calculation method
2023-01-18 02:05:30 +04:00
Dydzio
cf1674d0ca
Introduce new bonus for limiting range
2023-01-18 02:05:30 +04:00
Dydzio
c22ab5ec9e
Initial version of limiting shooters range feature
2023-01-18 02:05:30 +04:00
Ivan Savenko
a46ab835ce
Applied review suggestions
2023-01-14 23:01:33 +02:00
Ivan Savenko
3be3c871fb
Destroyed walls will now remove wall penalty
2023-01-13 01:59:09 +02:00
Ivan Savenko
1d7f004658
Implemented reinforced walls in towns with Castle
2023-01-13 01:09:24 +02:00
Ivan Savenko
500cf7f15d
EWallPart & EWallState are now enum class
2023-01-13 00:35:58 +02:00
Ivan Savenko
dd3adb7e16
Arrow towers damage algorithm should now match H3
2023-01-12 23:52:03 +02:00
Ivan Savenko
e48bd39b9c
Moved road & river handlers into a separate file
2023-01-11 15:17:24 +02:00
Ivan Savenko
4f3ea0d1d9
Renamed Terrain.h/cpp -> TerrainHandler.h/cpp
2023-01-10 00:01:35 +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
Dydzio
3e1e41ef59
Apply suggestions from code review
...
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
2023-01-05 17:31:30 +02:00
Dydzio
a83c7eb00f
Add configurable damage and defense parameters
2023-01-05 17:31:30 +02:00
Ivan Savenko
5d80457eda
Merge with vcmi/develop branch
2022-12-30 00:52:23 +02:00
Ivan Savenko
a0ab760249
Removed debug code
2022-12-25 16:53:40 +02:00
Ivan Savenko
eb20a4b208
Merge remote-tracking branch 'vcmi/develop' into warnings_fix
2022-12-23 14:40:45 +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
41b87088d5
Color muxer effects can now be (partially) configured by user.
...
TODO: move color muxer effects from spells into spell config
2022-12-21 23:29:56 +02:00
Ivan Savenko
b423b3fa6b
Fix dragon breath & fire shield
2022-12-21 18:04:54 +02:00
Ivan Savenko
a57eec23e6
Refactoring of setBattleCursor & fromWhichHexAttack methods
2022-12-19 01:12:26 +02:00
Ivan Savenko
a6622b5896
Fixed clone damage
2022-12-18 17:38:14 +02:00
Ivan Savenko
45aa841fb6
Stack reversing logic now matches H3
2022-12-18 11:42:02 +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
733f21f8dc
Petrify will freeze stack animations
2022-12-16 18:34:35 +02:00
Ivan Savenko
291bb9b204
Expanded cursors enum to include all possible values
2022-12-16 11:22:58 +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
1558c28c0a
Fix obstacle rendering
2022-12-12 00:05:00 +02:00
Ivan Savenko
db2a40600d
Fixed some of the warnings detected by CI run
2022-12-08 23:20:42 +02:00
Ivan Savenko
5094fab4d9
Refactoring of spell animations, multiple fixes for spell visuals
2022-12-01 22:06:42 +02:00
nordsoft
b7cab0e01d
Merge remote-tracking branch 'upstream/develop' into battle-dialog
2022-11-30 01:03:57 +04:00
Ivan Savenko
3e58d1e3c5
Merge remote-tracking branch 'refs/remotes/vcmi/develop' into battleint_refactor
2022-11-28 16:10:13 +02:00
nordsoft
8e324603bf
Remove extra lines
2022-11-27 00:08:47 +04:00
nordsoft
2c88e35749
Fix obstacles generation
2022-11-27 00:04:14 +04:00
Ivan Savenko
6b3beb05e5
BattleInt split is finished, start of refactoring:
...
- Refactoring of siege controller code
- Replaced some usages of C struct SDL_Surface with proper c++ class
IImage
- Refactoring of rendering of battlefield objects (WIP)
2022-11-25 00:26:14 +02:00
Ivan Savenko
a65dd0726d
Separated siege-related part of BattleInterface into separate class
...
- added constants for BattleHex'es of castle towers
2022-11-17 18:50:12 +02:00
nordsoft
9b597fc8d4
Merge remote-tracking branch 'upstream/develop' into battle-dialog
2022-11-15 23:08:20 +04:00
Andrii Danylchenko
8b964be71f
Merge pull request #1111 from GermanAizek/develop
...
Code refactor and fix condition bug
2022-11-15 09:23:16 +02:00
lainon
7fdad4e0f6
Code refactor following C++ standard and condition fixes
2022-11-15 03:20:55 +03:00
Nordsoft91
072e2d72bb
Merge branch 'develop' into battle-dialog
2022-11-12 17:14:15 +04:00
nordsoft
4ccad9178e
Fix potential BattleInfo destruction before usage
2022-11-06 21:46:56 +04:00
nordsoft
0f35082024
Fix crash with objects belonging players without state
2022-11-06 03:26:13 +04:00
nordsoft
48925a50f2
Development
2022-11-05 03:35:46 +04:00
Andrii Danylchenko
601ced3749
BattleAI: rework movement when no targtes
2022-10-23 11:41:03 +03:00
Andrii Danylchenko
82a9f82e1c
BattleAI: retreat
2022-10-14 12:00:56 +03:00
Tomasz Zieliński
20c102e648
Remove T prefix from new typedefs
2022-09-29 11:44:46 +02:00
Tomasz Zieliński
f386f42166
Merge remote-tracking branch 'origin/develop' into terrain-rewrite
...
# Conflicts:
# lib/Terrain.cpp
# lib/Terrain.h
# lib/battle/CBattleInfoEssentials.cpp
# lib/rmg/ObstaclePlacer.cpp
# lib/rmg/RiverPlacer.cpp
2022-09-27 07:50:17 +02:00
Tomasz Zieliński
4ea57ea7fc
A variety of suggested style tweaks
2022-09-25 09:33:56 +02: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
Tomasz Zieliński
a5077245a8
Merge remote-tracking branch 'origin/develop' into terrain-rewrite
...
# Conflicts:
# lib/Terrain.cpp
# lib/Terrain.h
2022-09-23 20:01:13 +02:00
Andrey Filipenkov
7e6ed0583c
disable all scripting code when configuring without scripting modules
2022-09-21 19:31:42 +03:00
Tomasz Zieliński
494b0f0226
First version that compiles
2022-09-21 11:34:23 +02: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
Nordsoft91
ad01c7ffce
Vlc obstacles [part 1] ( #888 )
...
* obstacles content handler, entity service and VLC integration
2022-09-15 11:06:54 +03:00
Andrii Danylchenko
4b4cc3cf4b
battlefields in VLC and custom bonuses for terrain patches
2022-09-11 11:31:27 +03:00
Andrii Danylchenko
3b1d271ae0
allow configurable battleground graphics
2022-09-11 11:31:26 +03:00
Nordsoft91
c4035134e5
New battlegrounds ( #758 )
2022-09-11 11:31:26 +03:00
Nordsoft91
aaa07e4d2e
New terrain support - part 1 ( #755 )
...
Initial support of new terrains
2022-09-11 11:31:26 +03:00
Konstantin
c6b198ce14
Warning fix (I moved C++17 and CI to another branch) ( #739 )
...
* clang warning fixes
* use CMake 3.10 due to MXE CI does not have 3.13 yet
Co-authored-by: Konstantin <rilian@niisi.ras.ru>
2022-05-19 15:14:50 +03:00
Andrii Danylchenko
e0e3787748
When the battle is won with only summoned creatures - defeat
2022-05-01 09:30:30 +03:00
Dmitry Orlov
30b879ae5d
Fixed: duplicated bonusing building. Improved: opposite bonus propagation
2021-09-12 14:30:54 +03:00
Dmitry Orlov
25d9ea1ddf
Feature: Opposite Side Limiter
2021-09-04 14:15:38 +03:00
Dmitry Orlov
f861d3a509
Fix: Visiting hero should receive town bonuses during town siege
2021-09-04 14:15:37 +03:00
Dmitry Orlov
6f0864b47c
Feature: Town Negative Bonuses. Fix: Negative bonus bearers should not be affected
2021-09-04 14:15:37 +03:00
AlexVinS
483a4689ce
Fixes for code review issues
2021-02-20 04:57:50 +03:00
AlexVinS
ecaa9f5d0b
Entities redesign and a few ERM features
...
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
MikeLodz
38efbb345e
Fixes mantis tickets 2899 and 2984 (bugged hero spell specialties)
...
- stoneskin/haste/prayer/weakness: didnt work because there were 2 bonus objects in buffer and they were filtered out as a possible duplicate (BattleInfo::addOrUpdateUnitBonus). it was fixed by making them a single bonus.
- disrupting-ray and weakness: had opposite effect, because of missing negation
- added a new specialty types: SPECIAL_ADD_VALUE_ENCHANT and SPECIAL_FIXED_VALUE_ENCHANT. this is to make possible specialties like Aenin (fixed specialty value added to spell value) and Melody (fixed value for spell regardless of anything). These specialties can be used in mods with any heroes.
- slayer spell effect calculations was fixed to include hero Coronius-style specialty.
- finally fixed description for Labetha Conflux hero, this is a OH3 bug described here https://heroes.thelazy.net/index.php/Labetha
Changes were tested and work as intended.
commit was made in cooperation with modder Misiokles
2021-02-08 23:58:12 +01:00
Andrii Danylchenko
ade84699b0
found a bug in code where AI can change client gamestate directly causing sorting crash
2021-01-30 17:29:49 +02:00
Andrii Danylchenko
3614330b3d
moat bypass when no targets to attack
2020-12-02 19:40:24 +02:00
Andrii Danylchenko
ea073c81d3
2184 - fix battlefield corners unreachable for 2 hex units
2020-11-28 14:14:13 +02:00
Andrii Danylchenko
211a993c44
Fix obstacles escaping for twohex creatures
2020-11-22 08:57:28 +02:00
Andrii Danylchenko
af192b8efe
Try fix bypassing destroyed fort drawbridge
2020-11-21 22:09:27 +02:00
Dmitry Orlov
39de2f6435
Fix: Morale bonus should be shown correctly
2020-11-11 22:43:40 +03:00
Dmitry Orlov
f4816b0824
Mod system improvement Part I : Special buildings should work in the modders towns
2020-10-07 12:35:11 +03:00
John Bolton
c61bae4060
Fixed RETURN_IF_BATTLE(). Undid disabled warnings. Fixed indentation.
2020-10-05 16:28:28 -07:00
John Bolton
a05ae78e67
Fixed lots of warnings.
...
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.
4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
2020-10-04 02:20:18 -07:00
John Bolton
6d8f1e4530
Fixed incorrect usage of const std::shared_ptr. Resolves 0003142.
...
Replaced const TBonusListPtr with TConstBonusListPtr where necessary
Replaced const std::shared_ptr<T> with std::shared_ptr<const T> where necessary.
Removed superfluous use of const.
Replaced const std::shared_ptr<T> with const std::shared_ptr<T> & in function parameters and ranged for-loops.
2020-09-30 22:56:28 -07:00
Andrii Danylchenko
d782ee39df
hacks to optimize a few bonus requests
2020-07-04 17:52:22 +03:00
Alexander Shishkin
cc75b859d4
Merge pull request #609 from viciious/improve_battleai
...
Improve battle AI
2020-05-25 05:50:40 +03:00
Victor Luchits
b4025fa1d6
More formatting
2020-05-16 16:14:58 +03:00
Victor Luchits
618d521407
Fix CMP_stack to follow strict weak ordering of elements
2020-05-11 18:14:36 +03:00
Victor Luchits
be10694b73
Some changes to make the battle AI smarter
...
- the AI will now consider attacking multiple units
- the preferred strategy now is to minimize collateral damage rather than to maximize damage to enemy units alone
- attacks that block enemy shooters will be prioritized over other attacks in cases when shooters have weaker melee attacks
2020-05-05 17:53:03 +03:00
Toney Sui
dca5d86e7a
Fix bug: LandMine is not exploding to enemies. ( #630 )
...
* The reason is,
the mine has attribute hidden=true;
when enemy unit moves, the code in BattleInfo.cpp MoveUnit() (line 817) will update the revealed to true;
then in the CGameHandler.cpp handleDamageFromObstacle() (line 4846) is checking , and the condition battleIsObstacleVisibleForSide() will return true, so the effect will not be triggerred.
Resolution:
1. Remove the "revealed=true" in moveUnit(), and in handleDamageFromObstacle, remove the "const" restrict for obstacle, and then update revealed to true;
2. After the takeDamage function, add a pack "BattleObstaclesChanged" to update the obstacle to be "revealed=true".
2020-02-12 20:12:12 +03:00
Alexander Shishkin
21f74a9968
Merge pull request #590 from Ewilhan/fixCombatOrder
...
Fixed Battle Creature Ordering
2019-05-29 17:51:52 +03:00
Dydzio
cd78779d9c
Remove false warning indicating something is wrong
2019-05-19 12:22:41 +02:00
Ewilhan
cba94f8bb3
Code style
...
Co-Authored-By: Alexander Shishkin <alexvins@users.noreply.github.com>
2019-05-18 18:37:02 +02:00
Ewilhan
023d6c88fd
Code style and improved readability
2019-05-17 09:34:59 +01:00
Ewilhan
ab1c598d4e
Fixed Battle Creature Order
...
Fixed the messy creature order. It now follows correctly all creature ordering rules.
2019-05-16 14:41:02 +01:00
Dydzio
e50efdc279
Creature spellcast refactor ( #569 )
...
* Move some logic to lib
* Mouse action priority queue enhancement
* Get rid of siegehandler dependency
* Improve AI offensive spellcasting
* CBattleInterface cleanup
2019-05-04 06:42:55 +03:00
Michał Kalinowski
ac6b477aa2
Simplify statements
...
-Simplify return statements across the code
2019-03-31 09:43:14 +03:00
Dydzio
9e4619c08d
Fix lack of unit action with morale+wait
2019-03-23 23:51:50 +01:00