sc: hover creep boost on speed values
[sheet.git] / sc.plp
diff --git a/sc.plp b/sc.plp
index d8e89de68219ec5ec0fcb4b3d8975a5ec9ba2ebd..450d1cb57c6a92244dbffec769b6acc8533114e2 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -313,11 +313,20 @@ sub showrangeint {
                                $_->{detect} ? '<strong class="unit-detect">%s</strong>' : '%s',
                                showrangeint($_->{sight}, $_->{upgraded}->{sight})
                        ),
                                $_->{detect} ? '<strong class="unit-detect">%s</strong>' : '%s',
                                showrangeint($_->{sight}, $_->{upgraded}->{sight})
                        ),
-                       '<td class="val unit-speed">' .
+                       sprintf('<td class="val unit-speed"%2$s>%s',
                                showrange(
                                        map { $_ && sprintf '%.1f', $_ }
                                        $_->{speed}, $_->{upgraded}->{speed}
                                ),
                                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($_),
                        $_->{attr}->{jump}
                                && qq'<span class="unit unit-jump" title="$_->{attr}->{jump}">↕</span>',
                        '<td class="unit-magic">' . showmagic($_),