1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-18 03:21:27 +02:00

Update PriorityEvaluator.cpp

Further working towards heroes avoiding danger.
This commit is contained in:
Xilmi 2024-08-07 01:36:27 +02:00
parent b0e4551dbf
commit ec5da0e6b3

View File

@ -1466,6 +1466,11 @@ float PriorityEvaluator::evaluate(Goals::TSubgoal task, int priorityTier)
score /= turnsTo;
}
}
else
{
if (evaluationContext.enemyHeroDangerRatio > 0.5 && !evaluationContext.isDefend)
return 0;
}
break;
}
}