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,
368 name => 'Stasis Ward',
370 desc => 'places ward for 170s',
375 alt => 'Stasis Ward',
387 name => 'Permanent Cloak',
389 desc => 'cloaked at all times',
393 name => 'Stasis Trap',
395 desc => 'triggered by nearby ground units, trapping them for 21½s',
404 hp => $V lt v4.7.1 ? 300 : $V lt v4.11.0 ? 150 : 200,
405 shield => $V lt v4.7.1 ? 150 : $V lt v4.11.0 ? 125 : 100,
406 min => $V lt v4.7.1 ? 300 : 250,
407 gas => $V lt v4.7.1 ? 200 : 175,
408 pop => $V lt v4.7.1 ? 6 : 5,
409 speed => $V lt v4.7.1 ? 2.63 : $V lt v4.8.2 ? 3.5 : 3.15,
412 %{ $unit{tempest}->{attack}->[0] }, # kinetic overload
417 range => $V lt v4.11.0 ? 15 : 14,
420 %{ $unit{tempest}->{attack}->[1] }, # resonance coil
429 $V lt v5.0.2 ? () : {
430 name => 'Tectonic Destabilizers',
448 hp => $V lt v4.7.1 ? 250 : 300,
449 build => $V lt v4.7.1 ? 86 : 64,
452 %{ $unit{carrier}->{special}->[0] }, # interceptor
454 build => $V lt v4.7.1 ? 6 : $V lt v4.10.1 ? 11 : 9,
457 $V lt v4.7.1 ? () : (upgrade => []), # remove Graviton Catapult
464 $unit{missile_turret},
465 $unit{planetary_fortress},
470 %{ $unit{marauder} },
473 %{ $unit{marauder}->{attack}->[0] }, # punisher grenades
474 count => $V lt v4.3.0 ? 2 : 1,
475 damage => $V lt v4.3.0 ? 5 : 10,
478 armored => $V lt v4.3.0 ? 5 : 10,
479 -armored => $V lt v4.3.0 ? 0 : 1,
497 # replaces Sniper Round
498 name => 'Steady Targeting',
500 desc => '170 damage ignoring armor to a biological unit after 1.43s without damage',
502 range => 10, # kept until 14
506 %{ $unit{ghost}->{special}->[1] }, # emp round
507 radius => $V ge v5.0.11 ? 1.75 : $V lt v4.10.1 ? 1.5 : 2,
509 $unit{ghost}->{special}->[2], # cloak
510 $unit{ghost}->{special}->[3], # tac nuke strike
518 %{ $unit{hellion}->{attack}->[0] }, # infernal flamethrower
531 $unit{hellbat}->{special}->[0], # Hellion Mode
533 name => 'Smart Servos',
537 transform => -1.43, # halve #TODO: alter special duration?
543 %{ $unit{widow_mine} },
547 %{ $unit{widow_mine}->{attack}->[0] }, # Sentinel Missiles
551 transform => $V lt v5.0.9 ? .71 : 1.07,
557 %{ $unit{siege_tank} },
561 %{ $unit{siege_tank}->{special}->[0] }, # siege mode
564 %{ $unit{siege_tank}->{special}->[0]->{attack}->[0] }, # shock cannon
589 hp => $V lt v4.7.1 ? 180 : 120,
597 name => $V lt v4.7.1 ? 'Tornado Blaster' : 'Typhoon Missile Pod',
598 damage => $V lt v4.7.1 ? 3 : 18,
599 upgrade => $V lt v4.7.1 ? 1 : 2,
600 bonus => $V ge v4.7.1 ? {} : {
604 cooldown => $V lt v4.7.1 ? .1 : .71,
605 range => $V lt v4.7.1 ? 6 : 5,
608 speed => $V lt v4.7.1 ? 4.13 : 4.73,
615 $V ge v5.0.11 ? 'deal 400 damage (600 after upgrade) over 14 seconds' :
616 $V ge v4.7.1 ? 'deal 400 damage (double to armored after upgrade) over 14 seconds' :
617 'target air for 160 damage ignoring armor while visible and within 15 range'
623 $V ge v4.7.1 ? () : {
624 name => 'Rapid Fire Launchers',
626 desc => 'rapid first 12 Lock On shots',
633 $V lt v4.7.1 ? () : {
634 name => 'Mag-Field Accelerator',
637 build => $V lt v4.8.2 ? 79 : 100,
638 desc => 'increases lock-on damage by '.($V ge v5.0.11 ? '50%' : '100% vs armored'),
645 armor => $V ge v3.14.0 && $V lt v4.7.1 ? 2 : 1,
647 $unit{thor}->{attack}->[0], # thor's hammer
648 $unit{thor}->{attack}->[1], # javelin missiles
650 %{ $unit{thor}->{attack}->[2] }, # punisher cannons
651 name => 'High Impact Payload',
652 damage => $V lt v4.7.1 ? 35 : $V lt v4.11.0 ? 40 : 25,
655 $V lt v4.7.1 ? 'armored' : 'massive' => $V lt v4.11.0 ? 15 : 10,
656 $V lt v4.7.1 ? '-armored' : '-massive' => 2,
658 cooldown => $V lt v4.7.1 ? 2.14 : $V lt v4.11.0 ? 1.71 : .9,
659 range => $V lt v4.8.2 ? 10 : 11,
667 hp => $V lt v4.3.0 ? 125 : 135,
673 $unit{medivac}->{special}->[0], # heal
675 %{ $unit{medivac}->{special}->[1] }, # ignite afterburners
676 desc => 'boost speed and accelleration to 4.25 for 8s',
678 duration => $V lt v4.7.1 ? 6.43 : 4.29,
679 cooldown => $V lt v4.11.0 ? 20 : 14,
685 name => 'Rapid Reignition System',
701 gas => $V ge v5.0.11 ? 125 : 150,
714 name => 'Lexington Rockets',
717 type => 'projectile',
725 name => 'Defender Mode',
727 transform => 2.88, # 1.46s to revert
728 alt => 'Defender Liberator',
732 name => 'Concord Cannon',
733 desc => 'within 5 diameter circle',
741 sight => 15, # only targeted area
744 name => 'Advanced Ballistics',
767 name => 'Hyperflight Rotors',
769 min => $V ge v5.0.11 ? 125 : $V ge v4.7.1 ? 150 : 200,
770 gas => $V ge v5.0.11 ? 125 : $V ge v4.7.1 ? 150 : 200,
771 build => $V ge v5.0.11 ? 100 : 121.4,
778 gas => $V ge v5.0.11 ? 150 : 200,
779 build => $V ge v5.0.11 ? 34.3 : 42.9,
780 speed => $V lt v4.11.0 ? 3.85 : 4.13,
781 upgrade => $V ge v5.0.11 ? [] : $unit{raven}->{upgrade}, # corvid reactor
784 %{ $unit{raven}->{special}->[0] }, # auto-turret
788 name => '12 mm Gauss Cannon',
794 hp => $V ge v5.0.11 ? 100 : 150,
795 armor => $V ge v5.0.11 ? 0 : 1,
796 range => $V lt v4.3.0 ? 1 : 2,
797 duration => $V ge v5.0.11 ? 7.9 : 10,
799 $unit{raven}->{special}->[0]->{upgrade}->[0], # hi-sec auto tracking
800 $unit{raven}->{special}->[0]->{upgrade}->[1], # structure armor
801 # no more durable materials
805 name => 'Interference Matrix',
807 desc => 'disable target mech or psionic unit rendering it unable to attack or cast',
808 cost => $V lt v4.11.0 ? 50 : 75,
810 duration => $V lt v4.11.0 ? 7.9 : 11,
813 name => 'Anti-Armor Missile',
815 desc => sprintf('launches missile %s reduce armor by %d',
816 $V lt v4.7.1 ? 'to do splash damage and' : 'to',
817 $V ge v5.0.11 ? 2 : 3,
823 damage => $V lt v4.3.0 ? 30 : $V lt v4.7.1 ? 15 : 0,
834 %{ $unit{battlecruiser} },
836 $unit{battlecruiser}->{attack}->[0], # ats laser
838 %{ $unit{battlecruiser}->{attack}->[1] }, # ata laser
839 damage => $V lt v4.7.1 ? 6 : 5,
844 name => 'Tactical Jump',
846 desc => 'warps to the target location after 5s (invulnerable after 1s)',
851 %{ $unit{battlecruiser}->{special}->[0] }, # yc
852 desc => '240 damage to a single target',
872 $unit{queen}->{attack}->[0], # claws
874 %{ $unit{queen}->{attack}->[1] }, # acid spines
875 range => $V lt v4.12.0 ? 8 : 7,
882 %{ $unit{overlord} },
883 speed => .902, # changed in 4.0.0
886 %{ $unit{overlord}->{upgrade}->[0] }, # carapace
889 $unit{overlord}->{upgrade}->[1], # sacs
894 %{ $unit{overseer} },
897 name => 'Oversight Mode',
899 desc => 'gain 25% vision while immobilized',
904 @{ $unit{overseer}->{special} }, # changeling, contaminate
909 $unit{spine_crawler},
912 %{ $unit{spore_crawler} },
915 %{ $unit{spore_crawler}->{attack}->[0] }, # seeker spores
928 %{ $unit{baneling} },
932 %{ $unit{baneling}->{attack}->[0] }, # volatile burst
933 damage => $V lt v4.12.0 ? 20 : $V lt v5.0.2 ? 18 : 15,
935 light => $V lt v4.12.0 ? 15 : $V lt v5.0.2 ? 17 : 20,
946 %{ $unit{baneling}->{upgrade}->[0] }, # centrifugal hooks
956 %{ $unit{roach}->{special}->[0] }, # rapid regeneration
957 desc => 'regenerates health at 7 HP/s while burrowed',
960 %{ $unit{roach}->{special}->[1] }, # tunneling claws
961 min => $V lt v4.7.1 ? 150 : 100,
962 gas => $V lt v4.7.1 ? 150 : 100,
964 desc => 'move while burrowed at speed of 2.8',
977 build => $V ge v5.0.11 ? 12.14 : 8.57+.36, # added max random
991 type => 'projectile',
1002 %{ $unit{hydralisk} },
1006 %{ $unit{hydralisk}->{upgrade}->[0] }, # grooved spines
1013 $unit{hydralisk}->{upgrade}->[1], # muscular augments
1021 base => ['Hydralisk'],
1041 range => $V lt v4.11.0 ? 9 : 8,
1050 $V lt v4.11.0 ? () : {
1051 name => 'Seismic Spines',
1063 name => 'Adaptive Talons',
1064 desc => 'halves burrow time and increases movement speed',
1066 transform => $V lt v5.0.9 ? .71 : 1.07,
1075 %{ $unit{infestor} },
1078 %{ $unit{infestor}->{special}->[0] }, # neural parasite
1079 range => $V lt v4.11.0 ? 9 : 8,
1081 $unit{infestor}->{special}->[1], # fungal growth
1083 name => 'Microbial Shroud',
1085 desc => 'reduce damage from air by 50% to ground units in target area',
1086 cost => $V lt v4.11.3 ? 100 : 75,
1087 min => $V lt v4.11.3 ? 150 : undef,
1088 gas => $V lt v4.11.3 ? 150 : undef,
1089 build => $V lt v4.11.3 ? 79 : undef,
1090 req => $V lt v4.11.3 ? 'Hive' : undef,
1093 radius => $V lt v4.11.3 ? 3 : 3.5,
1095 $V ge v4.11.0 ? () : {
1096 %{ $unit{infestor}->{special}->[2] }, # infested terran
1099 %{ $unit{infestor}->{special}->[2]->{attack}->[0] }, # rockets
1100 cooldown => $V lt v4.10.1 ? .95 : 1.14,
1108 % {$unit{nydus_worm} },
1109 min => $V lt v4.7.1 ? 100 : $V lt v4.11.0 ? 50 : 75, # Nydus Network costs 150/150
1110 gas => $V lt v4.7.1 ? 100 : $V lt v4.11.0 ? 50 : 75,
1111 cooldown => $V lt v4.11.0 ? 0 : 14, # Summon Nydus Worm
1115 %{ $unit{swarm_host} },
1119 %{ $unit{swarm_host}->{special}->[0] }, # locust
1121 upgrade => [], # no flying
1131 %{ $unit{brood_lord} },
1132 speed => $V ge v5.0.11 ? 2.24 : 1.97,
1138 %{ $unit{ultralisk} },
1140 size => $V ge v5.0.11 ? 1.75 : 2,
1142 $unit{ultralisk}->{upgrade}->[0], # chitinous plating
1144 name => 'Anabolic Synthesis',
1148 speed => $V lt v4.8.2 ? .41 : .82,
1149 creep => -.215, # reverse speed increase