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',
61 desc => 'increase target Shield Battery restoration rate by 100% and function without consuming energy for 14s',
64 cooldown => 60, # shared by all nexuses
65 range => 8, # within any friendly nexus
76 desc => 'on attack, increases movement speed to 8.47 for 2.5s and deals 8 damage on hit',
77 min => 100, # changed in 3.14.0
89 speed => $V lt v4.11.0 ? .98 : 1.57,
97 $unit{sentry}->{special}->[0], # ff
99 %{ $unit{sentry}->{special}->[1] }, # gs
100 radius => $V lt v4.7.1 ? 4 : 4.5,
103 %{ $unit{sentry}->{special}->[2] }, # hl
104 cost => $V lt v4.7.1 ? 100 : 75,
113 %{ $unit{stalker}->{attack}->[0] }, # particle disruptors
131 build => $V lt v4.8.2 ? 27 : 30,
152 type => 'projectile', #XXX: assumption
161 name => 'Psionic Transfer',
163 desc => 'project shade, teleport after 7s',
171 attack => [], #TODO: indicate diff from parent
172 speed => 5, #XXX: faster than 3.5
173 range => 7, #XXX: calculate from speed
179 name => 'Resonating Glaives',
185 cooldown => $V lt v4.11.0 || $V ge v4.11.3 ? -.5 : -.6, # +45%/60%
193 %{ $unit{high_templar} },
206 $unit{high_templar}->{special}->[0], # fb
207 range => $V lt v4.12.0 ? 9 : 10,
209 $unit{high_templar}->{special}->[1], # ps
214 %{ $unit{dark_templar} },
216 $unit{dark_templar}->{special}->[0], # cl
218 name => 'Shadow Stride',
220 desc => 'teleport to visible location',
223 build => $V lt v4.7.1 ? 121 : 100,
225 cooldown => $V lt v4.7.1 ? 21 : 14,
233 %{ $unit{observer} },
234 speed => $V lt v4.8.2 || $V ge v4.11.0 ? 2.63 : 3.01,
236 $unit{observer}->{special}->[0], # cloak
238 name => 'Surveillance Mode',
240 desc => 'gain 25% vision while immobilized',
241 sight => 2.75, # +25%
248 %{ $unit{warp_prism} },
250 min => $V lt v4.10.1 ? 200 : 250,
251 range => $V lt v4.10.1 ? 6 : 5, # pickup
254 %{ $unit{warp_prism}->{special}->[0] }, # gravitic drive
263 %{ $unit{colossus} },
266 %{ $unit{colossus}->{attack}->[0] }, # thermal lances
273 # cooldown => 1.18, #XXX
298 name => 'Purification Nova',
303 type => 'trans', #TODO: indicate
316 %{ $unit{void_ray} },
317 min => $V lt v5.0.2 ? 250 : 200,
318 speed => $V lt v5.0.2 ? 3.5 : 3.85,
319 build => $V lt v5.0.2 ? 43 : 37,
322 name => 'Flux Vanes',
326 speed => $V lt v5.0.2 ? 1.15 : .798,
335 $V lt v4.8.2 ? 'light' : 'armored' => 1,
342 %{ $unit{oracle}->{attack}->[0] }, # pulsar beam
350 name => 'Revelation',
352 desc => 'hit enemy units and buildings are revealed for ½ minute',
353 cost => $V lt v4.12.0 ? 50 : 25,
355 cooldown => $V lt v4.12.0 ? 2 : 10,
356 duration => $V lt v4.12.0 ? 30 : $V lt v5.0.2 ? 15 : 20,
360 name => 'Stasis Ward',
362 desc => 'places ward for 170s',
367 alt => 'Stasis Ward',
379 name => 'Permanent Cloak',
381 desc => 'cloaked at all times',
385 name => 'Stasis Trap',
387 desc => 'triggered by nearby ground units, trapping them for 21½s',
396 hp => $V lt v4.7.1 ? 300 : $V lt v4.11.0 ? 150 : 200,
397 shield => $V lt v4.7.1 ? 150 : $V lt v4.11.0 ? 125 : 100,
398 min => $V lt v4.7.1 ? 300 : 250,
399 gas => $V lt v4.7.1 ? 200 : 175,
400 pop => $V lt v4.7.1 ? 6 : 5,
401 speed => $V lt v4.7.1 ? 2.63 : $V lt v4.8.2 ? 3.5 : 3.15,
404 %{ $unit{tempest}->{attack}->[0] }, # kinetic overload
409 range => $V lt v4.11.0 ? 15 : 14,
412 %{ $unit{tempest}->{attack}->[1] }, # resonance coil
421 $V lt v5.0.2 ? () : {
422 name => 'Tectonic Destabilizers',
440 hp => $V lt v4.7.1 ? 250 : 300,
441 build => $V lt v4.7.1 ? 86 : 64,
444 %{ $unit{carrier}->{special}->[0] }, # interceptor
446 build => $V lt v4.7.1 ? 6 : $V lt v4.10.1 ? 11 : 9,
449 $V lt v4.7.1 ? () : (upgrade => []), # remove Graviton Catapult
456 $unit{missile_turret},
457 $unit{planetary_fortress},
462 %{ $unit{marauder} },
465 %{ $unit{marauder}->{attack}->[0] }, # punisher grenades
466 count => $V lt v4.3.0 ? 2 : 1,
467 damage => $V lt v4.3.0 ? 5 : 10,
470 armored => $V lt v4.3.0 ? 5 : 10,
471 -armored => $V lt v4.3.0 ? 0 : 1,
489 # replaces Sniper Round
490 name => 'Steady Targeting',
492 desc => '170 damage ignoring armor to a biological unit after 1.43s without damage',
498 %{ $unit{ghost}->{special}->[1] }, # emp round
499 radius => $V lt v4.10.1 ? 1.5 : 2,
501 $unit{ghost}->{special}->[2], # cloak
502 $unit{ghost}->{special}->[3], # tac nuke strike
510 %{ $unit{hellion}->{attack}->[0] }, # infernal flamethrower
523 $unit{hellbat}->{special}->[0], # Hellion Mode
525 name => 'Smart Servos',
529 transform => -1.43, # halve #TODO: alter special duration?
535 %{ $unit{widow_mine} },
539 %{ $unit{widow_mine}->{attack}->[0] }, # Sentinel Missiles
548 %{ $unit{siege_tank} },
552 %{ $unit{siege_tank}->{special}->[0] }, # siege mode
555 %{ $unit{siege_tank}->{special}->[0]->{attack}->[0] }, # shock cannon
580 hp => $V lt v4.7.1 ? 180 : 120,
588 name => $V lt v4.7.1 ? 'Tornado Blaster' : 'Typhoon Missile Pod',
589 damage => $V lt v4.7.1 ? 3 : 18,
590 upgrade => $V lt v4.7.1 ? 1 : 2,
591 bonus => $V ge v4.7.1 ? {} : {
595 cooldown => $V lt v4.7.1 ? .1 : .71,
596 range => $V lt v4.7.1 ? 6 : 5,
599 speed => $V lt v4.7.1 ? 4.13 : 4.73,
605 desc => $V lt v4.7.1 ? 'target air for 160 damage ignoring armor while visible and within 15 range'
606 : 'deal 400 damage (double to armored after upgrade) over 14 seconds',
611 $V ge v4.7.1 ? () : {
612 name => 'Rapid Fire Launchers',
614 desc => 'rapid first 12 Lock On shots',
621 $V lt v4.7.1 ? () : {
622 name => 'Mag-Field Accelerator',
625 build => $V lt v4.8.2 ? 79 : 100,
626 desc => 'increases lock-on damage to ',
633 armor => $V ge v3.14.0 && $V lt v4.7.1 ? 2 : 1,
635 $unit{thor}->{attack}->[0], # thor's hammer
636 $unit{thor}->{attack}->[1], # javelin missiles
638 %{ $unit{thor}->{attack}->[2] }, # punisher cannons
639 name => 'High Impact Payload',
640 damage => $V lt v4.7.1 ? 35 : $V lt v4.11.0 ? 40 : 25,
643 $V lt v4.7.1 ? 'armored' : 'massive' => $V lt v4.11.0 ? 15 : 10,
644 $V lt v4.7.1 ? '-armored' : '-massive' => 2,
646 cooldown => $V lt v4.7.1 ? 2.14 : $V lt v4.11.0 ? 1.71 : .9,
647 range => $V lt v4.8.2 ? 10 : 11,
655 hp => $V lt v4.3.0 ? 125 : 135,
661 $unit{medivac}->{special}->[0], # heal
663 %{ $unit{medivac}->{special}->[1] }, # ignite afterburners
664 desc => 'boost speed and accelleration to 4.25 for 8s',
666 duration => $V lt v4.7.1 ? 6.43 : 4.29,
667 cooldown => $V lt v4.11.0 ? 20 : 14,
673 name => 'Rapid Reignition System',
702 name => 'Lexington Rockets',
705 type => 'projectile',
713 name => 'Defender Mode',
715 transform => 2.88, # 1.46s to revert
716 alt => 'Defender Liberator',
720 name => 'Concord Cannon',
721 desc => 'within 5 diameter circle',
729 sight => 15, # only targeted area
732 name => 'Advanced Ballistics',
755 name => 'Hyperflight Rotors',
757 min => $V lt v4.7.1 ? 200 : 150,
758 gas => $V lt v4.7.1 ? 200 : 150,
766 speed => $V lt v4.11.0 ? 3.85 : 4.13,
769 %{ $unit{raven}->{special}->[0] }, # auto-turret
773 name => '12 mm Gauss Cannon',
779 range => $V lt v4.3.0 ? 1 : 2,
782 $unit{raven}->{special}->[0]->{upgrade}->[0], # hi-sec auto tracking
783 $unit{raven}->{special}->[0]->{upgrade}->[1], # structure armor
784 # no more durable materials
788 name => 'Interference Matrix',
790 desc => 'disable target mech or psionic unit rendering it unable to attack or cast',
791 cost => $V lt v4.11.0 ? 50 : 75,
793 duration => $V lt v4.11.0 ? 7.9 : 11,
796 name => 'Anti-Armor Missile',
798 desc => $V lt v4.7.1 ? 'launches missile to do splash damage and reduce armor by 3'
799 : 'launches missile to reduce armor by 3',
804 damage => $V lt v4.3.0 ? 30 : $V lt v4.7.1 ? 15 : 0,
815 %{ $unit{battlecruiser} },
817 $unit{battlecruiser}->{attack}->[0], # ats laser
819 %{ $unit{battlecruiser}->{attack}->[1] }, # ata laser
820 damage => $V lt v4.7.1 ? 6 : 5,
825 name => 'Tactical Jump',
827 desc => 'warps to the target location after 5s (invulnerable after 1s)',
832 %{ $unit{battlecruiser}->{special}->[0] }, # yc
833 desc => '240 damage to a single target',
853 $unit{queen}->{attack}->[0], # claws
855 %{ $unit{queen}->{attack}->[1] }, # acid spines
856 range => $V lt v4.12.0 ? 8 : 7,
863 %{ $unit{overlord} },
864 speed => .902, # changed in 4.0.0
867 %{ $unit{overlord}->{upgrade}->[0] }, # carapace
870 $unit{overlord}->{upgrade}->[1], # sacs
877 $unit{spine_crawler},
880 %{ $unit{spore_crawler} },
883 %{ $unit{spore_crawler}->{attack}->[0] }, # seeker spores
896 %{ $unit{baneling} },
900 %{ $unit{baneling}->{attack}->[0] }, # volatile burst
901 damage => $V lt v4.12.0 ? 20 : $V lt v5.0.2 ? 18 : 15,
903 light => $V lt v4.12.0 ? 15 : $V lt v5.0.2 ? 17 : 20,
914 %{ $unit{baneling}->{upgrade}->[0] }, # centrifugal hooks
924 %{ $unit{roach}->{special}->[0] }, # rapid regeneration
925 desc => 'regenerates health at 7 HP/s while burrowed',
928 %{ $unit{roach}->{special}->[1] }, # tunneling claws
929 min => $V lt v4.7.1 ? 150 : 100,
930 gas => $V lt v4.7.1 ? 150 : 100,
932 desc => 'move while burrowed at speed of 2.8',
959 type => 'projectile',
970 %{ $unit{hydralisk} },
974 %{ $unit{hydralisk}->{upgrade}->[0] }, # grooved spines
981 $unit{hydralisk}->{upgrade}->[1], # muscular augments
989 base => ['Hydralisk'],
1009 range => $V lt v4.11.0 ? 9 : 8,
1017 $V lt v4.11.0 ? () : {
1018 name => 'Seismic Spines',
1036 %{ $unit{infestor} },
1039 %{ $unit{infestor}->{special}->[0] }, # neural parasite
1040 range => $V lt v4.11.0 ? 9 : 8,
1042 $unit{infestor}->{special}->[1], # fungal growth
1044 name => 'Microbial Shroud',
1046 desc => 'reduce damage from air by 50% to ground units in target area',
1047 cost => $V lt v4.11.3 ? 100 : 75,
1048 min => $V lt v4.11.3 ? 150 : undef,
1049 gas => $V lt v4.11.3 ? 150 : undef,
1050 build => $V lt v4.11.3 ? 79 : undef,
1051 req => $V lt v4.11.3 ? 'Hive' : undef,
1054 radius => $V lt v4.11.3 ? 3 : 3.5,
1056 $V ge v4.11.0 ? () : {
1057 %{ $unit{infestor}->{special}->[2] }, # infested terran
1060 %{ $unit{infestor}->{special}->[2]->{attack}->[0] }, # rockets
1061 cooldown => $V lt v4.10.1 ? .95 : 1.14,
1069 % {$unit{nydus_worm} },
1070 min => $V lt v4.7.1 ? 100 : $V lt v4.11.0 ? 50 : 75, # Nydus Network costs 150/150
1071 gas => $V lt v4.7.1 ? 100 : $V lt v4.11.0 ? 50 : 75,
1072 cooldown => $V lt v4.11.0 ? 0 : 14, # Summon Nydus Worm
1076 %{ $unit{swarm_host} },
1080 %{ $unit{swarm_host}->{special}->[0] }, # locust
1082 upgrade => [], # no flying
1094 %{ $unit{ultralisk} },
1097 $unit{ultralisk}->{upgrade}->[0], # chitinous plating
1099 name => 'Anabolic Synthesis',
1103 speed => $V lt v4.8.2 ? .41 : .82,
1104 creep => -.215, # reverse speed increase