sc: bw unit dimensions from bwapi
[sheet.git] / sc-units-bw.inc.pl
index 7d3feb17563e0ce308c4c899760ca343feab197c..75908837fc6f6ca42cc256de33e801c6e8029c1f 100644 (file)
@@ -1,11 +1,12 @@
 use utf8;
 use strict;
 
-# time in fastest game seconds
-my $FPS = 24;  # frames per second
-# toss shield += .65 per second
-# zerg regen  += .37 per second
-my $SM = .2;  # speed multiplication
+my $PPT = 32;  # tile size in pixels
+my $FPS = 1000 / 56;  # frames per second on fast
+# energy      += 8HP/frame ≈ .74 per second
+# toss shield += 7HP/frame ≈ .65/s
+# zerg regen  += 4HP/frame ≈ .37/s
+my $SM = $FPS / $PPT;  # pixels per frame to tiles per second multiplication
 
 [
 '<span title="no known changes as of v1.16.1">version≥1.08</span>',
@@ -20,6 +21,7 @@ min => 50,
 gas => 0,
 build => 20,
 suit => 1,
+size => 23 / $PPT,
 pop => 1,
 cargo => 1,
 race => 'protoss',
@@ -35,11 +37,11 @@ attack => [
                name => "Particle Beam",
                damage => 5,
                cooldown => 22 / $FPS,
-               range => 0,
+               range => 1,
        },
 ],
 sight => 8,
-speed => 14 * $SM,
+speed => 4.92 * $SM,
 counter => ['vulture', 'dark templar'],
 },
 
@@ -54,6 +56,7 @@ min => 150,
 gas => 0,
 build => 50,
 suit => 3,
+size => 2, # 41x33
 race => 'protoss',
 attr => {
        structure => 1,
@@ -86,6 +89,7 @@ min => 100,
 gas => 0,
 build => 40,
 suit => 1,
+size => 23 / $PPT, # x19
 pop => 2,
 cargo => 2,
 race => 'protoss',
@@ -106,11 +110,11 @@ attack => [
        },
 ],
 sight => 7,
