1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-05-22 09:55:17 +02:00
Commit Graph

36 Commits

Author SHA1 Message Date
Xilmi 0b016b9b14 Update RecruitHeroBehavior.cpp
If the AI is very rich it will buy more heroes even if it doesn't have a capitol.
2024-09-27 23:02:40 +02:00
Xilmi 71504a3140 Hire despite hero present
Only if both the garrison and the outside of a town are blocked are hires of heros being blocked.
2024-09-23 17:25:17 +02:00
Xilmi 37f9f93948 Update RecruitHeroBehavior.cpp
Modified how to score what hero to hire to make it more likely to rehire fled heroes with high levels when the army-gain from the hero would be rather insignificant.
2024-09-09 23:38:28 +02:00
Xilmi faa5a02659 Update RecruitHeroBehavior.cpp
Fix potential division by zero.
2024-09-09 23:25:09 +02:00
Xilmi 8c3f6fc1e2 Update RecruitHeroBehavior.cpp
Fixed crash caused by mistakenly assuming that "pos" is the position of a hero on the map and not its bottom-right-corner that can be outside of the map.
2024-09-08 02:19:19 +02:00
Xilmi c186de2d52 Update AI/Nullkiller/Behaviors/RecruitHeroBehavior.cpp
Avoid checking float against an exact value.

Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-09-05 16:36:07 +02:00
Xilmi 72597b549b hero spread
Prefer hiring heroes at towns that don't have heroes nearby.
2024-08-31 23:00:27 +02:00
Xilmi af7d5c7f7f Update RecruitHeroBehavior.cpp
Don't hire a hero in a town where another hero is currently defending against a threat. This would mean one of them has to stay outside and be exposed.
2024-08-18 09:50:32 +02:00
Xilmi bbb5157f74 Update RecruitHeroBehavior.cpp
Reworked recruit-behavior to be a bit more conservative and avoid recruiting-sprees. Stuff like buying several heros in a row because the next one is always slightly better than the last but using up the whole starting-bank for that.
2024-07-24 21:17:04 +02:00
Xilmi 945de7c369 More warnings
Removed unused code
2024-07-20 21:12:43 +02:00
Xilmi 9c6d8762c5 Lowered restrictions from hero-hiring.
Removed two restrictions from hero-hiring, that prevented AI from hiring heros in certain scenarios.
2024-07-19 15:18:02 +02:00
Xilmi fdaac9d3c3 Hero-hiring
When we have no hero, we will definitely want to hire one.
We will also want to hire heroes who already pay for more than themselves by coming with an army that has more value than the hero costs.
2024-07-12 15:39:50 +02:00
Alexander Wilms 7d925b3689 Fix typo: Preasure -> Pressure 2024-04-16 21:10:15 +00:00
Andrii Danylchenko 728f673763 NKAI: remove static ai field 2024-03-31 21:11:25 +03:00
Andrii Danylchenko 35429eab52 NKAI: moddable configuration 2024-03-01 22:03:07 +02:00
Ivan Savenko 87957e74c1 Replaced boost::thread_specific_ptr with thread_local 2023-08-23 16:32:29 +03:00
Andrii Danylchenko 1eabb738dc NKAI: fix heroes not recruited 2023-08-13 09:08:30 +03:00
Andrii Danylchenko ccfc6f5716 NKAI: increase towns priority, buy heroes more often 2023-07-31 22:01:12 +03:00
Andrii Danylchenko 6ba74f02bc NKAI: playing around with defence 2023-07-31 22:01:11 +03:00
Ivan Savenko 87fcfa4add Removed excessive pathfinder includes 2023-06-21 12:00:44 +03:00
Ivan Savenko acac42291e Remove excessive CMap.h includes 2023-05-31 23:18:38 +03:00
Andrii Danylchenko d347db4c16 Fix hero count calculation for resourceful ai mod 2023-04-22 14:47:31 +03:00
Konstantin 11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
Andrii Danylchenko e9c725181c NKAI: fix retreat logic 2022-10-15 15:15:12 +03:00
Andrii Danylchenko 153cccdf46 NKAI: hire retreated hero 2022-10-14 12:00:56 +03:00
Andrii Danylchenko eeea01d778 NKAI: namespace 2022-10-04 08:40:14 +03:00
Andrii Danylchenko b4241670ba Nullkiller: rename VCAI to AIGateway 2021-07-26 21:02:50 +03:00
Andrii Danylchenko 1806dd8447 Nullkiller: remove AIhelper + refactoring 2021-07-26 21:02:50 +03:00
Andrii Danylchenko 223a52b3d1 Nullkiller: Try to join behavior and goal and see what come out of it. 2021-07-26 21:02:50 +03:00
Andrii Danylchenko 400967904b Nullkiller AI: stabilization of build and prioritization fixes 2021-07-26 21:02:50 +03:00
Andrii Danylchenko 66ed1a2901 Nullkiller AI: add strategical value fuzzy variable 2021-07-26 21:02:50 +03:00
Andrii Danylchenko 84e5e6ac17 Nullkiller: rework defence a bit 2021-07-26 21:02:50 +03:00
Andrii Danylchenko ada76a5603 Nullkiller: fix file headers, move fuzzy config to ai folder 2021-07-26 21:02:50 +03:00
Andrii Danylchenko e3c87fb58d Nullkiller: stabilisation and fixes 2021-07-26 21:02:50 +03:00
Andrii Danylchenko bcf8db3d05 Nullkiller: startup scripts 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