1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-09 13:14:02 +02:00

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.
This commit is contained in:
Xilmi 2024-11-26 15:39:35 +01:00
parent cd65e69c91
commit 84571f1ae8

View File

@ -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());