Skip to content

Commit

Permalink
Fixing lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Roy committed Jun 13, 2019
1 parent 42cd688 commit 4cd2b89
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
8 changes: 3 additions & 5 deletions src/directives/defense/invasionDefense.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -25,8 +25,6 @@ export class DirectiveInvasionDefense extends Directive {

memory: DirectiveInvasionDefenseMemory;
room: Room | undefined;
safeEndTime: 300;
safeSpawnHaltTime: 100;

private relocateFrequency: number;

Expand Down
4 changes: 2 additions & 2 deletions src/overlords/defense/bunkerDefense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/overlords/defense/rangedDefense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
}

Expand Down
8 changes: 3 additions & 5 deletions src/zerg/CombatZerg.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 4cd2b89

Please sign in to comment.