git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
081094b
)
sc: separate bonus damage indicators, recognise structure target
author
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 29 May 2022 11:26:29 +0000
(13:26 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 2 Jun 2022 21:57:11 +0000
(23:57 +0200)
sc.plp
patch
|
blob
|
history
diff --git
a/sc.plp
b/sc.plp
index 8d021b793a7eec2e2ffdcee31df65a3146077a65..fde2597226ea34dff51164720151e76554d4a7d4 100644
(file)
--- a/
sc.plp
+++ b/
sc.plp
@@
-178,15
+178,16
@@
sub showrangeint {
if $attack->{type} eq 'implosive';
if (my @bonus = sort grep { !/^-/ } keys %{ $attack->{bonus} }) {
$out .= sprintf('<span class="%s" title="%s">≥</span>',
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 '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}->{$_},
sprintf('+%s vs %s',
showrangeint(
$attack->{bonus}->{$_},
@@
-195,8
+196,8
@@
sub showrangeint {
),
$_,
),
),
$_,
),
- )
} @bonus)
,
- );
+ ),
+ )
for @bonus
;
}
$out .= '<span class="unit-pdd" title="projectile">•</span>'
if $attack->{type} eq 'projectile';
}
$out .= '<span class="unit-pdd" title="projectile">•</span>'
if $attack->{type} eq 'projectile';