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

1054 Commits

Author SHA1 Message Date
Andrii Danylchenko
0bff5f9eb6 AI pathfinding shared storage 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
be4f803d4a Nullkiller: copy VCAI 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
9c8d776398 Merge branch 'develop' into handlersAbstraction
# Conflicts:
#	CI/linux/before_install.sh
#	CI/mac/before_install.sh
#	CI/mxe/before_install.sh
#	lib/CModHandler.cpp
#	lib/mapObjects/CObjectClassesHandler.cpp
#	lib/mapObjects/CObjectClassesHandler.h
#	lib/mapObjects/CommonConstructors.cpp
#	server/CGameHandler.cpp
#	test/CMakeLists.txt
#	test/spells/effects/TeleportTest.cpp
2021-07-16 00:32:13 +03:00
Dmitry Orlov
0e5d427dc9 Fix: VCAI should not attempt to move Spellbook 2021-04-29 00:04:22 +03:00
AlexVinS
a59e12ca5f tweaks 2021-02-15 15:03:32 +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
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
36854742e4 Fix StupidAI trying to attack through obstacle 2020-12-15 20:38:01 +02:00
Dmitry Orlov
ef6220ebec Fix: Creature resolution failed when mod is in the custom directory 2020-12-13 03:33:28 +03: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
Dmitry Orlov
39de2f6435 Fix: Morale bonus should be shown correctly 2020-11-11 22:43:40 +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
Dmitry Orlov
5e0023704b Fix PQ issues while calculating paths 2020-09-22 00:19:40 +03:00
Victor Luchits
2727958a63 Tweak Battle AI damage prioritization score logic 2020-05-23 13:38:24 +03:00
Victor Luchits
f68b449e5e More formatting 2020-05-17 11:21:49 +03:00
Victor Luchits
b4025fa1d6 More formatting 2020-05-16 16:14:58 +03:00
Victor Luchits
d4cc005882 Address various issues pointed out by reviewers 2020-05-09 14:09:32 +03:00
Victor Luchits
59c39527c5 Formatting 2020-05-09 13:51:00 +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
Jacob Lundgren
cfe33e6b6e 3117: Fix crash after AI revisits teleporter
**	Behavioral change: Fix AI heroes sometimes attempting to probe
teleport exits using data from a previously processed hero, causing
nullptr dereferences.

VCAI::moveHeroToTile has special case logic for revisiting tiles. This
logic could cause teleport exits to be stored in
teleportChannelProbingList, without the list subsequently being
cleared. If the processing of that hero ended immediately after that,
the next hero would believe that the list is accurate for them and
attempt to teleport while not standing on a teleporter.
2020-05-01 06:33:06 +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
Andrii Danylchenko
bdec7db528 [3085] - MapObjectEvaluator crashes on custom monolith 2019-09-13 10:33:06 +03:00
Dydzio
54550b50de Update VS files to 2019, partially fix test project 2019-06-09 17:28:55 +02:00
Dydzio
4be4e10fe9 Fix wrong AI prison value handling 2019-06-05 23:07:22 +02:00
Alexander Shishkin
b16af04a09
Merge pull request #597 from dydzio0614/AiInterruptFix
Ensure no freeze on AI interruption
2019-06-03 16:53:35 +03:00
AlexVinS
1f2ee843aa [C::B] Switched to boost shared linkage 2019-05-30 20:55:40 +03:00
Andrii Danylchenko
11af1431fb
Fix code style
Co-Authored-By: Alexander Shishkin <alexvins@users.noreply.github.com>
2019-05-29 22:07:10 +03:00
Andrii Danylchenko
0bd5782470 AI: blind fix for 3062 2019-05-28 09:04:31 +03:00
Dydzio
545b07b8b8 Thread interruption fixes 2019-05-26 17:55:22 +02:00
AlexVinS
cffd763bb5 [C::B] Updated projects. 2019-05-04 10:45:00 +03: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
Alexander Shishkin
bd11e87f6a
Merge pull request #572 from dydzio0614/FuzzyHelperCrash
Fix crash caused by FuzzyLite destructor
2019-04-21 22:06:53 +03:00
Andrii Danylchenko
4153ebac58 ai fixes for android 2019-04-11 14:54:48 +03:00
Michał Kalinowski
ac6b477aa2 Simplify statements
-Simplify return statements across the code
2019-03-31 09:43:14 +03:00
Dydzio
55b000fb64 Fix crash caused by FuzzyLite destructor 2019-03-30 19:19:36 +01:00
Michał Kalinowski
ec536e613c CMake more transitive
-Moving AIs cmake to target focusing code
-Beign explicit when link libraries
2019-03-28 16:56:51 +03:00
Dydzio
94040ea8af Update VS files (add AI armymanager) 2019-03-25 02:20:24 +03:00
Andrii Danylchenko
75ed6210c6 try fix build 2019-03-23 14:11:57 +02:00
Andrii Danylchenko
ffdf5ad180 AI: fix hero exchange logic, allow splitting weakest-fastest creature, refactoring 2019-03-17 11:54:02 +02:00
Alexander Shishkin
83094faf8e
Merge pull request #553 from nullkiller/ai-fix-town-portal-to-occupied-town
ai fix town portal to occupied town
2019-03-08 20:26:32 +03:00
Andrii Danylchenko
5fb5ddfc67 ai fix town portal to occupied town 2019-02-26 22:50:46 +02:00
AlexVinS
f36a86412e Quick fix for https://bugs.vcmi.eu/view.php?id=3041 2019-02-24 18:45:53 +03:00
AlexVinS
9311966706 [C::B] Switch to MinGW 7.3 2019-02-19 14:59:10 +03:00
Andrii Danylchenko
f76c6c2300 Remove a few more usages of thread shared ai and cb 2019-02-17 14:32:42 +02:00
Alexander Shishkin
6165954e40
Merge pull request #546 from nullkiller/ai-pathfinding-update-paths
AI pathfinding const api and updatePaths
2019-02-14 20:33:00 +03:00
Dydzio
e6baba3ca0 Disable tactical advantage engine until rework 2019-02-13 12:01:32 +01:00
Alexander Shishkin
1e8fc51f70
Merge pull request #549 from dydzio0614/AiStackSplitImprovement
AI hero exchange improvement: split last creature stack
2019-02-13 00:02:31 +03:00