Mercurial > eagle-eye
comparison Ikariam.pm @ 205:d9f17bcbf1f1
we keep 10 transporters for prize
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Mon, 03 Nov 2008 17:20:51 +0800 |
parents | 95d47d69c202 |
children | 48ea8222782a |
comparison
equal
deleted
inserted
replaced
204:95d47d69c202 | 205:d9f17bcbf1f1 |
---|---|
747 my $extractor = new Ikariam::Extractor(content => $res->content); | 747 my $extractor = new Ikariam::Extractor(content => $res->content); |
748 | 748 |
749 my %report; | 749 my %report; |
750 | 750 |
751 $report{id} = $combatId; | 751 $report{id} = $combatId; |
752 my $c = $extractor->{doc}->toString(1); | 752 my $c = $extractor->{doc}->toString(0); |
753 | 753 |
754 # FIXME 城鎮 6 級)的城牆( 2 級)為防禦部隊增加了 7% 的防禦力。 | 754 # FIXME 城鎮 6 級)的城牆( 2 級)為防禦部隊增加了 7% 的防禦力。 |
755 while($c =~ /城鎮\s+(\d+)/gs) { | 755 while($c =~ /城鎮\s+(\d+)/gs) { |
756 $report{cityLevel} = $1; | 756 $report{cityLevel} = $1; |
757 $report{wallLevel} = $2; | 757 $report{wallLevel} = $2; |
1047 Cook => {n=>"Cook",p=>4,w=>520,W=>103,b=>"38m",u=>138,m=>8,o=>8,a=>6,d=>26,A=>0,D=>0,s=>16,c=>"Human",v=>20,x=>"Regeneration"} | 1047 Cook => {n=>"Cook",p=>4,w=>520,W=>103,b=>"38m",u=>138,m=>8,o=>8,a=>6,d=>26,A=>0,D=>0,s=>16,c=>"Human",v=>20,x=>"Regeneration"} |
1048 }; | 1048 }; |
1049 | 1049 |
1050 my $cost = 0; | 1050 my $cost = 0; |
1051 foreach(keys(%{$cities->{$cityId}->{army}})) { | 1051 foreach(keys(%{$cities->{$cityId}->{army}})) { |
1052 # printf("%s %d = %d\n", $_, $cities->{$cityId}->{army}->{$_}, $cities->{$cityId}->{army}->{$_} * $troops->{$_}->{u}); | |
1053 $cost += $cities->{$cityId}->{army}->{$_} * $troops->{$_}->{u}; | 1052 $cost += $cities->{$cityId}->{army}->{$_} * $troops->{$_}->{u}; |
1054 } | 1053 } |
1055 return $cost; | 1054 return $cost; |
1056 } | 1055 } |
1057 | 1056 |