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

This commit is contained in:
Tomasz Zieliński
2022-09-11 11:31:27 +03:00
committed by Andrii Danylchenko
parent 6fb7301e8e
commit f0bb97b0d2
+2 -1
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