fixes some AI errors

This was SVN commit r14761.
This commit is contained in:
mimo
2014-02-18 18:19:33 +00:00
parent 039b06e012
commit a4ec034bb5
2 changed files with 3 additions and 2 deletions
@@ -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();