+ if (my @bonus = sort grep { !/^-/ } keys %{ $attack->{bonus} }) {
+ $out .= sprintf('<span class="%s" title="%s">≥</span>',
+ (map {
+ $_ eq 'light' ? 'unit-s' :
+ $_ eq 'armored' ? 'unit-l' :
+ $_ eq 'organic' ? 'unit-o' :
+ $_ eq 'massive' ? 'unit-h' :
+ $_ eq 'shields' ? 'unit-shield' :
+ '',
+ } join '_', @bonus),
+ join(', ', map {(
+ sprintf('+%s vs %s',
+ showrange(
+ $attack->{bonus}->{$_},
+ $attack->{bonus}->{$_} + $attack->{bonus}->{"-$_"} * 3,
+ ),
+ $_,
+ ),
+ )} @bonus),
+ );
+ }
+ $out .= '<span class="unit-pdd" title="projectile">•</span>'
+ if $attack->{type} eq 'projectile';
+
+ $out .= sprintf '<span title="%s">', $attack->{name} if $attack->{name};