if $attack->{type} eq 'implosive';
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' :
+ $_ eq 'structure' ? 'unit-x' :
'',
- } join '_', @bonus),
- join(', ', map {(
+ ),
+ (
sprintf('+%s vs %s',
showrangeint(
$attack->{bonus}->{$_},
),
$_,
),
- )} @bonus),
- );
+ ),
+ ) for @bonus;
}
$out .= '<span class="unit-pdd" title="projectile">•</span>'
if $attack->{type} eq 'projectile';