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:
committed by
Andrii Danylchenko
parent
cbf2a1b7cc
commit
a83753a7d2
@@ -507,6 +507,9 @@ int32_t RewardEvaluator::getGoldReward(const CGObjectInstance * target, const CG
|
|||||||
return 1500;
|
return 1500;
|
||||||
case Obj::PANDORAS_BOX:
|
case Obj::PANDORAS_BOX:
|
||||||
return 5000;
|
return 5000;
|
||||||
|
case Obj::PRISON:
|
||||||
|
//Objectively saves us 2500 to hire hero
|
||||||
|
return GameConstants::HERO_GOLD_COST;
|
||||||
case Obj::HERO:
|
case Obj::HERO:
|
||||||
return ai->cb->getPlayerRelations(target->tempOwner, ai->playerID) == PlayerRelations::ENEMIES
|
return ai->cb->getPlayerRelations(target->tempOwner, ai->playerID) == PlayerRelations::ENEMIES
|
||||||
? heroEliminationBonus + enemyArmyEliminationGoldRewardRatio * getArmyCost(dynamic_cast<const CGHeroInstance *>(target))
|
? heroEliminationBonus + enemyArmyEliminationGoldRewardRatio * getArmyCost(dynamic_cast<const CGHeroInstance *>(target))
|
||||||
|
Reference in New Issue
Block a user