mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 04:05:32 +00:00
fixes some AI errors
This was SVN commit r14761.
This commit is contained in:
@@ -71,7 +71,7 @@ m.DefenseArmy.prototype.assignUnit = function (gameState, entID)
|
||||
this.assignedAgainst[maxEnt].push(entID);
|
||||
this.assignedTo[entID] = maxEnt;
|
||||
|
||||
ent.attack(id);
|
||||
ent.attack(maxEnt);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -802,7 +802,8 @@ m.HQ.prototype.buildMoreHouses = function(gameState,queues) {
|
||||
var HouseNb = gameState.countEntitiesByType(gameState.applyCiv("foundation|structures/{civ}_house"), true);
|
||||
|
||||
var freeSlots = 0;
|
||||
if (gameState.civ() == "gaul" || gameState.civ() == "brit" || gameState.civ() == "iber")
|
||||
if (gameState.civ() == "gaul" || gameState.civ() == "brit" || gameState.civ() == "iber" ||
|
||||
gameState.civ() == "maur" || gameState.civ() == "ptol")
|
||||
freeSlots = gameState.getPopulationLimit() + HouseNb*5 - gameState.getPopulation();
|
||||
else
|
||||
freeSlots = gameState.getPopulationLimit() + HouseNb*10 - gameState.getPopulation();
|
||||
|
||||
Reference in New Issue
Block a user