浏览代码

Update PriorityEvaluator.cpp

Further working towards heroes avoiding danger.
Xilmi 1 年之前
父节点
当前提交
ec5da0e6b3
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      AI/Nullkiller/Engine/PriorityEvaluator.cpp

+ 5 - 0
AI/Nullkiller/Engine/PriorityEvaluator.cpp

@@ -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;
 			}
 		}