annotate planner.pl @ 360:26f52b25aa06

disable building warehouse
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Mon, 23 Feb 2009 16:25:02 +0800
parents 58351fccf619
children 2444685c68c9
rev   line source
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
1 #!/usr/bin/perl
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
2 use Ikariam;
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
3 use Data::Dumper;
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
4 use Decision::ParseTree q{ParseTree};
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
5 use YAML qw/LoadFile Dump DumpFile/;
301
07f51bb67e56 option for wave attack
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 293
diff changeset
6 use Getopt::Std;
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
7
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
8 Ikariam::Cities->has_a(island => 'Ikariam::Island');
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
9
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
10 my $army = {
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
11 "Slinger" => 301,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
12 "Swordsman" => 302,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
13 "Phalanx" => 303,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
14 "Ram" => 307,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
15 "Archer" => 313,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
16 "Catapult" => 306,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
17 "Gunsman" => 304,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
18 "Mortar" => 305,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
19 "SteamGiant" => 308,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
20 "Gyrocopter" => 312,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
21 "Bombardier" => 309,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
22 "Doctor" => 311,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
23 "Cook" => 310,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
24 };
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
25
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
26 my $fleet = {
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
27 "CargoShip" => 201,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
28 "Ram-Ship" => 210,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
29 "BallistaShip" => 213,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
30 "Flamethrower" => 211,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
31 "CatapultShip" => 214,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
32 "MortarShip" => 215,
303
50cff2eee239 fixed a typo
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 301
diff changeset
33 "PaddleWheelRam" => 216,
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
34 "DivingBoat" => 212,
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
35 };
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
36
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
37 # return minutes.
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
38 sub travelTime {
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
39 my ($x1, $y1, $x2, $y2, $speed) = @_;
334
65f45552060e fixed travel time
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 327
diff changeset
40 $speed = 60 unless(defined($speed));
65f45552060e fixed travel time
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 327
diff changeset
41 if($x1 == $x2 && $y1 == $y2) {
65f45552060e fixed travel time
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 327
diff changeset
42 return 600/$speed;
65f45552060e fixed travel time
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 327
diff changeset
43 } else {
65f45552060e fixed travel time
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 327
diff changeset
44 return int( (sqrt((abs($x1 - $x2) * abs($x1 - $x2)) + (abs($y1 - $y2) * abs($y1 - $y2)))) * (1200/$speed));
65f45552060e fixed travel time
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 327
diff changeset
45 }
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
46 }
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
47
343
85d60a0569bf fixed travel time for 0.3.0
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 334
diff changeset
48
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
49 package main;
301
07f51bb67e56 option for wave attack
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 293
diff changeset
50 getopts('w');
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
51 if($#ARGV < 2) {
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
52 die("Usage: %s targetCity navyCity armyCity wingman1.. wingman2..\n");
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
53 }
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
54 my $targetCityId = shift(@ARGV);
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
55 my $navyCity = shift(@ARGV);
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
56 my $armyCity = shift(@ARGV);
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
57 my @wingman = @ARGV;
358
58351fccf619 default unit number is now 0, for avoid stupid thing
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 354
diff changeset
58 my $vanguard = 21;
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
59
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
60 my $targetCity = Ikariam::Cities->retrieve($targetCityId);
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
61
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
62 # NAVY
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
63 my $city = LoadFile(sprintf("city-%s-dump.yaml", $navyCity));
358
58351fccf619 default unit number is now 0, for avoid stupid thing
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 354
diff changeset
64 $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 33) + $vanguard + 8;
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
65 $city->{type} = "navy";
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
66 push (@cities, $city);
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
67
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
68 # ARMY
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
69 my $city = LoadFile(sprintf("city-%s-dump.yaml", $armyCity));
358
58351fccf619 default unit number is now 0, for avoid stupid thing
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 354
diff changeset
70 $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 60) + $vanguard + 5;
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
71 $city->{type} = "army";
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
72 push (@cities, $city);
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
73
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
74 # wingman, army
301
07f51bb67e56 option for wave attack
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 293
diff changeset
75 foreach my $i (0..$#wingman) {
07f51bb67e56 option for wave attack
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 293
diff changeset
76 my $cityId = $wingman[$i];
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
77 my $city = LoadFile(sprintf("city-%s-dump.yaml", $cityId));
307
2972852a4ee5 added comment onn wingman
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 303
diff changeset
78 $city->{type} = "wingman" . ($i+1);
301
07f51bb67e56 option for wave attack
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 293
diff changeset
79 if(defined($opt_w)) {
334
65f45552060e fixed travel time
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 327
diff changeset
80 $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 60) - ($i * 20 + 20);
301
07f51bb67e56 option for wave attack
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 293
diff changeset
81 } else {
334
65f45552060e fixed travel time
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 327
diff changeset
82 $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 60);
301
07f51bb67e56 option for wave attack
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 293
diff changeset
83 }
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
84 push (@cities, $city);
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
85 }
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
86
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
87 # print the code.
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
88 print <<EOF;
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
89 #!/usr/bin/perl
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
90 use strict;
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
91 use Ikariam;
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
92 use Data::Dumper;
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
93 package main;
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
94 my \$ikariam = new Ikariam(\$::server, \$::user, \$::pass);
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
95 EOF
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
96
358
58351fccf619 default unit number is now 0, for avoid stupid thing
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 354
diff changeset
97 foreach(@cities) {
58351fccf619 default unit number is now 0, for avoid stupid thing
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 354
diff changeset
98 printf("# %s %s (%s)\n", $_->{type}, $_->{id}, $_->{distance});
58351fccf619 default unit number is now 0, for avoid stupid thing
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 354
diff changeset
99 }
58351fccf619 default unit number is now 0, for avoid stupid thing
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 354
diff changeset
100 @cities = sort { $a->{distance} <=> $b->{distance}; } (@cities);
58351fccf619 default unit number is now 0, for avoid stupid thing
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 354
diff changeset
101
276
8355ec8514f9 refined output data
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 271
diff changeset
102 printf ("# %s %s [%s:%s]\n", $targetCity->owner, $targetCity->cityname, $targetCity->island->x, $targetCity->island->y);
8355ec8514f9 refined output data
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 271
diff changeset
103 printf ("# http://%s/index.php?view=island&id=%d&selectCity=%d\n", $::server, $targetCity->island->id, $targetCity->id);
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
104
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
105 for(my $i = ($#cities + 1) ; $i-- ; $i < 0 ) {
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
106
276
8355ec8514f9 refined output data
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 271
diff changeset
107 if($i ne $#cities) {
8355ec8514f9 refined output data
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 271
diff changeset
108 # TODO, 計算港口速度
8355ec8514f9 refined output data
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 271
diff changeset
109 # 減掉 cities[$i+1]->buliding->port 的速度
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
110 printf("sleep(%d*60);\n",
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
111 ($cities[$i+1]->{distance} - $cities[$i]->{distance}));
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
112 }
276
8355ec8514f9 refined output data
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 271
diff changeset
113 printf("\n# %s %s %dm\n", $cities[$i]->{name}, $cities[$i]->{type}, $cities[$i]->{distance});
285
c864134ebe3e refined output format
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 276
diff changeset
114 printf("# ActionPoint %d/%d\n", $cities[$i]->{actionPoints}, $cities[$i]->{maxActionPoints});
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
115
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
116 printf('$ikariam->login;' . "\n");
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
117 if($cities[$i]->{type} eq "navy") {
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
118 printf('$ikariam->changeCity(%d);' . "\n", $cities[$i]->{id});
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
119 printf('$ikariam->blockadeCity(%d, {' . "\n", $targetCity->id);
358
58351fccf619 default unit number is now 0, for avoid stupid thing
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 354
diff changeset
120 printf("\tblockadeDuration => 8*60*60," . "\n");
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
121 while (my ($k, $v) = each(%{$cities[$i]->{fleet}})) {
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
122 if($v > 0) {
358
58351fccf619 default unit number is now 0, for avoid stupid thing
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 354
diff changeset
123 printf("\tcargo_fleet_%s => %s, # %s (%d)\n", $fleet->{$k}, 0, $k, $v);
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
124 }
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
125 }
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
126 printf('});' . "\n", $cities[$i]->{id});
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
127 } else {
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
128 printf('$ikariam->changeCity(%d);' . "\n", $cities[$i]->{id});
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
129 printf('$ikariam->plunderCity(%d, {' . "\n", $targetCity->id);
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
130 while (my ($k, $v) = each(%{$cities[$i]->{army}})) {
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
131 if($v > 0) {
358
58351fccf619 default unit number is now 0, for avoid stupid thing
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 354
diff changeset
132 printf("\tcargo_army_%s => %s, # %s (%d)\n", $army->{$k}, 0, $k, $v);
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
133 }
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
134 }
358
58351fccf619 default unit number is now 0, for avoid stupid thing
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 354
diff changeset
135 printf("\ttransporter => %s, # transporter\n", $cities[$i]->{transporters}->{avail});
271
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
136 printf('});' . "\n", $cities[$i]->{id});
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
137 }
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
138 printf('$ikariam->logout;' . "\n");
0ed1b3e72e65 new campaign planner
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
139 }