Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/researchManager.js
Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | if (gameState.currentPhase() < 3) | ||||
return; | return; | ||||
// remove some techs not yet used by this AI | // remove some techs not yet used by this AI | ||||
// remove also sharedLos if we have no ally | // remove also sharedLos if we have no ally | ||||
for (let i = 0; i < techs.length; ++i) | for (let i = 0; i < techs.length; ++i) | ||||
{ | { | ||||
let template = techs[i][1]._template; | let template = techs[i][1]._template; | ||||
if (template.affects && template.affects.length === 1 && | if (template.affects && template.affects.length === 1 && | ||||
(template.affects[0] === "Healer" || template.affects[0] === "Outpost" || template.affects[0] === "Wall")) | (template.affects[0] === "Healer" || template.affects[0] === "Lookout" || template.affects[0] === "Wall")) | ||||
{ | { | ||||
techs.splice(i--, 1); | techs.splice(i--, 1); | ||||
continue; | continue; | ||||
} | } | ||||
if (template.modifications && template.modifications.length === 1 && | if (template.modifications && template.modifications.length === 1 && | ||||
template.modifications[0].value === "Player/sharedLos" && | template.modifications[0].value === "Player/sharedLos" && | ||||
!gameState.hasAllies()) | !gameState.hasAllies()) | ||||
{ | { | ||||
Show All 27 Lines |
Wildfire Games · Phabricator