comparison agent.pl @ 360:26f52b25aa06

disable building warehouse
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Mon, 23 Feb 2009 16:25:02 +0800
parents b74e3a838b58
children 3b2658751efa
comparison
equal deleted inserted replaced
359:4bea7db828eb 360:26f52b25aa06
97 return (($city->{buildings}->{townHall} >= $city->{buildings}->{safehouse}) ? 0 : 1); 97 return (($city->{buildings}->{townHall} >= $city->{buildings}->{safehouse}) ? 0 : 1);
98 } 98 }
99 99
100 sub is_warehouse_enough { 100 sub is_warehouse_enough {
101 my ($self, $city) = @_; 101 my ($self, $city) = @_;
102
103 return 1;
102 # my @warehouse = (qw/undef undef 0 4 9 16 18 19 20 21 22 23 24 25/); 104 # my @warehouse = (qw/undef undef 0 4 9 16 18 19 20 21 22 23 24 25/);
103 my @warehouse = (qw/undef undef 0 4 9 15 17 18 19 20 21 22 23 24/); 105 my @warehouse = (qw/undef undef 0 4 9 15 17 18 19 20 21 22 23 24/);
104 my @cities = keys(%{$self->{ikariam}->{cities}}); 106 my @cities = keys(%{$self->{ikariam}->{cities}});
105 my $nextCities = ($#cities + 1) + 1; 107 my $nextCities = ($#cities + 1) + 1;
106 108