sc: indicate cooldown of costless specials instead
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 19 Jun 2015 14:11:33 +0000 (16:11 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 22 Jun 2015 13:38:51 +0000 (15:38 +0200)
sc-units-hots.inc.pl
sc.plp

index 6404dce9ee35cb784be6f004d92243a4c27cd7c8..5cf26b2a197b572a0b562439b73b4732e5ec9aef 100644 (file)
@@ -2850,6 +2850,7 @@ use strict;
                        name => 'Consume',
                        abbr => 'cs',
                        desc => 'leaches 200 life of friendly building over 20s to gain 50 energy',
                        name => 'Consume',
                        abbr => 'cs',
                        desc => 'leaches 200 life of friendly building over 20s to gain 50 energy',
+                       cost => -50,
                        duration => 20,
                        range => 7,
                        cooldown => 1,
                        duration => 20,
                        range => 7,
                        cooldown => 1,
diff --git a/sc.plp b/sc.plp
index df78b8e06dc5c2a28a728096008300041b6a68c6..a7da312c8207b4ef8650d2291355c7796da91b44 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -188,15 +188,17 @@ sub showrange {
                                join('',
                                        $_->{name},
                                        $_->{desc} ? ": $_->{desc}" : '',
                                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},
                                                        ),
                                                $_->{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};
                                ),
                                sprintf($_->{build} ? '(%s)' : '%s', $_->{abbr}),
                } grep { defined $_->{abbr} } @{$specials};
@@ -420,8 +422,8 @@ if ($scver{major} > 1) {
 <dt>speed
        <dd>relative speed of movement (when in full motion, startup speed ignored)
 <dt>specials
 <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>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
        <dd>hover for description
        <dd>range is maximum range required to activate
        <dd>cost is percentage of total energy lost