1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-15 11:46:56 +02:00

Merge branch 'develop' of https://github.com/xilmi/vcmi into develop

This commit is contained in:
Xilmi 2024-09-05 16:40:21 +02:00
commit d5d9f3cb7d

View File

@ -87,7 +87,7 @@ Goals::TGoalVec RecruitHeroBehavior::decompose(const Nullkiller * ai) const
score *= hero->getArmyCost(); score *= hero->getArmyCost();
if (hero->type->heroClass->faction == town->getFaction()) if (hero->type->heroClass->faction == town->getFaction())
score *= 1.5; score *= 1.5;
if (visitability == 0) if (vstd::isAlmostZero(visitability))
score *= 30 * town->getTownLevel(); score *= 30 * town->getTownLevel();
else else
score *= town->getTownLevel() / visitability; score *= town->getTownLevel() / visitability;