From e3dac38771fe8c06e4c19c42403f7fb9b7f09da8 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 19 Jun 2015 03:04:16 +0200 Subject: [PATCH] sc: simplify code by concatenating all showattack() output --- sc.plp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 { -- 2.30.0