# HG changeset patch # User "Rex Tsai " # Date 1231084375 -28800 # Node ID 68138c99ee168f8bbdec6dfa5cc5c4e3bd78992f # Parent 2972852a4ee57e64ec0535c25a4bb46a588999f8# Parent f6f56a47f3834c49646baf480386f51b63021c20 merged changes diff -r 2972852a4ee5 -r 68138c99ee16 agent.pl --- a/agent.pl Sun Dec 14 02:35:53 2008 +0800 +++ b/agent.pl Sun Jan 04 23:52:55 2009 +0800 @@ -50,7 +50,12 @@ sub is_museum_enough { my ($self, $city) = @_; return 1 if($city->{buildings}->{museum} >= 8); - return ($city->{buildings}->{museum} >= ($city->{buildings}->{tavern}/2) ? 1 : 0); +} + +sub is_tavern_enough { + my ($self, $city) = @_; + return 0 if(!defined($city->{buildings}->{tavern})); + return 1 if($city->{buildings}->{museum} >= 12); } sub is_branchOffice_enough { @@ -132,10 +137,6 @@ return 1 if($city->{buildings}->{townHall} >= 20); } -sub is_tavern_available { - my ($self, $city) = @_; - return (defined($city->{buildings}->{tavern}) ? 1 : 0); -} sub is_bacchanal { my ($self, $city) = @_; diff -r 2972852a4ee5 -r 68138c99ee16 city.yaml --- a/city.yaml Sun Dec 14 02:35:53 2008 +0800 +++ b/city.yaml Sun Jan 04 23:52:55 2009 +0800 @@ -31,7 +31,7 @@ 1: build_museum - is_winepress_researched: 1: - - is_tavern_available: + - is_tavern_enough: 0: build_tavern 1: - is_bacchanal: