sc: separate interceptor subunit from carrier
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 12 Jun 2015 17:56:00 +0000 (19:56 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Fri, 12 Jun 2015 17:56:00 +0000 (19:56 +0200)
sc-units.inc.pl
sc.plp

index d2c3b01406ef2c584a3a8a784c347716eeb626e0..af100913b7c062b3c192eeebc6fcc901481db7c4 100644 (file)
@@ -434,9 +434,7 @@ shield => 150,
 armor => 4,
 attack => {
        ground => {
 armor => 4,
 attack => {
        ground => {
-               damage => [6, 7, 8, 9],
                dps => [17, undef, undef, 49],
                dps => [17, undef, undef, 49],
-               min => 25,
                build => 12.7*$FM,
                max => 4,
        },
                build => 12.7*$FM,
                max => 4,
        },
@@ -445,7 +443,40 @@ attack => {
 },
 sight => 11,
 speed => 10,
 },
 sight => 11,
 speed => 10,
-special => [],
+special => [
+       {
+               alt => 'Interceptor',
+               min => 25,
+               build => 20,
+               suit => 1,
+               unit => 0,
+               race => 'protoss',
+               organic => 0,
+               hp => 40,
+               shield => 40,
+               armor => 0,
+               attack => {
+                       ground => {
+                               damage => [6, 7, 8, 9],
+                               dps => [4, 5, 5, 6],
+                               cooldown => 37, # approximate, varies
+                               build => 12.7*$FM,
+                       },
+                       air => 'ground',
+                       range => 0,
+               },
+               sight => 0,
+               range => 0,
+       },
+],
+upgrade => [
+       {
+               name => 'Carrier Capacity',
+               damage => {
+                       max => 4,
+               },
+       },
+],
 counter => ['wraith', 'corsair', 'scourge'],
 },
 
 counter => ['wraith', 'corsair', 'scourge'],
 },
 
diff --git a/sc.plp b/sc.plp
index 76974c94ee8f7351faaaeb1d8e76ceb83ffd0954..25c9863c36cf6d3a75beb6ca3225ec620d08d244 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -262,6 +262,7 @@ sub showrange {
        sub showunitcols {
                my ($row) = @_;
                local $_ = $row;
        sub showunitcols {
                my ($row) = @_;
                local $_ = $row;
+               $_->{hp} += $_->{shield} if $_->{shield};
                my $suitchar = '';
                if ($_->{suit}) {
                        $suitchar = [qw/? s m l/]->[$_->{suit}];
                my $suitchar = '';
                if ($_->{suit}) {
                        $suitchar = [qw/? s m l/]->[$_->{suit}];
@@ -325,7 +326,6 @@ sub showrange {
                printf '<tbody id="%s"><tr class="race"><th colspan="18"><h2>%s</h2>'."\n", $race, ucfirst $race
                        if $grouped and $race ne $_->{race};
                $_->{cat} = $_->{race} if not $grouped;
                printf '<tbody id="%s"><tr class="race"><th colspan="18"><h2>%s</h2>'."\n", $race, ucfirst $race
                        if $grouped and $race ne $_->{race};
                $_->{cat} = $_->{race} if not $grouped;
-               $_->{hp} += $_->{shield};
                print(
                        '<tr>',
                        sprintf('<t%s class="cat">%s', $cat ne $_->{cat} ? ('h', $cat = $_->{cat}) : ('d', '&nbsp;')),
                print(
                        '<tr>',
                        sprintf('<t%s class="cat">%s', $cat ne $_->{cat} ? ('h', $cat = $_->{cat}) : ('d', '&nbsp;')),