index: release v1.18 with only altgr index linked
[sheet.git] / sc-units-lotv.inc.pl
1 use utf8;
2 use strict;
3
4 my $V = v5.0.11;
5 my $RT = 1.4;  # real-time speed factor to faster
6
7 my $hots = do 'sc-units-hots.inc.pl' or die $!;
8 my %unit;
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} // [] };
15         }
16         $unit{ lc $row->{name} =~ tr/ /_/r } = $row;
17 }
18
19 [
20 sprintf('patch %vd', $V),
21
22 # protoss
23
24 $unit{probe},
25
26 $unit{photon_cannon},
27
28 {
29         %{ $unit{mothership} },
30         speed => 2.62,
31         special => [
32                 $unit{mothership}->{special}->[0], # cf
33                 $unit{mothership}->{special}->[1], # mr
34                 {
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%',
38                 },
39         ],
40 },
41
42 {
43         %{ $unit{nexus} },
44         attack => [],
45         energy => 50,
46         capacity => 200,
47         special => [
48                 $unit{nexus}->{special}->[0], # chrono boost
49                 {
50                         name => $V lt v4.7.1 ? 'Mass Recall' : 'Strategic Recall',
51                         abbr => 'sr',
52                         desc => 'recalls units owned by the player in the target area to the Nexus',
53                         cost => 50,
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
57                 },
58                 $V lt v4.12.0 ? () : {
59                         name => 'Battery Overcharge',
60                         abbr => 'bo',
61                         desc => sprintf(
62                                 'increase target Shield Battery restoration rate by %d%% and function without consuming energy for 14s',
63                                 $V ge v5.0.11 ? 50 : 100,
64                         ),
65                         cost => 50,
66                         duration => 14,
67                         cooldown => 60, # shared by all nexuses
68                         range => 8, # within any friendly nexus
69                 },
70         ],
71 },
72
73 {
74         %{ $unit{zealot} },
75         special => [
76                 {
77                         name => 'Charge',
78                         abbr => 'ch',
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
81                         gas => 100,
82                         build => 100,
83                         speed => .5,
84                         range => 4,
85                         duration => 2.5,
86                         cooldown => 7,
87                 },
88         ],
89         upgrade => [
90                 {
91                         name => 'Charge',
92                         speed => $V lt v4.11.0 ? .98 : 1.57,
93                 },
94         ],
95 },
96
97 {
98         %{ $unit{sentry} },
99         build => $V ge v5.0.11 ? 22.9 : 26.4,
100         speed => $V ge v5.0.11 ? 3.5 : 3.15,
101         special => [
102                 $unit{sentry}->{special}->[0], # ff
103                 {
104                         %{ $unit{sentry}->{special}->[1] }, # gs
105                         radius => $V lt v4.7.1 ? 4 : 4.5,
106                 },
107                 {
108                         %{ $unit{sentry}->{special}->[2] }, # hl
109                         cost => $V lt v4.7.1 ? 100 : 75,
110                 },
111         ],
112 },
113
114 {
115         %{ $unit{stalker} },
116         attack => [
117                 {
118                         %{ $unit{stalker}->{attack}->[0] }, # particle disruptors
119                         damage => 13,
120                         bonus => {
121                                 armored => 5,
122                                 -armored => 1,
123                         },
124                         cooldown => 1.34,
125                 },
126         ],
127 },
128
129 {
130         race => 'protoss',
131         cat => 'gateway',
132         name => 'Adept',
133         pop => 2,
134         min => 100,
135         gas => 25,
136         build => $V lt v4.8.2 ? 27 : 30,
137         warp => 20,
138         size => 1,
139         cargo => 2,
140         armor => 1,
141         hp => 70,
142         shield => 70,
143         attr => {
144                 light => 1,
145                 organic => 1,
146         },
147         attack => [
148                 {
149                         anti => 1,
150                         name => undef, #TODO
151                         damage => 10,
152                         upgrade => 1,
153                         bonus => {
154                                 light => 12,
155                                 -light => 1,
156                         },
157                         type => 'projectile', #XXX: assumption
158                         cooldown => 1.61,
159                         range => 4,
160                 },
161         ],
162         speed => 3.5,
163         sight => 9,
164         special => [
165                 {
166                         name => 'Psionic Transfer',
167                         abbr => 'pt',
168                         desc => 'project shade, teleport after 7s',
169                         cooldown => 11,
170
171                         alt => 'Shade',
172                         build => 0,
173                         size => 0,
174                         cargo => 0,
175                         hp => -1,
176                         attack => [], #TODO: indicate diff from parent
177                         speed => 5, #XXX: faster than 3.5
178                         range => 7, #XXX: calculate from speed
179                         sight => 4,
180                 },
181         ],
182         upgrade => [
183                 {
184                         name => 'Resonating Glaives',
185                         min => 100,
186                         gas => 100,
187                         build => 100,
188                         attack => [
189                                 {
190                                         cooldown => $V lt v4.11.0 || $V ge v4.11.3 ? -.5 : -.6, # +45%/60%
191                                 },
192                         ],
193                 },
194         ],
195 },
196
197 {
198         %{ $unit{high_templar} },
199         speed => $V ge v5.0.11 ? 2.82 : 2.63,
200         attack => [
201                 {
202                         anti => 1,
203                         name => '?', #XXX
204                         damage => 4,
205                         upgrade => 1,
206                         cooldown => 1.25,
207                         range => 6,
208                 },
209         ],
210         special => [
211                 {
212                         $unit{high_templar}->{special}->[0], # fb
213                         range => $V lt v4.12.0 ? 9 : 10,
214                 },
215                 $unit{high_templar}->{special}->[1], # ps
216         ],
217 },
218
219 {
220         %{ $unit{dark_templar} },
221         special => [
222                 $unit{dark_templar}->{special}->[0], # cl
223                 {
224                         name => 'Shadow Stride',
225                         abbr => 'bl',
226                         desc => sprintf('teleport to visible location, %.2fs attack delay afterwards', $V ge v5.0.11 ? .71 : .75),
227                         min => 100,
228                         gas => 100,
229                         build => $V lt v4.7.1 ? 121 : 100,
230                         range => 8,
231                         cooldown => $V lt v4.7.1 ? 21 : 14,
232                 },
233         ],
234 },
235
236 $unit{archon},
237
238 {
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,
242         special => [
243                 $unit{observer}->{special}->[0], # cloak
244                 {
245                         name => 'Surveillance Mode',
246                         abbr => 'sm',
247                         desc => 'gain 25% vision while immobilized',
248                         speed => 0,
249                         sight => 2.75, # +25%
250                         transform => .54,
251                 },
252         ],
253 },
254
255 {
256         %{ $unit{warp_prism} },
257         hp => 80,
258         min => $V lt v4.10.1 ? 200 : 250,
259         range => $V lt v4.10.1 ? 6 : 5, # pickup
260         upgrade => [
261                 {
262                         %{ $unit{warp_prism}->{special}->[0] }, # gravitic drive
263                         speed => 1.23,
264                 },
265         ],
266 },
267
268 $unit{immortal},
269
270 {
271         %{ $unit{colossus} },
272         attack => [
273                 {
274                         %{ $unit{colossus}->{attack}->[0] }, # thermal lances
275                         damage => 10,
276                         upgrade => 1,
277                         bonus => {
278                                 light => 5,
279                                 -light => 1,
280                         },
281 #                       cooldown => 1.18, #XXX
282                 },
283         ],
284 },
285
286 {
287         race => 'protoss',
288         cat => 'robotic',
289         name => 'Disruptor',
290         pop => 3,
291         min => 150,
292         gas => 150,
293         build => 36,
294         size => 1,
295         cargo => 4,
296         armor => 1,
297         hp => 100,
298         shield => 100,
299         attr => {
300                 armored => 1,
301                 mech => 1,
302         },
303         attack => [
304                 {
305                         anti => 1,
306                         name => 'Purification Nova',
307                         damage => 145,
308                         bonus => {
309                                 shields => 55,
310                         },
311                         type => 'trans', #TODO: indicate
312                         splash => $V ge v5.0.11 ? 1.375 : 1.5,
313                         cooldown => 14.3,
314                         range => 13, # 2s
315                 },
316         ],
317         speed => 3.15,
318         sight => 9,
319 },
320
321 $unit{phoenix},
322
323 {
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,
328         upgrade => [
329                 {
330                         name => 'Flux Vanes',
331                         min => 100,
332                         gas => 100,
333                         build => 57,
334                         speed => $V lt v5.0.2 ? 1.15 : .798,
335                 },
336         ],
337 },
338
339 {
340         %{ $unit{oracle} },
341         build => 37,
342         attr => {
343                 $V lt v4.8.2 ? 'light' : 'armored' => 1,
344                 mech => 1,
345                 psionic => 1,
346                 flying => 1,
347         },
348         attack => [
349                 {
350                         %{ $unit{oracle}->{attack}->[0] }, # pulsar beam
351                         bonus => {
352                                 light => 7,
353                         },
354                 },
355         ],
356         special => [
357                 {
358                         name => 'Revelation',
359                         abbr => 'rv',
360                         desc => 'hit enemy units and buildings are revealed for Â½ minute',
361                         cost => $V lt v4.12.0 ? 50 : 25,
362                         range => 9,
363                         cooldown => $V lt v4.12.0 ? 2 : 10,
364                         duration => $V lt v4.12.0 ? 30 : $V lt v5.0.2 ? 15 : 20,
365                         radius => 6,
366                         detect => 1,
367                 },
368                 {
369                         name => 'Stasis Ward',
370                         abbr => 'sw',
371                         desc => 'places ward for 170s',
372                         cost => 50,
373                         range => 6,
374                         build => 3.58,
375                         duration => 170,
376                         alt => 'Stasis Ward',
377                         hp => 30,
378                         shield => 30,
379                         armor => 0,
380                         attr => {
381                                 light => 1,
382                                 structure => 1,
383                         },
384                         sight => 0,
385                         speed => 0,
386                         special => [
387                                 {
388                                         name => 'Permanent Cloak',
389                                         abbr => 'cl',
390                                         desc => 'cloaked at all times',
391                                         duration => -1,
392                                 },
393                                 {
394                                         name => 'Stasis Trap',
395                                         abbr => 'st',
396                                         desc => 'triggered by nearby ground units, trapping them for 21½s',
397                                 },
398                         ],
399                 },
400         ],
401 },
402
403 {
404         %{ $unit{tempest} },
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,
411         attack => [
412                 {
413                         %{ $unit{tempest}->{attack}->[0] }, # kinetic overload
414                         bonus => {
415                                 massive => 22,
416                                 -massive => 2,
417                         },
418                         range => $V lt v4.11.0 ? 15 : 14,
419                 },
420                 {
421                         %{ $unit{tempest}->{attack}->[1] }, # resonance coil
422                         bonus => {
423                                 structure => 0,
424                         },
425                         damage => 40,
426                         upgrade => 4,
427                 },
428         ],
429         upgrade => [
430                 $V lt v5.0.2 ? () : {
431                         name => 'Tectonic Destabilizers',
432                         attack => [
433                                 {},
434                                 {
435                                         bonus => {
436                                                 structure => 40,
437                                         },
438                                 },
439                         ],
440                         min => 150,
441                         gas => 150,
442                         build => 100,
443                 },
444         ],
445 },
446
447 {
448         %{ $unit{carrier} },
449         hp => $V lt v4.7.1 ? 250 : 300,
450         build => $V lt v4.7.1 ? 86 : 64,
451         special => [
452                 {
453                         %{ $unit{carrier}->{special}->[0] }, # interceptor
454                         min => 5,
455                         build => $V lt v4.7.1 ? 6 : $V lt v4.10.1 ? 11 : 9,
456                 },
457         ],
458         $V lt v4.7.1 ? () : (upgrade => []), # remove Graviton Catapult
459 },
460
461 # terran
462
463 $unit{scv},
464 $unit{mule},
465 $unit{missile_turret},
466 $unit{planetary_fortress},
467
468 $unit{marine},
469
470 {
471         %{ $unit{marauder} },
472         attack => [
473                 {
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,
477                         upgrade => 1,
478                         bonus => {
479                                 armored => $V lt v4.3.0 ? 5 : 10,
480                                 -armored => $V lt v4.3.0 ? 0 : 1,
481                         },
482                 },
483         ],
484 },
485
486 {
487         %{ $unit{reaper} },
488         build => 32,
489 },
490
491 {
492         %{ $unit{ghost} },
493         min => 150,
494         gas => 125,
495         speed => 3.94,
496         special => [
497                 {
498                         # replaces Sniper Round
499                         name => 'Steady Targeting',
500                         abbr => 'st',
501                         desc => '170 damage ignoring armor to a biological unit after 1.43s without damage',
502                         cost => 50,
503                         range => 10, # kept until 14
504                         duration => 1.43,
505                 },
506                 {
507                         %{ $unit{ghost}->{special}->[1] }, # emp round
508                         radius => $V ge v5.0.11 ? 1.75 : $V lt v4.10.1 ? 1.5 : 2,
509                 },
510                 $unit{ghost}->{special}->[2], # cloak
511                 $unit{ghost}->{special}->[3], # tac nuke strike
512         ],
513         upgrade => [
514                 $V ge v5.0.11 || $V lt v4.10.1 ? () : {
515                         name => 'Enhanced Shockwaves',
516                         min => 150,
517                         gas => 150,
518                         build => 79,
519                         special => [
520                                 {},
521                                 { radius => .5 }, # emp
522                                 {},
523                                 {},
524                         ],
525                 },
526         ],
527 },
528
529 {
530         %{ $unit{hellion} },
531         attack => [
532                 {
533                         %{ $unit{hellion}->{attack}->[0] }, # infernal flamethrower
534                         bonus => {
535                                 light => 5,
536                                 -light => 0,
537                         },
538                 },
539         ],
540         #TODO smart servos
541 },
542
543 {
544         %{ $unit{hellbat} },
545         special => [
546                 $unit{hellbat}->{special}->[0], # Hellion Mode
547                 {
548                         name => 'Smart Servos',
549                         min => 100,
550                         gas => 100,
551                         build => 79,
552                         transform => -1.43, # halve #TODO: alter special duration?
553                 },
554         ],
555 },
556
557 {
558         %{ $unit{widow_mine} },
559         build => 21,
560         attack => [
561                 {
562                         %{ $unit{widow_mine}->{attack}->[0] }, # Sentinel Missiles
563                         bonus => {
564                                 shields => 25,
565                         },
566                         transform => $V lt v5.0.9 ? .71 : 1.07,
567                 },
568         ],
569 },
570
571 {
572         %{ $unit{siege_tank} },
573         hp => 175,
574         special => [
575                 {
576                         %{ $unit{siege_tank}->{special}->[0] }, # siege mode
577                         attack => [
578                                 {
579                                         %{ $unit{siege_tank}->{special}->[0]->{attack}->[0] }, # shock cannon
580                                         damage => 40,
581                                         upgrade => 4,
582                                         bonus => {
583                                                 armored => 30,
584                                                 -armored => 1,
585                                         },
586                                         cooldown => 2.14,
587                                 },
588                         ],
589                 },
590         ],
591 },
592
593 {
594         race => 'terran',
595         cat => 'factory',
596         name => 'Cyclone',
597         pop => 3,
598         min => 150,
599         gas => 100,
600         build => 32,
601         size => 1.5,
602         cargo => 3,
603         armor => 1,
604         hp => $V lt v4.7.1 ? 180 : 120,
605         attr => {
606                 armored => 1,
607                 mech => 1,
608         },
609         attack => [
610                 {
611                         anti => 1,
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 ? {} : {
616                                 armored => 2,
617                                 -armored => 0,
618                         },
619                         cooldown => $V lt v4.7.1 ? .1 : .71,
620                         range => $V lt v4.7.1 ? 6 : 5,
621                 },
622         ],
623         speed => $V lt v4.7.1 ? 4.13 : 4.73,
624         sight => 11,
625         special => [
626                 {
627                         name => 'Lock On',
628                         abbr => 'lo',
629                         desc => (
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'
633                         ),
634                         range => 7,
635                         duration => 14.3,
636                         cooldown => 4,
637                 },
638                 $V ge v4.7.1 ? () : {
639                         name => 'Rapid Fire Launchers',
640                         abbr => 'rf',
641                         desc => 'rapid first 12 Lock On shots',
642                         min => 75,
643                         gas => 75,
644                         build => 79,
645                 },
646         ],
647         upgrade => [
648                 $V lt v4.7.1 ? () : {
649                         name => 'Mag-Field Accelerator',
650                         min => 100,
651                         gas => 100,
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'),
654                 },
655         ],
656 },
657
658 {
659         %{ $unit{thor} },
660         armor => $V ge v3.14.0 && $V lt v4.7.1 ? 2 : 1,
661         attack => [
662                 $unit{thor}->{attack}->[0], # thor's hammer
663                 $unit{thor}->{attack}->[1], # javelin missiles
664                 {
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,
668                         upgrade => 3,
669                         bonus => {
670                                 $V lt v4.7.1 ? 'armored' : 'massive' => $V lt v4.11.0 ? 15 : 10,
671                                 $V lt v4.7.1 ? '-armored' : '-massive' => 2,
672                         },
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,
675                 },
676         ],
677         #TODO smart servos
678 },
679
680 {
681         %{ $unit{viking} },
682         hp => $V lt v4.3.0 ? 125 : 135,
683 },
684
685 {
686         %{ $unit{medivac} },
687         special => [
688                 $unit{medivac}->{special}->[0], # heal
689                 {
690                         %{ $unit{medivac}->{special}->[1] }, # ignite afterburners
691                         desc => 'boost speed and accelleration to 4.25 for 8s',
692                         speed => 5.94,
693                         duration => $V lt v4.7.1 ? 6.43 : 4.29,
694                         cooldown => $V lt v4.11.0 ? 20 : 14,
695                         -cooldown => 9,
696                 },
697         ],
698         upgrade => [
699                 {
700                         name => 'Rapid Reignition System',
701                         min => 100,
702                         gas => 100,
703                         build => 57,
704                         speed => .63,
705                 },
706         ],
707 },
708
709 {
710         race => 'terran',
711         cat => 'starport',
712         name => 'Liberator',
713
714         pop => 3,
715         min => 150,
716         gas => $V ge v5.0.11 ? 125 : 150,
717         build => 43,
718         size => 1.5,
719         armor => 0,
720         hp => 180,
721         attr => {
722                 armored => 1,
723                 mech => 1,
724                 flying => 1,
725         },
726         attack => [
727                 {
728                         anti => 2,
729                         name => 'Lexington Rockets',
730                         damage => 5,
731                         upgrade => 1,
732                         type => 'projectile',
733                         cooldown => 1.29,
734                         count => 2,
735                         range => 5,
736                 },
737         ],
738         special => [
739                 {
740                         name => 'Defender Mode',
741                         abbr => 'dm',
742                         transform => 2.88, # 1.46s to revert
743                         alt => 'Defender Liberator',
744                         attack => [
745                                 {
746                                         anti => 1,
747                                         name => 'Concord Cannon',
748                                         desc => 'within 5 diameter circle',
749                                         damage => 75,
750                                         upgrade => 5,
751                                         cooldown => 1.14,
752                                         range => 10,
753                                 },
754                         ],
755                         speed => 0,
756                         sight => 15, # only targeted area
757                         upgrade => [
758                                 {
759                                         name => 'Advanced Ballistics',
760                                         min => 150,
761                                         gas => 150,
762                                         build => 79,
763                                         attack => [
764                                                 {
765                                                         range => 4,
766                                                 },
767                                         ],
768                                         sight => 4,
769                                 },
770                         ],
771                 },
772         ],
773         speed => 4.72,
774         sight => 10,
775 },
776
777 {
778         %{ $unit{banshee} },
779         speed => 3.85,
780         upgrade => [
781                 {
782                         name => 'Hyperflight Rotors',
783                         speed => 1.4,
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,
787                 },
788         ],
789 },
790
791 {
792         %{ $unit{raven} },
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
797         special => [
798                 {
799                         %{ $unit{raven}->{special}->[0] }, # auto-turret
800                         attack => [
801                                 {
802                                         anti => 3,
803                                         name => '12 mm Gauss Cannon',
804                                         damage => 18,
805                                         cooldown => .57,
806                                         range => 6,
807                                 },
808                         ],
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,
813                         upgrade => [
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
817                         ],
818                 },
819                 {
820                         name => 'Interference Matrix',
821                         abbr => 'im',
822                         desc => 'disable target mech or psionic unit rendering it unable to attack or cast',
823                         cost => $V lt v4.11.0 ? 50 : 75,
824                         range => 9,
825                         duration => $V lt v4.11.0 ? 7.9 : 11,
826                 },
827                 {
828                         name => 'Anti-Armor Missile',
829                         abbr => 'aa',
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,
833                         ),
834                         range => 10,
835                         size => 2.88,
836                         attack => [
837                                 {
838                                         damage => $V lt v4.3.0 ? 30 : $V lt v4.7.1 ? 15 : 0,
839                                         splash => 1,
840                                 },
841                         ],
842                         cost => 75,
843                         duration => 21,
844                 },
845         ],
846 },
847
848 {
849         %{ $unit{battlecruiser} },
850         attack => [
851                 $unit{battlecruiser}->{attack}->[0], # ats laser
852                 {
853                         %{ $unit{battlecruiser}->{attack}->[1] }, # ata laser
854                         damage => $V lt v4.7.1 ? 6 : 5,
855                 },
856         ],
857         special => [
858                 {
859                         name => 'Tactical Jump',
860                         abbr => 'tj',
861                         desc => 'warps to the target location after 5s (invulnerable after 1s)',
862                         duration => 4,
863                         cooldown => 71,
864                 },
865                 {
866                         %{ $unit{battlecruiser}->{special}->[0] }, # yc
867                         desc => '240 damage to a single target',
868                         attack => [
869                                 {
870                                         damage => 240,
871                                 },
872                         ],
873                         cost => undef,
874                         cooldown => 71,
875                 },
876         ],
877         upgrade => [],
878 },
879
880 # zerg
881
882 $unit{drone},
883
884 {
885         %{ $unit{queen} },
886         attack => [
887                 $unit{queen}->{attack}->[0], # claws
888                 {
889                         %{ $unit{queen}->{attack}->[1] }, # acid spines
890                         range => $V lt v4.12.0 ? 8 : 7,
891                 },
892         ],
893         range => 8,
894 },
895
896 {
897         %{ $unit{overlord} },
898         speed => .902, # changed in 4.0.0
899         upgrade => [
900                 {
901                         %{ $unit{overlord}->{upgrade}->[0] }, # carapace
902                         speed => 2.63-.902,
903                 },
904                 $unit{overlord}->{upgrade}->[1], # sacs
905         ],
906 },
907
908 {
909         %{ $unit{overseer} },
910         special => [
911                 {
912                         name => 'Oversight Mode',
913                         abbr => 'om',
914                         desc => 'gain 25% vision while immobilized',
915                         speed => 0,
916                         sight => 11 * 1.25,
917                         transform => .54,
918                 },
919                 @{ $unit{overseer}->{special} }, # changeling, contaminate
920         ],
921 },
922
923 $unit{larva},
924 $unit{spine_crawler},
925
926 {
927         %{ $unit{spore_crawler} },
928         attack => [
929                 {
930                         %{ $unit{spore_crawler}->{attack}->[0] }, # seeker spores
931                         bonus => {
932                                 organic => 15,
933                         },
934                 },
935         ],
936         speed => (1.5),
937         creep => 2.6,
938 },
939
940 $unit{zergling},
941
942 {
943         %{ $unit{baneling} },
944         min => 25,
945         attack => [
946                 {
947                         %{ $unit{baneling}->{attack}->[0] }, # volatile burst
948                         damage => $V lt v4.12.0 ? 20 : $V lt v5.0.2 ? 18 : 15,
949                         bonus => {
950                                 light => $V lt v4.12.0 ? 15 : $V lt v5.0.2 ? 17 : 20,
951                                 -light => 2,
952                                 structure => 80,
953                                 -structure => 5,
954                         },
955                         splash => 1,
956                         range => 0,
957                 },
958         ],
959         upgrade => [
960                 {
961                         %{ $unit{baneling}->{upgrade}->[0] }, # centrifugal hooks
962                         hp => 5,
963                 },
964         ],
965 },
966
967 {
968         %{ $unit{roach} },
969         special => [
970                 {
971                         %{ $unit{roach}->{special}->[0] }, # rapid regeneration
972                         desc => 'regenerates health at 7 HP/s while burrowed',
973                 },
974                 {
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,
978                         build => 79,
979                         desc => 'move while burrowed at speed of 2.8',
980                 },
981         ],
982 },
983
984 {
985         race => 'zerg',
986         cat => 'hatchery',
987         name => 'Ravager',
988         base => ['Roach'],
989         pop => 3,
990         min => 25,
991         gas => 75,
992         build => $V ge v5.0.11 ? 12.14 : 8.57+.36, # added max random
993         size => 1.5,
994         cargo => 4,
995         armor => 1,
996         hp => 120,
997         attr => {
998                 organic => 1,
999         },
1000         attack => [
1001                 {
1002                         anti => 1,
1003                         name => '?',
1004                         damage => 16,
1005                         upgrade => 2,
1006                         type => 'projectile',
1007                         cooldown => 1.14,
1008                         range => 6,
1009                 },
1010         ],
1011         speed => 3.85,
1012         creep => 1.3,
1013         sight => 9,
1014 },
1015
1016 {
1017         %{ $unit{hydralisk} },
1018         hp => 90,
1019         upgrade => [
1020                 {
1021                         %{ $unit{hydralisk}->{upgrade}->[0] }, # grooved spines
1022                         attack => [
1023                                 {
1024                                         range => 2,
1025                                 },
1026                         ],
1027                 },
1028                 $unit{hydralisk}->{upgrade}->[1], # muscular augments
1029         ],
1030 },
1031
1032 {
1033         race => 'zerg',
1034         cat => 'lair',
1035         name => 'Lurker',
1036         base => ['Hydralisk'],
1037         pop => 3,
1038         min => 50,
1039         gas => 100,
1040         build => 18,
1041         cargo => 4,
1042         armor => 1,
1043         hp => 200,
1044         attr => {
1045                 armored => 1,
1046                 organic => 1,
1047         },
1048         attack => [
1049                 {
1050                         anti => 1,
1051                         name => 'Spines',
1052                         damage => 20,
1053                         upgrade => 2,
1054                         splash => 'line',
1055                         cooldown => 1.43,
1056                         range => $V lt v4.11.0 ? 9 : 8,
1057                         bonus => {
1058                                 armored => 10,
1059                                 -armored => 1,
1060                         },
1061                 },
1062         ],
1063         transform => 2.0,
1064         upgrade => [
1065                 $V lt v4.11.0 ? () : {
1066                         name => 'Seismic Spines',
1067                         attack => [
1068                                 {
1069                                         range => 2,
1070                                 },
1071                         ],
1072                         req => 'Hive',
1073                         min => 150,
1074                         gas => 150,
1075                         build => 57,
1076                 },
1077                 {
1078                         name => 'Adaptive Talons',
1079                         desc => 'halves burrow time and increases movement speed',
1080                         speed => .413,
1081                         transform => $V lt v5.0.9 ? .71 : 1.07,
1082                 },
1083         ],
1084         speed => 4.13,
1085         creep => 1.3,
1086         sight => 10,
1087 },
1088
1089 {
1090         %{ $unit{infestor} },
1091         special => [
1092                 {
1093                         %{ $unit{infestor}->{special}->[0] }, # neural parasite
1094                         range => $V lt v4.11.0 ? 9 : 8,
1095                 },
1096                 $unit{infestor}->{special}->[1], # fungal growth
1097                 {
1098                         name => 'Microbial Shroud',
1099                         abbr => 'ms',
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,
1106                         range => 9,
1107                         duration => 11,
1108                         radius => $V lt v4.11.3 ? 3 : 3.5,
1109                 },
1110                 $V ge v4.11.0 ? () : {
1111                         %{ $unit{infestor}->{special}->[2] }, # infested terran
1112                         attack => [
1113                                 {
1114                                         %{ $unit{infestor}->{special}->[2]->{attack}->[0] }, # rockets
1115                                         cooldown => $V lt v4.10.1 ? .95 : 1.14,
1116                                 },
1117                         ],
1118                 },
1119         ],
1120 },
1121
1122 {
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
1127 },
1128
1129 {
1130         %{ $unit{swarm_host} },
1131         gas => 75,
1132         special => [
1133                 {
1134                         %{ $unit{swarm_host}->{special}->[0] }, # locust
1135                         hp => 50,
1136                         upgrade => [], # no flying
1137                 },
1138         ],
1139         upgrade => [],
1140 },
1141
1142 $unit{mutalisk},
1143 $unit{corruptor},
1144
1145 {
1146         %{ $unit{brood_lord} },
1147         speed => $V ge v5.0.11 ? 2.24 : 1.97,
1148 },
1149
1150 $unit{viper},
1151
1152 {
1153         %{ $unit{ultralisk} },
1154         armor => 2,
1155         size => $V ge v5.0.11 ? 1.75 : 2,
1156         upgrade => [
1157                 $unit{ultralisk}->{upgrade}->[0], # chitinous plating
1158                 {
1159                         name => 'Anabolic Synthesis',
1160                         min => 150,
1161                         gas => 150,
1162                         build => 42.85,
1163                         speed => $V lt v4.8.2 ? .41 : .82,
1164                         creep => -.215, # reverse speed increase
1165                 },
1166         ],
1167 },
1168
1169 ]