browser: drop unused agent version metadata
[sheet.git] / sc.plp
1 <(common.inc.plp)><:
2 use List::Util qw(max sum);
3
4 my %scvers = (
5         bw => {
6                 name => 'Brood War',
7                 title => 'starcraft',
8                 game => 'StarCraft BW',
9                 major => 1,
10         },
11         hots => {
12                 name => 'Heart of the Swarm',
13                 title => 'starcraft2 hots',
14                 game => 'StarCraft II HotS',
15                 major => 2,
16         },
17         lotv => {
18                 name => 'Legacy of the Void',
19                 title => 'starcraft2 lotv',
20                 game => 'StarCraft II LotV',
21                 major => 2,
22         },
23         index => 'bw',
24         1     => 'bw',
25         2     => 'lotv',
26 );
27
28 my $requestver = $scvers{$Request ||= 'index'}
29         or Html(), Abort("Requested version <q>$Request</q> not available", '404 request not found');
30
31 if (ref $requestver ne 'HASH') {
32         $header{Location} = $requestver;
33         Abort("Canonical URL for $Request is at $requestver", '302 subpage alias');
34 }
35
36 my %scver = %{$requestver};
37 my $datafile = "sc-units-$Request.inc.pl";
38
39 Html({
40         title => "$scver{title} unit cheat sheet",
41         version => '1.2',
42         description => [
43                 "Reference of $scver{game} unit properties,"
44                 . " comparing various statistics of all the units in $scver{name}"
45                 . ' including costs, damage, defense, speed, ranges, and abilities.',
46         ],
47         keywords => [
48                 qw'
49                 starcraft game unit statistics stats comparison table sheet cheat
50                 reference software attributes properties patch attribute multiplayer
51                 ',
52                 $scver{major} < 2 ? qw' bw broodwar brood war ' :
53                 qw' starcraft2 lotv hots wol ',
54         ],
55         stylesheet => [qw( light dark )],
56         raw => '<link rel="stylesheet" type="text/css" media="all" href="/sc.css?1.2">',
57         data => [$datafile],
58 });
59
60 say "<h1>$scver{game} units</h1>\n";
61
62 my $units = do $datafile;
63 Abort("Cannot open unit data", 501, $_) for $@ || $! || ();
64 my $patch = shift @{$units}
65         or Abort("Cannot open unit data: metadata not found", 501);
66
67 say "<p>Unit properties as seen or measured in $scver{name}\n$patch.";
68 say "Also see the $_ tables." for join(' and ',
69         (showlink('StarCraft 2: LotV', '/sc/lotv'))    x ($Request ne 'lotv'),
70         (showlink(             'HotS', '/sc/hots'))    x ($Request ne 'hots'),
71         (showlink('original SC: Brood War', '/sc/bw')) x ($Request ne 'bw'),
72 );
73 say "</p>\n";
74
75 sub addupgrade {
76         my ($ref, $increase, $org) = @_;
77         if (ref $increase eq 'HASH') {
78                 addupgrade(\${$ref}->{$_}, $increase->{$_}, $org->{$_}) for keys %{$increase};
79         }
80         elsif (ref $increase eq 'ARRAY') {
81                 addupgrade(\${$ref}->[$_], $increase->[$_], $org->[$_]) for 0 .. $#{$increase};
82         }
83         ${$ref} //= $org;
84         ${$ref} += $increase if $increase =~ /^-?[0-9.]+/;
85 }
86
87 for my $unit (@{$units}) {
88         for my $upgrade (@{ $unit->{upgrade} }) {
89                 while (my ($col, $increase) = each %{$upgrade}) {
90                         defined $unit->{$col} or next;
91                         addupgrade(\$unit->{upgraded}->{$col}, $increase, $unit->{$col});
92                 }
93         }
94         for my $special (@{ $unit->{special} }) {
95                 for my $upgrade (@{ $special->{upgrade} }) {
96                         while (my ($col, $increase) = each %{$upgrade}) {
97                                 defined $special->{$col} or next;
98                                 addupgrade(\$special->{upgraded}->{$col}, $increase, $special->{$col});
99                         }
100                 }
101         }
102 }
103
104 sub coltoggle {
105         my ($name, $id, $nolink) = @_;
106         return "$name ▼" if defined $get{order} ? $get{order} eq $id : !$id;
107         return $name if $nolink;
108         return showlink($name, '?'.($id && "order=$id"));
109 }
110 :><table class="units">
111 <thead><tr>
112         <th><:= coltoggle(exists $get{order} ? 'race' : 'source' => '') :></th>
113         <th class="unit-name"><:= coltoggle(name => 'name') :></th>
114         <th class="val unit-min" title=minerals><:= coltoggle(cost => 'cost') :></th>
115         <th class="val unit-gas">gas</th>
116         <th class="val time"><:= coltoggle(build => 'build') :></th>
117         <th class="unit" colspan="2"><:= coltoggle(qw'size size') :></th>
118         <th class="unit unit-attr" colspan="2">attr</th>
119         <th class="val unit-hp"><:= coltoggle(HP => 'hp') :></th>
120         <th class="val unit-shield">shield</th>
121         <th class="val unit-armor" title="armor">⛨</th>
122         <th class="val hurt"><:= coltoggle(attack => 'attack') :></th>
123         <th class="hurt hurtrel">dps</th>
124         <th class="val unit-range" colspan=3>range</th>
125         <th class="val unit-sight">sight</th>
126         <th class="val unit-speed"><:= coltoggle(speed => 'speed') :></th>
127         <th class="unit-magic">specials</th>
128 </tr></thead>
129 <:
130 sub showrange {
131         my ($min, $max) = @_;
132         return '' if not defined $min;
133         return $min || '-' if !$max or $min == $max;
134         return "$min-$max";
135 }
136
137 sub showrangeint {
138         $_ &&= int($_ + .5) for @_;  # round halves up
139         return showrange(@_);
140 }
141
142         sub showcost {
143                 my ($row, $unit) = @_;
144                 return join(' ',
145                         sprintf('cost %s%%', join '-',
146                                 map { $_ && sprintf '%.0f', 100 * $row->{cost} / $_ } grep { defined $_ }
147                                 $unit->{energy},
148                                 $unit->{upgraded}->{energy},
149                                 $unit->{capacity},
150                                 $unit->{upgraded}->{capacity},
151                         ),
152                         !defined $row->{maint} ? () : sprintf('+%s%%/s', join '-',
153                                 map { sprintf '%.1f', 100 * $row->{maint} / $_ } grep $_,
154                                 $unit->{capacity},
155                                 $unit->{upgraded}->{capacity},
156                         ),
157                 );
158         }
159
160         sub showattack {
161                 my ($row, $area) = @_;
162                 my $attack = $row->{attack}->[$area]
163                         or return '<td colspan=5 class="hurt">';
164
165                 my $upattack = $row->{upgraded}->{attack}->[$area];
166                 my $damage = $attack->{damage};
167                 my $maxdamage = $upattack->{damage} // $damage;
168                 $maxdamage += ($upattack->{upgrade} // $attack->{upgrade}) * 3;
169
170                 my $out = '<td class="val hurt">';
171                 $out .= sprintf '<span title="%s">¤</span> ', showcost($attack, $row)
172                         if $attack->{cost};
173                 $out .= sprintf('<small>%s× </small>',
174                         showrangeint($attack->{count}, $upattack->{count}),
175                 ) if $attack->{count} > 1;
176                 $out .= '<span class="unit-l" title="explosive">*</span>'
177                         if $attack->{type} eq 'explosive';
178                 $out .= '<span class="unit-s" title="implosive">~</span>'
179                         if $attack->{type} eq 'implosive';
180         if (my @bonus = sort grep { !/^-/ } keys %{ $attack->{bonus} }) {
181                 $out .= sprintf('<span class="%s" title="%s">&ge;</span>',
182                         (map {
183                                 $_ eq 'light' ? 'unit-s' :
184                                 $_ eq 'armored' ? 'unit-l' :
185                                 $_ eq 'organic' ? 'unit-o' :
186                                 $_ eq 'massive' ? 'unit-h' :
187                                 $_ eq 'shields' ? 'unit-shield' :
188                                 '',
189                         } join '_', @bonus),
190                         join(', ', map {(
191                                 sprintf('+%s vs %s',
192                                         showrangeint(
193                                                 $attack->{bonus}->{$_},
194                                                 ($upattack->{bonus} // $attack->{bonus})->{$_}
195                                                         + ($upattack->{bonus} // $attack->{bonus})->{"-$_"} * 3,
196                                         ),
197                                         $_,
198                                 ),
199                         )} @bonus),
200                 );
201         }
202                 $out .= '<span class="unit-pdd" title="projectile">•</span>'
203                         if $attack->{type} eq 'projectile';
204
205                 $out .= sprintf '<span title="%s">', $attack->{name} if $attack->{name};
206                 $out .= showrangeint($damage, $maxdamage);
207                 $out .= '</span>' if $attack->{name};
208                 $out .= sprintf('<span class="unit-splash" title="%s">%s</span>',
209                         $attack->{splash} eq 'line' ? ('linear', '+') : ('splash', '⁜')
210                 ) if $attack->{splash};
211
212                 $out .= '<td class="val hurt hurtrel">';
213                 if ($attack->{dps}) {
214                         # precalculated dps, do not touch
215                         $out .= showrangeint($attack->{dps}->[0],
216                                 $upattack->{dps}->[-1] // $attack->{dps}->[-1]
217                         );
218                 }
219                 elsif ($attack->{cooldown}) {
220                         if (my $type = $attack->{type}) {
221                                 if ($type eq 'explosive') {
222                                         $damage /= 2;
223                                 }
224                                 elsif ($type eq 'implosive') {
225                                         $damage /= 4;
226                                 }
227                         }
228                         $damage *= ($attack->{count} // 1) / $attack->{cooldown};
229                         if (my $bonus = $upattack->{bonus} // $attack->{bonus}) {
230                                 $maxdamage += $_ for max(
231                                         map { $bonus->{$_} + $bonus->{"-$_"} * 3 }
232                                         grep { !/^-/ } keys %{$bonus}
233                                 );
234                         }
235                         $maxdamage *= ($upattack->{count} // $attack->{count} // 1)
236                                     / ($upattack->{cooldown} // $attack->{cooldown});
237                         $out .= showrangeint($damage, $maxdamage);
238                 }
239
240                 $out .= '<td class="unit hurt-g">' . '▽' x !!($attack->{anti} & 1);
241                 $out .= '<td class="unit hurt-a">' . '△' x !!($attack->{anti} & 2);
242
243                 $out .= '<td class="val unit-range">' .
244                         showrangeint($attack->{range}, $upattack->{range});
245
246                 return $out;
247         }
248
249         sub showmagic {
250                 my ($row) = @_;
251                 my $specials = $row->{special} or return '';
252                 return join ' ', map {
253                         sprintf '<span%s title="%s">%s</span>',
254                                 $_->{duration} < 0 && ' class="magic-perma"',
255                                 join('',
256                                         $_->{name},
257                                         $_->{desc} ? ": $_->{desc}" : '',
258                                         (map { $_ && " ($_)" } join ', ',
259                                                 #TODO: apply upgrades
260                                                 $_->{range} ? "range $_->{range}" : (),
261                                                 $_->{cost} ? showcost($_, $row) :
262                                                 $_->{cooldown} ? "cooldown $_->{cooldown}s" : (),
263                                         ),
264                                 ),
265                                 sprintf($_->{build} ? '(%s)' : '%s', $_->{abbr}),
266                 } grep { defined $_->{abbr} } @{$specials};
267         }
268
269         sub showunitcols {
270                 my ($row) = @_;
271                 local $_ = $row;
272                 $_->{hp} += $_->{shield} if $_->{shield};
273
274                 return (
275                         '<td class="val unit-min">' . ($_->{min} // ''),
276                         '<td class="val unit-gas">' . ($_->{gas} || ''),
277                         defined $_->{transform} ? sprintf('<td class="val time">%.0f',
278                                 $_->{transform},
279                         ) :
280                         !defined $_->{build} ? '<td>' : sprintf('<td class="val time"%s>%s%.0f',
281                                 defined $_->{warp} && qq(title="$_->{build} without warpgate"),
282                                 !!$_->{base} && sprintf(
283                                         '<span class="unit-composed" title="%s">+</span>',
284                                         'from '.join('+', @{ $_->{base} }),
285                                 ),
286                                 $_->{warp} // $_->{build} || '0',
287                         ),
288                         sprintf('<td class="unit unit-%s" title="%4$s%3$s">%s',
289                                 $_->            {cargo} < 0 ? ('supply',           T => 'transport') :
290                                 $_->{upgraded}->{cargo} < 0 ? ('supply magic-opt', T => 'optional transport') :
291                                 $_->            {attr}->{flying} ? ('air',           F => 'flying') :
292                                 $_->{upgraded}->{attr}->{flying} ? ('air magic-opt', F => 'potentially flying') :
293                                 $_->{attr}->{structure} ? ('x',   B => 'building') :
294                                 (
295                                         [qw( x s m l l h h h h )]->[ $_->{cargo} ],
296                                         $_->{cargo} || '-',
297                                         $_->{cargo} ? 'transportable' : 'untransportable',
298                                 ),
299                                 defined $_->{size} && sprintf('⌀%.1f ', $_->{size}),
300                         ),
301                         sprintf('<td class="val unit unit-pop%s">%s',
302                                 defined $_->{pop} && $_->{pop} < 0 && ' unit-supply',
303                                 defined $_->{pop} && $_->{pop} == .5 ? '½' : $_->{pop},
304                         ),
305                         '<td class="unit unit-type">' . join('', grep { $_ }
306                                 (defined $_->{organic} ? !$_->{organic} : $_->{attr}->{mech})
307                                         && '<span class="unit-u" title="mechanic">m</span>',
308                                 ($_->{organic} || $_->{attr}->{organic})
309                                         && '<span class="unit-o" title="organic">o</span>',
310                                 $_->{attr}->{psionic}
311                                         && '<span class="unit-p" title="psionic">ψ</span>',
312                         ),
313                         '<td class="unit unit-attr">' . join('', grep { $_ }
314                                 $_->{attr}->{armored}
315                                         && '<span class="unit unit-l" title="armored">A</span>',
316                                 $_->{attr}->{light}
317                                         && '<span class="unit unit-s" title="light">L</span>',
318                                 $_->{suit} && sprintf(
319                                         '<span class="unit unit-%s" title="%3$s">%s</span>',
320                                         map { @{$_} } [
321                                                 [qw( x ? unknown )],
322                                                 [qw( s S small )],
323                                                 [qw( m M medium )],
324                                                 [qw( l L large )],
325                                         ]->[ $_->{suit} ],
326                                 ),
327                                 $_->{attr}->{massive}
328                                         && '<span class="unit-massive" title="massive">⚓</span>',
329                         ),
330                         $_->{hp} < 0 ? '<td class="val unit-hp" title="invulnerable">∞' :
331                         '<td class="val unit-hp">' . showrangeint($_->{hp}, $_->{upgraded}->{hp}),
332                         $_->{shield} ? sprintf('<td class="val unit-shield">%.0f%%<td',
333                                 100 * $_->{shield} / $_->{hp}
334                         ) : '<td colspan=2',
335                         ' class="val unit-armor">' .
336                                 showrangeint($_->{armor}, $_->{upgraded}->{armor}),
337                         showattack($_, 0),
338                         '<td class="val unit-sight">' . sprintf(
339                                 $_->{detect} ? '<strong class="unit-detect">%s</strong>' : '%s',
340                                 showrangeint($_->{sight}, $_->{upgraded}->{sight})
341                         ),
342                         sprintf('<td class="val unit-speed"%2$s>%s',
343                                 showrange(
344                                         map { $_ && sprintf '%.1f', $_ }
345                                         $_->{speed}, $_->{upgraded}->{speed}
346                                 ),
347                                 defined $_->{creep} && sprintf(' title="%s on creep"',
348                                         $_->{creep} == 1 ? 'same' : showrange(
349                                                 map { $_ && sprintf '%.1f', $_ }
350                                                 $_->{speed} * $_->{creep},
351                                                 $_->{upgraded}->{speed} && $_->{upgraded}->{speed} *
352                                                         ($_->{upgraded}->{creep} // $_->{creep}),
353                                         ),
354                                 ),
355                         ),
356                         $_->{attr}->{jump}
357                                 && qq'<span class="unit unit-jump" title="$_->{attr}->{jump}">↕</span>',
358                         '<td class="unit-magic">' . showmagic($_),
359                         !$_->{attack}->[1] ? () : (
360                                 '<tr><th class="cat" colspan="2"><td colspan=10>', showattack($_, 1), '<td colspan=3>'
361                         ),
362                         !$_->{attack}->[2] ? () : (
363                                 '<tr><th class="cat" colspan="2"><td colspan=10>', showattack($_, 2), '<td colspan=3>'
364                         ),
365                         "\n"
366                 );
367         }
368
369         my @rows = @{$units};
370         my $grouped = 1;  # race headers
371         if (exists $get{order}) {
372                 $grouped = 0;
373                 $get{order} ||= '';
374                 if ($get{order} eq 'name') {
375                         @rows = sort {$a->{name} cmp $b->{name}} @rows;
376                 }
377                 elsif ($get{order} eq 'cost') {
378                         $_->{order} = (
379                                 $_->{gas}*1.5 + $_->{min} + $_->{pop}/8 + $_->{build}/256/8
380                         ) for @rows;
381                 }
382                 elsif ($get{order} eq 'build') {
383                         my %unittime = map { ($_->{name} => $_->{warp} // $_->{build}) } @rows;
384                         $unittime{Templar} = $unittime{'High Templar'};
385                         $_->{order} = (
386                                 ($_->{warp} // $_->{build})
387                                 + ($_->{gas}*1.5 + $_->{min} + $_->{pop}/8)/1024
388                                 + ($_->{base} ? ($unittime{$_->{base}->[0]} // 100) + 1 : 0)
389                         ) for @rows;
390                 }
391                 elsif ($get{order} eq 'size') {
392                         $_->{order} = (
393                                 $_->{pop}*16 + ($_->{size} // $_->{suit}) + $_->{cargo}/8
394                                 + $_->{hp}/512 + $_->{min}/8192
395                         ) for @rows;
396                 }
397                 elsif ($get{order} eq 'hp') {
398                         $_->{order} = (
399                                 $_->{hp}*1.01 + $_->{armor} + $_->{shield} + $_->{size}/1024,
400                         ) for @rows;
401                 }
402                 elsif ($get{order} eq 'attack') {
403                         $_->{order} = $_->{hp} / 1024 + $_->{shield} / 1008 + max(
404                                 map {
405                                         ($_->{dps} ? $_->{dps}->[-1] :
406                                                 ($_->{damage} + $_->{upgrade} * 3)
407                                                 * ($_->{count} // 1) / ($_->{cooldown} // 1)
408                                         )
409                                         * ($_->{splash} ? 1.01 : 1)
410                                         * ($_->{type} eq 'implosive' ? .96 : 1)
411                                         * ($_->{type} eq 'explosive' ? .98 : 1)
412                                 } @{ $_->{attack} }
413                         ) for @rows;
414                 }
415                 elsif ($get{order} eq 'speed') {
416                         $_->{order} = (
417                                 ($_->{upgraded}->{speed} // $_->{speed}*1.01)
418                                 + $_->{sight}/1024 + $_->{detect}/2048
419                         ) for @rows;
420                 }
421                 @rows = sort {$a->{order} <=> $b->{order}} @rows if exists $rows[0]->{order};
422         }
423
424         my ($race, $cat) = ('', '');
425         for (@rows) {
426                 if ($grouped) {
427                         say sprintf '<tbody id="%s"><tr class="race"><th colspan="20"><h2>%s</h2>',
428                                 $race = $_->{race}, ucfirst $race
429                                         unless $race eq $_->{race};
430                 }
431                 else {
432                         $_->{cat} = $_->{race};
433                 }
434
435                 print(
436                         '<tr>',
437                         '<th class="cat">', $cat ne $_->{cat} && ($cat = $_->{cat}),
438                         '<td>', $_->{name},
439                         showunitcols($_),
440                 );
441
442                 for my $subrow (@{ $_->{special} }) {
443                         $subrow->{alt} or next;
444                         print(
445                                 '<tr class="alt"><th class="cat"><td>', $subrow->{alt},
446                                 showunitcols($subrow),
447                         );
448                 }
449         }
450 :>
451 </table>
452
453 <div class="legend">
454 <h2>Legend</h2>
455
456 <dl>
457 <dt>cost
458         <dd><span class="unit-min">minerals</span> and
459                 <span class="unit-gas">gas</span> required to create one unit
460         <dd>includes total expenses if based on existing units
461 <dt>build
462         <dd>relative time needed to create at least one unit
463         <dd>excludes construction of dependencies such as buildings
464                 and <span class="unit-composed">+</span>parent units
465 <dt>size
466         <dd><span class="unit unit-supply">T</span>ransports can fit upto
467                 8 non-<span class="unit unit-air">F</span>lying cargo units
468         <dd>number of command points taken while alive
469         <dd><:
470 if ($scver{major} > 1) {
471                 :>received damage depends on
472                 <span class="unit unit-o">o</span>rganic,
473                 <span class="unit unit-u">m</span>echanic,
474                 <span class="unit unit-p">ψ</span>(ps)ionic,
475                 <span class="unit unit-s">L</span>ight, and
476                 <span class="unit unit-l">A</span>rmored
477                 attributes
478         <dd>massive <span class="unit-massive">⚓</span> units
479                 cannot be lifted or slowed and can break force fields<:
480 } else {
481                 :>abilities may hit only <span class="unit unit-o">o</span>rganic
482                 or <span class="unit unit-u">m</span>echanic targets
483         <dd>affected by <span class="unit unit-s">S</span>mall,
484                 <span class="unit unit-m">M</span>edium, or
485                 <span class="unit unit-l">L</span>arge damage<:
486 } :>
487 <dt>HP
488         <dd>total number of hitpoints (including shields)
489         <dd>everything zerg (except for eggs) regenerates one point every
490                 <:= $scver{major} == 1 ? '4½' : '3.7' :> seconds
491 <dt>shield
492         <dd>percentage of HP in shields
493         <dd><:
494 if ($scver{major} > 1) {
495                 :>shields always take full damage, irrelevant of unit size
496         <dd><:
497 }
498                 :>does not take armor bonuses,
499                 but upgrades can decrease damage to any shield hit by upto 3
500         <dd><:
501 if ($scver{major} > 1) {
502                 :>after 10 seconds out of combat, 2 points are recharged per game second<:
503 } else {
504                 :>recharges one point every 2½ seconds<:
505 } :>
506 <dt>armor
507         <dd>base unit armor
508         <dd>can be increased by upto 3 at various facilities
509         <dd>each point decreases damage per hit by one, upto a minimum of ½
510         <dd>reduction applies to initial damage, before size penalties
511                 <small>(so a plasma hit of 12 to 4 armor large deals 2 damage, not ½)</small>
512 <dt>attack
513         <dd>damage per single hit
514         <dd>some weapons fire multiple × times, multiplying armor penalties
515         <dd>splash damage hits all objects nearby <span class="unit-splash">⁜</span>
516                 or in a straight line <span class="unit-splash">+</span>.
517         <dd><:
518 if ($scver{major} > 1) {
519                 :>does not include <span>&ge;</span>bonus damage
520                 dealt to susceptible unit types
521         <dd><span class="unit-pdd">•</span>projectile shots are negated by
522                 Point Defense Drones<:
523 } else {
524                 :><span class="unit-l">*</span>explosive damage does only
525                 50% damage to <span class="unit unit-s">S</span>mall units,
526                 75% to <span class="unit unit-m">M</span>edium,
527                 100% to <span class="unit unit-l">L</span>arge
528         <dd><span class="unit-s">~</span>concussive/plasma damage does
529                 25% to <span class="unit unit-l">L</span>arge,
530                 50% <span class="unit unit-m">M</span>edium,
531                 100% to <span class="unit unit-s">S</span>mall units<:
532 } :>
533         <dd><span class="hurtrel">dps</span> indicates relative total amount of damage
534                 done in 1 second of <:= $scver{major} > 1 ? '<em>Normal</em> in-game time' :
535                 'time on <em>Fast</em> game speed' :>
536         <dd>targets <span class="hurt-g">▽</span>&nbsp;ground
537                 and/or  <span class="hurt-a">△</span>&nbsp;air
538 <dt>range
539         <dd>maximum hex distance a weapon can fire (note Sieged Tank also has a minimum)
540 <dt>sight
541         <dd>range in which the unit detects other units
542         <dd><strong class="unit-detect">emphasis</strong> indicates ability to detect cloaked units
543 <dt>speed
544         <dd>top movement speed in hex per second
545         <dd>acceleration and deceleration ignored
546 <dt>specials
547         <dd>parentheses () indicate that it needs to be researched first
548         <dd><span class="magic-perma">passive</span> abilities are always enabled
549         <dd>hover for description
550         <dd>range is maximum distance allowed to activate
551         <dd>cost describes energy loss percentage on spawn and when fully charged
552 </dl>
553
554 <p>
555 When two values are given (1-2), the second value indicates the attribute
556 after all possible upgrades.
557 </p>
558
559 </div>
560