mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-20 06:45:37 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user