comparison sheep.pl @ 33:d183277b4d93

refined the output message.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sat, 11 Oct 2008 05:19:29 +0800
parents 93d4e6ffe330
children 5849b6fdc76c
comparison
equal deleted inserted replaced
32:b18369979b58 33:d183277b4d93
80 80
81 # 所得金錢 = 對方城鎮等級x(對方城鎮等級-1)x對方金錢/10000 81 # 所得金錢 = 對方城鎮等級x(對方城鎮等級-1)x對方金錢/10000
82 my $robbery = $c->citylevel * ($c->citylevel - 1) * $sheep->trader_score_secondary / 10000; 82 my $robbery = $c->citylevel * ($c->citylevel - 1) * $sheep->trader_score_secondary / 10000;
83 83
84 next if($robbery < 2000); 84 next if($robbery < 2000);
85
85 $line = sprintf("%d %s army %d %s/%s(%d),", 86 $line = sprintf("%d %s army %d %s/%s(%d),",
86 $robbery, 87 $robbery,
87 $c->status, $sheep->army_score_main, $sheep->name, $sheep->ally, $members); 88 $c->status, $sheep->army_score_main, $sheep->name, $sheep->ally, $members);
88 89
89 $line .= sprintf("\"%s\" %d [%d,%d] %s http://s2.ikariam.tw/index.php?view=island&id=%d\n", 90 $line .= sprintf("\"%s\" %d [%d,%d] %s http://s2.ikariam.tw/index.php?view=island&id=%d&selectCity=%d\n",
90 $c->cityname, $c->citylevel, 91 $c->cityname, $c->citylevel,
91 $island->x, $island->y, 92 $island->x, $island->y,
92 $tradegoodText[$island->tradegood], 93 $tradegoodText[$island->tradegood],
93 $island->id); 94 $island->id,
95 $c->cityId
96 );
94 97
95 printf("%s", $line); 98 printf("%s", $line);
96 } 99 }
97 } 100 }
98 } 101 }