mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-22 20:55:49 +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") ||
|
if (target.hasClass("Fortress") || target.hasClass("Wonder") ||
|
||||||
target.getMetadata(PlayerID, "phaseUp") == true)
|
target.getMetadata(PlayerID, "phaseUp") == true)
|
||||||
targetNB = 7;
|
targetNB = 7;
|
||||||
else if (target.hasClass("Barracks") || target.hasClass("DefenseTower") ||
|
else if (target.hasClass("Barracks") || target.hasClass("Range") || target.hasClass("Stable") ||
|
||||||
target.hasClass("Market"))
|
target.hasClass("DefenseTower") || target.hasClass("Market"))
|
||||||
targetNB = 4;
|
targetNB = 4;
|
||||||
else if (target.hasClass("House") || target.hasClass("DropsiteWood"))
|
else if (target.hasClass("House") || target.hasClass("DropsiteWood"))
|
||||||
targetNB = 3;
|
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 barracksTemplate = this.canBuild(gameState, "structures/{civ}_barracks") ? "structures/{civ}_barracks" : undefined;
|
||||||
|
|
||||||
let rangeTemplate = this.canBuild(gameState, "structures/{civ}_range") ? "structures/{civ}_range" : undefined;
|
let rangeTemplate = this.canBuild(gameState, "structures/{civ}_range") ? "structures/{civ}_range" : undefined;
|
||||||
let numRanges = gameState.getOwnEntitiesByClass("Archery", true).length;
|
let numRanges = gameState.getOwnEntitiesByClass("Range", true).length;
|
||||||
numBarracks -= numRanges;
|
|
||||||
|
|
||||||
let stableTemplate = this.canBuild(gameState, "structures/{civ}_stables") ? "structures/{civ}_stables" :
|
let stableTemplate = this.canBuild(gameState, "structures/{civ}_stables") ? "structures/{civ}_stables" :
|
||||||
this.canBuild(gameState, "structures/{civ}_stable") ? "structures/{civ}_stable" : undefined;
|
this.canBuild(gameState, "structures/{civ}_stable") ? "structures/{civ}_stable" : undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user