1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

AI will now pick Prisons if possible

This commit is contained in:
Tomasz Zieliński
2022-09-09 19:21:36 +02:00
committed by Andrii Danylchenko
parent cbf2a1b7cc
commit a83753a7d2

View File

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