prevent AI to try to attack its allies, fix #2393
This was SVN commit r14721.
This commit is contained in:
parent
e21f052803
commit
5b506ceee3
@ -80,6 +80,9 @@ m.Defence.prototype.checkEnemyUnits = function(gameState)
|
||||
i++;
|
||||
else if (i === PlayerID)
|
||||
i = 1;
|
||||
|
||||
if (gameState.isPlayerAlly(i))
|
||||
return;
|
||||
|
||||
var filter = API3.Filters.and(API3.Filters.byClass("Unit"), API3.Filters.byOwner(i));
|
||||
var enemyUnits = gameState.updatingGlobalCollection("player-" +i + "-units", filter);
|
||||
|
Loading…
Reference in New Issue
Block a user