Make the ai aware ranges no longer have the barracks class

fixes 536d5e3af4

Patch By: Angen
Comments By: Nescio, Stan
Differential Revision: https://code.wildfiregames.com/D1857
This was SVN commit r22280.
This commit is contained in:
bb
2019-05-13 18:53:21 +00:00
parent 795e414663
commit 964934cf4e
2 changed files with 3 additions and 4 deletions
@@ -801,8 +801,8 @@ m.BaseManager.prototype.assignToFoundations = function(gameState, noRepair)
if (target.hasClass("Fortress") || target.hasClass("Wonder") ||
target.getMetadata(PlayerID, "phaseUp") == true)
targetNB = 7;
else if (target.hasClass("Barracks") || target.hasClass("DefenseTower") ||
target.hasClass("Market"))
else if (target.hasClass("Barracks") || target.hasClass("Range") || target.hasClass("Stable") ||
target.hasClass("DefenseTower") || target.hasClass("Market"))
targetNB = 4;
else if (target.hasClass("House") || target.hasClass("DropsiteWood"))
targetNB = 3;
@@ -1922,8 +1922,7 @@ m.HQ.prototype.constructTrainingBuildings = function(gameState, queues)
let barracksTemplate = this.canBuild(gameState, "structures/{civ}_barracks") ? "structures/{civ}_barracks" : undefined;
let rangeTemplate = this.canBuild(gameState, "structures/{civ}_range") ? "structures/{civ}_range" : undefined;
let numRanges = gameState.getOwnEntitiesByClass("Archery", true).length;
numBarracks -= numRanges;
let numRanges = gameState.getOwnEntitiesByClass("Range", true).length;
let stableTemplate = this.canBuild(gameState, "structures/{civ}_stables") ? "structures/{civ}_stables" :
this.canBuild(gameState, "structures/{civ}_stable") ? "structures/{civ}_stable" : undefined;