5 my $RT = 1.4; # real-time speed factor to faster
7 my $hots = do 'sc-units-hots.inc.pl' or die $!;
9 for my $row (@{$hots}) {
10 ref $row eq 'HASH' or next;
11 for ($row, @{ $row->{special} }, @{ $row->{upgrade} }) {
12 $_ *= $RT for $_->{speed} // ();
13 $_ /= $RT for $_->{build} // (), $_->{transform} // (), $_->{warp} // (), $_->{cooldown} // ();
14 $_->{cooldown} and $_->{cooldown} /= $RT for @{ $_->{attack} // [] };
16 $unit{ lc $row->{name} =~ tr/ /_/r } = $row;
20 sprintf('patch %vd', $V),
29 %{ $unit{mothership} },
32 $unit{mothership}->{special}->[0], # cf
33 $unit{mothership}->{special}->[1], # mr
35 %{ $unit{mothership}->{special}->[2] }, # tw
36 desc => $V lt v4.11.0 ? 'create a temporal field which slows ground units by 50%'
37 : 'create a temporal field which slows ground and air units by 50%',
48 $unit{nexus}->{special}->[0], # chrono boost
50 name => $V lt v4.7.1 ? 'Mass Recall' : 'Strategic Recall',
52 desc => 'recalls units owned by the player in the target area to the Nexus',
54 cooldown => $V lt v4.7.1 || $V ge v4.10.1 ? 130 : 85,
55 radius => $V lt v4.7.1 ? 6.5 : 2.5,
56 duration => 3.6, # +.7 warp in
58 $V lt v4.12.0 ? () : {
59 name => 'Battery Overcharge',
62 'increase target Shield Battery restoration rate by %d%% and function without consuming energy for 14s',
63 $V ge v5.0.11 ? 50 : 100,
67 cooldown => 60, # shared by all nexuses
68 range => 8, # within any friendly nexus
79 desc => 'on attack, increases movement speed to 8.47 for 2.5s and deals 8 damage on hit',
80 min => 100, # changed in 3.14.0
92 speed => $V lt v4.11.0 ? .98 : 1.57,
99 build => $V ge v5.0.11 ? 22.9 : 26.4,
100 speed => $V ge v5.0.11 ? 3.5 : 3.15,
102 $unit{sentry}->{special}->[0], # ff
104 %{ $unit{sentry}->{special}->[1] }, # gs
105 radius => $V lt v4.7.1 ? 4 : 4.5,
108 %{ $unit{sentry}->{special}->[2] }, # hl
109 cost => $V lt v4.7.1 ? 100 : 75,
118 %{ $unit{stalker}->{attack}->[0] }, # particle disruptors
136 build => $V lt v4.8.2 ? 27 : 30,
157 type => 'projectile', #XXX: assumption
166 name => 'Psionic Transfer',
168 desc => 'project shade, teleport after 7s',
176 attack => [], #TODO: indicate diff from parent
177 speed => 5, #XXX: faster than 3.5
178 range => 7, #XXX: calculate from speed
184 name => 'Resonating Glaives',
190 cooldown => $V lt v4.11.0 || $V ge v4.11.3 ? -.5 : -.6, # +45%/60%
198 %{ $unit{high_templar} },
199 speed => $V ge v5.0.11 ? 2.82 : 2.63,
212 $unit{high_templar}->{special}->[0], # fb
213 range => $V lt v4.12.0 ? 9 : 10,
215 $unit{high_templar}->{special}->[1], # ps
220 %{ $unit{dark_templar} },
222 $unit{dark_templar}->{special}->[0], # cl
224 name => 'Shadow Stride',
226 desc => sprintf('teleport to visible location, %.2fs attack delay afterwards', $V ge v5.0.11 ? .71 : .75),
229 build => $V lt v4.7.1 ? 121 : 100,
231 cooldown => $V lt v4.7.1 ? 21 : 14,
239 %{ $unit{observer} },
240 speed => $V ge v5.0.11 ? 2.82 : $V lt v4.8.2 || $V ge v4.11.0 ? 2.63 : 3.01,
241 size => $V ge v5.0.11 ? 1.1 : 1,
243 $unit{observer}->{special}->[0], # cloak
245 name => 'Surveillance Mode',
247 desc => 'gain 25% vision while immobilized',
249 sight => 2.75, # +25%
256 %{ $unit{warp_prism} },
258 min => $V lt v4.10.1 ? 200 : 250,
259 range => $V lt v4.10.1 ? 6 : 5, # pickup
262 %{ $unit{warp_prism}->{special}->[0] }, # gravitic drive
271 %{ $unit{colossus} },
274 %{ $unit{colossus}->{attack}->[0] }, # thermal lances
281 # cooldown => 1.18, #XXX
306 name => 'Purification Nova',
311 type => 'trans', #TODO: indicate
312 splash => $V ge v5.0.11 ? 1.375 : 1.5,
324 %{ $unit{void_ray} },
325 min => $V lt v5.0.9 && $V ge v5.0.2 ? 200 : 250,
326 speed => $V lt v5.0.2 ? 3.5 : 3.85,
327 build => $V lt v5.0.9 && $V ge v5.0.2 ? 37 : 43,
330 name => 'Flux Vanes',
334 speed => $V lt v5.0.2 ? 1.15 : .798,
343 $V lt v4.8.2 ? 'light' : 'armored' => 1,
350 %{ $unit{oracle}->{attack}->[0] }, # pulsar beam
358 name => 'Revelation',
360 desc => 'hit enemy units and buildings are revealed for ½ minute',
361 cost => $V lt v4.12.0 ? 50 : 25,
363 cooldown => $V lt v4.12.0 ? 2 : 10,
364 duration => $V lt v4.12.0 ? 30 : $V lt v5.0.2 ? 15 : 20,
369 name => 'Stasis Ward',
371 desc => 'places ward for 170s',
376 alt => 'Stasis Ward',
388 name => 'Permanent Cloak',
390 desc => 'cloaked at all times',
394 name => 'Stasis Trap',
396 desc => 'triggered by nearby ground units, trapping them for 21½s',
405 hp => $V lt v4.7.1 ? 300 : $V lt v4.11.0 ? 150 : 200,
406 shield => $V lt v4.7.1 ? 150 : $V lt v4.11.0 ? 125 : 100,
407 min => $V lt v4.7.1 ? 300 : 250,
408 gas => $V lt v4.7.1 ? 200 : 175,
409 pop => $V lt v4.7.1 ? 6 : 5,
410 speed => $V lt v4.7.1 ? 2.63 : $V lt v4.8.2 ? 3.5 : 3.15,
413 %{ $unit{tempest}->{attack}->[0] }, # kinetic overload
418 range => $V lt v4.11.0 ? 15 : 14,
421 %{ $unit{tempest}->{attack}->[1] }, # resonance coil
430 $V lt v5.0.2 ? () : {
431 name => 'Tectonic Destabilizers',
449 hp => $V lt v4.7.1 ? 250 : 300,
450 build => $V lt v4.7.1 ? 86 : 64,
453 %{ $unit{carrier}->{special}->[0] }, # interceptor
455 build => $V lt v4.7.1 ? 6 : $V lt v4.10.1 ? 11 : 9,
458 $V lt v4.7.1 ? () : (upgrade => []), # remove Graviton Catapult
465 $unit{missile_turret},
466 $unit{planetary_fortress},
471 %{ $unit{marauder} },
474 %{ $unit{marauder}->{attack}->[0] }, # punisher grenades
475 count => $V lt v4.3.0 ? 2 : 1,
476 damage => $V lt v4.3.0 ? 5 : 10,
479 armored => $V lt v4.3.0 ? 5 : 10,
480 -armored => $V lt v4.3.0 ? 0 : 1,
498 # replaces Sniper Round
499 name => 'Steady Targeting',
501 desc => '170 damage ignoring armor to a biological unit after 1.43s without damage',
503 range => 10, # kept until 14
507 %{ $unit{ghost}->{special}->[1] }, # emp round
508 radius => $V ge v5.0.11 ? 1.75 : $V lt v4.10.1 ? 1.5 : 2,
510 $unit{ghost}->{special}->[2], # cloak
511 $unit{ghost}->{special}->[3], # tac nuke strike
514 $V ge v5.0.11 || $V lt v4.10.1 ? () : {
515 name => 'Enhanced Shockwaves',
521 { radius => .5 }, # emp
533 %{ $unit{hellion}->{attack}->[0] }, # infernal flamethrower
546 $unit{hellbat}->{special}->[0], # Hellion Mode
548 name => 'Smart Servos',
552 transform => -1.43, # halve #TODO: alter special duration?
558 %{ $unit{widow_mine} },
562 %{ $unit{widow_mine}->{attack}->[0] }, # Sentinel Missiles
566 transform => $V lt v5.0.9 ? .71 : 1.07,
572 %{ $unit{siege_tank} },
576 %{ $unit{siege_tank}->{special}->[0] }, # siege mode
579 %{ $unit{siege_tank}->{special}->[0]->{attack}->[0] }, # shock cannon
604 hp => $V lt v4.7.1 ? 180 : 120,
612 name => $V lt v4.7.1 ? 'Tornado Blaster' : 'Typhoon Missile Pod',
613 damage => $V lt v4.7.1 ? 3 : 18,
614 upgrade => $V lt v4.7.1 ? 1 : 2,
615 bonus => $V ge v4.7.1 ? {} : {
619 cooldown => $V lt v4.7.1 ? .1 : .71,
620 range => $V lt v4.7.1 ? 6 : 5,
623 speed => $V lt v4.7.1 ? 4.13 : 4.73,
630 $V ge v5.0.11 ? 'deal 400 damage (600 after upgrade) over 14 seconds' :
631 $V ge v4.7.1 ? 'deal 400 damage (double to armored after upgrade) over 14 seconds' :
632 'target air for 160 damage ignoring armor while visible and within 15 range'
638 $V ge v4.7.1 ? () : {
639 name => 'Rapid Fire Launchers',
641 desc => 'rapid first 12 Lock On shots',
648 $V lt v4.7.1 ? () : {
649 name => 'Mag-Field Accelerator',
652 build => $V lt v4.8.2 ? 79 : 100,
653 desc => 'increases lock-on damage by '.($V ge v5.0.11 ? '50%' : '100% vs armored'),
660 armor => $V ge v3.14.0 && $V lt v4.7.1 ? 2 : 1,
662 $unit{thor}->{attack}->[0], # thor's hammer
663 $unit{thor}->{attack}->[1], # javelin missiles
665 %{ $unit{thor}->{attack}->[2] }, # punisher cannons
666 name => 'High Impact Payload',
667 damage => $V lt v4.7.1 ? 35 : $V lt v4.11.0 ? 40 : 25,
670 $V lt v4.7.1 ? 'armored' : 'massive' => $V lt v4.11.0 ? 15 : 10,
671 $V lt v4.7.1 ? '-armored' : '-massive' => 2,
673 cooldown => $V lt v4.7.1 ? 2.14 : $V lt v4.11.0 ? 1.71 : .9,
674 range => $V lt v4.8.2 ? 10 : 11,
682 hp => $V lt v4.3.0 ? 125 : 135,
688 $unit{medivac}->{special}->[0], # heal
690 %{ $unit{medivac}->{special}->[1] }, # ignite afterburners
691 desc => 'boost speed and accelleration to 4.25 for 8s',
693 duration => $V lt v4.7.1 ? 6.43 : 4.29,
694 cooldown => $V lt v4.11.0 ? 20 : 14,
700 name => 'Rapid Reignition System',
716 gas => $V ge v5.0.11 ? 125 : 150,
729 name => 'Lexington Rockets',
732 type => 'projectile',
740 name => 'Defender Mode',
742 transform => 2.88, # 1.46s to revert
743 alt => 'Defender Liberator',
747 name => 'Concord Cannon',
748 desc => 'within 5 diameter circle',
756 sight => 15, # only targeted area
759 name => 'Advanced Ballistics',
782 name => 'Hyperflight Rotors',
784 min => $V ge v5.0.11 ? 125 : $V ge v4.7.1 ? 150 : 200,
785 gas => $V ge v5.0.11 ? 125 : $V ge v4.7.1 ? 150 : 200,
786 build => $V ge v5.0.11 ? 100 : 121.4,
793 gas => $V ge v5.0.11 ? 150 : 200,
794 build => $V ge v5.0.11 ? 34.3 : 42.9,
795 speed => $V lt v4.11.0 ? 3.85 : 4.13,
796 upgrade => $V ge v5.0.11 ? [] : $unit{raven}->{upgrade}, # corvid reactor
799 %{ $unit{raven}->{special}->[0] }, # auto-turret
803 name => '12 mm Gauss Cannon',
809 hp => $V ge v5.0.11 ? 100 : 150,
810 armor => $V ge v5.0.11 ? 0 : 1,
811 range => $V lt v4.3.0 ? 1 : 2,
812 duration => $V ge v5.0.11 ? 7.9 : 10,
814 $unit{raven}->{special}->[0]->{upgrade}->[0], # hi-sec auto tracking
815 $unit{raven}->{special}->[0]->{upgrade}->[1], # structure armor
816 # no more durable materials
820 name => 'Interference Matrix',
822 desc => 'disable target mech or psionic unit rendering it unable to attack or cast',
823 cost => $V lt v4.11.0 ? 50 : 75,
825 duration => $V lt v4.11.0 ? 7.9 : 11,
828 name => 'Anti-Armor Missile',
830 desc => sprintf('launches missile %s reduce armor by %d',
831 $V lt v4.7.1 ? 'to do splash damage and' : 'to',
832 $V ge v5.0.11 ? 2 : 3,
838 damage => $V lt v4.3.0 ? 30 : $V lt v4.7.1 ? 15 : 0,
849 %{ $unit{battlecruiser} },
851 $unit{battlecruiser}->{attack}->[0], # ats laser
853 %{ $unit{battlecruiser}->{attack}->[1] }, # ata laser
854 damage => $V lt v4.7.1 ? 6 : 5,
859 name => 'Tactical Jump',
861 desc => 'warps to the target location after 5s (invulnerable after 1s)',
866 %{ $unit{battlecruiser}->{special}->[0] }, # yc
867 desc => '240 damage to a single target',
887 $unit{queen}->{attack}->[0], # claws
889 %{ $unit{queen}->{attack}->[1] }, # acid spines
890 range => $V lt v4.12.0 ? 8 : 7,
897 %{ $unit{overlord} },
898 speed => .902, # changed in 4.0.0
901 %{ $unit{overlord}->{upgrade}->[0] }, # carapace
904 $unit{overlord}->{upgrade}->[1], # sacs
909 %{ $unit{overseer} },
912 name => 'Oversight Mode',
914 desc => 'gain 25% vision while immobilized',
919 @{ $unit{overseer}->{special} }, # changeling, contaminate
924 $unit{spine_crawler},
927 %{ $unit{spore_crawler} },
930 %{ $unit{spore_crawler}->{attack}->[0] }, # seeker spores
943 %{ $unit{baneling} },
947 %{ $unit{baneling}->{attack}->[0] }, # volatile burst
948 damage => $V lt v4.12.0 ? 20 : $V lt v5.0.2 ? 18 : 15,
950 light => $V lt v4.12.0 ? 15 : $V lt v5.0.2 ? 17 : 20,
961 %{ $unit{baneling}->{upgrade}->[0] }, # centrifugal hooks
971 %{ $unit{roach}->{special}->[0] }, # rapid regeneration
972 desc => 'regenerates health at 7 HP/s while burrowed',
975 %{ $unit{roach}->{special}->[1] }, # tunneling claws
976 min => $V lt v4.7.1 ? 150 : 100,
977 gas => $V lt v4.7.1 ? 150 : 100,
979 desc => 'move while burrowed at speed of 2.8',
992 build => $V ge v5.0.11 ? 12.14 : 8.57+.36, # added max random
1006 type => 'projectile',
1017 %{ $unit{hydralisk} },
1021 %{ $unit{hydralisk}->{upgrade}->[0] }, # grooved spines
1028 $unit{hydralisk}->{upgrade}->[1], # muscular augments
1036 base => ['Hydralisk'],
1056 range => $V lt v4.11.0 ? 9 : 8,
1065 $V lt v4.11.0 ? () : {
1066 name => 'Seismic Spines',
1078 name => 'Adaptive Talons',
1079 desc => 'halves burrow time and increases movement speed',
1081 transform => $V lt v5.0.9 ? .71 : 1.07,
1090 %{ $unit{infestor} },
1093 %{ $unit{infestor}->{special}->[0] }, # neural parasite
1094 range => $V lt v4.11.0 ? 9 : 8,
1096 $unit{infestor}->{special}->[1], # fungal growth
1098 name => 'Microbial Shroud',
1100 desc => 'reduce damage from air by 50% to ground units in target area',
1101 cost => $V lt v4.11.3 ? 100 : 75,
1102 min => $V lt v4.11.3 ? 150 : undef,
1103 gas => $V lt v4.11.3 ? 150 : undef,
1104 build => $V lt v4.11.3 ? 79 : undef,
1105 req => $V lt v4.11.3 ? 'Hive' : undef,
1108 radius => $V lt v4.11.3 ? 3 : 3.5,
1110 $V ge v4.11.0 ? () : {
1111 %{ $unit{infestor}->{special}->[2] }, # infested terran
1114 %{ $unit{infestor}->{special}->[2]->{attack}->[0] }, # rockets
1115 cooldown => $V lt v4.10.1 ? .95 : 1.14,
1123 % {$unit{nydus_worm} },
1124 min => $V lt v4.7.1 ? 100 : $V lt v4.11.0 ? 50 : 75, # Nydus Network costs 150/150
1125 gas => $V lt v4.7.1 ? 100 : $V lt v4.11.0 ? 50 : 75,
1126 cooldown => $V lt v4.11.0 ? 0 : 14, # Summon Nydus Worm
1130 %{ $unit{swarm_host} },
1134 %{ $unit{swarm_host}->{special}->[0] }, # locust
1136 upgrade => [], # no flying
1146 %{ $unit{brood_lord} },
1147 speed => $V ge v5.0.11 ? 2.24 : 1.97,
1153 %{ $unit{ultralisk} },
1155 size => $V ge v5.0.11 ? 1.75 : 2,
1157 $unit{ultralisk}->{upgrade}->[0], # chitinous plating
1159 name => 'Anabolic Synthesis',
1163 speed => $V lt v4.8.2 ? .41 : .82,
1164 creep => -.215, # reverse speed increase