diff --git a/binaries/data/mods/public/simulation/ai/petra/attackPlan.js b/binaries/data/mods/public/simulation/ai/petra/attackPlan.js index 70da9da68b..aae83e746e 100644 --- a/binaries/data/mods/public/simulation/ai/petra/attackPlan.js +++ b/binaries/data/mods/public/simulation/ai/petra/attackPlan.js @@ -1801,13 +1801,10 @@ m.AttackPlan.prototype.UpdateWalking = function(gameState, events) this.state = "arrived"; return true; } - else // abort plan - { - if (this.Config.debug > 1) - API3.warn("Attack Plan " + this.type + " " + this.name + " has met walls and gives up."); - return false; - } - break; + // abort plan + if (this.Config.debug > 1) + API3.warn("Attack Plan " + this.type + " " + this.name + " has met walls and gives up."); + return false; } //this.unitCollection.move(this.path[0][0], this.path[0][1]); diff --git a/binaries/data/mods/public/simulation/ai/petra/baseManager.js b/binaries/data/mods/public/simulation/ai/petra/baseManager.js index 7cec50dddf..a20c0d5d44 100644 --- a/binaries/data/mods/public/simulation/ai/petra/baseManager.js +++ b/binaries/data/mods/public/simulation/ai/petra/baseManager.js @@ -829,7 +829,7 @@ m.BaseManager.prototype.assignToFoundations = function(gameState, noRepair) for (let target of damagedBuildings.values()) { - // Don't repair if we're still under attack, unless it's a vital (civcentre or wall) building + // Don't repair if we're still under attack, unless it's a vital (civcentre or wall) building // that's being destroyed. if (gameState.ai.HQ.isNearInvadingArmy(target.position())) if (target.healthLevel() > 0.5 ||