1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
Commit Graph

1838 Commits

Author SHA1 Message Date
Xilmi
00e5770aa3 Update PriorityEvaluator.cpp
Revert change that made AI too passive.
2024-08-18 21:22:05 +02:00
Xilmi
e6d907af55 Merge remote-tracking branch 'upstream/develop' into develop 2024-08-18 09:52:59 +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
bdbb9d02fc Update DefenceBehavior.cpp
Fixed an issue where heroes that were leaving towns were still considered as defending the town.
2024-08-18 09:49:38 +02:00
Xilmi
65b8576687 Update BuyArmyBehavior.cpp
Allow building army in threatened town even when it wants to save for a building.
2024-08-18 09:49:02 +02:00
Xilmi
ea5ee039ca Update BuildingBehavior.cpp
Prioritize defensive buildings in threatened towns.
2024-08-18 09:48:16 +02:00
Xilmi
284f276108 Update Nullkiller.cpp
Don't trade away gold when the gold-pressure is high.
2024-08-18 09:47:37 +02:00
Xilmi
3be25d9414 Update PriorityEvaluator.cpp
Defend towns 1 turn earlier.
2024-08-18 09:47:05 +02:00
Xilmi
8ad6d712c0 lowered aggression
Being less willing to rush across half the map to attack an enemy town only to find it too well defended when arriving there.
2024-08-15 18:16:23 +02:00
Xilmi
a79f76f32b Update Nullkiller.cpp
Fix issue with selling/buying the same resources back and forth. But probably leads to not using the market early on. (needs more testing)
2024-08-15 18:15:29 +02:00
Xilmi
6193e6224f Update FuzzyHelper.cpp
Added Multiplicative danger-modifier to citadels and castles.
2024-08-15 18:14:48 +02:00
Xilmi
f0ca1c6112 Update BuildAnalyzer.cpp
Removed the restrictions of the greedy-playstyle.
Only count forts as gold-producing prerequisites when no same- or higher-level fort exists somewhere else in the empire.
2024-08-15 18:13:44 +02:00
Xilmi
b7e4219fde More purposeful defending
Avoid defending towns that are out of reach for the enemy.
2024-08-14 22:53:48 +02:00
Xilmi
c10c04779f Adaptive Build-order
When not threatened by nearby enemies the AI adds missing gold-income-buildings towards gold-pressure. This impacts the build-order in a way that they try to rush these more and get up a good economy more quickly.
2024-08-14 22:52:19 +02:00
Ivan Savenko
49c5f650f7
Merge pull request #4437 from IvanSavenko/battle_sides
Unified handling of battle sides ID's
2024-08-14 18:37:05 +03:00
Ivan Savenko
5c7c4a7810
Merge pull request #4443 from IvanSavenko/fix_sonar
Fix miscellaneous issues discovered by Sonar
2024-08-14 17:12:27 +03:00
Ivan Savenko
ac717d57ea
Merge pull request #4445 from IvanSavenko/fix_ranged_attack
Do not try to shoot at 2nd hex of wide creatures
2024-08-14 17:05:12 +03:00
Ivan Savenko
38311244a4
Merge pull request #4402 from Laserlicht/8th_creature
support for 8th creature (Factory)
2024-08-14 17:04:32 +03:00
Ivan Savenko
cd6d55fe75 Do not try to shoot at 2nd hex of wide creatures 2024-08-14 10:38:59 +00:00
Xilmi
6bd442e6f1 BattleAI: Fix endless loop
Fixed an issue where the part of a 2-tile-unit that is outside of the map was considered a target and caused an endless-loop in the pathfinding being unable to get there.
2024-08-13 23:43:56 +02:00
Ivan Savenko
97f1a310df Fix miscellaneous issues discovered by Sonar 2024-08-12 18:26:30 +00:00
Xilmi
068e3bdc59 Fix endless loop
Fixed an endless-loop caused by someone removing this ", turn++".
2024-08-12 19:47:15 +02:00
Ivan Savenko
2a05fbdd50 Unified handling of battle sides ID's
- Replaced BattleSide namespace-enum with enum class
- Merged two different BattleSide enum's into one
- Merged BattlePerspective enum into BattleSide enum
- Changed all places that use integers to represent battle side to use
BattleSide enum
- Added BattleSideArray convenience wrapper for std::array that is
always 2-elements in size and allows access to its elements using
BattleSide enum
2024-08-11 20:54:44 +00:00
Xilmi
a7b26e237f Fix crash
Fixed a crash due to improperly trying to access "cb".
2024-08-11 21:59:06 +02:00
Xilmi
fba34a743e Update DefenceBehavior.cpp
Reverted previous change to defense-behavior.

