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