Differential D660 Diff 2665 ps/trunk/binaries/data/mods/public/simulation/ai/petra/startingStrategy.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/ai/petra/startingStrategy.js
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* load units and buildings from the config files | * load units and buildings from the config files | ||||
* TODO: change that to something dynamic | * TODO: change that to something dynamic | ||||
*/ | */ | ||||
m.HQ.prototype.structureAnalysis = function(gameState) | m.HQ.prototype.structureAnalysis = function(gameState) | ||||
{ | { | ||||
let civref = gameState.playerData.civ; | let civref = gameState.playerData.civ; | ||||
let civ = civref in this.Config.buildings.base ? civref : 'default'; | let civ = civref in this.Config.buildings.advanced ? civref : 'default'; | ||||
this.bBase = []; | |||||
for (let base of this.Config.buildings.base[civ]) | |||||
this.bBase.push(gameState.applyCiv(base)); | |||||
civ = civref in this.Config.buildings.advanced ? civref : 'default'; | |||||
this.bAdvanced = []; | this.bAdvanced = []; | ||||
for (let advanced of this.Config.buildings.advanced[civ]) | for (let advanced of this.Config.buildings.advanced[civ]) | ||||
if (!gameState.isTemplateDisabled(gameState.applyCiv(advanced))) | if (!gameState.isTemplateDisabled(gameState.applyCiv(advanced))) | ||||
this.bAdvanced.push(gameState.applyCiv(advanced)); | this.bAdvanced.push(gameState.applyCiv(advanced)); | ||||
}; | }; | ||||
/** | /** | ||||
* build our first base | * build our first base | ||||
▲ Show 20 Lines • Show All 290 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator