1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00
Commit Graph

113 Commits

Author SHA1 Message Date
9248e06ae0 Demon summon is now a spell. DEMON_SUMMONING bonus has been removed 2022-12-22 23:11:55 +02:00
b423b3fa6b Fix dragon breath & fire shield 2022-12-21 18:04:54 +02:00
a57eec23e6 Refactoring of setBattleCursor & fromWhichHexAttack methods 2022-12-19 01:12:26 +02:00
45aa841fb6 Stack reversing logic now matches H3 2022-12-18 11:42:02 +02:00
60a00b450e Multiple fixes & improvements to animation ordering 2022-12-13 21:31:49 +02:00
db2a40600d Fixed some of the warnings detected by CI run 2022-12-08 23:20:42 +02:00
7fdad4e0f6 Code refactor following C++ standard and condition fixes 2022-11-15 03:20:55 +03:00
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
4b4cc3cf4b battlefields in VLC and custom bonuses for terrain patches 2022-09-11 11:31:27 +03:00
c4035134e5 New battlegrounds (#758) 2022-09-11 11:31:26 +03:00
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
e0e3787748 When the battle is won with only summoned creatures - defeat 2022-05-01 09:30:30 +03:00
483a4689ce Fixes for code review issues 2021-02-20 04:57:50 +03:00
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
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
211a993c44 Fix obstacles escaping for twohex creatures 2020-11-22 08:57:28 +02:00
af192b8efe Try fix bypassing destroyed fort drawbridge 2020-11-21 22:09:27 +02:00
39de2f6435 Fix: Morale bonus should be shown correctly 2020-11-11 22:43:40 +03:00
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
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
b4025fa1d6 More formatting 2020-05-16 16:14:58 +03:00
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
cba94f8bb3 Code style
Co-Authored-By: Alexander Shishkin <alexvins@users.noreply.github.com>
2019-05-18 18:37:02 +02:00
023d6c88fd Code style and improved readability 2019-05-17 09:34:59 +01:00
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
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
ac6b477aa2 Simplify statements
-Simplify return statements across the code
2019-03-31 09:43:14 +03:00
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
324717acbe Spelling fixes: privilaged -> privileged, retreive -> retrieve 2018-02-10 21:52:23 +03:00
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
c2a0b13332 Merge pull request #371 from dydzio0614/NewAbilities
Tested and approved. Congrats!
2017-12-29 14:19:05 +01:00
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
c6731f3b90 Fix code formatting 2017-11-13 14:18:38 +01:00
3eef689005 Add TERMINATOR ability support, small fixes 2017-09-09 21:01:12 +02:00
7cbd9acd67 Add BLOCK_MAGIC_BELOW bonus 2017-09-06 00:03:32 +02:00
59764d8349 Implemented SHOOTS_ALL_ADJACENT 2017-09-05 23:45:31 +02:00
5c17e172b6 Revert some changes, update WIDE_BREATH 2017-09-05 22:29:31 +02:00
4cab76900f Add SYNERGY_TARGET and [wip]-SHOOTS_ALL_ADJACENT 2017-09-04 23:32:24 +02:00
5ba8d64b63 Working WIDE_BREATH ability 2017-08-19 19:16:44 +02:00
8cae811d11 Merge branch 'kuririn' into NewAbilities 2017-08-19 18:40:06 +02:00
0868164147 (int) -> static_cast<int> 2017-08-12 15:43:41 +03:00
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
61e241308d Logging cleanup 2017-08-10 19:52:05 +03:00
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
7374689301 Fixed https://bugs.vcmi.eu/view.php?id=2715 2017-07-16 00:02:55 +03:00
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
ea0ceb1805 Merge pull request #323 from vcmi/CStackTweaks
CStack tweaks
2017-07-15 00:42:08 +03:00
006fa6c6df Merge pull request #332 from FeniksFire/SmallBugFix
Fix handling damage from obstacles
2017-07-15 00:09:37 +03:00
77ca27b90b Merge pull request #340 from dydzio0614/navalbattlefieldfix2
Add proper handling for ship-to-ship battlefield
2017-07-14 16:30:40 +03:00
50b0773aab Formatting change 2017-07-14 15:24:50 +02:00