changeset 209:31fca1e55ed5

we don't fight with sheep has only a little money
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Mon, 03 Nov 2008 22:28:28 +0800
parents a2bb38589172
children a5862d3f1c84
files warfare.pl
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/warfare.pl	Mon Nov 03 20:07:05 2008 +0800
+++ b/warfare.pl	Mon Nov 03 22:28:28 2008 +0800
@@ -110,8 +110,10 @@
         # we attack one city maximum 4 times a day.
         next if($c >= 4);
 
+        my $capture = $city->citylevel * ($city->citylevel - 1) * $sheep->trader_score_secondary / 10000;
+        next if($capture < 1500);
+
         # {
-            my $capture = $city->citylevel * ($city->citylevel - 1) * $sheep->trader_score_secondary / 10000;
             my $line = sprintf("%d %s [%d,%d] %s (%d) %s Attacked %d", 
                 $capture, $city->status, 
                 $island->x, $island->y,