# HG changeset patch # User "Rex Tsai " # Date 1228332144 -28800 # Node ID c864134ebe3ed4e310f4943e2245b5b31fe0ccdf # Parent 10f14db31151fe73d0ae8e1d7d88b02d5ff80939 refined output format diff -r 10f14db31151 -r c864134ebe3e planner.pl --- a/planner.pl Thu Dec 04 03:22:11 2008 +0800 +++ b/planner.pl Thu Dec 04 03:22:24 2008 +0800 @@ -96,15 +96,16 @@ ($cities[$i+1]->{distance} - $cities[$i]->{distance})); } printf("\n# %s %s %dm\n", $cities[$i]->{name}, $cities[$i]->{type}, $cities[$i]->{distance}); + printf("# ActionPoint %d/%d\n", $cities[$i]->{actionPoints}, $cities[$i]->{maxActionPoints}); printf('$ikariam->login;' . "\n"); if($cities[$i]->{type} eq "navy") { printf('$ikariam->changeCity(%d);' . "\n", $cities[$i]->{id}); printf('$ikariam->blockadeCity(%d, {' . "\n", $targetCity->id); - printf('blockadeDuration => 8*60*60,' . "\n"); + printf("\tblockadeDuration => 2*60*60," . "\n"); while (my ($k, $v) = each(%{$cities[$i]->{fleet}})) { if($v > 0) { - printf("cargo_fleet_%s => %s, # %s \n", $fleet->{$k}, $v, $k); + printf("\tcargo_fleet_%s => %s, # %s \n", $fleet->{$k}, $v, $k); } } printf('});' . "\n", $cities[$i]->{id}); @@ -113,7 +114,7 @@ printf('$ikariam->plunderCity(%d, {' . "\n", $targetCity->id); while (my ($k, $v) = each(%{$cities[$i]->{army}})) { if($v > 0) { - printf("cargo_army_%s => %s, # %s \n", $army->{$k}, $v, $k); + printf("\tcargo_army_%s => %s, # %s \n", $army->{$k}, $v, $k); } } printf('});' . "\n", $cities[$i]->{id});