Browse Source

AI will now pick Prisons if possible

Tomasz Zieliński 3 years ago
parent
commit
a83753a7d2
1 changed files with 3 additions and 0 deletions
  1. 3 0
      AI/Nullkiller/Engine/PriorityEvaluator.cpp

+ 3 - 0
AI/Nullkiller/Engine/PriorityEvaluator.cpp

@@ -507,6 +507,9 @@ int32_t RewardEvaluator::getGoldReward(const CGObjectInstance * target, const CG
 		return 1500;
 	case Obj::PANDORAS_BOX:
 		return 5000;
+	case Obj::PRISON:
+		//Objectively saves us 2500 to hire hero
+		return GameConstants::HERO_GOLD_COST;
 	case Obj::HERO:
 		return ai->cb->getPlayerRelations(target->tempOwner, ai->playerID) == PlayerRelations::ENEMIES
 			? heroEliminationBonus + enemyArmyEliminationGoldRewardRatio * getArmyCost(dynamic_cast<const CGHeroInstance *>(target))