# HG changeset patch # User "Rex Tsai " # Date 1227068610 -28800 # Node ID a5bd0050dd12f42896040dfac2df91dd263d21c7 # Parent a4e52feec5a5eaa4aea09b84152c6ede8758672b fixed the wrong syntax. diff -r a4e52feec5a5 -r a5bd0050dd12 warfare.pl --- a/warfare.pl Wed Nov 19 01:35:47 2008 +0800 +++ b/warfare.pl Wed Nov 19 12:23:30 2008 +0800 @@ -88,19 +88,19 @@ # we don't fight with members in same ally. next if($sheep->allyId == $user->allyId); - # we fight for island which ownes differnet trade goods. - next if($island->tradegood == $tradegood) unless ($city->status eq 'i'); - # Ignore the user in vacation which we can not attack. next if($city->status eq 'v'); unless ($city->status eq 'i') { + # we fight for island which ownes differnet trade goods. + next CITY if($island->tradegood == $tradegood); + unless (!defined($sheep->allyId) || $sheep->allyId == 0) { my $ally = Ikariam::Ally->retrieve($user->allyId); my $targetAlly = Ikariam::Ally->retrieve($sheep->allyId); # We don't want to piss off the big team. - next if($ally->score == 0); - next if($targetAlly->score > $ally->score); - next if(defined($ally) && $ally->members > 12); + next CITY if($ally->score == 0); + next CITY if($targetAlly->score > $ally->score); + next CITY if(defined($ally) && $ally->members > 12); } }