- Same buildings in different towns of the same faction that provide
bonuses with propagators will now correctly stack their bonuses. This
fixes Tavern and possibly other such buildings
- Brotherhood of Sword now correctly adds bonus to thieves guild access
- bump our oldest builder from Ubuntu 20.04 to 22.04 due to Github
phasing-out of 20.04: https://github.com/actions/runner-images/issues/
11101
- use gcc-10 on ubuntu 22.04 (oldest available)
- explicitly use 24.04 image instead of latest, in line with other jobs.
Nullkiller AI will now prefer giving its scout heroes faster units to
optimize their movement points on next turns.
Unit selection logic:
- AI prefers to give 'weak' units that won't affect army strength of main
hero. Unit is considered 'weak' if its level below 4 or if its AI value
is below 1% of total army strength. So AI can give high-tier unit to
scout, but only if main hero already has massive army.
- Within weak units, if hero is moving on terrain with penalty, AI will
always prefer units that are native to this terrain. So on snow AI will
always prefer unit from Tower even if its speed is lower than unit from
another faction.
- Within remaining candidates, AI will prefer unit that will give higher
movement points limit. This also means that in case of H3 rules, all
units with 11+ speed will be viewed as equally good
- If there are multiple units with same speed, AI will prefer unit with
lowest AI value
AI will no longer leave the defense of a threatened town in order to bring the army to another hero.
AI will no longer send heroes to die outside of towns that already have a garrisioning hero inside, if there's a stronger enemy hero lurking around the town.
AI no longer rushes towns that don't have a citadel or better when there is a scary enemy hero around.
AI will no longer try to maximize defenses by using the strongest possible defender. Instead it will try to use the most appropriate defender. The most appropriate is considered to have roughly 75% power of the threat and the score will be lower but still above zero the bigger the deviation is.
Dismissing StayAtTown-tasks for heroes with less than 100 movement-points in order to avoid these tasks to be creates for heroes that have no movement over and over.
Resource-silo is now evaluated by it's output rather than like a building the AI doesn't know what it is good for.
AI should now try to maximize the highest mage-guild instead of building them slowly one by one.
Drastically reducing the score of dwelling-upgrades for upgrades the AI already has.
Heroes that are currently threatened anyways will be more brave and not care about going for things that are also threatened if there is nothing safe in range.
AI will no longer waste their heroe's MPs defending cities that don't have at least a Citatdel.
Reverted prior change that caused AI to no longer push for grey towns.
AI no longer thinks it can recharge their mana at towns without a mage-guild.
AI no longer treats neutral monsters as if they were their enemies.
Upgrading armies no longer has it's own priority-tier. It is now handled at the same-priority as hunter-gather.
Fixed an issue causing the AI to use evaluationContext.powerRatio as maxWillingToLose instead of evaluationContext.powerRatio * ai->settings->getMaxArmyLossTarget().
Defense-tasks no longer ignore maxWillingToLose when the target isn't a hero.
Basic dwellings get a score-boost to take into consideration that units are immediately hirerable as opposed to just being added at the beginning of next weak. This means they should win out against early Citadels more.
Handling for conditional quicker mage-guild-upgrading incase of caster-mains.
AI-heroes are reduce their confidence for attacks based on how many of the units they currently have stacks from exist somewhere else in their empire. So for example if an AI has 2 black-drakes while 3 more are waiting in their castle, they act as if their army was only 2/5th as strong as it is. This should make them more likely to first reinforce their army before attacking.
Changed the formula of scoring dwelling-upgrades in a way that doesn't overvalue upgrading vs. producing new units so much.
AI will no longer be so overconfident when fighting enemy heroes near their own castle. This lead to a lot of horrible trades, especially between different AI which made FFAs way easier in the long run.
AI should be better at preventing their enemies finding their towns undefended due to considering enemies that are not immediately in their castle's range too.
If only gold is missing but no special-resources the AI will no longer devalue what building it wants to build next and build something cheaper instead. This should lead to AI quicker reaching their tier 7 units and skipping some unnecessary lower tiers on the way to it.