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