1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
Commit Graph

79 Commits

Author SHA1 Message Date
Ivan Savenko
17fc9d8d8f Merge with vcmi/develop 2023-01-18 01:04:34 +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
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
9248e06ae0 Demon summon is now a spell. DEMON_SUMMONING bonus has been removed 2022-12-22 23:11:55 +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
45aa841fb6 Stack reversing logic now matches H3 2022-12-18 11:42:02 +02:00
Ivan Savenko
60a00b450e Multiple fixes & improvements to animation ordering 2022-12-13 21:31:49 +02:00
Ivan Savenko
db2a40600d Fixed some of the warnings detected by CI run 2022-12-08 23:20:42 +02:00
lainon
7fdad4e0f6 Code refactor following C++ standard and condition fixes 2022-11-15 03:20: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
Andrii Danylchenko
4b4cc3cf4b battlefields in VLC and custom bonuses for terrain patches 2022-09-11 11:31:27 +03:00
Nordsoft91
c4035134e5 New battlegrounds (#758) 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
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
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
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
Victor Luchits
b4025fa1d6 More formatting 2020-05-16 16:14:58 +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
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
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
Arseniy Shestakov
324717acbe Spelling fixes: privilaged -> privileged, retreive -> retrieve 2018-02-10 21:52:23 +03: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
Dydzio
3eef689005 Add TERMINATOR ability support, small fixes 2017-09-09 21:01:12 +02:00