From f00c1e5c4de7325c9d5d851a61355fe8638cca95 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 20 Jun 2015 07:14:32 +0200 Subject: [PATCH] sc: prefer precalculated dps for aggregate attacks Carrier and Swarm Host do not have an attack of their own, but indirectly deal damage through subunits which can be summed up manually. --- sc-units-hots.inc.pl | 11 ++++++++--- sc.plp | 5 ++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sc-units-hots.inc.pl b/sc-units-hots.inc.pl index 5cedf2e..6b230d9 100644 --- a/sc-units-hots.inc.pl +++ b/sc-units-hots.inc.pl @@ -902,8 +902,10 @@ use strict; }, attack => [ { + anti => 3, + count => 8, range => 8, # leash range 14 - dps => [13.3, undef, undef, 42.6], + dps => [26.7, undef, undef, 42.6], cooldown => 0.5, }, ], @@ -2612,9 +2614,12 @@ use strict; attack => [ { anti => 1, - dps => [27.9, 30.2, 32.5, 34.8], + dps => [16.7, undef, undef, 20.8], # 20/.6 * 2 /60*25 type => 'projectile', - cooldown => 0.86, + count => 2, + cooldown => 60, + duration => 25, + range => 3*25, # locust speed * duration = theoretical walk limit }, ], speed => 2.95, diff --git a/sc.plp b/sc.plp index 2a17bc8..f1632ee 100644 --- a/sc.plp +++ b/sc.plp @@ -164,7 +164,10 @@ sub showrange { ) if $attack->{splash}; $out .= ''; - if ($attack->{cooldown}) { + if ($attack->{dps}) { + $out .= showrange($attack->{dps}->[0], $attack->{dps}->[-1]); + } + elsif ($attack->{cooldown}) { if (my $type = $attack->{type}) { if ($type eq 'explosive') { $damage /= 2; -- 2.30.0