# HG changeset patch # User "Rex Tsai " # Date 1224518433 -28800 # Node ID 6e0d5e781949b360cc04c5356b4ed130887642cc # Parent ff00d108e955f4778d51c265313be9d312563876 fixed a typo in agent.pl diff -r ff00d108e955 -r 6e0d5e781949 Ikariam.pm --- a/Ikariam.pm Mon Oct 20 23:44:45 2008 +0800 +++ b/Ikariam.pm Tue Oct 21 00:00:33 2008 +0800 @@ -18,7 +18,7 @@ use Data::Dumper; use LWP; # use LWP::Debug qw(+ -conns -trace -debug); -use LWP::Debug qw(+trace); +# use LWP::Debug qw(+trace); use HTTP::Cookies; use WWW::Mechanize; use HTML::TagParser; diff -r ff00d108e955 -r 6e0d5e781949 agent.pl --- a/agent.pl Mon Oct 20 23:44:45 2008 +0800 +++ b/agent.pl Tue Oct 21 00:00:33 2008 +0800 @@ -87,10 +87,10 @@ my @marble = qw/undef 0 0 17 28 66 95 156 243 406 579 799 1348 2124 2951 4409 6461 8187 10176 12466 15082 18055 21381 25116 100464 200928 401856 803712 1607424 3214848 6429696 12859392/; my $level = $city->{buildings}->{townHall}; - if($city->{resources}->{woold} >= $wood[$level] && $city->{resources}->{marble} >= $marble[$level] ) { + if($city->{resources}->{wood} >= $wood[$level] && $city->{resources}->{marble} >= $marble[$level] ) { return 1; } - warn("Resource is short for build city hall."); + warn(sprintf("Resource is short for build city hall. wood [%d] marble [%d] ", $wood[$level], $marble[$level])); return 0; } diff -r ff00d108e955 -r 6e0d5e781949 building.yaml --- a/building.yaml Mon Oct 20 23:44:45 2008 +0800 +++ b/building.yaml Tue Oct 21 00:00:33 2008 +0800 @@ -6,7 +6,8 @@ 0: - is_constructing: # already building something. - 1: + 1: + # adjust human resources # let's find something to build up 0: # 確認是否為主城