1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00

Removed the "GATHER"-priorityTier

There was no real need for it to be a separated tier from Hunter_gather.
This commit is contained in:
Xilmi 2024-09-05 19:35:47 +02:00
parent 581a142a20
commit 5488a0a29c
2 changed files with 0 additions and 31 deletions

View File

@ -1426,36 +1426,6 @@ float PriorityEvaluator::evaluate(Goals::TSubgoal task, int priorityTier)
score /= evaluationContext.movementCost;
break;
}
case PriorityTier::GATHER: //Collect unguarded stuff
{
if (evaluationContext.enemyHeroDangerRatio > 1)
return 0;
if (evaluationContext.isDefend)
return 0;
if (evaluationContext.armyLossPersentage > 0)
return 0;
if (evaluationContext.involvesSailing && evaluationContext.movementCostByRole[HeroRole::MAIN] > 0)
return 0;
if (evaluationContext.buildingCost.marketValue() > 0)
return 0;
if (evaluationContext.closestWayRatio < 1)
return 0;
score += evaluationContext.strategicalValue * 1000;
score += evaluationContext.goldReward;
score += evaluationContext.skillReward * evaluationContext.armyInvolvement * (1 - evaluationContext.armyLossPersentage) * 0.05;
score += evaluationContext.armyReward;
score += evaluationContext.armyGrowth;
if (score <= 0)
return 0;
else
score = 1000;
score *= evaluationContext.closestWayRatio;
if (evaluationContext.threat > evaluationContext.armyInvolvement && !evaluationContext.isDefend)
score *= evaluationContext.armyInvolvement / evaluationContext.threat;
if (evaluationContext.movementCost > 0)
score /= evaluationContext.movementCost;
break;
}
case PriorityTier::HUNTER_GATHER: //Collect guarded stuff
{
if (evaluationContext.enemyHeroDangerRatio > 1 && !evaluationContext.isDefend)

View File

@ -110,7 +110,6 @@ public:
INSTAKILL,
INSTADEFEND,
KILL,
GATHER,
HUNTER_GATHER,
DEFEND
};