--- /dev/null
+use utf8;
+use strict;
+
+my $RT = 1.4; # real-time speed factor to faster
+
+my $hots = do 'sc-units-hots.inc.pl' or die $!;
+my %unit;
+for my $row (@{$hots}) {
+ ref $row eq 'HASH' or next;
+ for ($row, @{ $row->{special} }, @{ $row->{upgrade} }) {
+ $_ *= $RT for $_->{speed};
+ $_ /= $RT for $_->{build}, $_->{warp} // ();
+ $_->{cooldown} /= $RT for @{ $_->{attack} // [] };
+ }
+ $unit{ lc $row->{name} =~ tr/ /_/r } = $row;
+}
+
+[
+'patch 4.1.4',
+
+# protoss
+
+$unit{probe},
+$unit{photon_cannon},
+$unit{mothership},
+$unit{nexus},
+$unit{zealot},
+$unit{sentry},
+$unit{stalker},
+{
+ race => 'protoss',
+ cat => 'gateway',
+ name => 'Adept',
+},
+$unit{high_templar},
+$unit{dark_templar},
+$unit{archon},
+$unit{observer},
+$unit{warp_prism},
+$unit{immortal},
+$unit{colossus},
+{
+ race => 'protoss',
+ cat => 'robotic',
+ name => 'Disruptor',
+},
+$unit{phoenix},
+$unit{void_ray},
+$unit{oracle},
+$unit{tempest},
+$unit{carrier},
+
+# terran
+
+$unit{scv},
+$unit{mule},
+$unit{missile_turret},
+$unit{planetary_fortress},
+$unit{marine},
+$unit{marauder},
+$unit{reaper},
+$unit{ghost},
+$unit{hellion},
+$unit{hellbat},
+$unit{widow_mine},
+$unit{siege_tank},
+{
+ race => 'terran',
+ cat => 'factory',
+ name => 'Cyclone',
+},
+$unit{thor},
+$unit{viking},
+$unit{medivac},
+{
+ race => 'terran',
+ cat => 'starport',
+ name => 'Liberator',
+},
+$unit{banshee},
+$unit{raven},
+$unit{battlecruiser},
+
+# zerg
+
+$unit{larva},
+$unit{drone},
+$unit{queen},
+$unit{overlord},
+$unit{overseer},
+$unit{larva},
+$unit{spine_crawler},
+$unit{spore_crawler},
+$unit{zergling},
+$unit{baneling},
+$unit{roach},
+{
+ race => 'zerg',
+ cat => 'hatchery',
+ name => 'Ravager',
+},
+$unit{hydralisk},
+{
+ race => 'zerg',
+ cat => 'lair',
+ name => 'Lurker',
+},
+$unit{infestor},
+$unit{nydus_worm},
+$unit{swarm_host},
+$unit{mutalisk},
+$unit{corruptor},
+$unit{brood_lord},
+$unit{viper},
+$unit{ultralisk},
+
+]
bw => {
name => 'Brood War',
title => 'starcraft',
- game => 'StarCraft',
+ game => 'StarCraft BW',
major => 1,
},
hots => {
name => 'Heart of the Swarm',
- title => 'starcraft2',
- game => 'StarCraft II',
+ title => 'starcraft2 hots',
+ game => 'StarCraft II HotS',
+ major => 2,
+ },
+ lotv => {
+ name => 'Legacy of the Void',
+ title => 'starcraft2 lotv',
+ game => 'StarCraft II LotV',
major => 2,
},
);
$Request ||= 'bw';
-$Request = 'hots' if $Request eq '2';
+$Request = 'lotv' if $Request eq '2';
my %scver = %{ $scvers{$Request} }
or Abort("Requested version $Request not available", '404 unknown');
starcraft game unit statistics stats comparison table sheet cheat
reference software attributes properties patch attribute multiplayer
',
- $scver{major} < 2 ? qw' bw broodwar brood war ' : qw' starcraft2 hots ',
+ $scver{major} < 2 ? qw' bw broodwar brood war ' :
+ qw' starcraft2 lotv hots wol ',
],
stylesheet => [qw'light'],
raw => '<link rel="stylesheet" type="text/css" media="all" href="/sc.css?1.1" title="light">',
or Abort("Cannot open unit data: metadata not found", 501);
say "<p>Unit properties as seen or measured in $scver{name}\n$patch.";
-say "Also see the $_ table." for join(', ',
- (showlink('StarCraft 2: HotS', '/sc/hots')) x ($Request ne 'hots'),
+say "Also see the $_ tables." for join(' and ',
+ (showlink('StarCraft 2: LotV', '/sc/lotv')) x ($Request ne 'lotv'),
+ (showlink( 'HotS', '/sc/hots')) x ($Request ne 'hots'),
(showlink('original SC: Brood War', '/sc/bw')) x ($Request ne 'bw'),
);
say "</p>\n";