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

1077 Commits

Author SHA1 Message Date
Andrii Danylchenko
286d084445 Nullkiller: better tracing and hero locking for hero chain 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
ffa626dc2f AI: add ExecuteChain goal 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
37434dc4cf AI: hero chain stabilisation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
3ffcef30f6 AI: add army cost 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
f44eaf8132 AI: inefective chain cancellation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
0e328ab3c2 AI: hero chain stabilisation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
3a0d9fe14e AI: adding towns and dwellings to hero chain 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
8961f1c803 AI: fix hero exchange logic, allow splitting weakest-fastest creature, refactoring 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
e838e70165 ai fix town portal to occupied town 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
774f531c4e hero chain stabilisation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
87f1079c60 nullkiller&herochain stabilisation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
62e5366a08 AI: rough hero chain stabilisation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
ff57a52001 Nullkiller: hero chain stabilisation 2021-07-26 21:02:50 +03:00
AlexVinS
dd046e60be Quick fix for https://bugs.vcmi.eu/view.php?id=3041 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
fa39279c82 Nullkiller - rough stabilisation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
cd0f479d7e Nullkiller: rough implementation of prioritization 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
eee145c486 Nullkiller: rough implementation of capture objects and recruit hero behaviors 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
9c85e26d3c Nullkiller: add engine and activate it for blue AI only. Engine does nothing 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
a88181acd7 AI: separate hero chain recalculation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
c1e521a544 Nullkiller - rough stabilisation 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
9d70b28c9b AI: hero chain basic logic 2021-07-26 21:02:50 +03:00
Andrii Danylchenko
1e4a086bb1 AI pathfinding loss evaluation 2021-07-26 21:02:50 +03:00
AlexVinS
594d1684e9 Switch to MinGW 7.3 2021-07-26 21:02:50 +03:00
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