Browse Source

Update PriorityEvaluator.cpp

The army loss will no longer affect the score for defensive decisions.
Xilmi 1 year ago
parent
commit
76f5d925e6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      AI/Nullkiller/Engine/PriorityEvaluator.cpp

+ 2 - 2
AI/Nullkiller/Engine/PriorityEvaluator.cpp

@@ -1401,8 +1401,8 @@ float PriorityEvaluator::evaluate(Goals::TSubgoal task, int priorityTier)
 			{
 				if (evaluationContext.isDefend && evaluationContext.threatTurns == 0 && evaluationContext.turn == 0)
 					score = evaluationContext.armyInvolvement;
-				if (evaluationContext.isEnemy)
-					score *= (maxWillingToLose - evaluationContext.armyLossPersentage);
+				if (evaluationContext.isEnemy && maxWillingToLose - evaluationContext.armyLossPersentage < 0)
+					return 0;
 				score *= evaluationContext.closestWayRatio;
 				break;
 			}