# HG changeset patch # User "Rex Tsai " # Date 1225689050 -28800 # Node ID eec013e81fb01ab961cb52908b43337757086235 # Parent e9f1110573929d5fd637f6d9bc8e330bcdea3ce5 fixed count warehouse level diff -r e9f111057392 -r eec013e81fb0 agent.pl --- a/agent.pl Mon Nov 03 12:56:19 2008 +0800 +++ b/agent.pl Mon Nov 03 13:10:50 2008 +0800 @@ -50,9 +50,9 @@ my @warehouse = (qw/undef undef 0 4 9 16 18 19 20 21 22 23 24 25/); my @cities = keys(%{$self->{ikariam}->{cities}}); - Carp::carp(sprintf("Required warehouse level %s, current is %s only\n", $warehouse[$#cities], $city->{buildings}->{warehouse})); + Carp::carp(sprintf("Required warehouse level %s, current is %s\n", $warehouse[$#cities], $city->{buildings}->{warehouse})); return 0 if(!defined($city->{buildings}->{warehouse})); - return ($city->{buildings}->{warehouse} > $warehouse[$#cities]) ? 0 : 1; + return ($city->{buildings}->{warehouse} >= $warehouse[$#cities]) ? 1 : 0; } sub is_corruption { diff -r e9f111057392 -r eec013e81fb0 city.yaml --- a/city.yaml Mon Nov 03 12:56:19 2008 +0800 +++ b/city.yaml Mon Nov 03 13:10:50 2008 +0800 @@ -15,7 +15,7 @@ 1: - is_warehouse_enougn_for_governorsresidence: 0: build_warehouse - 1: build_governorsresidence + 1: build_palaceColony - is_any_corruption: 0: - is_space_enough: