X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/8ccd2531f273e279b7732a50f9f46391f92cf8ec..0b686d7436dbdb50f0bf8547f845af6bc334a9e4:/sc.plp diff --git a/sc.plp b/sc.plp index 6b08c94..d6ccaf6 100644 --- a/sc.plp +++ b/sc.plp @@ -193,7 +193,9 @@ sub showrange { } 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; } @@ -209,6 +211,11 @@ sub showrange { sub showattack { my ($row, $area) = @_; local $_ = $row->{attack}->{$area}; + if (not ref $_) { + # reference to another area + $area = $_; + $_ = $row->{attack}->{$area}; + } return '' unless $_;