Browse Source

Fixed an issue that prevented AI from building stables

Prerequisites of dwellings now also inherit the armyStrength of their respective dwelling for the purpose of their evaluation.
Xilmi 10 months ago
parent
commit
82ab49495e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      AI/Nullkiller/Analyzers/BuildAnalyzer.cpp

+ 1 - 0
AI/Nullkiller/Analyzers/BuildAnalyzer.cpp

@@ -291,6 +291,7 @@ BuildingInfo BuildAnalyzer::getBuildingOrPrerequisite(
 				prerequisite.baseCreatureID = info.baseCreatureID;
 				prerequisite.prerequisitesCount++;
 				prerequisite.armyCost = info.armyCost;
+				prerequisite.armyStrength = info.armyStrength;
 				bool haveSameOrBetterFort = false;
 				if (prerequisite.id == BuildingID::FORT && highestFort >= CGTownInstance::EFortLevel::FORT)
 					haveSameOrBetterFort = true;