sc: distinguish transformation time from build attribute
[sheet.git] / sc-units-lotv.inc.pl
1 use utf8;
2 use strict;
3
4 my $RT = 1.4;  # real-time speed factor to faster
5
6 my $hots = do 'sc-units-hots.inc.pl' or die $!;
7 my %unit;
8 for my $row (@{$hots}) {
9         ref $row eq 'HASH' or next;
10         for ($row, @{ $row->{special} }, @{ $row->{upgrade} }) {
11                 $_ *= $RT for $_->{speed} // ();
12                 $_ /= $RT for $_->{build} // (), $_->{transform} // (), $_->{warp} // (), $_->{cooldown} // ();
13                 $_->{cooldown} and $_->{cooldown} /= $RT for @{ $_->{attack} // [] };
14         }
15         $unit{ lc $row->{name} =~ tr/ /_/r } = $row;
16 }
17
18 [
19 'patch 4.1.4',
20
21 # protoss
22
23 $unit{probe},
24
25 $unit{photon_cannon},
26
27 {
28         %{ $unit{mothership} },
29         speed => 2.62,
30 },
31
32 $unit{nexus},
33
34 {
35         %{ $unit{zealot} },
36         special => [
37                 {
38                         name => 'Charge',
39                         abbr => 'ch',
40                         desc => 'on attack, increases movement speed to 8.47 for 2.5s and deals 8 damage on hit',
41                         min => 100, # changed in 3.14.0
42                         gas => 100,
43                         build => 100,
44                         speed => .5,
45                         range => 4,
46                         duration => 2.5,
47                         cooldown => 7,
48                 },
49         ],
50         upgrade => [
51                 {
52                         name => 'Charge',
53                         speed => .98,
54                 },
55         ],
56 },
57
58 $unit{sentry},
59
60 {
61         %{ $unit{stalker} },
62         attack => [
63                 {
64                         %{ $unit{stalker}->{attack}->[0] }, # particle disruptors
65                         damage => 13,
66                         bonus => {
67                                 armored => 5,
68                                 -armored => 1,
69                         },
70                         cooldown => 1.34,
71                 },
72         ],
73 },
74
75 {
76         race => 'protoss',
77         cat => 'gateway',
78         name => 'Adept',
79         pop => 2,
80         min => 100,
81         gas => 25,
82         build => 27,
83         warp => 20,
84         size => 1,
85         cargo => 2,
86         armor => 1,
87         hp => 70,
88         shield => 70,
89         attr => {
90                 light => 1,
91                 organic => 1,
92         },
93         attack => [
94                 {
95                         anti => 1,
96                         name => undef, #TODO
97                         damage => 10,
98                         upgrade => 1,
99                         bonus => {
100                                 light => 12,
101                                 -light => 1,
102                         },
103                         type => 'projectile', #XXX: assumption
104                         cooldown => 1.61,
105                         range => 4,
106                 },
107         ],
108         speed => 3.5,
109         sight => 9,
110         special => [
111                 {
112                         name => 'Psionic Transfer',
113                         abbr => 'pt',
114                         desc => 'project shade, teleport after 7s',
115                         cooldown => 11,
116
117                         alt => 'Shade',
118                         build => 0,
119                         size => 0,
120                         cargo => 0,
121                         attr => {
122                                 trans => 1,
123                         },
124                         attack => [], #TODO: indicate diff from parent
125                         speed => 5, #XXX: faster than 3.5
126                         range => 7, #XXX: calculate from speed
127                         sight => 4,
128                 },
129         ],
130         upgrade => [
131                 {
132                         name => 'Resonating Glaives',
133                         min => 100,
134                         gas => 100,
135                         build => 100,
136                         attack => [
137                                 {
138                                         cooldown => -.5, # +45%
139                                 },
140                         ],
141                 },
142         ],
143 },
144
145 {
146         %{ $unit{high_templar} },
147         attack => [
148                 {
149                         anti => 1,
150                         name => '?', #XXX
151                         damage => 4,
152                         upgrade => 1,
153                         cooldown => 1.25,
154                         range => 6,
155                 },
156         ],
157 },
158
159 $unit{dark_templar},
160 $unit{archon},
161 $unit{observer},
162
163 {
164         %{ $unit{warp_prism} },
165         hp => 80,
166         upgrade => [
167                 {
168                         %{ $unit{warp_prism}->{special}->[0] }, # gravitic drive
169                         speed => 1.23,
170                 },
171         ],
172 },
173
174 $unit{immortal},
175
176 {
177         %{ $unit{colossus} },
178         attack => [
179                 {
180                         %{ $unit{colossus}->{attack}->[0] }, # thermal lances
181                         damage => 10,
182                         upgrade => 1,
183                         bonus => {
184                                 light => 5,
185                                 -light => 1,
186                         },
187 #                       cooldown => 1.18, #XXX
188                 },
189         ],
190 },
191
192 {
193         race => 'protoss',
194         cat => 'robotic',
195         name => 'Disruptor',
196         pop => 3,
197         min => 150,
198         gas => 150,
199         build => 36,
200         size => 1,
201         cargo => 4,
202         armor => 1,
203         hp => 100,
204         shield => 100,
205         attr => {
206                 armored => 1,
207                 mech => 1,
208         },
209         attack => [
210                 {
211                         anti => 1,
212                         name => 'Purification Nova',
213                         damage => 145,
214                         bonus => {
215                                 shields => 55,
216                         },
217                         type => 'trans', #TODO: indicate
218                         splash => 1.5,
219                         cooldown => 14.3,
220                         range => 13, # 2s
221                 },
222         ],
223         speed => 3.15,
224         sight => 9,
225 },
226
227 $unit{phoenix},
228
229 {
230         %{ $unit{void_ray} },
231         speed => 3.5,
232 },
233
234 {
235         %{ $unit{oracle} },
236         build => 37,
237         attack => [
238                 {
239                         %{ $unit{oracle}->{attack}->[0] }, # pulsar beam
240                         bonus => {
241                                 light => 7,
242                         },
243                 },
244         ],
245         special => [
246                 {
247                         name => 'Revelation',
248                         abbr => 'rv',
249                         desc => 'hit enemy units and buildings are revealed for Â½ minute',
250                         cost => 50,
251                         range => 9,
252                         cooldown => 2.2,
253                         duration => 30,
254                         radius => 6,
255                 },
256                 {
257                         name => 'Stasis Ward',
258                         abbr => 'sw',
259                         desc => 'places ward for 170s',
260                         cost => 50,
261                         range => 6,
262                         build => 3.58,
263                         duration => 170,
264                         alt => 'Stasis Ward',
265                         hp => 30,
266                         shield => 30,
267                         armor => 0,
268                         attr => {
269                                 light => 1,
270                                 structure => 1,
271                         },
272                         sight => 0,
273                         speed => 0,
274                         special => [
275                                 {
276                                         name => 'Permanent Cloak',
277                                         abbr => 'cl',
278                                         desc => 'cloaked at all times',
279                                         duration => -1,
280                                 },
281                                 {
282                                         name => 'Stasis Trap',
283                                         abbr => 'st',
284                                         desc => 'triggered by nearby ground units, trapping them for 21½s',
285                                 },
286                         ],
287                 },
288         ],
289 },
290
291 {
292         %{ $unit{tempest} },
293         hp => 300,
294         shield => 150,
295         attack => [
296                 {
297                         %{ $unit{tempest}->{attack}->[0] }, # kinetic overload
298                         bonus => {
299                                 massive => 22,
300                                 -massive => 2,
301                         },
302                 },
303                 {
304                         %{ $unit{tempest}->{attack}->[1] }, # resonance coil
305                         damage => 40,
306                         upgrade => 4,
307                 },
308         ],
309 },
310
311 {
312         %{ $unit{carrier} },
313         hp => 250,
314         special => [
315                 {
316                         %{ $unit{carrier}->{special}->[0] }, # interceptor
317                         min => 5,
318                 },
319         ],
320 },
321
322 # terran
323
324 $unit{scv},
325 $unit{mule},
326 $unit{missile_turret},
327 $unit{planetary_fortress},
328
329 $unit{marine},
330
331 {
332         %{ $unit{marauder} },
333         attack => [
334                 {
335                         %{ $unit{marauder}->{attack}->[0] }, # punisher grenades
336                         count => 2,
337                         damage => 5,
338                         upgrade => 1,
339                         bonus => {
340                                 armored => 5,
341                                 -armored => 0,
342                         },
343                 },
344         ],
345 },
346
347 {
348         %{ $unit{reaper} },
349         build => 32,
350 },
351
352 {
353         %{ $unit{ghost} },
354         min => 150,
355         gas => 125,
356         speed => 3.94,
357         special => [
358                 {
359                         # replaces Sniper Round
360                         name => 'Steady Targeting',
361                         abbr => 'st',
362                         desc => '170 damage ignoring armor to a biological unit after 1.43s without damage',
363                         cost => 50,
364                         range => 10,
365                         duration => 1.43,
366                 },
367                 $unit{ghost}->{special}->[1], # emp round
368                 $unit{ghost}->{special}->[2], # cloak
369                 $unit{ghost}->{special}->[3], # tac nuke strike
370         ],
371 },
372
373 {
374         %{ $unit{hellion} },
375         attack => [
376                 {
377                         %{ $unit{hellion}->{attack}->[0] }, # infernal flamethrower
378                         bonus => {
379                                 light => 5,
380                                 -light => 0,
381                         },
382                 },
383         ],
384         #TODO smart servos
385 },
386
387 {
388         %{ $unit{hellbat} },
389         special => [
390                 $unit{hellbat}->{special}->[0], # Hellion Mode
391                 {
392                         name => 'Smart Servos',
393                         min => 100,
394                         gas => 100,
395                         build => 79,
396                         transform => -1.43, # halve #TODO: alter special duration?
397                 },
398         ],
399 },
400
401 {
402         %{ $unit{widow_mine} },
403         build => 21,
404         attack => [
405                 {
406                         %{ $unit{widow_mine}->{attack}->[0] }, # Sentinel Missiles
407                         bonus => {
408                                 shields => 25,
409                         },
410                 },
411         ],
412 },
413
414 {
415         %{ $unit{siege_tank} },
416         hp => 175,
417         special => [
418                 {
419                         %{ $unit{siege_tank}->{special}->[0] }, # siege mode
420                         attack => [
421                                 {
422                                         %{ $unit{siege_tank}->{special}->[0]->{attack}->[0] }, # shock cannon
423                                         damage => 40,
424                                         upgrade => 4,
425                                         bonus => {
426                                                 armored => 30,
427                                                 -armored => 1,
428                                         },
429                                         cooldown => 2.14,
430                                 },
431                         ],
432                 },
433         ],
434 },
435
436 {
437         race => 'terran',
438         cat => 'factory',
439         name => 'Cyclone',
440         pop => 3,
441         min => 150,
442         gas => 100,
443         build => 32,
444         size => 1.5,
445         cargo => 3,
446         armor => 1,
447         hp => 180,
448         attr => {
449                 armored => 1,
450                 mech => 1,
451         },
452         attack => [
453                 {
454                         anti => 1,
455                         name => 'Typhoon Blaster',
456                         damage => 3,
457                         upgrade => 1,
458                         bonus => {
459                                 armored => 2,
460                                 -armored => 0,
461                         },
462                         cooldown => .1,
463                         range => 6,
464                 },
465         ],
466         speed => 4.13,
467         sight => 11,
468         special => [
469                 {
470                         name => 'Lock On',
471                         abbr => 'lo',
472                         desc => 'target air for 160 damage ignoring armor while visible and within 15 range',
473                         range => 7,
474                         duration => 14,
475                         cooldown => 4,
476                 },
477                 {
478                         name => 'Rapid Fire Launchers',
479                         abbr => 'rf',
480                         desc => 'rapid first 12 Lock On shots',
481                         min => 75,
482                         gas => 75,
483                         build => 79,
484                 },
485         ],
486 },
487
488 {
489         %{ $unit{thor} },
490         armor => 2,
491         attack => [
492                 $unit{thor}->{attack}->[0],
493                 $unit{thor}->{attack}->[1],
494                 {
495                         %{ $unit{thor}->{attack}->[2] }, # high impact
496                         damage => 35,
497                         upgrade => 3,
498                         bonus => {
499                                 armored => 15,
500                                 -armored => 2,
501                         },
502                         cooldown => 2.14,
503                 },
504         ],
505         #TODO smart servos
506 },
507
508 $unit{viking},
509 $unit{medivac},
510
511 {
512         race => 'terran',
513         cat => 'starport',
514         name => 'Liberator',
515
516         pop => 3,
517         min => 150,
518         gas => 150,
519         build => 43,
520         size => 1.5,
521         armor => 0,
522         hp => 180,
523         attr => {
524                 armored => 1,
525                 mech => 1,
526                 flying => 1,
527         },
528         attack => [
529                 {
530                         anti => 2,
531                         name => 'Lexington Rockets',
532                         damage => 5,
533                         upgrade => 1,
534                         type => 'projectile',
535                         cooldown => 1.29,
536                         count => 2,
537                         range => 5,
538                 },
539         ],
540         special => [
541                 {
542                         name => 'Defender Mode',
543                         abbr => 'dm',
544                         transform => 2.88, # 1.46s to revert
545                         alt => 'Defender Liberator',
546                         attack => [
547                                 {
548                                         anti => 1,
549                                         name => 'Concord Cannon',
550                                         desc => 'within 5 diameter circle',
551                                         damage => 75,
552                                         upgrade => 5,
553                                         cooldown => 1.14,
554                                         range => 10,
555                                 },
556                         ],
557                         speed => 0,
558                         sight => 15, # only targeted area
559                         upgrade => [
560                                 {
561                                         name => 'Advanced Ballistics',
562                                         min => 150,
563                                         gas => 150,
564                                         build => 79,
565                                         attack => [
566                                                 {
567                                                         range => 4,
568                                                 },
569                                         ],
570                                         sight => 4,
571                                 },
572                         ],
573                 },
574         ],
575         speed => 4.72,
576         sight => 10,
577 },
578
579 $unit{banshee},
580
581 {
582         %{ $unit{raven} },
583         speed => 3.85,
584         special => [
585                 {
586                         %{ $unit{raven}->{special}->[0] }, # auto-turret
587                         attack => [
588                                 {
589                                         anti => 3,
590                                         name => '12 mm Gauss Cannon',
591                                         damage => 18,
592                                         cooldown => .57,
593                                         range => 6,
594                                 },
595                         ],
596                         range => 1,
597                         duration => 10,
598                         upgrade => [
599                                 $unit{raven}->{special}->[0]->{upgrade}->[0], # hi-sec auto tracking
600                                 $unit{raven}->{special}->[0]->{upgrade}->[1], # structure armor
601                                 # no more durable materials
602                         ],
603                 },
604                 {
605                         name => 'Interference Matrix',
606                         abbr => 'im',
607                         desc => 'disable target mech or psionic unit rendering it unable to attack or cast',
608                         cost => 50,
609                         range => 9,
610                         duration => 7.9,
611                 },
612                 {
613                         name => 'Anti-Armor Missile',
614                         abbr => 'aa',
615                         desc => 'launches missile to do 30 splash damage and reduces armor by 3',
616                         range => 10,
617                         size => 2.88,
618                         attack => [
619                                 {
620                                         damage => 30,
621                                         splash => 1,
622                                 },
623                         ],
624                         cost => 75,
625                         duration => 21,
626                 },
627         ],
628 },
629
630 $unit{battlecruiser},
631
632 # zerg
633
634 $unit{drone},
635
636 {
637         %{ $unit{queen} },
638         attack => [
639                 $unit{queen}->{attack}->[0], # claws
640                 {
641                         %{ $unit{queen}->{attack}->[1] }, # acid spines
642                         range => 8,
643                 },
644         ],
645         range => 8,
646 },
647
648 {
649         %{ $unit{overlord} },
650         speed => .902, # changed in 4.0.0
651         upgrade => [
652                 {
653                         %{ $unit{overlord}->{upgrade}->[0] }, # carapace
654                         speed => 2.63-.902,
655                 },
656                 $unit{overlord}->{upgrade}->[1], # sacs
657         ],
658 },
659
660 $unit{overseer},
661
662 $unit{larva},
663 $unit{spine_crawler},
664
665 {
666         %{ $unit{spore_crawler} },
667         attack => [
668                 {
669                         %{ $unit{spore_crawler}->{attack}->[0] }, # seeker spores
670                         bonus => {
671                                 organic => 15,
672                         },
673                 },
674         ],
675         speed => (1.5),
676         creep => 2.6,
677 },
678
679 $unit{zergling},
680
681 {
682         %{ $unit{baneling} },
683         min => 25,
684         upgrade => [
685                 {
686                         %{ $unit{baneling}->{upgrade}->[0] }, # centrifugal hooks
687                         hp => 5,
688                 },
689         ],
690 },
691
692 $unit{roach},
693
694 {
695         race => 'zerg',
696         cat => 'hatchery',
697         name => 'Ravager',
698         base => ['Roach'],
699         pop => 3,
700         min => 25,
701         gas => 75,
702         build => 9,
703         size => 1.5,
704         cargo => 4,
705         armor => 1,
706         hp => 120,
707         attr => {
708                 organic => 1,
709         },
710         attack => [
711                 {
712                         anti => 1,
713                         name => '?',
714                         damage => 16,
715                         upgrade => 2,
716                         type => 'projectile',
717                         cooldown => 1.14,
718                         range => 6,
719                 },
720         ],
721         speed => 3.85,
722         creep => 1.3,
723         sight => 9,
724 },
725
726 {
727         %{ $unit{hydralisk} },
728         hp => 90,
729         upgrade => [
730                 {
731                         %{ $unit{hydralisk}->{upgrade}->[0] }, # grooved spines
732                         attack => [
733                                 {
734                                         range => 2,
735                                 },
736                         ],
737                 },
738                 $unit{hydralisk}->{upgrade}->[1], # muscular augments
739         ],
740 },
741
742 {
743         race => 'zerg',
744         cat => 'lair',
745         name => 'Lurker',
746         base => ['Hydralisk'],
747         pop => 3,
748         min => 50,
749         gas => 100,
750         build => 18,
751         cargo => 4,
752         armor => 1,
753         hp => 200,
754         attr => {
755                 armored => 1,
756                 organic => 1,
757         },
758         attack => [
759                 {
760                         anti => 1,
761                         name => '?',
762                         damage => 20,
763                         upgrade => 2,
764                         splash => 'line',
765                         cooldown => 1.43,
766                         range => 9,
767                         bonus => {
768                                 armored => 10,
769                                 -armored => 1,
770                         },
771                 },
772         ],
773         speed => 4.13,
774         creep => 1.3,
775         sight => 10,
776 },
777
778 $unit{infestor},
779 $unit{nydus_worm},
780
781 {
782         %{ $unit{swarm_host} },
783         gas => 75,
784         special => [
785                 {
786                         %{ $unit{swarm_host}->{special}->[0] }, # locust
787                         hp => 50,
788                 },
789         ],
790         upgrade => [],
791 },
792
793 $unit{mutalisk},
794 $unit{corruptor},
795 $unit{brood_lord},
796 $unit{viper},
797
798 {
799         %{ $unit{ultralisk} },
800         armor => 2,
801 },
802
803 ]