-speed => 11 * $SM,
+speed => 4 * $SM,
 upgrade => [
        {
                name => 'Leg Enhancements',
-               speed => (16 - 11) * $SM,
+               speed => (6 - 4) * $SM,
                min => 150,
                gas => 150,
                build => 133,
@@ -130,6 +134,7 @@ min => 125,
 gas => 50,
 build => 50,
 suit => 3,
+size => 32 / $PPT,
 pop => 2,
 cargo => 4,
 race => 'protoss',
@@ -151,7 +156,7 @@ attack => [
        },
 ],
 sight => 8,
-speed => 15 * $SM,
+speed => 5 * $SM,
 upgrade => [
        {
                name => 'Singularity Charge',
@@ -179,6 +184,7 @@ min => 50,
 gas => 150,
 build => 50,
 suit => 1,
+size => 24 / $PPT,
 pop => 2,
 cargo => 2,
 race => 'protoss',
@@ -189,7 +195,7 @@ hp => 40,
 shield => 40,
 armor => 0,
 sight => 7,
-speed => 9 * $SM,
+speed => 3.2 * $SM,
 energy => 50,
 capacity => 200,
 upgrade => [
@@ -239,6 +245,7 @@ min => 125,
 gas => 100,
 build => 50,
 suit => 1,
+size => 25 / $PPT, # 24x26
 pop => 2,
 cargo => 2,
 race => 'protoss',
@@ -259,7 +266,7 @@ attack => [
        },
 ],
 sight => 7,
-speed => 15 * $SM,
+speed => 4.92 * $SM,
 special => [
        {
                name => 'Cloaked',
@@ -282,6 +289,7 @@ gas => 300,
 build => 20,
 base => ['templar', 'templar'],
 suit => 3,
+size => 32 / $PPT,
 pop => 4,
 cargo => 4,
 race => 'protoss',
@@ -303,7 +311,7 @@ attack => [
        },
 ],
 sight => 8,
-speed => 14 * $SM,
+speed => 4.92 * $SM,
 },
 
 {
@@ -318,6 +326,7 @@ gas => 200,
 build => 20,
 base => ['dark templar', 'dark templar'],
 suit => 3,
+size => 32 / $PPT,
 pop => 4,
 cargo => 4,
 race => 'protoss',
@@ -328,7 +337,7 @@ hp => 25,
 shield => 200,
 armor => 1,
 sight => 10,
-speed => 14 * $SM,
+speed => 4.92 * $SM,
 energy => 50,
 capacity => 200,
 upgrade => [
@@ -385,6 +394,7 @@ min => 275,
 gas => 125,
 build => 80,
 suit => 3,
+size => 36 / $PPT, # x32
 pop => 3,
 race => 'protoss',
 attr => {
@@ -413,7 +423,7 @@ attack => [
        },
 ],
 sight => 8,
-speed => 13 * $SM,
+speed => 5 * $SM,
 upgrade => [
        {
                name => 'Apial Sensors',
@@ -427,7 +437,7 @@ upgrade => [
                min => 200,
                gas => 200,
                build => 166,
-               speed => (18 - 13) * $SM,
+               speed => (6.67 - 5) * $SM,
        },
 ],
 },
@@ -442,6 +452,7 @@ min => 150,
 gas => 100,
 build => 40,
 suit => 2,
+size => 36 / $PPT, # x32
 pop => 2,
 race => 'protoss',
 attr => {
@@ -464,7 +475,7 @@ attack => [
        },
 ],
 sight => 9,
-speed => 17 * $SM,
+speed => 6.67 * $SM,
 energy => 50,
 capacity => 200,
 upgrade => [
@@ -503,6 +514,7 @@ min => 350,
 gas => 250,
 build => 140,
 suit => 3,
+size => 64 / $PPT,
 pop => 6,
 race => 'protoss',
 attr => {
@@ -521,7 +533,7 @@ attack => [
        },
 ],
 sight => 11,
-speed => 10 * $SM,
+speed => 3.33 * $SM,
 special => [
        {
                name => 'Build Interceptor',
@@ -529,6 +541,7 @@ special => [
                min => 25,
                build => 20,
                suit => 1,
+               size => 16 / $PPT,
                pop => 0,
                race => 'protoss',
                attr => {
@@ -548,8 +561,9 @@ special => [
                                range => 0,
                        },
                ],
-               sight => 0,
+               sight => 6,
                range => 0,
+               speed => 13.33 * $SM,
        },
 ],
 upgrade => [
@@ -576,6 +590,7 @@ min => 100,
 gas => 350,
 build => 160,
 suit => 3,
+size => 44 / $PPT,
 pop => 4,
 race => 'protoss',
 attr => {
@@ -597,7 +612,7 @@ attack => [
        },
 ],
 sight => 9,
-speed => 12 * $SM,
+speed => 5 * $SM,
 energy => 50,
 capacity => 200,
 upgrade => [
@@ -648,6 +663,7 @@ min => 200,
 gas => 100,
 build => 70,
 suit => 3,
+size => 32 / $PPT,
 pop => 4,
 cargo => 4,
 race => 'protoss',
@@ -661,7 +677,7 @@ attack => [
        {
                anti => 1,
                damage => 100,
-               cooldown => 60 / $FPS,
+               cooldown => 60 / $FPS, # 30 after drop
                splash => 1,
                min => 15,
                build => 7,
@@ -670,7 +686,7 @@ attack => [
        },
 ],
 sight => 10,
-speed => 5 * $SM,
+speed => 1.78 * $SM,
 upgrade => [
        {
                name => 'Scarab Damage',
@@ -714,6 +730,7 @@ min => 25,
 gas => 75,
 build => 40,
 suit => 1,
+size => 32 / $PPT,
 pop => 1,
 race => 'protoss',
 attr => {
@@ -726,7 +743,7 @@ shield => 20,
 armor => 0,
 sight => 9,
 detect => 1,
-speed => 9 * $SM,
+speed => 3.33 * $SM,
 upgrade => [
        {
                name => "Sensor Array",
@@ -740,7 +757,7 @@ upgrade => [
                min => 150,
                gas => 150,
                build => 166,
-               speed => (13 - 9) * $SM,
+               speed => (5 - 3.33) * $SM,
        },
 ],
 special => [
@@ -763,6 +780,7 @@ min => 200,
 gas => 0,
 build => 60,
 suit => 3,
+size => 40 / $PPT, # x32
 pop => 2,
 cargo => -8,
 race => 'protoss',
@@ -773,7 +791,7 @@ hp => 80,
 shield => 60,
 armor => 1,
 sight => 8,
-speed => 13 * $SM,
+speed => 4.43 * $SM,
 transport => 1,
 upgrade => [
        {
@@ -781,7 +799,7 @@ upgrade => [
                min => 200,
                gas => 200,
                build => 166,
-               speed => (19 - 13) * $SM,
+               speed => (6.67 - 4.43) * $SM,
        }
 ],
 },
@@ -796,6 +814,7 @@ min => 50,
 gas => 0,
 build => 20,
 suit => 1,
+size => 23 / $PPT,
 pop => 1,
 cargo => 1,
 race => 'terran',
@@ -814,7 +833,7 @@ attack => [
        },
 ],
 sight => 7,
-speed => 15 * $SM,
+speed => 4.92 * $SM,
 },
 
 {
@@ -827,6 +846,7 @@ min => 75,
 gas => 0,
 build => 30,
 suit => 3,
+size => 2, # 33x49
 race => 'terran',
 attr => {
        structure => 1,
@@ -857,6 +877,7 @@ min => 50,
 gas => 0,
 build => 24,
 suit => 1,
+size => 17 / $PPT, # x20
 pop => 1,
 cargo => 1,
 race => 'terran',
@@ -875,7 +896,7 @@ attack => [
        },
 ],
 sight => 7,
-speed => 11 * $SM,
+speed => 4 * $SM,
 upgrade => [
        {
                name => 'U-238 Shells',
@@ -897,7 +918,7 @@ special => [
                gas => 100,
                build => 80,
                desc => 'doubles attack speed and faster movement for a few seconds at the cost of 10 health',
-               speed => 17 * $SM,
+               speed => (6 - 4) * $SM,
                attack => [
                        {
                                anti => 3,
@@ -916,6 +937,7 @@ min => 50,
 gas => 25,
 build => 24,
 suit => 1,
+size => 23 / $PPT, # x22
 pop => 1,
 cargo => 1,
 race => 'terran',
@@ -936,7 +958,7 @@ attack => [
        },
 ],
 sight => 7,
-speed => 11 * $SM,
+speed => 4 * $SM,
 upgrade => [
 ],
 special => [
@@ -947,7 +969,7 @@ special => [
                gas => 100,
                build => 80,
                desc => 'doubles attack speed and faster movement for a few seconds at the cost of 10 health',
-               speed => 17 * $SM,
+               speed => (6 - 4) * $SM,
                attack => [
                        {
                                anti => 1,
@@ -969,6 +991,7 @@ min => 25,
 gas => 75,
 build => 50,
 suit => 1,
+size => 15 / $PPT, # x22
 pop => 1,
 cargo => 1,
 race => 'terran',
@@ -988,7 +1011,7 @@ attack => [
        },
 ],
 sight => 9,
-speed => 11 * $SM,
+speed => 4 * $SM,
 energy => 50,
 capacity => 200,
 upgrade => [
@@ -1056,6 +1079,7 @@ min => 50,
 gas => 25,
 build => 30,
 suit => 1,
+size => 17 / $PPT, # x20
 pop => 1,
 cargo => 1,
 race => 'terran',
@@ -1065,7 +1089,7 @@ attr => {
 hp =>  60,
 armor => 1,
 sight => 9,
-speed => 11 * $SM,
+speed => 4 * $SM,
 energy => 50,
 capacity => 200,
 upgrade => [
@@ -1122,6 +1146,7 @@ min => 75,
 gas => 0,
 build => 30,
 suit => 2,
+size => 32 / $PPT,
 pop => 2,
 cargo => 2,
 race => 'terran',
@@ -1141,14 +1166,14 @@ attack => [
        },
 ],
 sight => 8,
-speed => 20 * $SM,
+speed => 6.4 * $SM,
 upgrade => [
        {
                name => 'Ion Thrusters',
                min => 100,
                gas => 100,
                build => 100,
-               speed => (28 - 20) * $SM,
+               speed => (10 - 6.4) * $SM,
        },
 ],
 special => [
@@ -1166,6 +1191,7 @@ special => [
                },
                hp => 20,
                suit => 1,
+               size => 15 / $PPT,
                armor => 0,
                attack => [
                        {
@@ -1177,7 +1203,7 @@ special => [
                        },
                ],
                sight => 3,
-               speed => 25 * $SM,
+               speed => 16 * $SM,
     },
 ],
 },
@@ -1192,6 +1218,7 @@ min => 150,
 gas => 100,
 build => 50,
 suit => 3,
+size => 32 / $PPT,
 pop => 2,
 cargo => 4,
 race => 'terran',
@@ -1205,13 +1232,13 @@ attack => [
                anti => 1,
                damage => 30,
                upgrade => 3,
-               cooldown => 37 / $FPS,
+               cooldown => 37 / $FPS, # 15 after drop
                type => 'explosive',
                range => 7,
        },
 ],
 sight => 10,
-speed => 12 * $SM,
+speed => 4 * $SM,
 special => [
        {
                name => 'Siege Mode',
@@ -1246,6 +1273,7 @@ min => 100,
 gas => 50,
 build => 40,
 suit => 3,
+size => 32 / $PPT,
 pop => 2,
 cargo => 2,
 race => 'terran',
@@ -1259,7 +1287,7 @@ attack => [
                anti => 1,
                damage => 12,
                upgrade => 1,
-               cooldown => 22 / $FPS,
+               cooldown => 22 / $FPS, # 15 after drop
                range => 5,
        },
        {
@@ -1272,7 +1300,7 @@ attack => [
        },
 ],
 sight => 8,
-speed => 13 * $SM,
+speed => 4.57 * $SM,
 upgrade => [
        {
                name => 'Charon Boosters',
@@ -1296,6 +1324,7 @@ min => 150,
 gas => 100,
 build => 60,
 suit => 3,
+size => 38 / $PPT, # x30
 pop => 2,
 race => 'terran',
 attr => {
@@ -1323,7 +1352,7 @@ attack => [
        },
 ],
 sight => 7,
-speed => 17 * $SM,
+speed => 6.67 * $SM,
 energy => 50,
 capacity => 200,
 special => [
@@ -1360,6 +1389,7 @@ min => 400,
 gas => 300,
 build => 133,
 suit => 3,
+size => 75 / $PPT, # x59
 pop => 6,
 race => 'terran',
 attr => {
@@ -1379,7 +1409,7 @@ attack => [
        },
 ],
 sight => 11,
-speed => 7 * $SM,
+speed => 2.5 * $SM,
 energy => 50,
 capacity => 200,
 special => [
@@ -1422,6 +1452,7 @@ min => 100,
 gas => 225,
 build => 80,
 suit => 3,
+size => 65 / $PPT, # x50
 pop => 2,
 race => 'terran',
 attr => {
@@ -1433,7 +1464,7 @@ hp => 200,
 armor => 1,
 sight => 10,
 detect => 1,
-speed => 15 * $SM,
+speed => 5 * $SM,
 energy => 50,
 capacity => 200,
 special => [
@@ -1493,6 +1524,7 @@ min => 250,
 gas => 125,
 build => 50,
 suit => 3,
+size => 49 / $PPT, # x37
 pop => 3,
 race => 'terran',
 attr => {
@@ -1515,7 +1547,7 @@ attack => [
        },
 ],
 sight => 8,
-speed => 19 * $SM,
+speed => 6.6 * $SM,
 },
 
 {
@@ -1525,6 +1557,7 @@ min => 100,
 gas => 100,
 build => 50,
 suit => 3,
+size => 49 / $PPT, # x37
 pop => 2,
 cargo => -8,
 race => 'terran',
@@ -1536,7 +1569,7 @@ air => 1,
 hp => 150,
 armor => 1,
 sight => 8,
-speed => 15 * $SM,
+speed => 5.47 * $SM,
 transport => 1,
 },
 
@@ -1550,6 +1583,7 @@ min => 50,
 gas => 0,
 build => 20,
 suit => 1,
+size => 23 / $PPT,
 pop => 1,
 cargo => 1,
 race => 'zerg',
@@ -1563,11 +1597,11 @@ attack => [
                anti => 1,
                damage => 5,
                cooldown => 22 / $FPS,
-               range => 0,
+               range => 1,
        },
 ],
 sight => 7,
-speed => 14 * $SM,
+speed => 4.92 * $SM,
 },
 
 {
@@ -1577,6 +1611,7 @@ min => 100,
 gas => 0,
 build => 40,
 suit => 3,
+size => 50 / $PPT,
 pop => -9,
 cargo => 0,
 race => 'zerg',
@@ -1590,7 +1625,7 @@ armor => 0,
 cargo => 0,
 sight => 9,
 detect => 1,
-speed => 2 * $SM,
+speed => .83 * $SM,
 transport => 1,
 upgrade => [
        {
@@ -1612,7 +1647,7 @@ upgrade => [
                min => 150,
                gas => 150,
                build => 133,
-               speed => (10 - 2) * $SM,
+               speed => (3.33 - .83) * $SM,
        },
 ],
 },
@@ -1625,6 +1660,7 @@ trans => {
 },
 build => 20,
 suit => 1,
+size => 16 / $PPT,
 pop => 0,
 race => 'zerg',
 attr => {
@@ -1659,6 +1695,7 @@ min => 175,
 gas => 0,
 build => 20,
 suit => 3,
+size => 2, # 48x48
 race => 'zerg',
 attr => {
        structure => 1,
@@ -1685,6 +1722,7 @@ min => 175,
 gas => 0,
 build => 20,
 suit => 3,
+size => 2, # 48x48
 race => 'zerg',
 attr => {
        structure => 1,
@@ -1711,6 +1749,7 @@ min => 25,
 gas => 0,
 build => 28, # for 2
 suit => 1,
+size => 16 / $PPT,
 pop => 0.5,
 cargo => 1,
 race => 'zerg',
@@ -1729,14 +1768,14 @@ attack => [
        },
 ],
 sight => 5,
-speed => 14 * $SM,
+speed => 5.49 * $SM,
 upgrade => [
        {
                name => 'Metabolic Boost',
                min => 100,
                gas => 100,
                build => 80,
-               speed => (22 - 14) * $SM,
+               speed => (8.36 - 5.49) * $SM,
        },
        {
                name => 'Adrenal Glands',
@@ -1760,6 +1799,7 @@ min => 75,
 gas => 25,
 build => 28,
 suit => 2,
+size => 21 / $PPT, # x23
 pop => 1,
 cargo => 2,
 race => 'zerg',
@@ -1779,7 +1819,7 @@ attack => [
        },
 ],
 sight => 6,
-speed => 11 * $SM,
+speed => 3.66 * $SM,
 upgrade => [
        {
                name => 'Grooved Spines',
@@ -1797,7 +1837,7 @@ upgrade => [
                min => 150,
                gas => 150,
                build => 100,
-               speed => (16 - 11) * $SM,
+               speed => (5.57 - 3.66) * $SM,
        },
        {
                name => 'Lurker Aspect',
@@ -1816,6 +1856,7 @@ gas => 125,
 base => 'hydralisk',
 build => 40,
 suit => 2,
+size => 32 / $PPT,
 pop => 2,
 cargo => 4,
 race => 'zerg',
@@ -1835,7 +1876,7 @@ attack => [
        },
 ],
 sight => 8,
-speed => 17 * $SM,
+speed => 5.82 * $SM,
 },
 
 {
@@ -1845,6 +1886,7 @@ min => 100,
 gas => 100,
 build => 50,
 suit => 2,
+size => 48 / $PPT,
 pop => 2,
 race => 'zerg',
 attr => {
@@ -1855,7 +1897,7 @@ air => 1,
 hp => 120,
 armor => 0,
 sight => 10,
-speed => 18 * $SM,
+speed => 6.67 * $SM,
 energy => 50,
 capacity => 200,
 special => [
@@ -1896,6 +1938,7 @@ special => [
                count => 2,
                alt => 'Broodling',
                suit => 1,
+               size => 19 / $PPT,
                pop => 0,
                attr => {
                        organic => 1,
@@ -1912,7 +1955,7 @@ special => [
                        },
                ],
                sight => 5,
-               speed => 19 * $SM,
+               speed => 6 * $SM,
        },
 ],
 },
@@ -1924,6 +1967,7 @@ min => 100,
 gas => 50,
 build => 40,
 suit => 1,
+size => 17 / $PPT, # x20
 pop => 1,
 race => 'zerg',
 attr => {
@@ -1941,7 +1985,7 @@ attack => [
        },
 ],
 sight => 5,
-speed => 17 * $SM,
+speed => 5.82 * $SM,
 },
 
 {
@@ -1951,6 +1995,7 @@ min => 12,
 gas => 38,
 build => 30, # for 2
 suit => 1,
+size => 24 / $PPT,
 pop => 0.5,
 race => 'zerg',
 attr => {
@@ -1968,7 +2013,7 @@ attack => [
        },
 ],
 sight => 5,
-speed => 18 * $SM,
+speed => 6.67 * $SM,
 counter => ['cannon', 'goliath', 'hydralisk'],
 },
 
@@ -1979,6 +2024,7 @@ min => 100,
 gas => 100,
 build => 40,
 suit => 1,
+size => 44 / $PPT,
 pop => 2,
 race => 'zerg',
 attr => {
@@ -1999,11 +2045,12 @@ attack => [
        },
 ],
 sight => 7,
-speed => 18 * $SM,
+speed => 6.67 * $SM,
 special => [
        {
                alt => 'Cocoon',
                suit => 3,
+               size => 32 / $PPT,
                attr => {
                        organic => 1,
                        flying => 1,
@@ -2026,6 +2073,7 @@ gas => 200,
 build => 40,
 base => 'mutalisk',
 suit => 3,
+size => 44 / $PPT,
 pop => 2,
 race => 'zerg',
 attr => {
@@ -2045,7 +2093,7 @@ attack => [
        },
 ],
 sight => 11,
-speed => 7 * $SM,
+speed => 2.5 * $SM,
 },
 
 {
@@ -2056,6 +2104,7 @@ gas => 150,
 build => 40,
 base => 'mutalisk',
 suit => 3,
+size => 44 / $PPT,
 pop => 2,
 race => 'zerg',
 attr => {
@@ -2076,7 +2125,7 @@ attack => [
        },
 ],
 sight => 10,
-speed => 15 * $SM,
+speed => 5 * $SM,
 counter => ['goliath', 'dragoon', 'scourge'],
 },
 
@@ -2087,6 +2136,7 @@ min => 50,
 gas => 150,
 build => 50,
 suit => 2,
+size => 27 / $PPT, # x25
 pop => 2,
 cargo => 2,
 race => 'zerg',
@@ -2096,7 +2146,7 @@ attr => {
 hp => 80,
 armor => 1,
 sight => 10,
-speed => 12 * $SM,
+speed => 4 * $SM,
 energy => 50,
 capacity => 200,
 special => [
@@ -2150,6 +2200,7 @@ min => 200,
 gas => 200,
 build => 60,
 suit => 3,
+size => 38 / $PPT, # x32
 pop => 4,
 cargo => 4,
 race => 'zerg',
@@ -2168,7 +2219,7 @@ attack => [
        },
 ],
 sight => 7,
-speed => 16 * $SM,
+speed => 5.12 * $SM,
 upgrade => [
        {
                name => 'Chitinous Plating',
@@ -2182,7 +2233,7 @@ upgrade => [
                min => 200,
                gas => 200,
                build => 133,
-               speed => (21 - 16) * $SM,
+               speed => (8.1 - 5.12) * $SM,
        },
 ],
 },