AI is more careful when gathering stuff near enemies.
The wasted movement-points are no longer considered when calculating which own city to fall back to when there's nothing better to do.
Fix an issue that caused AI to take their hero's attributes into consideration twice when calculating how much army they think they'll lose.
Fixed an issue where offensive defending didn't take into consideration whether the hero would actually be strong enough to beat the enemy hero it was trying to dispatch.
A recent fix made it so that towns that weren't supposed to be defended are now no longer defended.
This caused scouts with minimal army to also go after them in addition to the main-hero.
Problem is when two heroes go for the same town it's a massive waste of movement-points. So for the time being only main-heroes will go for faraway captures.
Better solution would be to memorize who was sent to attack what on the same turn and filter out tasks going for the same target.
When attacking non-neutral towns that are far away, the AI now considers whether their attack would arrive in the same week. If it wouldn't, it means there's a high risk that newly bought troops might flip around who is stronger. So they now refrain from sending a hero towards an enemy town that is too far away.
The AI should no longer chase enemy heroes that are not reachable in the same turn, when there's other options as this behavior was quite exploitable.
The AI should now take their overall strength into account when deciding whether to attack or not.
Previously it would attack as long as their assumed army-loss was at most 25%.
Now that is 50% times the ratio of their power compared to the total power of everyone.
Currently this may lead to a case where player have received a query
(such as levelup query from Battle Academy in Dungeon), but still
attempts to move
The node of a disembark-action can no longer be part of a hero-chain since sea-to-land-trade isn't possible and landing first eats up all movement-points.
Manarecoveryreward now uses float instead of unsigned int in order to avoid extremely high instead of negative scores when the hero has more mana than his mana-limit for example due to mana-vortex.
Moved upgrading armies to a lower priority tier as otherwise the AI would go back to their cities all the time even though there were plenty of other things to do.
Improved exploration logic by putting different kinds of exploration to different priority-tiers.
Looking at the other side of a portal has high priority, visiting an observatory has medium priority and scouting by visiting nearby tiles has low priority.
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.