sc: separate bonus damage indicators, recognise structure target
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 29 May 2022 11:26:29 +0000 (13:26 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 2 Jun 2022 21:57:11 +0000 (23:57 +0200)
sc.plp

diff --git a/sc.plp b/sc.plp
index 8d021b793a7eec2e2ffdcee31df65a3146077a65..fde2597226ea34dff51164720151e76554d4a7d4 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -178,15 +178,16 @@ sub showrangeint {
                        if $attack->{type} eq 'implosive';
        if (my @bonus = sort grep { !/^-/ } keys %{ $attack->{bonus} }) {
                $out .= sprintf('<span class="%s" title="%s">&ge;</span>',
-                       (map {
+                       (
                                $_ eq 'light' ? 'unit-s' :
                                $_ eq 'armored' ? 'unit-l' :
                                $_ eq 'organic' ? 'unit-o' :
                                $_ eq 'massive' ? 'unit-h' :
                                $_ eq 'shields' ? 'unit-shield' :
+                               $_ eq 'structure' ? 'unit-x' :
                                '',
-                       } join '_', @bonus),
-                       join(', ', map {(
+                       ),
+                       (
                                sprintf('+%s vs %s',
                                        showrangeint(
                                                $attack->{bonus}->{$_},
@@ -195,8 +196,8 @@ sub showrangeint {
                                        ),
                                        $_,
                                ),
-                       )} @bonus),
-               );
+                       ),
+               ) for @bonus;
        }
                $out .= '<span class="unit-pdd" title="projectile">•</span>'
                        if $attack->{type} eq 'projectile';