Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/ai/petra/attackManager.js
Show First 20 Lines • Show All 174 Lines • ▼ Show 20 Lines | for (let ent of bombers.values()) | ||||
if (alreadyBombing) | if (alreadyBombing) | ||||
break; | break; | ||||
let range = ent.attackRange("Ranged").max; | let range = ent.attackRange("Ranged").max; | ||||
let entPos = ent.position(); | let entPos = ent.position(); | ||||
let access = PETRA.getLandAccess(gameState, ent); | let access = PETRA.getLandAccess(gameState, ent); | ||||
for (let struct of gameState.getEnemyStructures().values()) | for (let struct of gameState.getEnemyStructures().values()) | ||||
{ | { | ||||
if (!ent.canAttackTarget(struct.id(), PETRA.allowCapture(gameState, ent, struct.id()))) | |||||
Silier: `ERROR: JavaScript error: simulation/ai/petra/entityExtend.js line 138 TypeError: target. | |||||
continue; | |||||
let structPos = struct.position(); | let structPos = struct.position(); | ||||
let x; | let x; | ||||
let z; | let z; | ||||
if (struct.hasClass("Field")) | if (struct.hasClass("Field")) | ||||
{ | { | ||||
if (!struct.resourceSupplyNumGatherers() || | if (!struct.resourceSupplyNumGatherers() || | ||||
!gameState.isPlayerEnemy(gameState.ai.HQ.territoryMap.getOwner(structPos))) | !gameState.isPlayerEnemy(gameState.ai.HQ.territoryMap.getOwner(structPos))) | ||||
continue; | continue; | ||||
▲ Show 20 Lines • Show All 610 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
ERROR: JavaScript error: simulation/ai/petra/entityExtend.js line 138 TypeError: target.isCapturable is not a function PETRA.allowCapture@simulation/ai/petra/entityExtend.js:138:7 PETRA.AttackManager.prototype.assignBombers@simulation/ai/petra/attackManager.js:183:42 PETRA.AttackManager.prototype.update@simulation/ai/petra/attackManager.js:381:3 PETRA.HQ.prototype.update@simulation/ai/petra/headquarters.js:2772:3 PETRA.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:118:3 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:2