1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +02:00
Ivan Savenko f238d89601 NKAI - Prefer giving fast units to scouts
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
2025-02-11 16:37:54 +00:00
..
2024-10-01 17:20:54 +02:00
2024-06-17 09:43:22 +00:00