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

43 Commits

Author SHA1 Message Date
97111328a8 Made hiring heroes a bit more conditional to spam fewer of them 2025-02-09 17:33:39 +00:00
64ad060846 Update RecruitHeroBehavior.cpp
closestThreat was supposed to be < 1, not < 0
2024-12-17 12:03:46 +01:00
aff73b6e65 Be less wasteful with hiring heroes
When an enemy is near our city that currently has a hero hiding in it, we don't buy a hero without army as that one would be forced to wait outside and likely be killed.
2024-12-17 12:02:58 +01:00
34b8123fba Hero hiring adjustments
The AI is now a lot more likely to buy a hero early on when that hero's army is worth more than half the cost of the hero, regardless of other circumstances.
2024-12-02 15:11:39 +01:00
3a8a67407b Update RecruitHeroBehavior.cpp
AI's willingness to hire hero now depends more on the availability of treasure again.
2024-10-20 16:37:03 +02:00
f04e110e2c Update RecruitHeroBehavior.cpp
Removed inclusion of no longer existing and also not needed header.
2024-10-20 12:59:08 +02:00
da32b8b58f Restore compatibility with removal of getFaction() 2024-10-10 17:33:54 +02:00
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
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
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
faa5a02659 Update RecruitHeroBehavior.cpp
Fix potential division by zero.
2024-09-09 23:25:09 +02:00
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
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
72597b549b hero spread
Prefer hiring heroes at towns that don't have heroes nearby.
2024-08-31 23:00:27 +02:00
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
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
945de7c369 More warnings
Removed unused code
2024-07-20 21:12:43 +02:00
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
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
7d925b3689 Fix typo: Preasure -> Pressure 2024-04-16 21:10:15 +00:00
728f673763 NKAI: remove static ai field 2024-03-31 21:11:25 +03:00
35429eab52 NKAI: moddable configuration 2024-03-01 22:03:07 +02:00
87957e74c1 Replaced boost::thread_specific_ptr with thread_local 2023-08-23 16:32:29 +03:00
1eabb738dc NKAI: fix heroes not recruited 2023-08-13 09:08:30 +03:00
ccfc6f5716 NKAI: increase towns priority, buy heroes more often 2023-07-31 22:01:12 +03:00
6ba74f02bc NKAI: playing around with defence 2023-07-31 22:01:11 +03:00
87fcfa4add Removed excessive pathfinder includes 2023-06-21 12:00:44 +03:00
acac42291e Remove excessive CMap.h includes 2023-05-31 23:18:38 +03:00
d347db4c16 Fix hero count calculation for resourceful ai mod 2023-04-22 14:47:31 +03:00
11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
e9c725181c NKAI: fix retreat logic 2022-10-15 15:15:12 +03:00
153cccdf46 NKAI: hire retreated hero 2022-10-14 12:00:56 +03:00
eeea01d778 NKAI: namespace 2022-10-04 08:40:14 +03:00
b4241670ba Nullkiller: rename VCAI to AIGateway 2021-07-26 21:02:50 +03:00
1806dd8447 Nullkiller: remove AIhelper + refactoring 2021-07-26 21:02:50 +03:00
223a52b3d1 Nullkiller: Try to join behavior and goal and see what come out of it. 2021-07-26 21:02:50 +03:00
400967904b Nullkiller AI: stabilization of build and prioritization fixes 2021-07-26 21:02:50 +03:00
66ed1a2901 Nullkiller AI: add strategical value fuzzy variable 2021-07-26 21:02:50 +03:00
84e5e6ac17 Nullkiller: rework defence a bit 2021-07-26 21:02:50 +03:00
ada76a5603 Nullkiller: fix file headers, move fuzzy config to ai folder 2021-07-26 21:02:50 +03:00
e3c87fb58d Nullkiller: stabilisation and fixes 2021-07-26 21:02:50 +03:00
bcf8db3d05 Nullkiller: startup scripts 2021-07-26 21:02:50 +03:00
eee145c486 Nullkiller: rough implementation of capture objects and recruit hero behaviors 2021-07-26 21:02:50 +03:00