sc: multiply speed of bw units to match sc2 values
[sheet.git] / sc.plp
diff --git a/sc.plp b/sc.plp
index 5454b637d02d7e0f4f7d59d733df64d58ebdcc75..5f18477389b53f8cd183e3298e106468102c045b 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -313,8 +313,20 @@ sub showrangeint {
                                $_->{detect} ? '<strong class="unit-detect">%s</strong>' : '%s',
                                showrangeint($_->{sight}, $_->{upgraded}->{sight})
                        ),
-                       '<td class="val unit-speed">' .
-                               showrangeint($_->{speed}, $_->{upgraded}->{speed}),
+                       sprintf('<td class="val unit-speed"%2$s>%s',
+                               showrange(
+                                       map { $_ && sprintf '%.1f', $_ }
+                                       $_->{speed}, $_->{upgraded}->{speed}
+                               ),
+                               defined $_->{creep} && sprintf(' title="%s on creep"',
+                                       $_->{creep} == 1 ? 'same' : showrange(
+                                               map { $_ && sprintf '%.1f', $_ }
+                                               $_->{speed} * $_->{creep},
+                                               $_->{upgraded}->{speed} && $_->{upgraded}->{speed} *
+                                                       ($_->{upgraded}->{creep} // $_->{creep}),
+                                       ),
+                               ),
+                       ),
                        $_->{attr}->{jump}
                                && qq'<span class="unit unit-jump" title="$_->{attr}->{jump}">↕</span>',
                        '<td class="unit-magic">' . showmagic($_),
@@ -461,7 +473,8 @@ if ($scver{major} > 1) {
        <dd>range in which the unit detects other units
        <dd><strong class="unit-detect">emphasis</strong> indicates ability to detect cloaked units
 <dt>speed
-       <dd>relative speed of movement (when in full motion, startup speed ignored)
+       <dd>top movement speed in hex per second
+       <dd>acceleration and deceleration ignored
 <dt>specials
        <dd>parentheses () indicate that it needs to be researched first
        <dd><span class="magic-perma">passive</span> abilities are always enabled