1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Nullkiller: hero chain stabilisation

This commit is contained in:
Andrii Danylchenko
2021-05-15 21:26:24 +03:00
committed by Andrii Danylchenko
parent dd046e60be
commit ff57a52001
2 changed files with 3 additions and 12 deletions

View File

@@ -43,8 +43,7 @@ Goals::TGoalVec CaptureObjectsBehavior::getTasks() {
vstd::erase_if(waysToVisitObj, [objToVisit](Goals::TSubgoal goal) -> bool
{
return !goal->hero.validAndSet()
|| !shouldVisit(goal->hero, objToVisit)
|| goal->evaluationContext.danger * 1.5 > goal->hero->getTotalStrength();
|| !shouldVisit(goal->hero, objToVisit);
});
if(waysToVisitObj.empty())