From: Mischa POSLAWSKY Date: Fri, 19 Jun 2015 05:53:35 +0000 (+0200) Subject: sc: indicate hots bonus damage by ">" prefix X-Git-Tag: v1.8~134 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/f288c2ae9def10f90b5f8c0a84b1e1c17d55f38c?hp=70cddeb28fadb6c81c9af75483c179a521a1dcdf sc: indicate hots bonus damage by ">" prefix --- diff --git a/sc.plp b/sc.plp index b06f22e..4481b92 100644 --- a/sc.plp +++ b/sc.plp @@ -124,6 +124,23 @@ sub showrange { if $attack->{type} eq 'explosive'; $out .= '~' if $attack->{type} eq 'implosive'; + $out .= sprintf('', + (map { + $_ =~ /^light/ ? 'unit-s' : + $_ eq 'armored' ? 'unit-l' : + $_ eq 'organic' ? 'unit-o' : + $_ =~ /^massive/ ? 'unit-h' : + '', + } join '_', keys %{ $attack->{bonus} }), + join(', ', map {( + sprintf('+%s vs %s', + (map { + ref $_ ? showrange($_->[0], $_->[-1]) : $_ + } $attack->{bonus}->{$_}), + $_, + ), + )} keys %{ $attack->{bonus} }), + ) if $attack->{bonus}; $out .= showrange($damage, $maxdamage); $out .= sprintf('%s', $attack->{splash} eq 'line' ? ('linear', '×') : ('splash', '+')