Both approaches have pros and cons and neither really works as I want. This still needs work.
2024-08-11 18:23:52 +02:00
Xilmi
ed059393ec No more prio 3 tasks
The AI no longer performs prio 3 tasks, when no prio 0-2 tasks were found.
2024-08-11 18:23:02 +02:00
Xilmi
958aeb3a60 AI improvements
Deliberately defending towns in danger will now only be performed when the town has at least a citatel.

The AI will now count the buildings per town-type and add a score-bonus to dwellings of towns it already has a lot of buildings of. This shall help with getting a stronger army with less morale-issues.

Scoring for mage-guild now increased the bigger the existing armies are.

AI is less afraid of enemy-heros than previously.
2024-08-11 18:21:24 +02:00
Xilmi
5907aae057 Fixed AI not taking hero-strength into account when hero is garrisoned.
When evaluating their fighting-chance against towns with a garrisoned hero the AI didn't consider the attribute-boosts of the defending hero.
Now it does.
2024-08-11 17:59:10 +02:00
Xilmi
730e574bef Fixed AI ignoring garrisioned heroes when it comes to danger-analysis.
AI now considers garrisoned heros a potential threat for their heroes too.
2024-08-11 12:44:07 +02:00
Xilmi
99e4052dc0 Merge remote-tracking branch 'upstream/develop' into develop 2024-08-11 11:37:10 +02:00
Andrii Danylchenko
78dea24017 Visual logger colored text 2024-08-10 19:13:09 +03:00
Andrii Danylchenko
47c77826c3 Visual logger map texts 2024-08-10 13:04:35 +03:00
Xilmi
a454ecfe38 Merge remote-tracking branch 'upstream/develop' into develop 2024-08-10 11:05:28 +02:00
Andrii Danylchenko
9ffd6368d4 Add visual logger for battle interface 2024-08-10 10:54:20 +03:00
Laserlicht
170f375179 code review 2024-08-10 00:29:30 +02:00
Xilmi
ea4e412f9a Update Nullkiller.cpp
Only actual heroes and not nullptrs will exculde each other in comparison.
2024-08-07 01:37:15 +02:00
Xilmi
ec5da0e6b3 Update PriorityEvaluator.cpp
Further working towards heroes avoiding danger.
2024-08-07 01:36:27 +02:00
Laserlicht
475b769eef fix ToW 2024-08-07 01:35:50 +02:00
Xilmi
b0e4551dbf Update BuyArmyBehavior.cpp
No longer saving money for city-halls when city-halls cannot be built.
2024-08-07 01:35:17 +02:00
Laserlicht
14bcfad7b0 fix upgrade 2024-08-06 23:28:45 +02:00
Laserlicht
ebeeff5aa3 abstraction layer 2024-08-05 23:51:07 +02:00
Laserlicht
3afddbbf29 replaced constant 2024-08-05 23:03:19 +02:00
Xilmi
f4c0bee003 Merge remote-tracking branch 'upstream/develop' into develop 2024-08-05 21:53:59 +02:00
Laserlicht
1a06a2cc44 basic 8th creature support 2024-08-05 21:15:47 +02:00
Andrii Danylchenko
51b8bc9fc3 BattleAI: fix shhoters waiting and reduce strength of our loss affecting decissions 2024-08-04 17:50:19 +03:00
Andrii Danylchenko
801e919e7e BattleAI: fix ap calculation in exchange variant 2024-08-03 20:35:20 +03:00
Andrii Danylchenko
3d856bfa9d Merge remote-tracking branch 'origin/develop' into battle-ai-fixes 2024-08-03 12:54:25 +03:00
Andrii Danylchenko
9edb0afff8 BattleAI: fix dragonbreath retaliation 2024-07-28 14:41:32 +03:00
Xilmi
07108ce03d Update PriorityEvaluator.cpp
Allow defending in priority 2.
2024-07-25 21:49:17 +02:00
Xilmi
183ce82b99 Update Nullkiller.cpp
Readded prio-3 tasks for heroes when no prio 0-2 tasks were found. It's anything that doesn't lose more than the loss-threshold.
2024-07-25 21:48:44 +02:00