|
@@ -1490,7 +1490,7 @@ float PriorityEvaluator::evaluate(Goals::TSubgoal task, int priorityTier)
|
|
auto resourcesAvailable = evaluationContext.evaluator.ai->getFreeResources();
|
|
auto resourcesAvailable = evaluationContext.evaluator.ai->getFreeResources();
|
|
auto income = ai->buildAnalyzer->getDailyIncome();
|
|
auto income = ai->buildAnalyzer->getDailyIncome();
|
|
score /= evaluationContext.buildingCost.marketValue();
|
|
score /= evaluationContext.buildingCost.marketValue();
|
|
- if (resourcesAvailable.canAfford(evaluationContext.buildingCost))
|
|
|
|
|
|
+ if (!resourcesAvailable.canAfford(evaluationContext.buildingCost))
|
|
{
|
|
{
|
|
TResources needed = evaluationContext.buildingCost - resourcesAvailable;
|
|
TResources needed = evaluationContext.buildingCost - resourcesAvailable;
|
|
needed.positive();
|
|
needed.positive();
|