mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-16 10:19:47 +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:
parent
581a142a20
commit
5488a0a29c
@ -1426,36 +1426,6 @@ float PriorityEvaluator::evaluate(Goals::TSubgoal task, int priorityTier)
|
|||||||
score /= evaluationContext.movementCost;
|
score /= evaluationContext.movementCost;
|
||||||
break;
|
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
|
case PriorityTier::HUNTER_GATHER: //Collect guarded stuff
|
||||||
{
|
{
|
||||||
if (evaluationContext.enemyHeroDangerRatio > 1 && !evaluationContext.isDefend)
|
if (evaluationContext.enemyHeroDangerRatio > 1 && !evaluationContext.isDefend)
|
||||||
|
@ -110,7 +110,6 @@ public:
|
|||||||
INSTAKILL,
|
INSTAKILL,
|
||||||
INSTADEFEND,
|
INSTADEFEND,
|
||||||
KILL,
|
KILL,
|
||||||
GATHER,
|
|
||||||
HUNTER_GATHER,
|
HUNTER_GATHER,
|
||||||
DEFEND
|
DEFEND
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user