Fixed qbot for the scout tower to defense tower rename and updated the build restriction for the defense tower for consistent naming.
This was SVN commit r11024.
This commit is contained in:
parent
a61a682e2a
commit
867df2e6c1
@ -448,17 +448,17 @@ MilitaryAttackManager.prototype.measureEnemyStrength = function(gameState){
|
||||
|
||||
// Adds towers to the defenceBuilding queue
|
||||
MilitaryAttackManager.prototype.buildDefences = function(gameState, queues){
|
||||
if (gameState.countEntitiesAndQueuedWithType(gameState.applyCiv('structures/{civ}_scout_tower'))
|
||||
+ queues.defenceBuilding.totalLength() < gameState.getBuildLimits()["ScoutTower"]) {
|
||||
if (gameState.countEntitiesAndQueuedWithType(gameState.applyCiv('structures/{civ}_defense_tower'))
|
||||
+ queues.defenceBuilding.totalLength() < gameState.getBuildLimits()["DefenseTower"]) {
|
||||
|
||||
|
||||
gameState.getOwnEntities().forEach(function(dropsiteEnt) {
|
||||
if (dropsiteEnt.resourceDropsiteTypes() && dropsiteEnt.getMetadata("scoutTower") !== true){
|
||||
if (dropsiteEnt.resourceDropsiteTypes() && dropsiteEnt.getMetadata("defenseTower") !== true){
|
||||
var position = dropsiteEnt.position();
|
||||
if (position){
|
||||
queues.defenceBuilding.addItem(new BuildingConstructionPlan(gameState, 'structures/{civ}_scout_tower', position));
|
||||
queues.defenceBuilding.addItem(new BuildingConstructionPlan(gameState, 'structures/{civ}_defense_tower', position));
|
||||
}
|
||||
dropsiteEnt.setMetadata("scoutTower", true);
|
||||
dropsiteEnt.setMetadata("defenseTower", true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ BuildLimits.prototype.Schema =
|
||||
"<a:example>" +
|
||||
"<Limits>" +
|
||||
"<CivilCentre/>" +
|
||||
"<ScoutTower>25</ScoutTower>" +
|
||||
"<DefenseTower>25</DefenseTower>" +
|
||||
"<Fortress>10</Fortress>" +
|
||||
"<Special>" +
|
||||
"<LimitPerCivCentre>1</LimitPerCivCentre>" +
|
||||
|
@ -35,7 +35,7 @@ BuildRestrictions.prototype.Schema =
|
||||
"<choice>" +
|
||||
"<value>CivilCentre</value>" +
|
||||
"<value>House</value>" +
|
||||
"<value>ScoutTower</value>" +
|
||||
"<value>DefenseTower</value>" +
|
||||
"<value>Farmstead</value>" +
|
||||
"<value>Market</value>" +
|
||||
"<value>Barracks</value>" +
|
||||
|
@ -4,7 +4,7 @@
|
||||
<LimitMultiplier>1.0</LimitMultiplier>
|
||||
<Limits>
|
||||
<CivilCentre/>
|
||||
<ScoutTower>25</ScoutTower>
|
||||
<DefenseTower>25</DefenseTower>
|
||||
<Fortress>10</Fortress>
|
||||
</Limits>
|
||||
</BuildLimits>
|
||||
|
@ -22,7 +22,7 @@
|
||||
<GarrisonArrowMultiplier>1</GarrisonArrowMultiplier>
|
||||
</BuildingAI>
|
||||
<BuildRestrictions>
|
||||
<Category>ScoutTower</Category>
|
||||
<Category>DefenseTower</Category>
|
||||
</BuildRestrictions>
|
||||
<Cost>
|
||||
<BuildTime>120</BuildTime>
|
||||
|
Loading…
Reference in New Issue
Block a user