changeset 266:53827cc442b6

we attack same city 6 times, if the owner is inactive.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Tue, 25 Nov 2008 23:06:47 +0800
parents aaffc50e3318
children 06ee88d2bb2a
files warfare.pl
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/warfare.pl	Tue Nov 25 20:15:26 2008 +0800
+++ b/warfare.pl	Tue Nov 25 23:06:47 2008 +0800
@@ -116,7 +116,11 @@
             next CITY if($_->{to} == $city->cityId);
         }
         # we attack one city maximum 4 times a day.
-        next CITY if($c >= 4);
+        if ($city->status eq 'i') {
+            next CITY if($c >= 6);
+        } else {
+            next CITY if($c >= 4);
+        }
 
         my $capture = $city->citylevel * ($city->citylevel - 1) * $sheep->trader_score_secondary / 10000;
         next if($capture < 1500);