1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-08 00:39:47 +02:00

Hero hiring adjustments

The AI is now a lot more likely to buy a hero early on when that hero's army is worth more than half the cost of the hero, regardless of other circumstances.
This commit is contained in:
Xilmi 2024-12-02 15:11:39 +01:00
parent 85b29e453d
commit 34b8123fba
2 changed files with 2 additions and 1 deletions

View File

@ -505,7 +505,7 @@ void ObjectClusterizer::clusterizeObject(
else if (priority <= 0)
continue;
bool interestingObject = path.turn() <= 2 || priority > 0.5f;
bool interestingObject = path.turn() <= 2 || priority > ai->settings->isUseFuzzy() ? 0.5f : 0;
if(interestingObject)
{

View File

@ -124,6 +124,7 @@ Goals::TGoalVec RecruitHeroBehavior::decompose(const Nullkiller * ai) const
{
if (ai->cb->getHeroesInfo().size() == 0
|| treasureSourcesCount > ai->cb->getHeroesInfo().size() * 5
|| bestHeroToHire->getArmyCost() > GameConstants::HERO_GOLD_COST / 2.0
|| (ai->getFreeResources()[EGameResID::GOLD] > 10000 && !ai->buildAnalyzer->isGoldPressureHigh() && haveCapitol)
|| (ai->getFreeResources()[EGameResID::GOLD] > 30000 && !ai->buildAnalyzer->isGoldPressureHigh()))
{