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
Mikko
eba4f1b514
Update CBattleInfoEssentials.cpp
2019-01-24 14:48:38 +00:00
Karlis Senko
69330de89c
Avoid integer overflow and conversion related UB.
2018-05-01 00:02:07 +03:00
godric3
d9d01f0b68
Exposed more of existing limiters for modders ( #449 )
...
* Exposed alignment, faction and terrain limiters
* Limiters toString() use now boost:format
2018-04-17 19:59:30 +07:00
Henning Koehler
7f76648a7c
Extend Bonus.addInfo to integer vector ( #427 )
...
* changed Bonus::additionalInfo to integer vector
* fixed deserialization for old savegames
* removed newline from JsonNode::toJson()
* updated bonus schema; SPELL_AFTER_ATTACK and SPELL_BEFORE_ATTACK use new addInfo format
* removed unnecessary init in Bonus constructor
2018-03-12 08:20:18 +03:00
Henning Koehler
d3e4fc6e7a
renamed CBonusSystemNode::popBonuses to removeBonusesRecursive
2018-03-05 22:13:23 +08:00
AlexVinS
f126a34a5e
Fixed https://bugs.vcmi.eu/view.php?id=2904
2018-03-04 11:15:24 +03:00
Alexander Shishkin
8b002ad774
Issue2888 ( #421 )
...
Fixed issue 2888
* Merged AFTER_ATTACK & BEFORE_ATTACK cast modes.
* Introduced new caster class for creature ability usage
* Added few tests
2018-03-02 13:22:51 +03:00
ArseniyShestakov
7fd090786c
Merge pull request #379 from henningkoehlernz/hero_specialty_scaling
...
Hero specialty scaling
2018-02-28 15:03:24 +08:00
AlexVinS
080a81db3a
Fixed summoned units not being removed after battle
2018-02-23 21:58:05 +03:00
Henning Koehler
f1fd00f005
renamed & reused CBonusSystemNode::updateBonuses; tweaked updater signature
2018-02-18 16:55:15 +13:00
ArseniyShestakov
e11e69750a
Merge pull request #411 from drizt/fallthrough
...
Hide "this statement may fall through" warnings
2018-02-10 22:34:39 +03:00
Arseniy Shestakov
324717acbe
Spelling fixes: privilaged -> privileged, retreive -> retrieve
2018-02-10 21:52:23 +03:00
Ivan Romanov
eea50a044c
Hide "this statement may fall through" warnings
2018-02-10 22:27:00 +05:00
AlexVinS
0b70baa95e
Spells configuration version 2 (effect-based)
...
* Indirect spell effects loading
* Json serializer improvements
* spell->canBeCastAt do not allow useless cast for any spell
* Added proxy caster class for spell-created obstacles
* Handle damage from spell-created obstacles inside mechanics
* Experimental GameState integration/regression tests
* Ignore mod settings and load only "vcmi" mod when running tests
* fixed https://bugs.vcmi.eu/view.php?id=2765 (with tests)
* Huge improvements of BattleAI regarding spell casts
* AI can cast almost any combat spell except TELEPORT, SACRIFICE and obstacle placement spells.
* Possible fix for https://bugs.vcmi.eu/view.php?id=1811
* CStack factored out to several classes
* [Battle] Allowed RETURN_AFTER_STRIKE effect on server side to be optional
* [Battle] Allowed BattleAction have multiple destinations
* [Spells] Converted limit|immunity to target condition
* [Spells] Use partial configuration reload for backward compatibility handling
* [Tests] Started tests for CUnitState
* Partial fixes of fire shield effect
* [Battle] Do HP calculations in 64 bits
* [BattleAI] Use threading for spell cast evaluation
* [BattleAI] Made AI be able to evaluate modified turn order (on hypothetical battle state)
* Implemented https://bugs.vcmi.eu/view.php?id=2811
* plug rare freeze when hypnotized unit shots vertically
* Correctly apply ONLY_MELEE_FIGHT / ONLY_DISTANCE_FIGHT for unit damage, attack & defense
* [BattleAI] Try to not waste a cast if battle is actually won already
* Extended JsonSerializeFormat API
* fixed https://bugs.vcmi.eu/view.php?id=2847
* Any unit effect can be now chained (not only damage like Chain Lightning)
** only damage effect for now actually uses "chainFactor"
* Possible quick fix for https://bugs.vcmi.eu/view.php?id=2860
2018-02-08 11:37:21 +03:00
DjWarmonger
c2a0b13332
Merge pull request #371 from dydzio0614/NewAbilities
...
Tested and approved. Congrats!
2017-12-29 14:19:05 +01:00
Dydzio
6df536bb31
Siege tower handling improvements ( #392 )
...
* Fix bug #2581 - siege tower damage
* Improved siege tower damage calculation a bit
2017-11-18 12:41:07 +03:00
Dydzio
c6731f3b90
Fix code formatting
2017-11-13 14:18:38 +01:00
godric3
2a22d9ec12
Add terrain overlays morale and luck bonuses description, fix #2740
2017-10-05 14:53:39 +02:00
Henning Koehler
feba7e1979
tactics distance increased to 1 + bonus ( #375 )
2017-09-10 00:26:56 +03:00
Dydzio
14c07afd3c
Merge branch 'develop' into NewAbilities
2017-09-09 21:04:40 +02:00
Dydzio
3eef689005
Add TERMINATOR ability support, small fixes
2017-09-09 21:01:12 +02:00
Dydzio
7cbd9acd67
Add BLOCK_MAGIC_BELOW bonus
2017-09-06 00:03:32 +02:00
Dydzio
59764d8349
Implemented SHOOTS_ALL_ADJACENT
2017-09-05 23:45:31 +02:00
Dydzio
5c17e172b6
Revert some changes, update WIDE_BREATH
2017-09-05 22:29:31 +02:00
Dydzio
4cab76900f
Add SYNERGY_TARGET and [wip]-SHOOTS_ALL_ADJACENT
2017-09-04 23:32:24 +02:00
Henning Koehler
91fac7755a
made tactics skill configurable
2017-08-26 10:08:06 +12:00
Dydzio
5ba8d64b63
Working WIDE_BREATH ability
2017-08-19 19:16:44 +02:00
Dydzio
8cae811d11
Merge branch 'kuririn' into NewAbilities
2017-08-19 18:40:06 +02:00
AlexVinS
0868164147
(int) -> static_cast<int>
2017-08-12 15:43:41 +03:00
AlexVinS
8c0fab1dcf
fixes
2017-08-12 14:36:37 +03:00
AlexVinS
15138c23de
Finished conversion to new logging API
...
* removed logger streams
* (float3|int3)::operator() -> (float3|int3)::toString(), it was too ugly and confusing.
2017-08-11 23:06:27 +03:00
AlexVinS
64d9dadd64
Logging cleanup.
2017-08-11 15:47:50 +03:00
AlexVinS
96eb9c0ac7
tweak
2017-08-10 20:57:36 +03:00
AlexVinS
61e241308d
Logging cleanup
2017-08-10 19:52:05 +03:00
ArseniyShestakov
cb40c093f8
Avoid boost::optional assignment for Boost 1.64 compatibility ( #360 )
...
Two options here: to use emplace from 1.56 or boost::make_optional.
Unfortunately Ubuntu 14.04 is using 1.54 and I'd rather not to break it.
2017-08-05 16:09:29 +03:00
ArseniyShestakov
9d9c026c85
Code style: serialize everything on own lines for easier debugging ( #357 )
2017-07-31 16:35:42 +03:00
FeniksFire
b56d05b75b
Fix handling damage in bridge in fortress ( #349 )
...
Remove "Moat" obstacle on bridge hex from affected obstacles by creature,
when bridge is opened/destroyed.
Resolves: https://bugs.vcmi.eu/view.php?id=2577
2017-07-20 18:15:47 +03:00
Arseniy Shestakov
b540ab73ed
Code style: add empty parameters list to more lambda expressions
2017-07-19 01:39:38 +03:00
AlexVinS
7374689301
Fixed https://bugs.vcmi.eu/view.php?id=2715
2017-07-16 00:02:55 +03:00
ArseniyShestakov
a4c0ad94b1
Code style: remove default value hints in definitions ( #342 )
...
Some are outdated and this is something IDE are useful for.
2017-07-15 14:08:20 +03:00
ArseniyShestakov
ea0ceb1805
Merge pull request #323 from vcmi/CStackTweaks
...
CStack tweaks
2017-07-15 00:42:08 +03:00
ArseniyShestakov
006fa6c6df
Merge pull request #332 from FeniksFire/SmallBugFix
...
Fix handling damage from obstacles
2017-07-15 00:09:37 +03:00
ArseniyShestakov
77ca27b90b
Merge pull request #340 from dydzio0614/navalbattlefieldfix2
...
Add proper handling for ship-to-ship battlefield
2017-07-14 16:30:40 +03:00
Dydzio
50b0773aab
Formatting change
2017-07-14 15:24:50 +02:00
Arseniy Shestakov
f1e5797834
Code style: move or add licensing information on top of every file
2017-07-14 01:26:03 +03:00
Dydzio
85eb159e58
Minor code simplify
2017-07-13 21:44:22 +02:00
Dydzio
18f2e0ed96
Invalidate unavailable tiles as obstacle candidates
2017-07-13 18:51:56 +02:00
Dydzio
ee3f6c9b88
Block appropiate hexes on ship-to-ship battlefield
2017-07-13 16:47:28 +02:00
AlexVinS
f0713c1d36
Better handling of HYPNOTISED stacks in case of spellcasting
2017-07-09 16:55:10 +03:00
FeniksFire
43d324b561
Fix handling damage when stack wait in moat.
...
Currently stack don't take any damage from moat when he stay in same
place.
2017-07-09 15:07:20 +02:00
AlexVinS
7bf8c9bd69
fixed and cleanup
2017-07-08 21:20:38 +03:00
AlexVinS
4f14f22d3a
Unified CStack ammo, casts and counterattacks
...
* it is possible now to add casts and shoots OTF (f.e. with spell bonus)
Centralized stack 'ammo' loading from bonus system.
* introduced small proxy class for local bonus cache
(no need to use global cache if particular selector used on node only in one place)
* handle killing resurrected creatures
* use IBonusBearer::MaxHealth() where possible
* Fixed https://bugs.vcmi.eu/view.php?id=2486
* Possible fix for 0 HP after resurrection.
* Hack-fixed https://bugs.vcmi.eu/view.php?id=2584
* Unified CStack health API
* Use CHealth for CStack count and health points
* increased SERIALIZATION_VERSION
2017-07-08 20:29:59 +03:00
AlexVinS
5f1fadf71c
Fixed https://bugs.vcmi.eu/view.php?id=2706
2017-07-04 11:21:22 +03:00
FeniksFire
8577445b10
Simple fix: http://bugs.vcmi.eu/view.php?id=2366
2017-07-03 22:41:16 +03:00
AlexVinS
f463dc2fa3
fixed war machine spawning
2017-07-03 21:42:17 +03:00
ArseniyShestakov
5dfb7a5771
Merge pull request #317 from vcmi/attackerOwned
...
Refactored CStack::attackerOwned to CStack::side
2017-07-03 16:19:54 +03:00
Dydzio
ef2ff0c752
Precompiled header path also needs fix
2017-07-01 20:05:10 +02:00
AlexVinS
4f8c7bd4bb
CStack refactoring
...
* removed all occurrences of attackerOwned
* Use BattleSide enum
* more tweaks
2017-07-01 19:17:08 +03:00
Arseniy Shestakov
29e50cc21c
Fix include for SiegeInfo / SideInBattle. Lost them on rebase
2017-06-29 02:27:41 +03:00
Arseniy Shestakov
2ce02202c1
Fix more includes and move SideInBattle / SiegeInfo into battle
2017-06-29 02:02:05 +03:00
AlexVinS
ab4c848169
fixed relative include paths
2017-06-29 00:09:35 +03:00
FeniksFire
8ccdda6d2d
Improve formatting, update other config information about includes.
2017-06-27 17:00:44 +02:00
FeniksFire
4113bdab01
Moving some files from lib to the battle subdirectory.
2017-06-26 15:26:08 +02:00
FeniksFire
221386a39d
Refactoring.
...
Dividing CBattleCallback into smaller files with classes.
2017-06-24 15:51:07 +02:00