1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Nullkiller: stabilization

This commit is contained in:
Andrii Danylchenko
2021-05-16 14:57:36 +03:00
committed by Andrii Danylchenko
parent f2c26d7553
commit 80df879489
3 changed files with 7 additions and 1 deletions

View File

@@ -316,6 +316,9 @@ float RewardEvaluator::getStrategicalValue(const CGObjectInstance * target) cons
return target->subID == Res::GOLD ? 0 : 0.1f * getResourceRequirementStrength(target->subID);
case Obj::TOWN:
if(ai->buildAnalyzer->getDevelopmentInfo().empty())
return 1;
return dynamic_cast<const CGTownInstance *>(target)->hasFort()
? (target->tempOwner == PlayerColor::NEUTRAL ? 0.8f : 1.0f)
: 0.5f;