1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

AI will actually attack all heroes when possible - and win the game eventually :)

This commit is contained in:
Tomasz Zieliński 2022-09-09 20:59:44 +02:00 committed by Andrii Danylchenko
parent 6fb7301e8e
commit f0bb97b0d2

View File

@ -297,7 +297,8 @@ float RewardEvaluator::getEnemyHeroStrategicalValue(const CGHeroInstance * enemy
vstd::amax(objectValue, getStrategicalValue(obj));
}
return objectValue / 2.0f + enemy->level / 15.0f;
//AI should absolutely prioritize killing enemy heroes, even scouts
return std::min(1.0f, objectValue * 0.9f + (1.0f - (1.0f / (1 + enemy->level))));
}
float RewardEvaluator::getResourceRequirementStrength(int resType) const