From d8aa909e15e63d619dcb06df614accc41acbad96 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 30 Jun 2015 20:55:16 +0200 Subject: [PATCH] sc: hover creep boost on speed values --- sc-units-hots.inc.pl | 2 -- sc.plp | 11 ++++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sc-units-hots.inc.pl b/sc-units-hots.inc.pl index 1809d09..524ed12 100644 --- a/sc-units-hots.inc.pl +++ b/sc-units-hots.inc.pl @@ -2158,7 +2158,6 @@ use strict; flying => 1, }, speed => 0.586, - creep => 0, sight => 11, special => [ { @@ -2208,7 +2207,6 @@ use strict; flying => 1, }, speed => 1.875, - creep => 0, sight => 11, detect => 1, energy => 50, diff --git a/sc.plp b/sc.plp index d8e89de..450d1cb 100644 --- a/sc.plp +++ b/sc.plp @@ -313,11 +313,20 @@ sub showrangeint { $_->{detect} ? '%s' : '%s', showrangeint($_->{sight}, $_->{upgraded}->{sight}) ), - '' . + sprintf('%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'↕', '' . showmagic($_), -- 2.30.0