git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sc: reference shared attacks in data
[sheet.git]
/
sc.plp
diff --git
a/sc.plp
b/sc.plp
index 6b08c9477acb304665a865dc57178ca2f95d5013..d6ccaf62e8f72e3c0f8797726aa75ad2e1099e53 100644
(file)
--- 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') {{
}
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;
}
if ($type eq 'explosive') {
$min /= 2;
}
@@
-209,6
+211,11
@@
sub showrange {
sub showattack {
my ($row, $area) = @_;
local $_ = $row->{attack}->{$area};
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 $_;
return '<td colspan="2" class="hurt">' unless $_;