sc: indicate projectile attacks
[sheet.git] / sc.plp
diff --git a/sc.plp b/sc.plp
index c86ef0bc47bd33c2d9f55bbdc8974b37bb3fa83c..1c611305dbffc1d1e42df4fa9370e4b5bc874fab 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -144,8 +144,12 @@ sub showrange {
                                ),
                        )} keys %{ $attack->{bonus} }),
                ) if $attack->{bonus};
+               $out .= '<span class="unit-pdd" title="projectile">•</span>'
+                       if $attack->{type} eq 'projectile';
 
+               $out .= sprintf '<span title="%s">', $attack->{name} if $attack->{name};
                $out .= showrange($damage, $maxdamage);
+               $out .= '</span>' if $attack->{name};
                $out .= sprintf('<span class="unit-splash" title="%s">%s</span>',
                        $attack->{splash} eq 'line' ? ('linear', '×') : ('splash', '+')
                ) if $attack->{splash};
@@ -186,15 +190,17 @@ sub showrange {
                                join('',
                                        $_->{name},
                                        $_->{desc} ? ": $_->{desc}" : '',
-                                       $_->{range} || $_->{cost} ? sprintf(' (%s)', join ', ',
+                                       (map { $_ && " ($_)" } join ', ',
+                                               #TODO: apply upgrades
                                                $_->{range} ? "range $_->{range}" : (),
                                                $_->{cost} ? sprintf('cost %.0f%%%s',
                                                        100 * $_->{cost} / $row->{energy},
                                                        defined $_->{maint} && sprintf('+%.1f%%/s',
                                                                100 * $_->{maint} / $row->{energy},
                                                        ),
-                                               ) : (),
-                                       ) : '',
+                                               ) :
+                                               $_->{cooldown} ? "cooldown $_->{cooldown}s" : (),
+                                       ),
                                ),
                                sprintf($_->{build} ? '(%s)' : '%s', $_->{abbr}),
                } grep { defined $_->{abbr} } @{$specials};
@@ -401,7 +407,9 @@ if ($scver{major} > 1) {
        <dd><:
 if ($scver{major} > 1) {
                :>does not include <span>&ge;</span>bonus damage
-               dealt to susceptible unit types<:
+               dealt to susceptible unit types
+       <dd><span class="unit-pdd">•</span>projectile shots are negated by
+               Point Defense Drones<:
 } else {
                :><span class="unit-l">*</span>explosive damage does only
                50% damage to small units, 75% to medium, 100% to large
@@ -418,8 +426,8 @@ if ($scver{major} > 1) {
 <dt>speed
        <dd>relative speed of movement (when in full motion, startup speed ignored)
 <dt>specials
-       <dd>special abilities are usually casted manually, but some are <span class="magic-perma">always active</span>
        <dd>parentheses () indicate that it needs to be researched first
+       <dd><span class="magic-perma">passive</span> abilities are always enabled
        <dd>hover for description
        <dd>range is maximum range required to activate
        <dd>cost is percentage of total energy lost