1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

- AI will now use SectorMap to find a way to guarded / covered objects.

- Improvements to SectorMap needed for use of multiple heroes
This commit is contained in:
DjWarmonger
2014-02-15 16:38:51 +00:00
parent d01b84b460
commit d8933b5c36
4 changed files with 97 additions and 54 deletions

View File

@@ -476,7 +476,7 @@ float FuzzyHelper::evaluate (Goals::GatherArmy & g)
//the more army we need, the more important goal
//the more army we lack, the less important goal
float army = g.hero->getArmyStrength();
return g.value / std::min(g.value - army, 1000.0f);
return g.value / std::max(g.value - army, 1000.0f);
}
float FuzzyHelper::evaluate (Goals::BuildThis & g)
{