Xilmi
cf338e04ad
Update Nullkiller.cpp
...
AI can now also buy resources that it has income for.
2024-09-06 21:40:23 +02:00
Xilmi
35d8705fea
Update Nullkiller.cpp
...
prioOfTask-variable-usage bound to trace-level as otherwise a warning will ensue.
2024-09-06 17:20:12 +02:00
Xilmi
e43492d8b5
Update PriorityEvaluator.cpp
...
Fixed affordabilitycheck not being negated.
2024-09-06 00:12:44 +02:00
Xilmi
db2416cb6b
Update Nullkiller.cpp
...
Readded prioOfTask because it's needed in trace-messages.
2024-09-05 23:41:05 +02:00
Xilmi
5488a0a29c
Removed the "GATHER"-priorityTier
...
There was no real need for it to be a separated tier from Hunter_gather.
2024-09-05 19:35:47 +02:00
Xilmi
d9fe8d7fa0
Update BuyArmyBehavior.cpp
...
Removed pointless check for hero-army being more valuable than buying army directly as it was never the case anyways.
2024-09-05 16:50:22 +02:00
Xilmi
b3115f65c5
Update BuildingBehavior.cpp
...
Use std::numeric_limits<uint8_t>::max(); instead of UINT8_MAX; and remove some leftover-trace-messages from debugging.
2024-09-05 16:45:45 +02:00
Xilmi
d5d9f3cb7d
Merge branch 'develop' of https://github.com/xilmi/vcmi into develop
2024-09-05 16:40:21 +02:00
Xilmi
dafc9cd8a8
Update PriorityEvaluator.cpp
...
Replace float-comparisons with zero by vstd::isAlmostZero
2024-09-05 16:40:06 +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
23cd54c998
Preparations for merge
...
No longer using FuzzyEngine just to create a log-message. It's now only used when isUseFuzzy is set.
Also:
Removed < operator and instead use already existing "canAfford"-Method.
2024-09-05 16:22:25 +02:00
Xilmi
b32c9615ed
Update Nullkiller.cpp
...
Removed unused variable.
2024-09-05 15:59:09 +02:00
Xilmi
db16a9d234
A bit of clean-up for merge
...
Set back trace level to 0
Removed EvaluationContexts that weren't used
Encapsulated many debug-messages behinde trace-levels
2024-09-04 16:41:47 +02:00
Xilmi
d0aefdfbe6
Update RecruitHero.cpp
...
Removed a A
2024-09-03 21:17:06 +02:00
Xilmi
9361278f81
Merge remote-tracking branch 'upstream/develop' into develop
2024-09-03 21:16:01 +02:00
Xilmi
dfa992951b
Revert "Merge branch 'fix-battle-ai' into develop"
...
This reverts commit b489816d29
, reversing
changes made to 5ee7061ab7
.
2024-09-03 20:57:05 +02:00
Xilmi
64fad53532
Revert "Merge branch 'pr/4528' into develop"
...
This reverts commit f4578c6d3a
, reversing
changes made to ac8e5b3711
.
2024-09-03 20:51:13 +02:00
Andrii Danylchenko
07ae33b8f4
BattleAI: missing lock
2024-09-03 13:02:58 +03:00
Andrii Danylchenko
f9442208da
BattleAI: avoid standing in moat
2024-09-03 13:02:58 +03:00
Xilmi
b489816d29
Merge branch 'fix-battle-ai' into develop
2024-09-02 17:28:11 +02:00
Xilmi
5ee7061ab7
Merge remote-tracking branch 'upstream/develop' into develop
2024-09-02 17:27:08 +02:00
Andrii Danylchenko
3f916ab543
BattleAI: avoid standing in moat
2024-09-02 15:31:36 +03:00
Xilmi
1176628a88
Update PriorityEvaluator.cpp
...
Workaround for weird -nan(ind) closestWayRatios.
2024-09-02 01:37:21 +02:00
Xilmi
09badeb5be
Enum for PriorityTiers
...
In order to not confuse PriorityTiers, especially after adding new ones, now using an enum to identify them.
2024-09-02 00:16:19 +02:00
Xilmi
c667ca46d1
Using correct priorityTier for Clusterization
...
Clusterizer now uses PriorityTier = 5 for evaluation, which is used to generate priority for guarded objects
2024-09-02 00:00:36 +02:00
Xilmi
64c3fbd519
Update ExecuteHeroChain.cpp
...
Now resetting the ObjectClusterizer as killing something might change the situation.
2024-09-01 23:58:47 +02:00
Xilmi
7c6f96344a
Update Nullkiller.cpp
...
Removed resetAiState from loop cause it has too many side-effects. Such as the loop going through all passes.
2024-09-01 19:33:43 +02:00
Xilmi
0e91f10bbc
Update Nullkiller.cpp
...
ResetAIState so that units realize what they can do after unlocking a cluster.
2024-09-01 17:21:53 +02:00
Xilmi
1ef5e8ab1b
Update PriorityEvaluator.cpp
...
Prevent building more buildings when we are saving for our favorite building.
2024-09-01 13:47:30 +02:00
Xilmi
751f3b0e7d
Update BuildingBehavior.cpp
...
Fixed an issue that prevented generating more building-tasks when there already were tasks.
2024-09-01 13:46:44 +02:00
Xilmi
be43c4d5f0
New hero-not acting
...
Fixed an issue that caused newly hired heroes to do nothing on the turn they were hired under certain circumstances.
2024-09-01 12:33:54 +02:00
Xilmi
0c488145b9
Update BuildAnalyzer.cpp
...
Revert unintentionally commited changes
2024-09-01 00:02:47 +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
Ivan Savenko
39e5ba32f6
Merge pull request #4530 from IvanSavenko/town_fortifications
...
Support for configurable town fortifications
2024-08-31 13:59:40 +03:00
Xilmi
f4578c6d3a
Merge branch 'pr/4528' into develop
2024-08-30 22:09:43 +02:00
Xilmi
ac8e5b3711
Update PriorityEvaluator.cpp
...
AI should score citadels and castles higher for better developed towns so that it focuses on finishing the main-town quicker as opposed to developing several smaller towns simultaneously.
2024-08-30 21:02:50 +02:00
Xilmi
56988e054a
New priority
...
1. Take / kill what is reachable in same turn
2. Defend
3. Take / kill what is further away
2024-08-30 18:05:47 +02:00
Xilmi
05d948b582
Priorities
...
Swapped priority of attacking and defending.
Troop-delivery-missions will check safety of the delivering hero.
2024-08-30 16:46:36 +02:00
Xilmi
987a51cccb
Merge remote-tracking branch 'upstream/develop' into develop
2024-08-30 16:45:06 +02:00
Ivan Savenko
c3e76f19e1
Add workaround for very common crash in BattleAI
2024-08-30 12:25:55 +00:00
Ivan Savenko
644d6f4529
Merge pull request #4507 from vcmi/fix-battle-ai
...
Battle AI: fix firewall, fix haste spellcast evaluation for waits and…
2024-08-30 14:36:05 +03:00
MichalZ
e769e0a856
Merge branch 'vcmi:develop' into bug_fixes
2024-08-29 23:59:54 +02:00
Xilmi
dcec5637cd
Fix for defense-evaluation.
...
Defense-evaluation didn't fill armyInvolvement but it was what created the score for it. So there was only score if it also included a HeroExchange.
2024-08-29 21:01:06 +02:00
Xilmi
b8dacfc0be
Update Nullkiller.cpp
...
Fixed trade no longer working and changed log-output.
2024-08-29 20:49:01 +02:00
Xilmi
aea05b3fb8
Merge remote-tracking branch 'upstream/develop' into develop
2024-08-29 14:42:37 +02:00
Ivan Savenko
36c1ed670f
Support for configurable town fortifications
...
Removed most of hardcoded checks for fort level or for presence of fort/
citadel/castle buildings.
It is now possible to define which parts of town fortifications are
provided by town buildings
Configuration for H3-like fortifications is provided in
buildingsLibrary.json and will be used automatically by mods as long as
mods have buidings named "fort", "citadel" and "castle".
Alternatively, mods can separately define:
- hitpoints of walls (shared value for all sections)
- hitpoints of central, upper and lower towers (separate values)
- presence of moat
- shooters for each tower (separate values)
2024-08-28 19:42:14 +00:00
MichalZr6
ca3d81f047
fix crash on heroRoles.clear()
2024-08-28 15:22:00 +02:00
MichalZr6
7ae7c13964
drop setting reachability for turrets
2024-08-28 15:22:00 +02:00
Ivan Savenko
0fd9dbf240
Unified income handling, added IOwnableObject interface
2024-08-28 12:40:44 +00:00
Ivan Savenko
01396b62b7
Extracted handling of type ID's from serializer into a separate class
2024-08-26 19:48:46 +00:00