1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +02:00

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.
This commit is contained in:
Xilmi 2025-02-04 17:44:00 +01:00 committed by Ivan Savenko
parent cf3eee5d8a
commit 82ab49495e

View File

@ -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;