浏览代码

AI will actually attack all heroes when possible - and win the game eventually :)

Tomasz Zieliński 3 年之前
父节点
当前提交
f0bb97b0d2
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      AI/Nullkiller/Engine/PriorityEvaluator.cpp

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

@@ -297,7 +297,8 @@ float RewardEvaluator::getEnemyHeroStrategicalValue(const CGHeroInstance * enemy
 		vstd::amax(objectValue, getStrategicalValue(obj));
 	}
 
-	return objectValue / 2.0f + enemy->level / 15.0f;
+	//AI should absolutely prioritize killing enemy heroes, even scouts
+	return std::min(1.0f, objectValue * 0.9f + (1.0f - (1.0f / (1 + enemy->level))));
 }
 
 float RewardEvaluator::getResourceRequirementStrength(int resType) const