Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Have saben launch less frequently from colony.

  • Loading branch information...
commit 891e5a21bd8a7f2e492c72bec168e34f66908bdb 1 parent 9e6833e
@lemming552 lemming552 authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 bin/saben/send_attack.pl
View
6 bin/saben/send_attack.pl
@@ -44,6 +44,10 @@
while (my $attacking_colony = $colonies->next) {
out('Found colony to attack from named '.$attacking_colony->name);
+ if ($cache->get('saben_attack',$attacking_colony->id)) {
+ out('Attacked recently from '.$attacking_colony->name);
+ next;
+ }
$ai->destroy_world($attacking_colony);
out('Finding target body to attack...');
@@ -74,6 +78,8 @@
push @attacks, $ai->start_attack($attacking_colony, $target_colony, [qw(sweeper bleeder snark1 snark2 snark3)]);
$cache->set('saben_attack',$attacking_colony->id.'-'.$target_colony->empire_id, 1, 60 * 60 * 72);
}
+ my $rest = randint(18,36);
+ $cache->set('saben_attack',$attacking_colony->id, 1, 60 * 60 * $rest);
}
out("Waiting on attacks...");
Please sign in to comment.
Something went wrong with that request. Please try again.