瀏覽代碼

Update PriorityEvaluator.cpp

AI will be more aggressive when defending their territory. And more aggressive means more willing to take losses while fighting.
Xilmi 1 年之前
父節點
當前提交
eb94c9f0be
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      AI/Nullkiller/Engine/PriorityEvaluator.cpp

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

@@ -1345,7 +1345,7 @@ float PriorityEvaluator::evaluate(Goals::TSubgoal task, int priorityTier)
 	else
 	{
 		float score = 0;
-		float maxWillingToLose = ai->cb->getTownsInfo().empty() ? 1 : 0.25;
+		float maxWillingToLose = ai->cb->getTownsInfo().empty() || (evaluationContext.isDefend && evaluationContext.threatTurns == 0) ? 1 : 0.25;
 
 		bool arriveNextWeek = false;
 		if (ai->cb->getDate(Date::DAY_OF_WEEK) + evaluationContext.turn > 7)