# HG changeset patch # User "Rex Tsai " # Date 1226855450 -28800 # Node ID 5527133b7c7e70def8d011c55b290d859ee54680 # Parent a654d43731f0faedcc4c6f0789a6a410e9425437 we don't attack same city twice at same time. diff -r a654d43731f0 -r 5527133b7c7e warfare.pl --- a/warfare.pl Mon Nov 17 00:26:44 2008 +0800 +++ b/warfare.pl Mon Nov 17 01:10:50 2008 +0800 @@ -106,6 +106,8 @@ my $c = Ikariam::Report->search_victim($city->cityId, time - 24*60*60 - 7*60*60)->count(); # check the current plunders foreach (@{$self->{ikariam}->{'military'}->{'homeland'}}) { + # we don't attack same city twice at same time. + next if($_->{to} == $city->cityId); # counting for both leaving and coming back. $c++ if($_->{to} == $city->cityId || $_->{from} == $city->cityId); }