Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/startingStrategy.js
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | if (pos && bestbase.ID !== this.baseManagers[0].ID) | ||||
bestbase.workerObject.update(gameState, ent); | bestbase.workerObject.update(gameState, ent); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
/** | /** | ||||
* determine the main land Index (or water index if none) | * determine the main land Index (or water index if none) | ||||
* as well as the list of allowed (land andf water) regions | * as well as the list of allowed (land and water) regions | ||||
*/ | */ | ||||
PETRA.HQ.prototype.regionAnalysis = function(gameState) | PETRA.HQ.prototype.regionAnalysis = function(gameState) | ||||
{ | { | ||||
let accessibility = gameState.ai.accessibility; | let accessibility = gameState.ai.accessibility; | ||||
let landIndex; | let landIndex; | ||||
let seaIndex; | let seaIndex; | ||||
let ccEnts = gameState.getOwnStructures().filter(API3.Filters.byClass("CivCentre")); | let ccEnts = gameState.getOwnStructures().filter(API3.Filters.byClass("CivCentre")); | ||||
for (let cc of ccEnts.values()) | for (let cc of ccEnts.values()) | ||||
▲ Show 20 Lines • Show All 427 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator