}
if ($elements[0] eq 'attack' and $elements[1] ne 'range' and $elements[2] eq 'dps') {{
- my $type = $row->{$elements[0]}->{$elements[1]}->{type} or next;
+ my $attack = $row->{ $elements[0] }->{ $elements[1] };
+ ref $attack or $attack = $row->{ $elements[0] }->{$attack}; # follow
+ my $type = $attack->{type} or next;
if ($type eq 'explosive') {
$min /= 2;
}
sub showattack {
my ($row, $area) = @_;
local $_ = $row->{attack}->{$area};
+ if (not ref $_) {
+ # reference to another area
+ $area = $_;
+ $_ = $row->{attack}->{$area};
+ }
return '<td colspan="2" class="hurt">' unless $_;