+ $out .= '<span class="unit-l" title="explosive">*</span>'
+ if $attack->{type} eq 'explosive';
+ $out .= '<span class="unit-s" title="implosive">~</span>'
+ if $attack->{type} eq 'implosive';
+ $out .= sprintf('<span class="%s" title="%s">≥</span>',
+ (map {
+ $_ =~ /^light/ ? 'unit-s' :
+ $_ eq 'armored' ? 'unit-l' :
+ $_ eq 'organic' ? 'unit-o' :
+ $_ =~ /^massive/ ? 'unit-h' :
+ $_ eq 'shields' ? 'unit-shield' :
+ '',
+ } join '_', keys %{ $attack->{bonus} }),
+ join(', ', map {(
+ sprintf('+%s vs %s',
+ (map {
+ ref $_ ? showrange($_->[0], $_->[-1]) : $_
+ } $attack->{bonus}->{$_}),
+ $_,
+ ),
+ )} keys %{ $attack->{bonus} }),
+ ) if $attack->{bonus};