Skip to content

Commit

Permalink
allow out-of-spawn boosting now that pre-boosting has been removed
Browse files Browse the repository at this point in the history
  • Loading branch information
bencbartlett committed Dec 17, 2018
1 parent 72b85cb commit d54e4ed
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/overlords/Overlord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,12 +380,15 @@ export abstract class Overlord {
(creep.ticksToLive && creep.ticksToLive < MIN_LIFETIME_FOR_BOOST * creep.lifetime)) {
return false;
}
// If you're in a bunker layout at level 8 with max labs, only boost while spawning
if (onlyBoostInSpawn && this.colony.bunker && this.colony.level == 8 && this.colony.labs.length == 10) {
if (!creep.spawning) {
return false;
}
}

// EDIT: they removed in-spawn boosting... RIP :(
// // If you're in a bunker layout at level 8 with max labs, only boost while spawning
// if (onlyBoostInSpawn && this.colony.bunker && this.colony.level == 8 && this.colony.labs.length == 10) {
// if (!creep.spawning) {
// return false;
// }
// }

This comment has been minimized.

Copy link
@Evanito

Evanito Dec 28, 2018

Still tries to boost while spawning, just gets error code -7 until eventually getting 0

Looks like you can keep this if statement but invert it and it would do the trick.


// Otherwise just boost if you need it and can get the resources
if (this.boosts[creep.roleName]) {
let boosts = _.filter(this.boosts[creep.roleName]!,
Expand Down

0 comments on commit d54e4ed

Please sign in to comment.