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