diff --git a/src/core/configuration/DevConfig.ts b/src/core/configuration/DevConfig.ts index f6cfe152d..d43510abf 100644 --- a/src/core/configuration/DevConfig.ts +++ b/src/core/configuration/DevConfig.ts @@ -24,12 +24,12 @@ export const devConfig = new class extends DefaultConfig { return 100 } - numBots(): number { - return 0 - } - spawnNPCs(): boolean { - return false - } + // numBots(): number { + // return 0 + // } + // spawnNPCs(): boolean { + // return false + // } // boatMaxDistance(): number { // return 2000 diff --git a/src/core/execution/DestroyerExecution.ts b/src/core/execution/DestroyerExecution.ts index a2ee21fe2..6b3e12556 100644 --- a/src/core/execution/DestroyerExecution.ts +++ b/src/core/execution/DestroyerExecution.ts @@ -77,6 +77,11 @@ export class DestroyerExecution implements Execution { } this.target = ships.sort(distSortUnit(this.destroyer))[0] } + if (!this.target.isActive() || this.target.owner() == this._owner) { + // Incase another destroyer captured or destroyed target + this.target = null + return + } for (let i = 0; i < 2; i++) { const result = this.pathfinder.nextTile(this.destroyer.tile(), this.target.tile(), 5)