sc: ghost upgrades
[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                 },
367                 {
368                         name => 'Stasis Ward',
369                         abbr => 'sw',
370                         desc => 'places ward for 170s',
371                         cost => 50,
372                         range => 6,
373                         build => 3.58,
374                         duration => 170,
375                         alt => 'Stasis Ward',
376                         hp => 30,
377                         shield => 30,
378                         armor => 0,
379                         attr => {
380                                 light => 1,
381                                 structure => 1,
382                         },
383                         sight => 0,
384                         speed => 0,
385                         special => [
386                                 {
387                                         name => 'Permanent Cloak',
388                                         abbr => 'cl',
389                                         desc => 'cloaked at all times',
390                                         duration => -1,
391                                 },
392                                 {
393                                         name => 'Stasis Trap',
394                                         abbr => 'st',
395                                         desc => 'triggered by nearby ground units, trapping them for 21½s',
396                                 },
397                         ],
398                 },
399         ],
400 },
401
402 {
403         %{ $unit{tempest} },
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,
410         attack => [
411                 {
412                         %{ $unit{tempest}->{attack}->[0] }, # kinetic overload
413                         bonus => {
414                                 massive => 22,
415                                 -massive => 2,
416                         },
417                         range => $V lt v4.11.0 ? 15 : 14,
418                 },
419                 {
420                         %{ $unit{tempest}->{attack}->[1] }, # resonance coil
421                         bonus => {
422                                 structure => 0,
423                         },
424                         damage => 40,
425                         upgrade => 4,
426                 },
427         ],
428         upgrade => [
429                 $V lt v5.0.2 ? () : {
430                         name => 'Tectonic Destabilizers',
431                         attack => [
432                                 {},
433                                 {
434                                         bonus => {
435                                                 structure => 40,
436                                         },
437                                 },
438                         ],
439                         min => 150,
440                         gas => 150,
441                         build => 100,
442                 },
443         ],
444 },
445
446 {
447         %{ $unit{carrier} },
448         hp => $V lt v4.7.1 ? 250 : 300,
449         build => $V lt v4.7.1 ? 86 : 64,
450         special => [
451                 {
452                         %{ $unit{carrier}->{special}->[0] }, # interceptor
453                         min => 5,
454                         build => $V lt v4.7.1 ? 6 : $V lt v4.10.1 ? 11 : 9,
455                 },
456         ],
457         $V lt v4.7.1 ? () : (upgrade => []), # remove Graviton Catapult
458 },
459
460 # terran
461
462 $unit{scv},
463 $unit{mule},
464 $unit{missile_turret},
465 $unit{planetary_fortress},
466
467 $unit{marine},
468
469 {
470         %{ $unit{marauder} },
471         attack => [
472                 {
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,
476                         upgrade => 1,
477                         bonus => {
478                                 armored => $V lt v4.3.0 ? 5 : 10,
479                                 -armored => $V lt v4.3.0 ? 0 : 1,
480                         },
481                 },
482         ],
483 },
484
485 {
486         %{ $unit{reaper} },
487         build => 32,
488 },
489
490 {
491         %{ $unit{ghost} },
492         min => 150,
493         gas => 125,
494         speed => 3.94,
495         special => [
496                 {
497                         # replaces Sniper Round
498                         name => 'Steady Targeting',
499                         abbr => 'st',
500                         desc => '170 damage ignoring armor to a biological unit after 1.43s without damage',
501                         cost => 50,
502                         range => 10, # kept until 14
503                         duration => 1.43,
504                 },
505                 {
506                         %{ $unit{ghost}->{special}->[1] }, # emp round
507                         radius => $V ge v5.0.11 ? 1.75 : $V lt v4.10.1 ? 1.5 : 2,
508                 },
509                 $unit{ghost}->{special}->[2], # cloak
510                 $unit{ghost}->{special}->[3], # tac nuke strike
511         ],
512         upgrade => [
513                 $V ge v5.0.11 || $V lt v4.10.1 ? () : {
514                         name => 'Enhanced Shockwaves',
515                         min => 150,
516                         gas => 150,
517                         build => 79,
518                         special => [
519                                 {},
520                                 { radius => .5 }, # emp
521                                 {},
522                                 {},
523                         ],
524                 },
525         ],
526 },
527
528 {
529         %{ $unit{hellion} },
530         attack => [
531                 {
532                         %{ $unit{hellion}->{attack}->[0] }, # infernal flamethrower
533                         bonus => {
534                                 light => 5,
535                                 -light => 0,
536                         },
537                 },
538         ],
539         #TODO smart servos
540 },
541
542 {
543         %{ $unit{hellbat} },
544         special => [
545                 $unit{hellbat}->{special}->[0], # Hellion Mode
546                 {
547                         name => 'Smart Servos',
548                         min => 100,
549                         gas => 100,
550                         build => 79,
551                         transform => -1.43, # halve #TODO: alter special duration?
552                 },
553         ],
554 },
555
556 {
557         %{ $unit{widow_mine} },
558         build => 21,
559         attack => [
560                 {
561                         %{ $unit{widow_mine}->{attack}->[0] }, # Sentinel Missiles
562                         bonus => {
563                                 shields => 25,
564                         },
565                         transform => $V lt v5.0.9 ? .71 : 1.07,
566                 },
567         ],
568 },
569
570 {
571         %{ $unit{siege_tank} },
572         hp => 175,
573         special => [
574                 {
575                         %{ $unit{siege_tank}->{special}->[0] }, # siege mode
576                         attack => [
577                                 {
578                                         %{ $unit{siege_tank}->{special}->[0]->{attack}->[0] }, # shock cannon
579                                         damage => 40,
580                                         upgrade => 4,
581                                         bonus => {
582                                                 armored => 30,
583                                                 -armored => 1,
584                                         },
585                                         cooldown => 2.14,
586                                 },
587                         ],
588                 },
589         ],
590 },
591
592 {
593         race => 'terran',
594         cat => 'factory',
595         name => 'Cyclone',
596         pop => 3,
597         min => 150,
598         gas => 100,
599         build => 32,
600         size => 1.5,
601         cargo => 3,
602         armor => 1,
603         hp => $V lt v4.7.1 ? 180 : 120,
604         attr => {
605                 armored => 1,
606                 mech => 1,
607         },
608         attack => [
609                 {
610                         anti => 1,
611                         name => $V lt v4.7.1 ? 'Tornado Blaster' : 'Typhoon Missile Pod',
612                         damage => $V lt v4.7.1 ? 3 : 18,
613                         upgrade => $V lt v4.7.1 ? 1 : 2,
614                         bonus => $V ge v4.7.1 ? {} : {
615                                 armored => 2,
616                                 -armored => 0,
617                         },
618                         cooldown => $V lt v4.7.1 ? .1 : .71,
619                         range => $V lt v4.7.1 ? 6 : 5,
620                 },
621         ],
622         speed => $V lt v4.7.1 ? 4.13 : 4.73,
623         sight => 11,
624         special => [
625                 {
626                         name => 'Lock On',
627                         abbr => 'lo',
628                         desc => (
629                                 $V ge v5.0.11 ? 'deal 400 damage (600 after upgrade) over 14 seconds' :
630                                 $V ge v4.7.1 ? 'deal 400 damage (double to armored after upgrade) over 14 seconds' :
631                                 'target air for 160 damage ignoring armor while visible and within 15 range'
632                         ),
633                         range => 7,
634                         duration => 14.3,
635                         cooldown => 4,
636                 },
637                 $V ge v4.7.1 ? () : {
638                         name => 'Rapid Fire Launchers',
639                         abbr => 'rf',
640                         desc => 'rapid first 12 Lock On shots',
641                         min => 75,
642                         gas => 75,
643                         build => 79,
644                 },
645         ],
646         upgrade => [
647                 $V lt v4.7.1 ? () : {
648                         name => 'Mag-Field Accelerator',
649                         min => 100,
650                         gas => 100,
651                         build => $V lt v4.8.2 ? 79 : 100,
652                         desc => 'increases lock-on damage by '.($V ge v5.0.11 ? '50%' : '100% vs armored'),
653                 },
654         ],
655 },
656
657 {
658         %{ $unit{thor} },
659         armor => $V ge v3.14.0 && $V lt v4.7.1 ? 2 : 1,
660         attack => [
661                 $unit{thor}->{attack}->[0], # thor's hammer
662                 $unit{thor}->{attack}->[1], # javelin missiles
663                 {
664                         %{ $unit{thor}->{attack}->[2] }, # punisher cannons
665                         name => 'High Impact Payload',
666                         damage => $V lt v4.7.1 ? 35 : $V lt v4.11.0 ? 40 : 25,
667                         upgrade => 3,
668                         bonus => {
669                                 $V lt v4.7.1 ? 'armored' : 'massive' => $V lt v4.11.0 ? 15 : 10,
670                                 $V lt v4.7.1 ? '-armored' : '-massive' => 2,
671                         },
672                         cooldown => $V lt v4.7.1 ? 2.14 : $V lt v4.11.0 ? 1.71 : .9,
673                         range => $V lt v4.8.2 ? 10 : 11,
674                 },
675         ],
676         #TODO smart servos
677 },
678
679 {
680         %{ $unit{viking} },
681         hp => $V lt v4.3.0 ? 125 : 135,
682 },
683
684 {
685         %{ $unit{medivac} },
686         special => [
687                 $unit{medivac}->{special}->[0], # heal
688                 {
689                         %{ $unit{medivac}->{special}->[1] }, # ignite afterburners
690                         desc => 'boost speed and accelleration to 4.25 for 8s',
691                         speed => 5.94,
692                         duration => $V lt v4.7.1 ? 6.43 : 4.29,
693                         cooldown => $V lt v4.11.0 ? 20 : 14,
694                         -cooldown => 9,
695                 },
696         ],
697         upgrade => [
698                 {
699                         name => 'Rapid Reignition System',
700                         min => 100,
701                         gas => 100,
702                         build => 57,
703                         speed => .63,
704                 },
705         ],
706 },
707
708 {
709         race => 'terran',
710         cat => 'starport',
711         name => 'Liberator',
712
713         pop => 3,
714         min => 150,
715         gas => $V ge v5.0.11 ? 125 : 150,
716         build => 43,
717         size => 1.5,
718         armor => 0,
719         hp => 180,
720         attr => {
721                 armored => 1,
722                 mech => 1,
723                 flying => 1,
724         },
725         attack => [
726                 {
727                         anti => 2,
728                         name => 'Lexington Rockets',
729                         damage => 5,
730                         upgrade => 1,
731                         type => 'projectile',
732                         cooldown => 1.29,
733                         count => 2,
734                         range => 5,
735                 },
736         ],
737         special => [
738                 {
739                         name => 'Defender Mode',
740                         abbr => 'dm',
741                         transform => 2.88, # 1.46s to revert
742                         alt => 'Defender Liberator',
743                         attack => [
744                                 {
745                                         anti => 1,
746                                         name => 'Concord Cannon',
747                                         desc => 'within 5 diameter circle',
748                                         damage => 75,
749                                         upgrade => 5,
750                                         cooldown => 1.14,
751                                         range => 10,
752                                 },
753                         ],
754                         speed => 0,
755                         sight => 15, # only targeted area
756                         upgrade => [
757                                 {
758                                         name => 'Advanced Ballistics',
759                                         min => 150,
760                                         gas => 150,
761                                         build => 79,
762                                         attack => [
763                                                 {
764                                                         range => 4,
765                                                 },
766                                         ],
767                                         sight => 4,
768                                 },
769                         ],
770                 },
771         ],
772         speed => 4.72,
773         sight => 10,
774 },
775
776 {
777         %{ $unit{banshee} },
778         speed => 3.85,
779         upgrade => [
780                 {
781                         name => 'Hyperflight Rotors',
782                         speed => 1.4,
783                         min => $V ge v5.0.11 ? 125 : $V ge v4.7.1 ? 150 : 200,
784                         gas => $V ge v5.0.11 ? 125 : $V ge v4.7.1 ? 150 : 200,
785                         build => $V ge v5.0.11 ? 100 : 121.4,
786                 },
787         ],
788 },
789
790 {
791         %{ $unit{raven} },
792         gas => $V ge v5.0.11 ? 150 : 200,
793         build => $V ge v5.0.11 ? 34.3 : 42.9,
794         speed => $V lt v4.11.0 ? 3.85 : 4.13,
795         upgrade => $V ge v5.0.11 ? [] : $unit{raven}->{upgrade}, # corvid reactor
796         special => [
797                 {
798                         %{ $unit{raven}->{special}->[0] }, # auto-turret
799                         attack => [
800                                 {
801                                         anti => 3,
802                                         name => '12 mm Gauss Cannon',
803                                         damage => 18,
804                                         cooldown => .57,
805                                         range => 6,
806                                 },
807                         ],
808                         hp => $V ge v5.0.11 ? 100 : 150,
809                         armor => $V ge v5.0.11 ? 0 : 1,
810                         range => $V lt v4.3.0 ? 1 : 2,
811                         duration => $V ge v5.0.11 ? 7.9 : 10,
812                         upgrade => [
813                                 $unit{raven}->{special}->[0]->{upgrade}->[0], # hi-sec auto tracking
814                                 $unit{raven}->{special}->[0]->{upgrade}->[1], # structure armor
815                                 # no more durable materials
816                         ],
817                 },
818                 {
819                         name => 'Interference Matrix',
820                         abbr => 'im',
821                         desc => 'disable target mech or psionic unit rendering it unable to attack or cast',
822                         cost => $V lt v4.11.0 ? 50 : 75,
823                         range => 9,
824                         duration => $V lt v4.11.0 ? 7.9 : 11,
825                 },
826                 {
827                         name => 'Anti-Armor Missile',
828                         abbr => 'aa',
829                         desc => sprintf('launches missile %s reduce armor by %d',
830                                 $V lt v4.7.1 ? 'to do splash damage and' : 'to',
831                                 $V ge v5.0.11 ? 2 : 3,
832                         ),
833                         range => 10,
834                         size => 2.88,
835                         attack => [
836                                 {
837                                         damage => $V lt v4.3.0 ? 30 : $V lt v4.7.1 ? 15 : 0,
838                                         splash => 1,
839                                 },
840                         ],
841                         cost => 75,
842                         duration => 21,
843                 },
844         ],
845 },
846
847 {
848         %{ $unit{battlecruiser} },
849         attack => [
850                 $unit{battlecruiser}->{attack}->[0], # ats laser
851                 {
852                         %{ $unit{battlecruiser}->{attack}->[1] }, # ata laser
853                         damage => $V lt v4.7.1 ? 6 : 5,
854                 },
855         ],
856         special => [
857                 {
858                         name => 'Tactical Jump',
859                         abbr => 'tj',
860                         desc => 'warps to the target location after 5s (invulnerable after 1s)',
861                         duration => 4,
862                         cooldown => 71,
863                 },
864                 {
865                         %{ $unit{battlecruiser}->{special}->[0] }, # yc
866                         desc => '240 damage to a single target',
867                         attack => [
868                                 {
869                                         damage => 240,
870                                 },
871                         ],
872                         cost => undef,
873                         cooldown => 71,
874                 },
875         ],
876         upgrade => [],
877 },
878
879 # zerg
880
881 $unit{drone},
882
883 {
884         %{ $unit{queen} },
885         attack => [
886                 $unit{queen}->{attack}->[0], # claws
887                 {
888                         %{ $unit{queen}->{attack}->[1] }, # acid spines
889                         range => $V lt v4.12.0 ? 8 : 7,
890                 },
891         ],
892         range => 8,
893 },
894
895 {
896         %{ $unit{overlord} },
897         speed => .902, # changed in 4.0.0
898         upgrade => [
899                 {
900                         %{ $unit{overlord}->{upgrade}->[0] }, # carapace
901                         speed => 2.63-.902,
902                 },
903                 $unit{overlord}->{upgrade}->[1], # sacs
904         ],
905 },
906
907 {
908         %{ $unit{overseer} },
909         special => [
910                 {
911                         name => 'Oversight Mode',
912                         abbr => 'om',
913                         desc => 'gain 25% vision while immobilized',
914                         speed => 0,
915                         sight => 11 * 1.25,
916                         transform => .54,
917                 },
918                 @{ $unit{overseer}->{special} }, # changeling, contaminate
919         ],
920 },
921
922 $unit{larva},
923 $unit{spine_crawler},
924
925 {
926         %{ $unit{spore_crawler} },
927         attack => [
928                 {
929                         %{ $unit{spore_crawler}->{attack}->[0] }, # seeker spores
930                         bonus => {
931                                 organic => 15,
932                         },
933                 },
934         ],
935         speed => (1.5),
936         creep => 2.6,
937 },
938
939 $unit{zergling},
940
941 {
942         %{ $unit{baneling} },
943         min => 25,
944         attack => [
945                 {
946                         %{ $unit{baneling}->{attack}->[0] }, # volatile burst
947                         damage => $V lt v4.12.0 ? 20 : $V lt v5.0.2 ? 18 : 15,
948                         bonus => {
949                                 light => $V lt v4.12.0 ? 15 : $V lt v5.0.2 ? 17 : 20,
950                                 -light => 2,
951                                 structure => 80,
952                                 -structure => 5,
953                         },
954                         splash => 1,
955                         range => 0,
956                 },
957         ],
958         upgrade => [
959                 {
960                         %{ $unit{baneling}->{upgrade}->[0] }, # centrifugal hooks
961                         hp => 5,
962                 },
963         ],
964 },
965
966 {
967         %{ $unit{roach} },
968         special => [
969                 {
970                         %{ $unit{roach}->{special}->[0] }, # rapid regeneration
971                         desc => 'regenerates health at 7 HP/s while burrowed',
972                 },
973                 {
974                         %{ $unit{roach}->{special}->[1] }, # tunneling claws
975                         min => $V lt v4.7.1 ? 150 : 100,
976                         gas => $V lt v4.7.1 ? 150 : 100,
977                         build => 79,
978                         desc => 'move while burrowed at speed of 2.8',
979                 },
980         ],
981 },
982
983 {
984         race => 'zerg',
985         cat => 'hatchery',
986         name => 'Ravager',
987         base => ['Roach'],
988         pop => 3,
989         min => 25,
990         gas => 75,
991         build => $V ge v5.0.11 ? 12.14 : 8.57+.36, # added max random
992         size => 1.5,
993         cargo => 4,
994         armor => 1,
995         hp => 120,
996         attr => {
997                 organic => 1,
998         },
999         attack => [
1000                 {
1001                         anti => 1,
1002                         name => '?',
1003                         damage => 16,
1004                         upgrade => 2,
1005                         type => 'projectile',
1006                         cooldown => 1.14,
1007                         range => 6,
1008                 },
1009         ],
1010         speed => 3.85,
1011         creep => 1.3,
1012         sight => 9,
1013 },
1014
1015 {
1016         %{ $unit{hydralisk} },
1017         hp => 90,
1018         upgrade => [
1019                 {
1020                         %{ $unit{hydralisk}->{upgrade}->[0] }, # grooved spines
1021                         attack => [
1022                                 {
1023                                         range => 2,
1024                                 },
1025                         ],
1026                 },
1027                 $unit{hydralisk}->{upgrade}->[1], # muscular augments
1028         ],
1029 },
1030
1031 {
1032         race => 'zerg',
1033         cat => 'lair',
1034         name => 'Lurker',
1035         base => ['Hydralisk'],
1036         pop => 3,
1037         min => 50,
1038         gas => 100,
1039         build => 18,
1040         cargo => 4,
1041         armor => 1,
1042         hp => 200,
1043         attr => {
1044                 armored => 1,
1045                 organic => 1,
1046         },
1047         attack => [
1048                 {
1049                         anti => 1,
1050                         name => 'Spines',
1051                         damage => 20,
1052                         upgrade => 2,
1053                         splash => 'line',
1054                         cooldown => 1.43,
1055                         range => $V lt v4.11.0 ? 9 : 8,
1056                         bonus => {
1057                                 armored => 10,
1058                                 -armored => 1,
1059                         },
1060                 },
1061         ],
1062         transform => 2.0,
1063         upgrade => [
1064                 $V lt v4.11.0 ? () : {
1065                         name => 'Seismic Spines',
1066                         attack => [
1067                                 {
1068                                         range => 2,
1069                                 },
1070                         ],
1071                         req => 'Hive',
1072                         min => 150,
1073                         gas => 150,
1074                         build => 57,
1075                 },
1076                 {
1077                         name => 'Adaptive Talons',
1078                         desc => 'halves burrow time and increases movement speed',
1079                         speed => .413,
1080                         transform => $V lt v5.0.9 ? .71 : 1.07,
1081                 },
1082         ],
1083         speed => 4.13,
1084         creep => 1.3,
1085         sight => 10,
1086 },
1087
1088 {
1089         %{ $unit{infestor} },
1090         special => [
1091                 {
1092                         %{ $unit{infestor}->{special}->[0] }, # neural parasite
1093                         range => $V lt v4.11.0 ? 9 : 8,
1094                 },
1095                 $unit{infestor}->{special}->[1], # fungal growth
1096                 {
1097                         name => 'Microbial Shroud',
1098                         abbr => 'ms',
1099                         desc => 'reduce damage from air by 50% to ground units in target area',
1100                         cost => $V lt v4.11.3 ? 100 : 75,
1101                         min => $V lt v4.11.3 ? 150 : undef,
1102                         gas => $V lt v4.11.3 ? 150 : undef,
1103                         build => $V lt v4.11.3 ? 79 : undef,
1104                         req => $V lt v4.11.3 ? 'Hive' : undef,
1105                         range => 9,
1106                         duration => 11,
1107                         radius => $V lt v4.11.3 ? 3 : 3.5,
1108                 },
1109                 $V ge v4.11.0 ? () : {
1110                         %{ $unit{infestor}->{special}->[2] }, # infested terran
1111                         attack => [
1112                                 {
1113                                         %{ $unit{infestor}->{special}->[2]->{attack}->[0] }, # rockets
1114                                         cooldown => $V lt v4.10.1 ? .95 : 1.14,
1115                                 },
1116                         ],
1117                 },
1118         ],
1119 },
1120
1121 {
1122         % {$unit{nydus_worm} },
1123         min => $V lt v4.7.1 ? 100 : $V lt v4.11.0 ? 50 : 75, # Nydus Network costs 150/150
1124         gas => $V lt v4.7.1 ? 100 : $V lt v4.11.0 ? 50 : 75,
1125         cooldown => $V lt v4.11.0 ? 0 : 14, # Summon Nydus Worm
1126 },
1127
1128 {
1129         %{ $unit{swarm_host} },
1130         gas => 75,
1131         special => [
1132                 {
1133                         %{ $unit{swarm_host}->{special}->[0] }, # locust
1134                         hp => 50,
1135                         upgrade => [], # no flying
1136                 },
1137         ],
1138         upgrade => [],
1139 },
1140
1141 $unit{mutalisk},
1142 $unit{corruptor},
1143
1144 {
1145         %{ $unit{brood_lord} },
1146         speed => $V ge v5.0.11 ? 2.24 : 1.97,
1147 },
1148
1149 $unit{viper},
1150
1151 {
1152         %{ $unit{ultralisk} },
1153         armor => 2,
1154         size => $V ge v5.0.11 ? 1.75 : 2,
1155         upgrade => [
1156                 $unit{ultralisk}->{upgrade}->[0], # chitinous plating
1157                 {
1158                         name => 'Anabolic Synthesis',
1159                         min => 150,
1160                         gas => 150,
1161                         build => 42.85,
1162                         speed => $V lt v4.8.2 ? .41 : .82,
1163                         creep => -.215, # reverse speed increase
1164                 },
1165         ],
1166 },
1167
1168 ]