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

136 Commits

Author SHA1 Message Date
krs
0373febe6f Refactoring 1st phase - Renaming's mainly
S'more small battle order refactoring.
2023-03-01 21:21:20 +02:00
93c2bbf9ab vcmi: modernize lib/battle 2023-02-16 23:37:19 +03:00
9a30484183 Point and Rect now reside in library 2023-01-20 16:11:43 +02:00
d2b837b116 All creature-related texts go through translator 2023-01-20 15:18:36 +02:00
1418ce4678 Refactoring & fixes of damage calculation 2023-01-20 15:18:10 +02:00
8cfde8fc5e Fixed selection of dragon's breath attack against double-wide units 2023-01-20 15:15:44 +02:00
b8c5a32b9b Fix attack targeting selection for double-wide units 2023-01-20 15:15:44 +02:00
17fc9d8d8f Merge with vcmi/develop 2023-01-18 01:04:34 +02:00
0e72ee9217 No longer relevant TODO removed 2023-01-18 02:05:30 +04:00
f64d6bc1bc Add support for overwriting default range via additional info 2023-01-18 02:05:30 +04:00
01ce01d8f9 Add proper handling for 2-hex units + extract range calculation method 2023-01-18 02:05:30 +04:00
cf1674d0ca Introduce new bonus for limiting range 2023-01-18 02:05:30 +04:00
c22ab5ec9e Initial version of limiting shooters range feature 2023-01-18 02:05:30 +04:00
a46ab835ce Applied review suggestions 2023-01-14 23:01:33 +02:00
3be3c871fb Destroyed walls will now remove wall penalty 2023-01-13 01:59:09 +02:00
1d7f004658 Implemented reinforced walls in towns with Castle 2023-01-13 01:09:24 +02:00
500cf7f15d EWallPart & EWallState are now enum class 2023-01-13 00:35:58 +02:00
dd3adb7e16 Arrow towers damage algorithm should now match H3 2023-01-12 23:52:03 +02:00
1fece0ce18 Merge pull request #1229 from IvanSavenko/battle_improvements
Battle: Fixing bugs & Implementation of missing features
2023-01-09 22:07:13 +02:00
3e1e41ef59 Apply suggestions from code review
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
2023-01-05 17:31:30 +02:00
a83c7eb00f Add configurable damage and defense parameters 2023-01-05 17:31:30 +02:00
5d80457eda Merge with vcmi/develop branch 2022-12-30 00:52:23 +02:00
a0ab760249 Removed debug code 2022-12-25 16:53:40 +02:00
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