4 %dungeons = ( 0 => "the Dungeons of Doom",
6 2 => "the Gnomish Mines",
11 7 => "the Elemental Planes" );
13 # Conducts, in the order that they are stored in the conduct bitfield
14 @conducts = ( "Foodless", "Vegan", "Vegetarian", "Atheist", "Weaponless",
15 "Pacifist", "Illiterate", "Polypileless", "Polyselfless",
16 "Wishless", "Artifact Wishless", "Genocideless" );
18 # Achievements, in the order that they are stored in the achievement
20 @achievements = ( "Obtained the Bell of Opening",
22 "Obtained the Candelabrum of Invocation",
23 "Obtained the Book of the Dead",
24 "Performed the invocation ritual",
25 "Obtained the Amulet of Yendor",
26 "Reached the Elemental Planes",
27 "Reached the Astral Plane",
29 "Completed the Mines",
34 # Parse the line and store in the hash %field
35 @fields = split /:/, $entry;
37 foreach $field (@fields) {
38 if($field =~ /^([^=]*)=(.*)$/) {
41 $field{$fname} = $fval;
46 printf "%s-%s-%s-%s-%s, %s\n", $field{name
},
47 $field{role
}, $field{race
}, $field{gender
}, $field{align
},
49 printf " Died in %s on level %d (max %d). Final HP %d/%d.\n",
50 $dungeons{$field{deathdnum
}}, $field{deathlev
}, $field{maxlvl
},
51 $field{hp
}, $field{maxhp
};
54 $field{conduct
} = oct $field{conduct
};
55 for($i = 0; $i <= $#conducts; $i++) {
56 if($field{conduct
} & (1 << $i)) {
57 push @c, $conducts[$i];
60 print " Conducts: ", join(', ', @c), "\n";
63 $field{achieve
} = oct $field{achieve
};
64 for($i = 0; $i <= $#achievements; $i++) {
65 if($field{achieve
} & (1 << $i)) {
66 push @a, $achievements[$i];
69 print " Notable achievements: ", join(', ', @a), "\n";
72 printf " The game lasted %d turns, and took %d seconds of playtime.\n",
73 $field{turns
}, $field{realtime
};