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} },
30 pop => $V ge v5.0.12 ? 6 : 8,
31 min => $V ge v5.0.12 ? 300 : 400,
32 gas => $V ge v5.0.12 ? 300 : 400,
33 build => $V ge v5.0.12 ? 79 : 114,
34 size => $V ge v5.0.12 ? 2.475 : 2.75,
35 hp => $V ge v5.0.12 ? 250 : 350,
36 shield => $V ge v5.0.12 ? 250 : 350,
37 speed => $V ge v5.0.12 ? 2.83 : 2.62, # rotation speed also increased
38 energy => $V ge v5.0.12 ? 0 : 50,
41 %{ $unit{mothership}->{special}->[0] }, # cf
42 $V lt v5.0.12 ? () : (
45 desc => $unit{mothership}->{special}->[0]->{desc} . ' for 20s',
49 %{ $unit{mothership}->{special}->[1] }, # mr
50 cost => $V ge v5.0.12 ? 0 : 100,
51 cooldown => $V ge v5.0.12 ? 89 : 0,
52 radius => $V ge v5.0.12 ? 5 : 6.5,
55 %{ $unit{mothership}->{special}->[2] }, # tw
56 desc => $V lt v4.11.0 ? 'create a temporal field which slows ground units by 50%' :
57 $V lt v5.0.12 ? 'create a temporal field which slows ground and air units by 50%' :
58 'create a temporal field which slows ground and air units by 40%',
59 cost => $V ge v5.0.12 ? 0 : 100,
60 cooldown => $V ge v5.0.12 ? 60 : 0,
61 radius => $V ge v5.0.12 ? 3.75 : 4,
62 delay => $V ge v5.0.12 ? .71 : 1.79,
73 $unit{nexus}->{special}->[0], # chrono boost
75 name => $V lt v4.7.1 ? 'Mass Recall' : 'Strategic Recall',
77 desc => 'recalls units owned by the player in the target area to the Nexus',
79 cooldown => $V lt v4.7.1 || $V ge v4.10.1 ? 130 : 85,
80 radius => $V lt v4.7.1 ? 6.5 : 2.5,
81 duration => 3.6, # +.7 warp in
83 $V lt v4.12.0 ? () : {
84 name => 'Battery Overcharge',
87 'increase target Shield Battery restoration rate by %d%% and function without consuming energy for 14s',
88 $V ge v5.0.11 ? 50 : 100,
92 cooldown => 60, # shared by all nexuses
93 range => 8, # within any friendly nexus
104 desc => 'on attack, increases movement speed to 8.47 for 2.5s and deals 8 damage on hit',
105 min => 100, # changed in 3.14.0
117 speed => $V lt v4.11.0 ? .98 : 1.57,
124 build => $V ge v5.0.11 ? 22.9 : 26.4,
125 speed => $V ge v5.0.11 ? 3.5 : 3.15,
127 $unit{sentry}->{special}->[0], # ff
129 %{ $unit{sentry}->{special}->[1] }, # gs
130 radius => $V lt v4.7.1 ? 4 : 4.5,
131 duration => $V ge v5.0.12 ? 12.86 : 10.71,
134 %{ $unit{sentry}->{special}->[2] }, # hl
135 cost => $V lt v4.7.1 ? 100 : 75,
144 %{ $unit{stalker}->{attack}->[0] }, # particle disruptors
162 build => $V lt v4.8.2 ? 27 : 30,
183 type => 'projectile', #XXX: assumption
192 name => 'Psionic Transfer',
194 desc => 'project shade, teleport after 7s',
202 attack => [], #TODO: indicate diff from parent
203 speed => 5, #XXX: faster than 3.5
204 range => 7, #XXX: calculate from speed
210 name => 'Resonating Glaives',
216 cooldown => $V lt v4.11.0 || $V ge v4.11.3 ? -.5 : -.6, # +45%/60%
224 %{ $unit{high_templar} },
225 speed => $V ge v5.0.11 ? 2.82 : 2.63,
238 $unit{high_templar}->{special}->[0], # fb
239 range => $V lt v4.12.0 ? 9 : 10,
241 $unit{high_templar}->{special}->[1], # ps
246 %{ $unit{dark_templar} },
248 $unit{dark_templar}->{special}->[0], # cl
250 name => 'Shadow Stride',
252 desc => sprintf('teleport to visible location, %.2fs attack delay afterwards', $V ge v5.0.11 ? .71 : .75),
255 build => $V lt v4.7.1 ? 121 : 100,
257 cooldown => $V lt v4.7.1 ? 21 : 14,
265 %{ $unit{observer} },
266 speed => $V ge v5.0.11 ? 2.82 : $V lt v4.8.2 || $V ge v4.11.0 ? 2.63 : 3.01,
267 size => $V ge v5.0.11 ? 1.1 : 1,
269 $unit{observer}->{special}->[0], # cloak
271 name => 'Surveillance Mode',
273 desc => 'gain 25% vision while immobilized',
275 sight => 2.75, # +25%
282 %{ $unit{warp_prism} },
284 min => $V lt v4.10.1 ? 200 : 250,
285 range => $V lt v4.10.1 ? 6 : 5, # pickup
288 %{ $unit{warp_prism}->{special}->[0] }, # gravitic drive
295 %{ $unit{immortal} },
296 min => $V ge v4.8.2 ? 275 : 250,
301 desc => 'block initial damage, then absorb up to 100 damage for 2s',
303 cooldown => $V ge v3.8.0 ? 32 : 43,
309 %{ $unit{colossus} },
312 %{ $unit{colossus}->{attack}->[0] }, # thermal lances
319 # cooldown => 1.18, #XXX
328 pop => $V ge v5.0.12 ? 4 : 3,
332 size => $V ge v5.0.12 ? 1.25 : 1, # much larger model
344 name => 'Purification Nova',
349 type => 'trans', #TODO: indicate
350 splash => $V ge v5.0.11 ? 1.375 : 1.5,
362 %{ $unit{void_ray} },
363 min => $V lt v5.0.9 && $V ge v5.0.2 ? 200 : 250,
364 speed => $V lt v5.0.2 ? 3.5 : 3.85,
365 build => $V lt v5.0.9 && $V ge v5.0.2 ? 37 : 43,
368 name => 'Flux Vanes',
372 speed => $V lt v5.0.2 ? 1.15 : .798,
381 $V lt v4.8.2 ? 'light' : 'armored' => 1,
388 %{ $unit{oracle}->{attack}->[0] }, # pulsar beam
396 name => 'Revelation',
398 desc => 'hit enemy units and buildings are revealed for ½ minute',
399 cost => $V lt v4.12.0 ? 50 : 25,
401 cooldown => $V lt v4.12.0 ? 2 : 10,
402 duration => $V lt v4.12.0 ? 30 : $V lt v5.0.2 ? 15 : 20,
407 name => 'Stasis Ward',
409 desc => 'places ward for 170s',
414 alt => 'Stasis Ward',
422 sight => $V ge v5.0.12 ? 7 : 4,
426 name => 'Permanent Cloak',
428 desc => 'cloaked at all times',
432 name => 'Stasis Trap',
434 desc => 'triggered by nearby ground units, trapping them for 21½s',
443 hp => $V lt v4.7.1 ? 300 : $V lt v4.11.0 ? 150 : 200,
444 shield => $V lt v4.7.1 ? 150 : $V lt v4.11.0 ? 125 : 100,
445 min => $V lt v4.7.1 ? 300 : 250,
446 gas => $V lt v4.7.1 ? 200 : 175,
447 pop => $V lt v4.7.1 ? 6 : 5,
448 speed => $V lt v4.7.1 ? 2.63 : $V lt v4.8.2 ? 3.5 : 3.15,
449 # acceleration increased in v5.0.12
450 size => $V ge v5.0.12 ? 2.25 : 2.5,
453 %{ $unit{tempest}->{attack}->[0] }, # kinetic overload
458 range => $V lt v4.11.0 ? 15 : 14,
461 %{ $unit{tempest}->{attack}->[1] }, # resonance coil
470 $V lt v5.0.2 ? () : {
471 name => 'Tectonic Destabilizers',
489 hp => $V lt v4.7.1 ? 250 : 300,
490 build => $V lt v4.7.1 ? 86 : 64,
493 %{ $unit{carrier}->{special}->[0] }, # interceptor
495 build => $V lt v4.7.1 ? 6 : $V lt v4.10.1 ? 11 : 9,
498 $V lt v4.7.1 ? () : (upgrade => []), # remove Graviton Catapult
505 $unit{missile_turret},
506 $unit{planetary_fortress},
511 %{ $unit{marauder} },
514 %{ $unit{marauder}->{attack}->[0] }, # punisher grenades
515 count => $V lt v4.3.0 ? 2 : 1,
516 damage => $V lt v4.3.0 ? 5 : 10,
519 armored => $V lt v4.3.0 ? 5 : 10,
520 -armored => $V lt v4.3.0 ? 0 : 1,
538 # replaces Sniper Round
539 name => 'Steady Targeting',
541 desc => ($V ge v5.0.12 ? '130 damage (+40 psionic)' : '170 damage') .
542 ' ignoring armor to a biological unit after 1.43s without damage',
544 range => 10, # kept until 14
548 %{ $unit{ghost}->{special}->[1] }, # emp round
549 radius => $V ge v5.0.12 || $V lt v4.10.1 ? 1.5 : $V lt v5.0.11 ? 2 : 1.75,
551 $unit{ghost}->{special}->[2], # cloak
552 $unit{ghost}->{special}->[3], # tac nuke strike
555 $V ge v5.0.11 || $V lt v4.10.1 ? () : {
556 name => 'Enhanced Shockwaves',
562 { radius => .5 }, # emp
574 %{ $unit{hellion}->{attack}->[0] }, # infernal flamethrower
587 $unit{hellbat}->{special}->[0], # Hellion Mode
589 name => 'Smart Servos',
593 transform => -1.43, # halve #TODO: alter special duration?
598 %{ $unit{hellbat}->{upgrade}->[0] }, # Pre-Igniter
603 -light => $V ge v5.0.12 ? 0 : 1,
612 %{ $unit{widow_mine} },
616 %{ $unit{widow_mine}->{attack}->[0] }, # Sentinel Missiles
620 transform => $V lt v5.0.9 ? .71 : 1.07,
625 %{ $unit{widow_mine}->{upgrade}->[0] }, # drilling claws
626 desc => 'halves burrow/unburrow time from upto 2½/1 to 1½/½ seconds',
632 %{ $unit{siege_tank} },
636 %{ $unit{siege_tank}->{special}->[0] }, # siege mode
639 %{ $unit{siege_tank}->{special}->[0]->{attack}->[0] }, # shock cannon
658 min => $V ge v5.0.12 ? 125 : 150,
659 gas => $V ge v5.0.12 ? 50 : 100,
662 cargo => $V ge v5.0.12 ? 2 : 3,
663 armor => $V ge v5.0.12 ? 0 : 1,
664 hp => $V ge v5.0.12 ? 110 : $V ge v4.7.1 ? 120 : 180,
672 name => $V lt v4.7.1 ? 'Tornado Blaster' : 'Typhoon Missile Pod',
673 damage => $V ge v5.0.12 ? 11 : $V ge v4.7.1 ? 18 : 3,
674 upgrade => $V lt v4.7.1 ? 1 : 2,
675 bonus => $V ge v4.7.1 ? {} : {
676 armored => $V ge v5.0.12 ? 0 : 2,
678 mech => $V ge v5.0.12 ? 3 : 0,
680 cooldown => $V lt v4.7.1 ? .1 : $V lt v5.0.12 ? .71 : .481,
681 range => $V ge v5.0.12 || $V lt v4.7.1 ? 6 : 5,
684 speed => $V ge v5.0.12 ? 3.94 : $V ge v4.7.1 ? 4.73 : 4.13,
691 $V ge v5.0.12 ? 'attack single target while within 9 range' :
692 $V ge v5.0.11 ? 'deal 400 damage (600 after upgrade) over 14 seconds' :
693 $V ge v4.7.1 ? 'deal 400 damage (double to armored after upgrade) over 14 seconds' :
694 'target air for 160 damage ignoring armor while visible and within 15 range'
696 range => $V lt v5.0.12 ? 7 : 6,
697 duration => $V lt v5.0.12 ? 14.3 : 0,
698 cooldown => $V lt v5.0.12 ? 4 : 0,
700 $V ge v4.7.1 ? () : {
701 name => 'Rapid Fire Launchers',
703 desc => 'rapid first 12 Lock On shots',
710 $V ge v5.0.12 || $V lt v4.7.1 ? () : {
711 name => 'Mag-Field Accelerator',
714 build => $V lt v4.8.2 ? 79 : 100,
715 desc => 'increases lock-on damage by '.($V ge v5.0.11 ? '50%' : '100% vs armored'),
717 $V lt v5.0.12 ? () : {
718 name => 'Hurricane Engines',
729 armor => $V ge v3.14.0 && $V lt v4.7.1 ? 2 : 1,
731 $unit{thor}->{attack}->[0], # thor's hammer
732 $unit{thor}->{attack}->[1], # javelin missiles
734 %{ $unit{thor}->{attack}->[2] }, # punisher cannons
735 name => 'High Impact Payload',
736 damage => $V lt v4.7.1 ? 35 : $V lt v4.11.0 ? 40 : 25,
739 $V lt v4.7.1 ? 'armored' : 'massive' => $V lt v4.11.0 ? 15 : 10,
740 $V lt v4.7.1 ? '-armored' : '-massive' => 2,
742 cooldown => $V lt v4.7.1 ? 2.14 : $V lt v4.11.0 ? 1.71 : .9,
743 range => $V lt v4.8.2 ? 10 : 11,
751 hp => $V lt v4.3.0 ? 125 : 135,
757 $unit{medivac}->{special}->[0], # heal
759 %{ $unit{medivac}->{special}->[1] }, # ignite afterburners
760 desc => 'boost speed and accelleration to 4.25 for 8s',
762 duration => $V lt v4.7.1 ? 6.43 : 4.29,
763 cooldown => $V lt v4.11.0 ? 20 : 14,
769 name => 'Caduceus Reactor',
770 desc => 'double energy regeneration rate',
775 name => 'Rapid Reignition System',
791 gas => $V ge v5.0.11 ? 125 : 150,
804 name => 'Lexington Rockets',
807 type => 'projectile',
815 name => 'Defender Mode',
817 transform => 2.88, # 1.46s to revert
818 alt => 'Defender Liberator',
822 name => 'Concord Cannon',
823 desc => 'within 5 diameter circle',
831 sight => 15, # only targeted area
834 name => 'Advanced Ballistics',
857 name => 'Hyperflight Rotors',
859 min => $V ge v5.0.11 ? 125 : $V ge v4.7.1 ? 150 : 200,
860 gas => $V ge v5.0.11 ? 125 : $V ge v4.7.1 ? 150 : 200,
861 build => $V ge v5.0.11 ? 100 : 121.4,
868 gas => $V ge v5.0.11 ? 150 : 200,
869 build => $V ge v5.0.11 ? 34.3 : 42.9,
870 speed => $V lt v4.11.0 ? 3.85 : 4.13,
871 upgrade => $V ge v5.0.11 ? [] : $unit{raven}->{upgrade}, # corvid reactor
874 %{ $unit{raven}->{special}->[0] }, # auto-turret
878 name => '12 mm Gauss Cannon',
884 hp => $V ge v5.0.11 ? 100 : 150,
885 armor => $V ge v5.0.11 ? 0 : 1,
886 range => $V lt v4.3.0 ? 1 : 2,
887 duration => $V ge v5.0.11 ? 7.9 : 10,
889 $unit{raven}->{special}->[0]->{upgrade}->[0], # hi-sec auto tracking
890 $unit{raven}->{special}->[0]->{upgrade}->[1], # structure armor
891 # no more durable materials
895 name => 'Interference Matrix',
897 desc => 'disable target mech or psionic unit rendering it unable to attack or cast',
898 $V lt v5.0.12 ? () : (
903 cost => $V lt v4.11.0 ? 50 : 75,
905 duration => $V lt v4.11.0 ? 7.9 : 11,
908 name => 'Anti-Armor Missile',
910 desc => sprintf('launches missile %s reduce armor by %d',
911 $V lt v4.7.1 ? 'to do splash damage and' : 'to',
912 $V ge v5.0.11 ? 2 : 3,
918 damage => $V lt v4.3.0 ? 30 : $V lt v4.7.1 ? 15 : 0,
929 %{ $unit{battlecruiser} },
931 $unit{battlecruiser}->{attack}->[0], # ats laser
933 %{ $unit{battlecruiser}->{attack}->[1] }, # ata laser
934 damage => $V lt v4.7.1 ? 6 : 5,
939 name => 'Tactical Jump',
941 desc => 'warps to the target location after 5s (invulnerable after 1s)',
946 %{ $unit{battlecruiser}->{special}->[0] }, # yc
947 desc => '240 damage to a single target',
967 $unit{queen}->{attack}->[0], # claws
969 %{ $unit{queen}->{attack}->[1] }, # acid spines
970 range => $V lt v4.12.0 ? 8 : 7,
977 %{ $unit{overlord} },
978 speed => .9023, # changed in 4.0.0
979 # deceleration speed increased in v5.0.12
982 %{ $unit{overlord}->{upgrade}->[0] }, # carapace
983 speed => ($V ge v5.0.12 ? 2.83 : 2.63)-.9023,
986 %{ $unit{overlord}->{upgrade}->[1] }, # sacs
987 speed => $V ge v5.0.12 ? 1.099-.9023 : 0,
993 %{ $unit{overseer} },
996 name => 'Oversight Mode',
998 desc => 'gain 25% vision while immobilized',
1003 @{ $unit{overseer}->{special} }, # changeling, contaminate
1008 $unit{spine_crawler},
1011 %{ $unit{spore_crawler} },
1014 %{ $unit{spore_crawler}->{attack}->[0] }, # seeker spores
1027 %{ $unit{baneling} },
1031 %{ $unit{baneling}->{attack}->[0] }, # volatile burst
1032 damage => $V lt v4.12.0 ? 20 : $V lt v5.0.2 ? 18 : 15,
1034 light => $V lt v4.12.0 ? 15 : $V lt v5.0.2 ? 17 : 20,
1035 -light => $V ge v5.0.12 ? 0 : 2,
1045 %{ $unit{baneling}->{upgrade}->[0] }, # centrifugal hooks
1061 %{ $unit{roach}->{special}->[0] }, # rapid regeneration
1062 desc => 'regenerates health at 7 HP/s while burrowed',
1065 %{ $unit{roach}->{special}->[1] }, # tunneling claws
1066 min => $V lt v4.7.1 ? 150 : 100,
1067 gas => $V lt v4.7.1 ? 150 : 100,
1069 desc => 'move while burrowed at speed of 2.8',
1082 build => $V ge v5.0.11 ? 12.14 : 8.57+.36, # added max random
1096 type => 'projectile',
1107 %{ $unit{hydralisk} },
1111 %{ $unit{hydralisk}->{upgrade}->[0] }, # grooved spines
1112 min => $V ge v5.0.12 ? 75 : 100,
1113 gas => $V ge v5.0.12 ? 75 : 100,
1114 build => $V ge v5.0.12 ? 50 : 71,
1122 %{ $unit{hydralisk}->{upgrade}->[1] }, # muscular augments
1123 build => $V ge v5.0.12 ? 64 : 71,
1132 base => ['Hydralisk'],
1152 range => $V lt v4.11.0 ? 9 : 8,
1161 $V lt v4.11.0 ? () : {
1162 name => 'Seismic Spines',
1174 name => 'Adaptive Talons',
1175 desc => $V ge v5.0.12 ? 'halves burrow time from 2 seconds to 1' :
1176 'halves burrow time and increases movement speed',
1177 speed => $V ge v5.0.12 ? 0 : .413,
1178 transform => $V lt v5.0.9 ? .71 : 1.07,
1179 min => $V ge v5.0.12 ? 100 : 150,
1180 gas => $V ge v5.0.12 ? 100 : 150,
1190 %{ $unit{infestor} },
1191 energy => $V ge v5.0.12 ? 75 : 50,
1194 %{ $unit{infestor}->{special}->[0] }, # neural parasite
1195 range => $V lt v4.11.0 ? 9 : 8,
1198 %{ $unit{infestor}->{special}->[1] }, # fungal growth
1199 desc => 'for 4 seconds, immobilize enemy units in target area and deal '.($V lt v5.0.12 ? 30 : 25).' damage',
1200 range => $V lt v5.0.12 ? 10 : 9,
1203 name => 'Microbial Shroud',
1205 desc => 'reduce damage from air by 50% to ground units in target area',
1206 cost => $V lt v4.11.3 ? 100 : 75,
1207 min => $V lt v4.11.3 ? 150 : undef,
1208 gas => $V lt v4.11.3 ? 150 : undef,
1209 build => $V lt v4.11.3 ? 79 : undef,
1210 req => $V lt v4.11.3 ? 'Hive' : undef,
1213 radius => $V lt v4.11.3 ? 3 : 3.5,
1215 $V ge v4.11.0 ? () : {
1216 %{ $unit{infestor}->{special}->[2] }, # infested terran
1219 %{ $unit{infestor}->{special}->[2]->{attack}->[0] }, # rockets
1220 cooldown => $V lt v4.10.1 ? .95 : 1.14,
1226 $V lt v5.0.12 ? $unit{infestor}->{upgrade}->[0] : (), # Pathogen Glands
1231 % {$unit{nydus_worm} },
1232 min => $V lt v4.7.1 ? 100 : $V lt v4.11.0 ? 50 : 75, # Nydus Network costs 150/150
1233 gas => $V lt v4.7.1 ? 100 : $V lt v4.11.0 ? 50 : 75,
1234 cooldown => $V lt v4.11.0 ? 0 : 14, # Summon Nydus Worm
1238 %{ $unit{swarm_host} },
1242 %{ $unit{swarm_host}->{special}->[0] }, # locust
1244 upgrade => [], # no flying
1254 %{ $unit{brood_lord} },
1255 speed => $V ge v5.0.12 ? 2.62 : $V ge v5.0.11 ? 2.24 : 1.97,
1258 %{ $unit{brood_lord}->{special}->[0] }, # broodling
1261 %{ $unit{brood_lord}->{special}->[0]->{attack}->[0] }, # claws
1262 cooldown => $V ge v5.0.12 ? .57 : .46,
1265 hp => $V ge v5.0.12 ? 20 : 30,
1266 speed => $V ge v5.0.12 ? 4.13 : 5.37,
1268 $unit{brood_lord}->{special}->[1], # fz
1275 $unit{viper}->{special}->[0], # bc
1276 $unit{viper}->{special}->[1], # ad
1278 %{ $unit{viper}->{special}->[2] }, # consume
1279 desc => 'leaches '.($V ge v5.0.12 ? 150 : 200).' life of friendly building over 20s to gain 50 energy',
1285 %{ $unit{ultralisk} },
1286 min => $V ge v5.0.12 ? 275 : 300,
1288 size => $V ge v5.0.11 ? 1.75 : 2,
1290 $unit{ultralisk}->{upgrade}->[0], # chitinous plating
1292 name => 'Anabolic Synthesis',
1296 speed => $V lt v4.8.2 ? .41 : .82,
1297 creep => -.215, # reverse speed increase