X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/3978c7991a5172d9753094770f24b56cca85d91b..e487749bf1899655bb0c7b7fe9c2d4cbff3b8021:/sc.plp diff --git a/sc.plp b/sc.plp index 3252cf3..cf2155f 100644 --- a/sc.plp +++ b/sc.plp @@ -3,7 +3,6 @@ my %scver = ( id => 'bw', name => 'Brood War', - patch => 'version≥1.08', title => 'starcraft', game => 'StarCraft', major => 1, @@ -13,7 +12,6 @@ if ($ENV{PATH_INFO} and $ENV{PATH_INFO} eq '/2') { %scver = ( id => 'hots', name => 'Heart of the Swarm', - patch => 'patch 2.1.3 BU', title => 'starcraft2', game => 'StarCraft II', major => 2, @@ -42,7 +40,13 @@ Html({ }); print "

$scver{game} units

\n\n"; -print "

Unit properties as seen or measured in $scver{name}\n$scver{patch}.\n

\n\n"; + +my $units = do $datafile; +die "Cannot open unit data: $_\n" for $@ || $! || (); +my $patch = shift @{$units} + or die "Cannot open unit data: metadata not found\n"; + +print "

Unit properties as seen or measured in $scver{name}\n$patch.\n

\n\n"; sub coltoggle { my ($name, $id) = @_; @@ -174,7 +178,13 @@ sub showval { local $_ = $row; $_->{hp} += $_->{shield} if $_->{shield}; my $suitchar = ''; - if ($_->{suit}) { + if ($_->{cargo} > 0) { + $suitchar = [qw/? s m l l h h h h/]->[abs $_->{cargo}]; + } + elsif ($_->{size}) { + $suitchar = [qw/s m l h h h/]->[$_->{size}]; + } + elsif ($_->{suit}) { $suitchar = [qw/? s m l/]->[$_->{suit}]; } @@ -213,8 +223,6 @@ sub showval { ); } - my $units = do $datafile; - die "Cannot open unit data: $_\n" for $@ || $! || (); my $grouped = 1; # race headers if (exists $get{order}) { $grouped = 0; @@ -273,9 +281,17 @@ sub showval {
excludes construction of dependencies such as buildings and +parent units
size -
affected by Small, +
<: +if ($scver{major} > 1) { + :>transports can fit 8 Small, + 4 Medium, + 2 Large, + or a single Huge unit<: +} else { + :>affected by Small, Medium, - or Large unit damage + or Large unit damage<: +} :>
number of command points taken per unit
organic/mechanic unit
HP