From 84571f1ae895fc1eb29b3c8513829656fab5cbf3 Mon Sep 17 00:00:00 2001 From: Xilmi Date: Tue, 26 Nov 2024 15:39:35 +0100 Subject: [PATCH] Update PriorityEvaluator.cpp Just killing stuff even if there is no apparent reason now also is considered for the mere purpose of gaining XP. This also helps the non-cheating AI to keep attacking enemies when they can't see anything worth exploring behind them. --- AI/Nullkiller/Engine/PriorityEvaluator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AI/Nullkiller/Engine/PriorityEvaluator.cpp b/AI/Nullkiller/Engine/PriorityEvaluator.cpp index a71d236db..eb42a0c1f 100644 --- a/AI/Nullkiller/Engine/PriorityEvaluator.cpp +++ b/AI/Nullkiller/Engine/PriorityEvaluator.cpp @@ -1052,6 +1052,8 @@ public: evaluationContext.isEnemy = true; evaluationContext.goldCost += evaluationContext.evaluator.getGoldCost(target, hero, army); evaluationContext.armyInvolvement += army->getArmyCost(); + if(evaluationContext.danger > 0) + evaluationContext.skillReward += (float)evaluationContext.danger / (float)hero->getArmyStrength(); } vstd::amax(evaluationContext.armyLossPersentage, (float)path.getTotalArmyLoss() / (float)army->getArmyStrength());