Mercurial > eagle-eye
diff agent.pl @ 212:5f94d8d8370a
build embassy, museum, academy
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Tue, 04 Nov 2008 01:14:39 +0800 |
parents | a2bb38589172 |
children | f6836ef11203 |
line wrap: on
line diff
--- a/agent.pl Mon Nov 03 23:02:36 2008 +0800 +++ b/agent.pl Tue Nov 04 01:14:39 2008 +0800 @@ -36,6 +36,21 @@ return ($city->{buildings}->{wall} >= $city->{buildings}->{townHall} ? 1 : 0); } +sub is_academy_enough { + my ($self, $city) = @_; + return ($city->{buildings}->{academy} >= 6 ? 1 : 0); +} + +sub is_embassy_enough { + my ($self, $city) = @_; + return ($city->{buildings}->{embassy} >= 6 ? 1 : 0); +} + +sub is_museum_enough { + my ($self, $city) = @_; + return ($city->{buildings}->{museum} >= 2 ? 1 : 0); +} + sub is_space_enough { my ($self, $city) = @_; # The maximum town hall is level 20, then we build new town @@ -139,7 +154,7 @@ return (defined($self->{'ikariam'}->{research}->{1030}) ? 1 : 0); } -sub is_culturalexchange_researched { +sub is_foreigncultures_researched { my ($self) = @_; return (defined($self->{'ikariam'}->{research}->{1040}) ? 1 : 0); } @@ -149,6 +164,11 @@ return (defined($self->{'ikariam'}->{research}->{1060}) ? 1 : 0); } +sub is_conservation_researched { + my ($self) = @_; + return (defined($self->{'ikariam'}->{research}->{2010}) ? 1 : 0); +} + sub is_wealth_researched { my ($self) = @_; return (defined($self->{'ikariam'}->{research}->{2030}) ? 1 : 0);