diff --git a/src/directives/defense/invasionDefense.ts b/src/directives/defense/invasionDefense.ts index 1c19c65a8..192854f88 100644 --- a/src/directives/defense/invasionDefense.ts +++ b/src/directives/defense/invasionDefense.ts @@ -1,11 +1,11 @@ import {ColonyStage} from '../../Colony'; import {CombatIntel} from '../../intel/CombatIntel'; +import {Directive} from '../Directive'; +import {BunkerDefenseOverlord} from '../../overlords/defense/bunkerDefense'; import {MeleeDefenseOverlord} from '../../overlords/defense/meleeDefense'; import {RangedDefenseOverlord} from '../../overlords/defense/rangedDefense'; -import {profile} from '../../profiler/decorator'; -import {Directive} from '../Directive'; import {NotifierPriority} from '../Notifier'; -import {BunkerDefenseOverlord} from "../../overlords/defense/bunkerDefense"; +import {profile} from '../../profiler/decorator'; interface DirectiveInvasionDefenseMemory extends FlagMemory { persistent?: boolean; @@ -25,8 +25,6 @@ export class DirectiveInvasionDefense extends Directive { memory: DirectiveInvasionDefenseMemory; room: Room | undefined; - safeEndTime: 300; - safeSpawnHaltTime: 100; private relocateFrequency: number; diff --git a/src/overlords/defense/bunkerDefense.ts b/src/overlords/defense/bunkerDefense.ts index fc902d3cb..08e59c4b8 100644 --- a/src/overlords/defense/bunkerDefense.ts +++ b/src/overlords/defense/bunkerDefense.ts @@ -5,7 +5,7 @@ import {profile} from '../../profiler/decorator'; import {boostResources} from '../../resources/map_resources'; import {CombatZerg} from '../../zerg/CombatZerg'; import {CombatOverlord} from '../CombatOverlord'; -import {log} from "../../console/log"; +import {log} from '../../console/log'; /** * Spawns bunker-only defenders to defend against incoming sieges @@ -52,7 +52,7 @@ export class BunkerDefenseOverlord extends CombatOverlord { this.wishlist(1, setup); } else { const setup = CombatSetups.bunkerGuard.halfMove; - this.wishlist(2, setup); + this.wishlist(1, setup); } } diff --git a/src/overlords/defense/rangedDefense.ts b/src/overlords/defense/rangedDefense.ts index e6a432e0f..1ce728d34 100644 --- a/src/overlords/defense/rangedDefense.ts +++ b/src/overlords/defense/rangedDefense.ts @@ -27,8 +27,8 @@ export class RangedDefenseOverlord extends CombatOverlord { priority = OverlordPriority.defense.rangedDefense) { super(directive, 'rangedDefense', priority, 1); this.hydralisks = this.combatZerg(Roles.ranged, { - boostWishlist: boosted ? [boostResources.tough[3], boostResources.ranged_attack[3], boostResources.heal[3], boostResources.move[3]] - : undefined + boostWishlist: boosted ? [boostResources.tough[3], boostResources.ranged_attack[3], + boostResources.heal[3], boostResources.move[3]] : undefined }); } diff --git a/src/zerg/CombatZerg.ts b/src/zerg/CombatZerg.ts index 1707ff9d7..3ce8e3239 100644 --- a/src/zerg/CombatZerg.ts +++ b/src/zerg/CombatZerg.ts @@ -1,12 +1,11 @@ import {CombatIntel} from '../intel/CombatIntel'; +import {insideBunkerBounds} from '../roomPlanner/layouts/bunker'; import {Movement, NO_ACTION} from '../movement/Movement'; import {profile} from '../profiler/decorator'; import {CombatTargeting} from '../targeting/CombatTargeting'; import {GoalFinder} from '../targeting/GoalFinder'; import {randomHex} from '../utilities/utils'; import {Zerg} from './Zerg'; -import {insideBunkerBounds} from "../roomPlanner/layouts/bunker"; -import {Colony} from "../Colony"; interface CombatZergMemory extends CreepMemory { recovering: boolean; @@ -287,10 +286,9 @@ export class CombatZerg extends Zerg { return this.goToRoom(roomName, {ensurePath: true}); } - //let colony = Overmind.colonies[Overmind.colonyMap[roomName]] as Colony | undefined; // TODO check if right colony - let siegingCreeps = this.room.hostiles.filter(creep => _.any(creep.pos.neighbors, pos => insideBunkerBounds(pos, this.colony))); - + const siegingCreeps = this.room.hostiles.filter(creep => + _.any(creep.pos.neighbors, pos => insideBunkerBounds(pos, this.colony))); const target = CombatTargeting.findTarget(this, siegingCreeps);