7 'Dagger' => [ qw( 8 4 0 ) ],
8 'Shortsword' => [ qw( 10 5 0 ) ],
9 'Warhammer' => [ qw( 25 6 0 ) ],
10 'Longsword' => [ qw( 40 7 0 ) ],
11 'Greataxe' => [ qw( 74 8 0 ) ],
15 'NONE' => [ qw( 0 0 0 ) ],
16 'Leather' => [ qw( 13 0 1 ) ],
17 'Chainmail' => [ qw( 31 0 2 ) ],
18 'Splintmail' => [ qw( 53 0 3 ) ],
19 'Bandedmail' => [ qw( 75 0 4 ) ],
20 'Platemail' => [ qw( 102 0 5 ) ],
24 'NONE_1' => [ qw( 0 0 0 ) ],
25 'NONE_2' => [ qw( 0 0 0 ) ],
26 'Damage_+1' => [ qw( 25 1 0 ) ],
27 'Damage_+2' => [ qw( 50 2 0 ) ],
28 'Damage_+3' => [ qw( 100 3 0 ) ],
29 'Defense_+1' => [ qw( 20 0 1 ) ],
30 'Defense_+2' => [ qw( 40 0 2 ) ],
31 'Defense_+3' => [ qw( 80 0 3 ) ],
34 my $boss = [ qw(104 8 1) ];
37 for my $w (keys %weapons) {
38 for my $a (keys %armors) {
39 for my $r1 (keys %rings) {
40 for my $r2 (keys %rings) {
42 my $price = $weapons{$w}->[0]
46 my $damage = $weapons{$w}->[1]
50 my $armor = $weapons{$w}->[2]
54 my $pl = $damage - $boss->[2];
55 my $bo = $boss->[1] - $armor;
56 my ($bosshp, $playerhp) = ($boss->[0], 100);
60 $minprice = $price if !$minprice || $price < $minprice;
61 say "$price $w $a $r1 $r2";
65 last if ($playerhp <= 0);