From f288c2ae9def10f90b5f8c0a84b1e1c17d55f38c Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 19 Jun 2015 07:53:35 +0200 Subject: [PATCH] sc: indicate hots bonus damage by ">" prefix --- sc.plp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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', '+') -- 2.30.0