diff warfare.pl @ 338:824f949bc484

we attack zero army victim every 3 days
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Thu, 12 Feb 2009 03:59:24 +0800
parents 118605b58d09
children
line wrap: on
line diff
--- a/warfare.pl	Thu Feb 12 03:25:32 2009 +0800
+++ b/warfare.pl	Thu Feb 12 03:59:24 2009 +0800
@@ -108,7 +108,7 @@
         }
 
         # check if we over-attacked
-        my $c = Ikariam::Report->search_victim($city->cityId, time - 24*60*60 - 7*60*60)->count();
+        my $c = Ikariam::Report->search_victim($city->cityId, time - 24*60*60 * 3)->count();
         # check the current plunders
         foreach (@{$self->{ikariam}->{'military'}->{'homeland'}}) {
             # counting for both leaving and coming back.
@@ -117,7 +117,7 @@
             # we don't attack same city twice at same time.
             next CITY if($_->{to} == $city->cityId);
         }
-        next CITY if($c >= 1);
+        next CITY if($c ge 1);
 
         my $capture = $city->citylevel * ($city->citylevel - 1) * $sheep->trader_score_secondary / 10000;
         next if($capture < 1500);