diff planner.pl @ 327:0db3e2bcbd0f

updated timing
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Thu, 12 Feb 2009 01:16:20 +0800
parents 2972852a4ee5
children 65f45552060e
line wrap: on
line diff
--- a/planner.pl	Wed Feb 11 21:04:27 2009 +0800
+++ b/planner.pl	Thu Feb 12 01:16:20 2009 +0800
@@ -56,14 +56,13 @@
 
 # NAVY
 my $city = LoadFile(sprintf("city-%s-dump.yaml", $navyCity));
-# $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 8) + 45;
-$city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 8) + 25;
+$city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 33) + 25;
 $city->{type} = "navy";
 push (@cities, $city);
 
 # ARMY
 my $city = LoadFile(sprintf("city-%s-dump.yaml", $armyCity));
-$city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 20) + 5;
+$city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 50) + 5;
 $city->{type} = "army";
 push (@cities, $city);
 
@@ -73,9 +72,9 @@
     my $city = LoadFile(sprintf("city-%s-dump.yaml", $cityId));
     $city->{type} = "wingman" . ($i+1);
     if(defined($opt_w)) {
-        $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 20) - ($i * 20 + 20);
+        $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 50) - ($i * 20 + 20);
     } else {
-        $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 20);
+        $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 50);
     }
     push (@cities, $city);
 }
@@ -126,6 +125,7 @@
                 printf("\tcargo_army_%s => %s, # %s \n", $army->{$k}, $v, $k);
             }
         }
+                printf("\ttransporter   => %s, # transporter\n", $cities[$i]->{transporters}->{avail});
         printf('});' . "\n", $cities[$i]->{id});
     }
     printf('$ikariam->logout;' . "\n");