Mercurial > eagle-eye
comparison warfare.pl @ 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 | 83e3ce37779d |
children | 285d5b39ef2c |
comparison
equal
deleted
inserted
replaced
265:aaffc50e3318 | 266:53827cc442b6 |
---|---|
114 | 114 |
115 # we don't attack same city twice at same time. | 115 # we don't attack same city twice at same time. |
116 next CITY if($_->{to} == $city->cityId); | 116 next CITY if($_->{to} == $city->cityId); |
117 } | 117 } |
118 # we attack one city maximum 4 times a day. | 118 # we attack one city maximum 4 times a day. |
119 next CITY if($c >= 4); | 119 if ($city->status eq 'i') { |
120 next CITY if($c >= 6); | |
121 } else { | |
122 next CITY if($c >= 4); | |
123 } | |
120 | 124 |
121 my $capture = $city->citylevel * ($city->citylevel - 1) * $sheep->trader_score_secondary / 10000; | 125 my $capture = $city->citylevel * ($city->citylevel - 1) * $sheep->trader_score_secondary / 10000; |
122 next if($capture < 1500); | 126 next if($capture < 1500); |
123 | 127 |
124 # { | 128 # { |