1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-10 22:31:40 +02:00

Update RecruitHeroBehavior.cpp

closestThreat was supposed to be < 1, not < 0
This commit is contained in:
Xilmi
2024-12-17 12:03:46 +01:00
parent aff73b6e65
commit 64ad060846

View File

@@ -98,7 +98,7 @@ Goals::TGoalVec RecruitHeroBehavior::decompose(const Nullkiller * ai) const
for(auto hero : availableHeroes) for(auto hero : availableHeroes)
{ {
if ((town->visitingHero || town->garrisonHero) if ((town->visitingHero || town->garrisonHero)
&& closestThreat < 0 && closestThreat < 1
&& hero->getArmyCost() < GameConstants::HERO_GOLD_COST / 3.0) && hero->getArmyCost() < GameConstants::HERO_GOLD_COST / 3.0)
continue; continue;
auto score = ai->heroManager->evaluateHero(hero); auto score = ai->heroManager->evaluateHero(hero);