From: Mischa POSLAWSKY Date: Fri, 19 Jun 2015 01:04:16 +0000 (+0200) Subject: sc: simplify code by concatenating all showattack() output X-Git-Tag: v1.8~140 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/e3dac38771fe8c06e4c19c42403f7fb9b7f09da8 sc: simplify code by concatenating all showattack() output --- diff --git a/sc.plp b/sc.plp index 08cbc45..c8be6c7 100644 --- a/sc.plp +++ b/sc.plp @@ -113,19 +113,19 @@ sub showrange { my $attack = $row->{attack}->[$area] or return ''; - my $tagbase = ''; - $tagbase .= '' . '▽' x !!($attack->{anti} & 1); - $tagbase .= '' . '△' x !!($attack->{anti} & 2); - $tagbase .= '' . '▽' x !!($attack->{anti} & 1); + $out .= '' . '△' x !!($attack->{anti} & 2); + $out .= ''; + $out .= '">'; my $upattack = $row->{upgraded}->{attack}->[$area]; my $maxdamage = @@ -133,7 +133,7 @@ sub showrange { ($damage, $maxdamage) = ($damage->[0], $upattack->{damage} // $damage->[-1]) if ref $damage; - my $out = showrange($damage, $maxdamage); + $out .= showrange($damage, $maxdamage); $out .= sprintf('%s', $attack->{splash} eq 'line' ? ('linear', '×') : ('splash', '+') ) if $attack->{splash}; @@ -154,7 +154,7 @@ sub showrange { $out .= showrange($damage, $maxdamage); } - return $tagbase . $out; + return $out; } sub showmagic {