1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-05 15:05:40 +02:00

Update PriorityEvaluator.cpp

Revert change that made AI too passive.
This commit is contained in:
Xilmi 2024-08-18 21:22:05 +02:00
parent e6d907af55
commit 00e5770aa3

View File

@ -1389,8 +1389,6 @@ float PriorityEvaluator::evaluate(Goals::TSubgoal task, int priorityTier)
//score += evaluationContext.conquestValue * 1000;
if(evaluationContext.conquestValue > 0 || (evaluationContext.defenseValue >= CGTownInstance::EFortLevel::CITADEL && evaluationContext.turn <= 1 && evaluationContext.threat > evaluationContext.armyInvolvement && evaluationContext.threatTurns <= 1))
score = 1000;
if (evaluationContext.isEnemy && evaluationContext.turn > 0 && !ai->cb->getTownsInfo().empty())
return 0;
if (score == 0 || (evaluationContext.enemyHeroDangerRatio > 1 && evaluationContext.turn > 0 && !ai->cb->getTownsInfo().empty()))
return 0;
if (maxWillingToLose - evaluationContext.armyLossPersentage < 0)