sc: single attack column with indicator for target
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 19 Jun 2015 00:14:47 +0000 (02:14 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Fri, 19 Jun 2015 00:14:47 +0000 (02:14 +0200)
Make ground or air targeting an attack property (anti = 1|2 bits resp.)
instead of attempting to aggregate per type.

sc-units-bw.inc.pl
sc-units-hots.inc.pl
sc.plp

index 9064f70..0f865bf 100644 (file)
@@ -25,14 +25,15 @@ organic => 0,
 hp => 20,
 shield => 20,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                name => "Particle Beam",
                damage => 5,
                cooldown => 22 / $FPS,
+               range => 1,
        },
-       range => 1,
-},
+],
 sight => 8,
 speed => 14,
 counter => ['vulture', 'dark templar'],
@@ -53,14 +54,14 @@ race => 'protoss',
 hp => 100,
 shield => 100,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 3,
                damage => 20,
                cooldown => 22 / $FPS,
+               range => 7,
        },
-       air => 'ground',
-       range => 7,
-},
+],
 sight => 11,
 detect => 1,
 speed => 0,
@@ -84,14 +85,15 @@ organic => 1,
 hp => 100,
 shield => 60,
 armor => 1,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                name => "Psi Blades",
                damage => [16, 18, 20, 22],
                cooldown => 22 / $FPS,
+               range => 1,
        },
-       range => 1,
-},
+],
 sight => 7,
 speed => 11,
 upgrade => [
@@ -123,16 +125,16 @@ organic => 0,
 hp => 100,
 shield => 80,
 armor => 1,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 3,
                name => "Phase Disruptor",
                damage => [20, 22, 24, 26],
                type => 'explosive',
                cooldown => 30 / $FPS,
+               range => 4,
        },
-       air => 'ground',
-       range => 4,
-},
+],
 sight => 8,
 speed => 15,
 upgrade => [
@@ -141,9 +143,11 @@ upgrade => [
                min => 150,
                gas => 150,
                build => 166,
-               attack => {
-                       range => 6 - 4,
-               },
+               attack => [
+                       {
+                               range => 6 - 4,
+                       },
+               ],
        },
 ],
 counter => ['zergling', 'zealot', 'tank'],
@@ -221,14 +225,15 @@ organic => 1,
 hp => 80,
 shield => 40,
 armor => 1,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                name => "Warp Blades",
                damage => [40, 43, 46, 49],
                cooldown => 30 / $FPS,
+               range => 1,
        },
-       range => 1,
-},
+],
 sight => 7,
 speed => 15,
 special => [
@@ -259,16 +264,16 @@ organic => 0,
 hp => 10,
 shield => 350,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 3,
                name => "Psionic Shockwave",
                damage => [30, 33, 36, 39],
                cooldown => 20 / $FPS,
                splash => 1,
+               range => 2,
        },
-       air => 'ground',
-       range => 2,
-},
+],
 sight => 8,
 speed => 14,
 },
@@ -291,8 +296,6 @@ organic => 0,
 hp => 25,
 shield => 200,
 armor => 1,
-attack => {
-},
 sight => 10,
 speed => 14,
 energy => 200,
@@ -357,18 +360,21 @@ air => 1,
 hp => 150,
 shield => 100,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => [8, 9, 10, 11],
                cooldown => 30 / $FPS,
+               range => 4,
        },
-       air => {
+       {
+               anti => 2,
                damage => [28, 30, 32, 34],
                type => 'explosive',
                cooldown => 22 / $FPS,
+               range => 4,
        },
-       range => 4,
-},
+],
 sight => 8,
 speed => 13,
 upgrade => [
@@ -406,15 +412,16 @@ air => 1,
 hp => 100,
 shield => 80,
 armor => 1,
-attack => {
-       air => {
+attack => [
+       {
+               anti => 2,
                damage => [5, 6, 7, 8],
                cooldown => 8 / $FPS,
                splash => 1,
                type => 'explosive',
+               range => 5,
        },
-       range => 5,
-},
+],
 sight => 9,
 speed => 17,
 energy => 200,
@@ -459,14 +466,14 @@ organic => 0,
 hp => 300,
 shield => 150,
 armor => 4,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 3,
                dps => [17, undef, undef, 49],
                count => 4,
+               range => 8,
        },
-       air => 'ground',
-       range => 8,
-},
+],
 sight => 11,
 speed => 10,
 special => [
@@ -482,15 +489,15 @@ special => [
                hp => 40,
                shield => 40,
                armor => 0,
-               attack => {
-                       ground => {
+               attack => [
+                       {
+                               anti => 3,
                                damage => [6, 7, 8, 9],
                                cooldown => 43 / $FPS, # approximately 37 according to liquipedia
                                build => 20,
+                               range => 0,
                        },
-                       air => 'ground',
-                       range => 0,
-               },
+               ],
                sight => 0,
                range => 0,
        },
@@ -523,15 +530,15 @@ air => 1,
 hp => 200,
 shield => 150,
 armor => 1,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 3,
                damage => [10, 11, 12, 13],
                cooldown => 45 / $FPS,
                type => 'explosive',
+               range => 5,
        },
-       air => 'ground',
-       range => 5,
-},
+],
 sight => 9,
 speed => 12,
 energy => 200,
@@ -588,17 +595,18 @@ organic => 0,
 hp => 100,
 shield => 80,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => 100,
                cooldown => 60 / $FPS,
                splash => 1,
                cost => 15,
                build => 7,
                max => 5,
+               range => 8,
        },
-       range => 8,
-},
+],
 sight => 10,
 speed => 5,
 upgrade => [
@@ -607,29 +615,29 @@ upgrade => [
                min => 200,
                gas => 200,
                build => 166,
-               attack => {
-                       ground => {
+               attack => [
+                       {
                                damage => 125 - 100,
                        },
-               },
+               ],
        },
        {
-               attack => {
-                       ground => {
+               attack => [
+                       {
                                splash => 2 - 1,
                        },
-               },
+               ],
        },
        {
                name => 'Increased Reaver Capacity',
                min => 200,
                gas => 200,
                build => 166,
-               attack => {
-                       ground => {
+               attack => [
+                       {
                                max => 10-5,
                        },
-               },
+               ],
        },
 ],
 },
@@ -696,8 +704,6 @@ organic => 0,
 hp => 80,
 shield => 60,
 armor => 1,
-attack => {
-},
 sight => 8,
 speed => 13,
 transport => 1,
@@ -727,13 +733,14 @@ race => 'terran',
 organic => 0,
 hp =>  60,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => 5,
                cooldown => 15 / $FPS,
+               range => 1,
        },
-       range => 1,
-},
+],
 sight => 7,
 speed => 15,
 },
@@ -751,14 +758,15 @@ suit => 3,
 race => 'terran',
 hp => 200,
 armor => 0,
-attack => {
-       air => {
+attack => [
+       {
+               anti => 2,
                damage => 20,
                cooldown => 15 / $FPS,
                type => 'explosive',
+               range => 7,
        },
-       range => 7,
-},
+],
 sight => 11,
 detect => 1,
 speed => 0,
@@ -779,14 +787,14 @@ race => 'terran',
 organic => 1,
 hp =>  40,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 3,
                damage => [6, 7, 8, 9],
                cooldown => 15 / $FPS,
+               range => 4,
        },
-       air => 'ground',
-       range => 4,
-},
+],
 sight => 7,
 speed => 11,
 upgrade => [
@@ -795,9 +803,11 @@ upgrade => [
                min => 150,
                gas => 150,
                build => 100,
-               attack => {
-                       range => 5 - 4,
-               },
+               attack => [
+                       {
+                               range => 5 - 4,
+                       },
+               ],
        },
 ],
 special => [
@@ -809,12 +819,12 @@ special => [
                build => 80,
                desc => 'doubles attack speed and faster movement for a few seconds at the cost of 10 health',
                speed => 17,
-               attack => {
-                       ground => {
+               attack => [
+                       {
+                               anti => 3,
                                cooldown => 7.5 / $FPS,
                        },
-                       air => 'ground',
-               },
+               ],
                duration => 220 / $FPS,
        },
 ],
@@ -832,15 +842,16 @@ race => 'terran',
 organic => 1,
 hp =>  50,
 armor => 1,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => [16, 18, 20, 22],
                cooldown => 22 / $FPS,
                splash => 1,
                type => 'implosive',
+               range => 2,
        },
-       range => 2,
-},
+],
 sight => 7,
 speed => 11,
 upgrade => [
@@ -854,11 +865,12 @@ special => [
                build => 80,
                desc => 'doubles attack speed and faster movement for a few seconds at the cost of 10 health',
                speed => 17,
-               attack => {
-                       ground => {
+               attack => [
+                       {
+                               anti => 1,
                                cooldown => 11 / $FPS,
                        },
-               },
+               ],
                duration => 220 / $FPS,
        },
 ],
@@ -879,15 +891,15 @@ race => 'terran',
 organic => 1,
 hp =>  45,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 3,
                damage => [10, 11, 12, 13],
                cooldown => 22 / $FPS,
                type => 'implosive',
+               range => 7,
        },
-       air => 'ground',
-       range => 7,
-},
+],
 sight => 9,
 speed => 11,
 upgrade => [
@@ -960,8 +972,6 @@ race => 'terran',
 organic => 1,
 hp =>  60,
 armor => 1,
-attack => {
-},
 sight => 9,
 speed => 11,
 energy => 200,
@@ -1023,14 +1033,15 @@ race => 'terran',
 organic => 0,
 hp =>  80,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => [20, 22, 24, 26],
                cooldown => 30 / $FPS,
                type => 'implosive',
+               range => 5,
        },
-       range => 5,
-},
+],
 sight => 8,
 speed => 20,
 upgrade => [
@@ -1056,14 +1067,15 @@ special => [
                hp => 20,
                suit => 1,
                armor => 0,
-               attack => {
-                       ground => {
+               attack => [
+                       {
+                               anti => 1,
                                damage => 125,
                                splash => 1,
                                type => 'explosive',
+                               range => 3,
                        },
-                       range => 3,
-               },
+               ],
                sight => 3,
                speed => 25,
     },
@@ -1085,14 +1097,15 @@ race => 'terran',
 organic => 0,
 hp => 150,
 armor => 1,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => [30, 33, 36, 39],
                cooldown => 37 / $FPS,
                type => 'explosive',
+               range => 7,
        },
-       range => 7,
-},
+],
 sight => 10,
 speed => 12,
 special => [
@@ -1103,15 +1116,16 @@ special => [
                gas => 150,
                build => 80,
                alt => 'Sieged Tank',
-               attack => {
-                       ground => {
+               attack => [
+                       {
+                               anti => 1,
                                damage => [70, 75, 80, 85],
                                cooldown => 75 / $FPS,
                                splash => 1,
                                type => 'explosive',
+                               range => 12,
                        },
-                       range => 12,
-               },
+               ],
                speed => 0,
        },
 ],
@@ -1132,18 +1146,21 @@ race => 'terran',
 organic => 0,
 hp => 125,
 armor => 1,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => [12, 13, 14, 15],
                cooldown => 22 / $FPS,
+               range => 5,
        },
-       air => {
+       {
+               anti => 2,
                damage => [20, 24, 28, 32],
                type => 'explosive',
                cooldown => 22 / $FPS,
+               range => 5,
        },
-       range => 5,
-},
+],
 sight => 8,
 speed => 13,
 upgrade => [
@@ -1152,11 +1169,12 @@ upgrade => [
                min => 100,
                gas => 100,
                build => 133,
-               attack => {
-#                      air => {
+               attack => [
+                       {},
+                       {
                                range => 8 - 5,
-#                      },
-               },
+                       },
+               ],
        },
 ],
 },
@@ -1174,18 +1192,21 @@ organic => 0,
 air => 1,
 hp => 120,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => [8, 9, 10, 11],
                cooldown => 30 / $FPS,
+               range => 5,
        },
-       air => {
+       {
+               anti => 2,
                damage => [20, 22, 24, 26],
                cooldown => 22 / $FPS,
                type => 'explosive',
+               range => 5,
        },
-       range => 5,
-},
+],
 sight => 7,
 speed => 17,
 energy => 200,
@@ -1228,14 +1249,14 @@ organic => 0,
 air => 1,
 hp => 500,
 armor => 3,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 3,
                damage => [25, 28, 31, 34],
                cooldown => 30 / $FPS,
+               range => 6,
        },
-       air => 'ground',
-       range => 6,
-},
+],
 sight => 11,
 speed => 7,
 energy => 200,
@@ -1247,13 +1268,13 @@ special => [
                gas => 100,
                build => 120,
                desc => 'blast doing 260 damage to a target',
-               attack => {
-                       ground => {
+               attack => [
+                       {
+                               anti => 3,
                                damage => 260,
+                               range => 10,
                        },
-                       air => 'ground',
-                       range => 10,
-               },
+               ],
                cost => 150,
        },
 ],
@@ -1350,16 +1371,17 @@ organic => 0,
 air => 1,
 hp => 200,
 armor => 2,
-attack => {
-       air => {
+attack => [
+       {
+               anti => 2,
                damage => [6, 7, 8, 9],
                cooldown => 64 / $FPS,
                splash => 1,
                type => 'explosive',
                count => 8,
+               range => 6,
        },
-       range => 6,
-},
+],
 sight => 8,
 speed => 19,
 },
@@ -1397,13 +1419,14 @@ race => 'zerg',
 organic => 1,
 hp => 40,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => 5,
                cooldown => 22 / $FPS,
+               range => 1,
        },
-       range => 1,
-},
+],
 sight => 7,
 speed => 14,
 },
@@ -1494,14 +1517,15 @@ suit => 3,
 race => 'zerg',
 hp => 300,
 armor => 2,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => 40,
                cooldown => 32 / $FPS,
                type => 'explosive',
+               range => 7,
        },
-       range => 7,
-},
+],
 sight => 10,
 speed => 0,
 },
@@ -1516,13 +1540,14 @@ suit => 3,
 race => 'zerg',
 hp => 400,
 armor => 0,
-attack => {
-       air => {
+attack => [
+       {
+               anti => 2,
                damage => 15,
                cooldown => 15 / $FPS,
+               range => 7,
        },
-       range => 7,
-},
+],
 sight => 10,
 detect => 1,
 speed => 0,
@@ -1540,13 +1565,14 @@ race => 'zerg',
 organic => 1,
 hp => 35,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => [5, 6, 7, 8],
                cooldown => 8 / $FPS,
+               range => 1,
        },
-       range => 1,
-},
+],
 sight => 5,
 speed => 14,
 upgrade => [
@@ -1562,11 +1588,11 @@ upgrade => [
                min => 200,
                gas => 200,
                build => 80,
-               attack => {
-                       ground => {
+               attack => [
+                       {
                                cooldown => 6 / $FPS,
                        },
-               },
+               ],
        },
 ],
 counter => ['archon', 'templar', 'firebat'],
@@ -1584,15 +1610,15 @@ race => 'zerg',
 organic => 1,
 hp => 80,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 3,
                damage => [10, 11, 12, 13],
                cooldown => 15 / $FPS,
                type => 'explosive',
+               range => 4,
        },
-       air => 'ground',
-       range => 4,
-},
+],
 sight => 6,
 speed => 11,
 upgrade => [
@@ -1601,9 +1627,11 @@ upgrade => [
                min => 150,
                gas => 150,
                build => 100,
-               attack => {
-                       range => 5 - 4,
-               },
+               attack => [
+                       {
+                               range => 5 - 4,
+                       },
+               ],
        },
        {
                name => 'Muscular Augments',
@@ -1634,14 +1662,15 @@ race => 'zerg',
 organic => 1,
 hp => 125,
 armor => 1,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => [20, 22, 24, 26],
                cooldown => 37 / $FPS,
                splash => 'line',
+               range => 6,
        },
-       range => 6,
-},
+],
 sight => 8,
 speed => 17,
 },
@@ -1704,13 +1733,14 @@ special => [
                organic => 1,
                hp => 30,
                armor => 0,
-               attack => {
-                       ground => {
+               attack => [
+                       {
+                               anti => 1,
                                damage => [4, 5, 6, 7],
                                cooldown => 15 / $FPS,
+                               range => 1,
                        },
-                       range => 1,
-               },
+               ],
                sight => 5,
                speed => 19,
        },
@@ -1729,14 +1759,15 @@ race => 'zerg',
 organic => 1,
 hp => 60,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => 500,
                splash => 1,
                type => 'explosive',
+               range => 1,
        },
-       range => 1,
-},
+],
 sight => 5,
 speed => 17,
 },
@@ -1754,12 +1785,13 @@ organic => 1,
 air => 1,
 hp => 25,
 armor => 0,
-attack => {
-       air => {
+attack => [
+       {
+               anti => 2,
                damage => 110,
+               range => 1,
        },
-       range => 1,
-},
+],
 sight => 5,
 speed => 18,
 counter => ['cannon', 'goliath', 'hydralisk'],
@@ -1778,15 +1810,15 @@ organic => 1,
 air => 1,
 hp => 120,
 armor => 0,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 3,
                damage => [9 .. 12],
                cooldown => 30 / $FPS,
                splash => 'bounce',
+               range => 3,
        },
-       air => 'ground',
-       range => 3,
-},
+],
 sight => 7,
 speed => 18,
 special => [
@@ -1818,13 +1850,14 @@ organic => 1,
 air => 1,
 hp => 150,
 armor => 2,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => [20, 22, 24, 26],
                cooldown => 30 / $FPS,
+               range => 8,
        },
-       range => 8,
-},
+],
 sight => 11,
 speed => 7,
 },
@@ -1843,14 +1876,15 @@ organic => 1,
 air => 1,
 hp => 250,
 armor => 2,
-attack => {
-       air => {
+attack => [
+       {
+               anti => 2,
                damage => [25, 27, 29, 31],
                cooldown => 100 / $FPS,
                type => 'explosive',
+               range => 6,
        },
-       range => 6,
-},
+],
 sight => 10,
 speed => 15,
 counter => ['goliath', 'dragoon', 'scourge'],
@@ -1917,13 +1951,14 @@ race => 'zerg',
 organic => 1,
 hp => 400,
 armor => 1,
-attack => {
-       ground => {
+attack => [
+       {
+               anti => 1,
                damage => [20, 23, 26, 29],
                cooldown => 15 / $FPS,
+               range => 1,
        },
-       range => 1,
-},
+],
 sight => 7,
 speed => 16,
 upgrade => [
index c0b7452..2e5d251 100644 (file)
@@ -24,14 +24,15 @@ use strict;
                light => 1,
                mech => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => 5,
                        dps => 3.3,
                        cooldown => 1.5,
+                       range => 0,
                },
-               range => 0,
-       },
+       ],
        speed => 2.8125,
        sight => 8,
 },
@@ -51,16 +52,16 @@ use strict;
                armored => 1,
                structure => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        damage => 20,
                        dps => 16,
                        cooldown => 1.25,
                        type => 'projectile',
+                       range => 7,
                },
-               air => 'ground',
-               range => 7,
-       },
+       ],
        speed => 0,
        sight => 11,
        detect => 1,
@@ -85,15 +86,16 @@ use strict;
                psionic => 1,
                flying => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [8 .. 11],
                        dps => [9.4, 10.6, 11.8, 13.0],
                        type => 'projectile',
                        cooldown => 0.85,
+                       range => 5,
                },
-               range => 5,
-       },
+       ],
        speed => 1.875,
        sight => 9,
        energy => 200,
@@ -144,16 +146,16 @@ use strict;
                massive => 1,
                flying => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        damage => [6 .. 9],
                        dps => [16.3, 19.0, 21.7, 24.4],
                        cooldown => 2.21,
                        count => 6,
+                       range => 7,
                },
-               air => 'ground',
-               range => 7,
-       },
+       ],
        speed => 1.4062,
        sight => 14,
        energy => 200,
@@ -201,16 +203,16 @@ use strict;
                armored => 1,
                structure => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        damage => 20,
                        dps => 16,
                        cooldown => 1.25,
                        type => 'projectile',
+                       range => 13,
                },
-               air => 'ground',
-               range => 13,
-       },
+       ],
        speed => 0,
        sight => 11,
        energy => 100,
@@ -243,15 +245,16 @@ use strict;
                light => 1,
                organic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [8 .. 11],
                        dps => [13.3, 15.0, 16.7, 18.4],
                        cooldown => 1.2,
                        count => 2,
+                       range => 0,
                },
-               range => 0,
-       },
+       ],
        speed => 2.25,
        sight => 9,
        special => [
@@ -289,16 +292,16 @@ use strict;
                mech => 1,
                psionic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        damage => [6 .. 9],
                        dps => [6 .. 9],
                        cooldown => 1.0,
+                       range => 5,
                },
-               air => 'ground',
-       },
+       ],
        speed => 2.25,
-       range => 5,
        sight => 10,
        energy => 200,
        special => [
@@ -348,17 +351,17 @@ use strict;
                armored => 1,
                mech => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        damage => [10 .. 13],
                        dps => [6.9, 7.6, 8.3, 9.0],
                        #bonus => +4 A,
                        type => 'projectile',
                        cooldown => 1.44,
+                       range => 6,
                },
-               air => 'ground',
-               range => 6,
-       },
+       ],
        speed => 2.9531,
        sight => 10,
        special => [
@@ -440,14 +443,15 @@ use strict;
                organic => 1,
                psionic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [45, 50, 55, 60],
                        dps => [26.6, 29.6, 32.6, 35.6],
                        cooldown => 1.694,
+                       range => 0,
                },
-               range => 0,
-       },
+       ],
        speed => 2.8125,
        sight => 8,
        special => [
@@ -478,17 +482,17 @@ use strict;
                psionic => 1,
                massive => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        damage => [25, 28, 31, 34],
                        dps => [14.3, 16.0, 17.7, 19.4],
                        #bonus => +10 (+1) B,
                        splash => 1,
                        cooldown => 1.754,
+                       range => 3,
                },
-               air => 'ground',
-               range => 3,
-       },
+       ],
        speed => 2.8125,
        sight => 9,
 },
@@ -510,15 +514,16 @@ use strict;
                armored => 1,
                mech => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [20, 22, 24, 26],
                        #bonus => +30 (+3) A,
                        dps => [13.8, 15.2, 16.6, 18.0],
                        cooldown => 1.45,
+                       range => 6,
                },
-               range => 6,
-       },
+       ],
        speed => 2.25,
        sight => 9,
        special => [
@@ -550,16 +555,17 @@ use strict;
                massive => 1,
                jump => 'Cliff Walk',
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [15, 17, 19, 21],
                        dps => [18.2, 20.6, 23.0, 25.4],
                        splash => 'line',
                        cooldown => 1.65,
                        count => 2,
+                       range => 6,
                },
-               range => 6,
-       },
+       ],
        speed => 2.25,
        sight => 10,
        upgrade => [
@@ -568,9 +574,11 @@ use strict;
                        min => 200,
                        gas => 200,
                        build => 140,
-                       attack => {
-                               range => 3,
-                       },
+                       attack => [
+                               {
+                                       range => 3,
+                               },
+                       ],
                },
        ],
 },
@@ -672,17 +680,18 @@ use strict;
                mech => 1,
                flying => 1,
        },
-       attack => {
-               air => {
+       attack => [
+               {
+                       anti => 2,
                        damage => [5 .. 8],
                        dps => [9, 10.8, 12.6, 14.4],
                        #bonus => +5 L,
                        type => 'projectile',
                        cooldown => 1.11,
                        count => 2,
+                       range => 5,
                },
-               range => 5,
-       },
+       ],
        speed => 4.25,
        sight => 10,
        energy => 200,
@@ -702,9 +711,11 @@ use strict;
                        min => 150,
                        gas => 150,
                        build => 90,
-                       attack => {
-                               range => 2,
-                       },
+                       attack => [
+                               {
+                                       range => 2,
+                               },
+                       ],
                },
        ],
 },
@@ -727,16 +738,16 @@ use strict;
                mech => 1,
                flying => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        damage => [6 .. 9],
                        #bonus => +4 (+1), +10 (+1) A,
                        dps => [12, 14, 16, 18],
                        cooldown => 0.5,
+                       range => 6, # keeps firing until range 8
                },
-               air => 'ground',
-               range => 6, # keeps firing until range 8
-       },
+       ],
        speed => 2.25,
        sight => 10,
        special => [
@@ -769,8 +780,9 @@ use strict;
                psionic => 1,
                flying => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        name => 'Pulsar Beam',
                        damage => 15,
                        # costs energy
@@ -779,9 +791,9 @@ use strict;
                        cooldown => 0.86,
                        cost => 25,
                        maint => 1.4,
+                       range => 5, #XXX 4?
                },
-               range => 5, #XXX 4?
-       },
+       ],
        speed => 4,
        sight => 10,
        energy => 200,
@@ -826,17 +838,17 @@ use strict;
                massive => 1,
                flying => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        damage => [30, 33, 36, 39],
                        #bonus => +14 Ma Air,
                        dps => [9.1, 10.0, 10.9, 11.8],
                        type => 'projectile',
                        cooldown => 3.3,
+                       range => 15,
                },
-               air => 'ground',
-               range => 15,
-       },
+       ],
        speed => 1.875,
        sight => 12,
 },
@@ -860,9 +872,11 @@ use strict;
                massive => 1,
                flying => 1,
        },
-       attack => {
-               range => 8, # leash range 14
-       },
+       attack => [
+               {
+                       range => 8, # leash range 14
+               },
+       ],
        speed => 1.875,
        sight => 12,
        special => [
@@ -882,18 +896,18 @@ use strict;
                                mech => 1,
                                flying => 1,
                        },
-                       attack => {
-                               ground => {
+                       attack => [
+                               {
+                                       anti => 3,
                                        damage => [5 .. 8],
 #                                      dps => 26.7 (+5.3),
                                        dps => [3.3, 4.0, 4.7, 5.4],
 #                                      cooldown => 0.5 (0.125/ 0.25),
                                        cooldown => 3.0,
                                        count => 2,
+                                       range => 2,
                                },
-                               air => 'ground',
-                               range => 2,
-                       },
+                       ],
                        speed => 7.5,
                        sight => 7,
                },
@@ -928,14 +942,15 @@ use strict;
                organic => 1,
                mech => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => 5,
                        dps => 3.3,
                        cooldown => 1.5,
+                       range => 0,
                },
-               range => 0,
-       },
+       ],
        speed => 2.8125,
        sight => 8,
 },
@@ -974,16 +989,17 @@ use strict;
                mech => 1,
                structure => 1,
        },
-       attack => {
-               air => {
+       attack => [
+               {
+                       anti => 2,
                        damage => 12,
                        dps => 27.9,
                        cooldown => 0.8608,
                        count => 2,
                        type => 'projectile',
+                       range => 7,
                },
-               range => 7,
-       },
+       ],
        speed => 0,
        sight => 11,
        detect => 1,
@@ -993,9 +1009,11 @@ use strict;
                        min => 100,
                        gas => 100,
                        build => 80,
-                       attack => {
-                               range => 1,
-                       },
+                       attack => [
+                               {
+                                       range => 1,
+                               },
+                       ],
                },
                {
                        name => 'Building Armor',
@@ -1025,15 +1043,16 @@ use strict;
                mech => 1,
                structure => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => 40,
                        dps => 20,
                        splash => 1,
                        cooldown => 2,
+                       range => 6,
                },
-               range => 6,
-       },
+       ],
        speed => 0,
        sight => 11,
        upgrade => [
@@ -1056,9 +1075,11 @@ use strict;
                        min => 100,
                        gas => 100,
                        build => 80,
-                       attack => {
-                               range => 1,
-                       },
+                       attack => [
+                               {
+                                       range => 1,
+                               },
+                       ],
                },
        ],
 },
@@ -1079,16 +1100,16 @@ use strict;
                light => 1,
                organic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        name => 'C-14 rifle',
                        damage => [6 .. 9],
                        dps => [7, 8.2, 9.4, 10.6],
                        cooldown => 0.8608,
+                       range => 5,
                },
-               air => 'ground',
-               range => 5,
-       },
+       ],
        speed => 2.25,
        upgrade => [
                {
@@ -1109,13 +1130,14 @@ use strict;
                        min => 100,
                        gas => 100,
                        build => 170,
-                       attack => {
-                               ground => {
+                       attack => [
+                               {
+                                       anti => 3,
                                        dps => [10.5, 12.2, 13.9, 15.6],
                                        cooldown => 0.5739,
+                                       range => 5,
                                },
-                               air => 'ground',
-                       },
+                       ],
                        duration => 15,
                },
        ],
@@ -1138,16 +1160,17 @@ use strict;
                armored => 1,
                organic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [10 .. 13],
                        #bonus => +10 (+1) A,
                        dps => [6.7, 7.4, 8.1, 8.8],
                        type => 'projectile',
                        cooldown => 1.5,
+                       range => 6,
                },
-               range => 6,
-       },
+       ],
        special => [
                {
                        name => 'Stim Pack',
@@ -1158,13 +1181,15 @@ use strict;
                        min => 100,
                        gas => 100,
                        build => 170,
-                       attack => {
-                               ground => {
+                       attack => [
+                               {
+                                       anti => 3,
                                        dps => [10 .. 13],
+                                       type => 'projectile',
                                        cooldown => 1.0,
+                                       range => 6,
                                },
-                               air => 'ground',
-                       },
+                       ],
                        duration => 15,
                },
        ],
@@ -1200,15 +1225,16 @@ use strict;
                organic => 1,
                jump => 'Jet Pack',
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [4 .. 7],
                        dps => [7.3, 9.1, 10.9, 12.7],
                        cooldown => 1.1,
                        count => 2,
+                       range => 4.5,
                },
-               range => 4.5,
-       },
+       ],
        speed => 3.75,
        sight => 9,
        special => [
@@ -1237,16 +1263,16 @@ use strict;
                organic => 1,
                psionic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        damage => [10 .. 13],
                        #bonus => +10 (+1) L,
                        dps => [6.7, 7.4, 8.1, 8.8],
                        cooldown => 1.5,
+                       range => 6,
                },
-               air => 'ground',
-               range => 6,
-       },
+       ],
        speed => 2.25,
        sight => 11,
        energy => 200,
@@ -1302,15 +1328,16 @@ use strict;
                light => 1,
                mech => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [8 .. 11],
                        dps => [3.2, 3.6, 4.0, 4.4],
                        splash => 'line',
                        cooldown => 2.5,
+                       range => 5,
                },
-               range => 5,
-       },
+       ],
        speed => 4.25,
        sight => 10,
        special => [
@@ -1327,11 +1354,11 @@ use strict;
                        min => 150,
                        gas => 150,
                        build => 110,
-                       attack => {
-                               ground => {
+                       attack => [
+                               {
                                        #bonus => +6 (+1), +11 (+1) L,
                                },
-                       },
+                       ],
                },
        ],
 },
@@ -1353,15 +1380,16 @@ use strict;
                organic => 1,
                mech => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [18, 20, 22, 24],
                        dps => [9 .. 12],
                        splash => 1,
                        cooldown => 2,
+                       range => 2,
                },
-               range => 2,
-       },
+       ],
        speed => 2.25,
        sight => 10,
        special => [
@@ -1378,11 +1406,11 @@ use strict;
                        min => 150,
                        gas => 150,
                        build => 110,
-                       attack => {
-                               ground => {
+                       attack => [
+                               {
                                        #bonus => +12 (+1) L,
                                },
-                       },
+                       ],
                },
        ],
 },
@@ -1403,15 +1431,16 @@ use strict;
                light => 1,
                mech => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        damage => 125,
                        #bonus => +35 Shield,
                        splash => 1,
                        cooldown => 40,
+                       range => 5,
                },
-               range => 5,
-       },
+       ],
        speed => 2.8125,
        sight => 7,
        update => [
@@ -1442,31 +1471,33 @@ use strict;
                armored => 1,
                mech => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [15, 17, 19, 21],
                        #bonus => +10 (+1)A,
                        dps => [14.4, 16.3, 18.2, 20.1],
                        cooldown => 1.04,
+                       range => 7,
                },
-               range => 7,
-       },
+       ],
        special => [
                {
                        name => 'siege mode',
                        abbr => 'sg',
                        alt => 'Sieged Tank',
                        cargo => 0,
-                       attack => {
-                               ground => {
+                       attack => [
+                               {
+                                       anti => 1,
                                        damage => [35, 38, 41, 44],
                                        #bonus => 15 (+2)A,
                                        dps => [11.7, 12.7, 13.7, 14.7],
                                        splash => 1,
                                        cooldown => 3,
+                                       range => 13,
                                },
-                               range => 13,
-                       },
+                       ],
                        speed => 0,
                        duration => 4,
                },
@@ -1492,15 +1523,17 @@ use strict;
                mech => 1,
                massive => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [30, 33, 36, 39],
                        dps => [46.9, 51.6, 56.3, 61.0],
                        cooldown => 1.28,
                        range => 7,
                        count => 2,
                },
-               air => {
+               {
+                       anti => 2,
                        name => 'Explosive Payload',
                        damage => [6 .. 9],
                        #bonus => +6 (+1) L Air,
@@ -1511,14 +1544,15 @@ use strict;
                        range => 10,
                        count => 4,
                },
-               air => {
+               {
+                       anti => 2,
                        name => 'High Impact Payload',
                        damage => [24, 26, 28, 30],
                        dps => [12 .. 15],
                        cooldown => 2,
                        range => 10,
                },
-       },
+       ],
        speed => 1.875,
        sight => 11,
 },
@@ -1540,32 +1574,34 @@ use strict;
                mech => 1,
                flying => 1,
        },
-       attack => {
-               air => {
+       attack => [
+               {
+                       anti => 2,
                        damage => [10 .. 13],
                        #bonus => +4A,
                        dps => [10 .. 13],
                        type => 'projectile',
                        cooldown => 2,
                        count => 2,
+                       range => 9,
                },
-               range => 9,
-       },
+       ],
        special => [
                {
+                       name => 'Assault Mode',
+                       abbr => 'am',
+                       build => 3, # transformation time
+                       alt => 'Landed Viking',
                        cargo => 2,
-                       attack => {
-                               name => 'Assault Mode',
-                               abbr => 'am',
-                               build => 3, # transformation time
-                               alt => 'Landed Viking',
-                               ground => {
+                       attack => [
+                               {
+                                       anti => 1,
                                        damage => [12 .. 15],
                                        dps => [12 .. 15],
                                        cooldown => 1,
+                                       range => 6,
                                },
-                               range => 6,
-                       },
+                       ],
                },
        ],
        speed => 2.75,
@@ -1637,16 +1673,17 @@ use strict;
                mech => 1,
                flying => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [12 .. 15],
                        dps => [19.2, 20.8, 22.4, 24.0],
                        type => 'projectile',
                        cooldown => 1.25,
                        count => 2,
+                       range => 6,
                },
-               range => 6,
-       },
+       ],
        speed => 2.75,
        sight => 10,
        energy => 200,
@@ -1699,15 +1736,15 @@ use strict;
                                mech => 1,
                                structure => 1,
                        },
-                       attack => {
-                               ground => {
+                       attack => [
+                               {
+                                       anti => 3,
                                        damage => 8,
                                        dps => 10,
                                        cooldown => 0.8,
+                                       range => 6,
                                },
-                               air => 'ground',
-                               range => 6,
-                       },
+                       ],
                        speed => 0,
                        sight => 7,
                        upgrade => [
@@ -1716,9 +1753,11 @@ use strict;
                                        min => 100,
                                        gas => 100,
                                        build => 80,
-                                       attack => {
-                                               range => 1,
-                                       },
+                                       attack => [
+                                               {
+                                                       range => 1,
+                                               },
+                                       ],
                                },
                                {
                                        name => 'Building Armor',
@@ -1744,9 +1783,11 @@ use strict;
                                flying => 1,
                        },
                        cooldown => 0,
-                       attack => {
-                               range => 8,
-                       },
+                       attack => [
+                               {
+                                       range => 8,
+                               },
+                       ],
                        sight => 7,
                        upgrade => [
                                {
@@ -1754,9 +1795,11 @@ use strict;
                                        min => 100,
                                        gas => 100,
                                        build => 80,
-                                       attack => {
-                                               range => 1,
-                                       },
+                                       attack => [
+                                               {
+                                                       range => 1,
+                                               },
+                                       ],
                                },
                                {
                                        name => 'Building Armor',
@@ -1774,10 +1817,12 @@ use strict;
                        desc => 'launches missile to do 100 damage plus splash'
                                . ' unless targeted unit moves to 13 range within 5 seconds of charging',
                        range => 10,
-                       attack => {
-                               damage => 100,
-                               splash => 1,
-                       },
+                       attack => [
+                               {
+                                       damage => 100,
+                                       splash => 1,
+                               },
+                       ],
                        cost => 75,
                },
        ],
@@ -1824,21 +1869,24 @@ use strict;
                massive => 1,
                flying => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [8 .. 11],
                        dps => [35.6, 40.0, 44.4, 48.8],
                        cooldown => 0.225,
                        type => 'projectile',
+                       range => 6,
                },
-               air => {
+               {
+                       anti => 2,
                        damage => [6 .. 9],
                        dps => [26.7, 31.1, 35.5, 39.9],
                        cooldown => 0.225,
                        type => 'projectile',
+                       range => 6,
                },
-               range => 6,
-       },
+       ],
        speed => 1.875,
        sight => 12,
        energy => 200,
@@ -1853,9 +1901,11 @@ use strict;
                        duration => 3,
                        range => 10,
                        cost => 100,
-                       attack => {
-                               damage => 300,
-                       },
+                       attack => [
+                               {
+                                       damage => 300,
+                               },
+                       ],
                },
        ],
        update => [
@@ -1887,14 +1937,15 @@ use strict;
                light => 1,
                organic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => 5,
                        dps => 3.3,
                        cooldown => 1.5,
+                       range => 0,
                },
-               range => 0,
-       },
+       ],
        speed => 2.8125,
        creep => 1.0,
        sight => 8,
@@ -1916,8 +1967,9 @@ use strict;
                organic => 1,
                psionic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [4 .. 7],
                        dps => [8, 10, 12, 14],
                        cooldown => 1.0,
@@ -1925,14 +1977,15 @@ use strict;
                        range => 5,
                        count => 2,
                },
-               air => {
+               {
+                       anti => 2,
                        damage => [9 .. 12],
                        dps => [9 .. 12],
                        cooldown => 1.0,
                        type => 'projectile', # except if range < 3
                        range => 7,
                },
-       },
+       ],
        speed => 0.9375,
        creep => 2.7,
        sight => 9,
@@ -2125,15 +2178,16 @@ use strict;
                organic => 1,
                structure => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => 25,
                        #bonus => +5A,
                        dps => 13.5,
                        cooldown => 1.85,
+                       range => 7,
                },
-               range => 7,
-       },
+       ],
        speed => (1.0),
        creep => 2.5,
        sight => 11,
@@ -2155,16 +2209,17 @@ use strict;
                organic => 1,
                structure => 1,
        },
-       attack => {
-               air => {
+       attack => [
+               {
+                       anti => 2,
                        damage => 15,
                        #bonus => + 30 B,
                        dps => 17.4,
                        type => 'projectile',
                        cooldown => 0.8608,
+                       range => 7,
                },
-               range => 7,
-       },
+       ],
        speed => (1.0),
        creep => 2.5,
        sight => 11,
@@ -2187,13 +2242,14 @@ use strict;
                light => 1,
                organic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [5 .. 8],
                        dps => [7.2, 8.6, 10.0, 11.4],
                        cooldown => 0.696,
                },
-       },
+       ],
        speed => 2.9531,
        creep => 1.3,
        range => 0,
@@ -2204,12 +2260,13 @@ use strict;
                        min => 200,
                        gas => 200,
                        build => 130,
-                       attack => {
-                               ground => {
+                       attack => [
+                               {
+                                       anti => 1,
                                        dps => [8.5, 10.2, 11.9, 13.6],
                                        cooldown => -0.109,
                                },
-                       },
+                       ],
                        req => 'Hive',
                },
                {
@@ -2238,14 +2295,15 @@ use strict;
        attr => {
                organic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [20, 22, 24, 26],
                        #bonus => +15 (+2)L / +60 (+3)S,
                        splash => 1,
+                       range => 0,
                },
-               range => 0,
-       },
+       ],
        speed => 2.5,
        creep => 1.3,
        sight => 8,
@@ -2277,13 +2335,14 @@ use strict;
                armored => 1,
                organic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [16, 18, 20, 22],
                        dps => [8 .. 11],
                        cooldown => 2.0,
                },
-       },
+       ],
        speed => 2.25,
        creep => 1.3,
        range => 4,
@@ -2334,16 +2393,16 @@ use strict;
                light => 1,
                organic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        damage => [12 .. 15],
                        dps => [16, 17.3, 18.6, 19.9],
                        type => 'projectile', # except meelee
                        cooldown => 0.75,
+                       range => 5,
                },
-               air => 'ground',
-               range => 5,
-       },
+       ],
        speed => 2.25,
        creep => 1.5,
        sight => 9,
@@ -2353,9 +2412,11 @@ use strict;
                        min => 150,
                        gas => 150,
                        build => 80,
-                       attack => {
-                               range => 1,
-                       },
+                       attack => [
+                               {
+                                       range => 1,
+                               },
+                       ],
                },
                {
                        name => 'Muscular Augments',
@@ -2424,15 +2485,15 @@ use strict;
                                light => 1,
                                organic => 1,
                        },
-                       attack => {
-                               ground => {
+                       attack => [
+                               {
+                                       anti => 3,
                                        damage => 8,
                                        dps => 9.3,
                                        cooldown => 0.8608,
+                                       range => 5,
                                },
-                               air => 'ground',
-                               range => 5,
-                       },
+                       ],
                        speed => 0.9375,
                        creep => 1.3,
                        sight => 9,
@@ -2485,13 +2546,14 @@ use strict;
                armored => 1,
                organic => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        dps => [27.9, 30.2, 32.5, 34.8],
                        type => 'projectile',
                        cooldown => 0.86,
                },
-       },
+       ],
        speed => 2.95,
        creep => 1.3,
        sight => 10,
@@ -2507,15 +2569,16 @@ use strict;
                                light => 1,
                                organic => 1,
                        },
-                       attack => {
-                               ground => {
+                       attack => [
+                               {
+                                       anti => 1,
                                        damage => [12 .. 15],
                                        dps => [14.0, 15.2, 16.4, 17.6],
                                        type => 'projectile',
                                        cooldown => 0.6,
+                                       range => 3,
                                },
-                               range => 3,
-                       },
+                       ],
                        speed => 1.875,
                        creep => 1.4,
                        sight => 6,
@@ -2554,17 +2617,17 @@ use strict;
                organic => 1,
                flying => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 3,
                        damage => [9 .. 12],
                        dps => [5.9, 6.6, 7.3, 8.0],
                        splash => 'bounce',
                        psionic => 1,
                        cooldown => 1.5246,
+                       range => 3,
                },
-               air => 'ground',
-               range => 3,
-       },
+       ],
        speed => 4,
        sight => 11,
        update => [
@@ -2593,16 +2656,17 @@ use strict;
                organic => 1,
                flying => 1,
        },
-       attack => {
-               air => {
+       attack => [
+               {
+                       anti => 2,
                        damage => [14 .. 17],
                        #bonus => +6 (+1)Ma,
                        dps => [7.4, 7.9, 8.4, 8.9],
                        type => 'projectile',
                        cooldown => 1.9,
+                       range => 6,
                },
-               range => 6,
-       },
+       ],
        speed => 2.9531,
        sight => 10,
        special => [
@@ -2635,14 +2699,15 @@ use strict;
                massive => 1,
                flying => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [20, 22, 24, 26],
                        dps => [8.0, 8.8, 9.6, 10.4],
                        cooldown => 2.5,
+                       range => 9.5,
                },
-               range => 9.5,
-       },
+       ],
        speed => 1.4062,
        sight => 12,
        special => [
@@ -2662,14 +2727,15 @@ use strict;
                                light => 1,
                                organic => 1,
                        },
-                       attack => {
-                               ground => {
+                       attack => [
+                               {
+                                       anti => 1,
                                        damage => [4 .. 7],
                                        dps => [6.2, 7.7, 9.2, 10.7],
                                        cooldown => 0.6455,
+                                       range => 0,
                                },
-                               range => 0,
-                       },
+                       ],
                        speed => 3.836,
                        creep => 1.0,
                        sight => 7,
@@ -2750,15 +2816,16 @@ use strict;
                organic => 1,
                massive => 1,
        },
-       attack => {
-               ground => {
+       attack => [
+               {
+                       anti => 1,
                        damage => [35, 38, 41, 44],
                        dps => [40.7, 44.2, 47.7, 51.2],
                        splash => 1,
                        cooldown => 0.861,
+                       range => 1,
                },
-               range => 1,
-       },
+       ],
        speed => 2.9531,
        creep => 1.3,
        sight => 9,
diff --git a/sc.plp b/sc.plp
index 3f6b781..4fc00ba 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -67,9 +67,7 @@ sub coltoggle {
        <th class="val unit-hp">HP</th>
        <th class="val unit-shield">shield</th>
        <th class="val unit-armor" title="armor">⛨</th>
-       <th class="val hurt">ground</th>
-       <th class="hurt hurtrel">dps</th>
-       <th class="val hurt">air</th>
+       <th class="val hurt" colspan=3>attack</th>
        <th class="hurt hurtrel">dps</th>
        <th class="val unit-range">range</th>
        <th class="val unit-sight">sight</th>
@@ -88,7 +86,8 @@ sub showval {
        my ($min, $max);
 
        my $value = $row;
-       $value = ref $value eq 'HASH' && $value->{$_} or last for @elements;
+       $value = ref $value eq 'HASH'   ? $value->{$_}
+              : ref $value eq 'ARRAY' && $value->[$_] or last for @elements;
        if (ref $value eq 'ARRAY') {
                $min = $value->[0];
                $max = $value->[-1];
@@ -101,15 +100,15 @@ sub showval {
        if ($row->{upgrade}) {
                for (@{ $row->{upgrade} }) {
                        my $increase = $_ or next;
-                       $increase = ref $increase eq 'HASH' && $increase->{$_} or last for @elements;
+                       $increase = ref $increase eq 'HASH'   ? $increase->{$_}
+                                 : ref $increase eq 'ARRAY' && $increase->[$_] or last for @elements;
                        $increase = $increase->[-1] if ref $increase eq 'ARRAY';
                        $max += $increase if $increase;
                }
        }
 
-       if ($elements[0] eq 'attack' and $elements[1] ne 'range' and $elements[2] eq 'dps') {{
-               my $attack = $row->{ $elements[0] }->{ $elements[1] };
-               ref $attack or $attack = $row->{ $elements[0] }->{$attack}; # follow
+       if ($elements[0] eq 'attack' and $elements[2] eq 'dps') {{
+               my $attack = $row->{ $elements[0] }->[ $elements[1] ];
                my $type = $attack->{type} or next;
                if ($type eq 'explosive') {
                        $min /= 2;
@@ -123,16 +122,13 @@ sub showval {
 
        sub showattack {
                my ($row, $area) = @_;
-               my $attack = $row->{attack}->{$area};
-               if (not ref $attack) {
-                       # reference to another area
-                       $area = $attack;
-                       $attack = $row->{attack}->{$area};
-               }
+               my $attack = $row->{attack}->[$area]
+                       or return '<td colspan=4 class="hurt">';
 
-               return '<td colspan="2" class="hurt">' unless $attack;
-
-               my $tagbase = '<td class="val hurt';
+               my $tagbase = '';
+               $tagbase .= '<td class="unit hurt-g">' . '▽' x !!($attack->{anti} & 1);
+               $tagbase .= '<td class="unit hurt-a">' . '△' x !!($attack->{anti} & 2);
+               $tagbase .= '<td class="val hurt';
                if (ref $attack and $attack->{type}) {
                        if ($attack->{type} eq 'explosive') {
                                $tagbase .= ' unit-l';
@@ -238,9 +234,8 @@ sub showval {
                                100 * $_->{shield} / $_->{hp}
                        ) : '<td colspan=2',
                        ' class="val unit-armor">' . showval($_, 'armor'),
-                       showattack($_, 'ground'),
-                       showattack($_, 'air'),
-                       '<td class="val unit-range">' . showval($_, 'attack', 'range'),
+                       showattack($_, 0),
+                       '<td class="val unit-range">' . showval($_, 'attack', 0, 'range'),
                        '<td class="val unit-sight">' . sprintf(
                                $_->{detect} ? '<strong class="unit-detect">%s</strong>' : '%s',
                                showval($_, 'sight')
@@ -251,6 +246,9 @@ sub showval {
                        $_->{attr}->{flying}
                                && qq'<span class="unit unit-jump" title="flying">↑</span>',
                        '<td class="unit-magic">' . showmagic($_),
+                       !$_->{attack}->[1] ? () : (
+                               '<tr><td colspan=12>', showattack($_, 1), '<td colspan=4>'
+                       ),
                        "\n"
                );
        }
@@ -349,11 +347,14 @@ if ($scver{major} > 1) {
        <dd>base unit armor
        <dd>can be increased by upto 3 at various facilities
        <dd>each point decreases damage per hit by one, upto a minimum of ½
-       <dd>reduction applies to initial damage, before size penalties <small>(so a plasma hit of 12 to 4 armor large deals 2 damage, not ½)</small>
-<dt>ground/air
-       <dd>damage done per single attack against ground/air units
-       <dd>2nd column indicates relative amount of damage done in
-               1 second of fastest game time
+       <dd>reduction applies to initial damage, before size penalties
+               <small>(so a plasma hit of 12 to 4 armor large deals 2 damage, not ½)</small>
+<dt>attack
+       <dd>targets <span class="hurt-g">▽</span>&nbsp;ground
+               and/or  <span class="hurt-a">△</span>&nbsp;air
+       <dd>damage given per single hit
+       <dd><em>dps</em> indicates relative amount of damage done in
+               1 second of in-game time
        <dd>splash damage hits all objects nearby <span class="unit-splash">+</span>
                or in a straight line <span class="unit-splash">×</span>.
        <dd><span class="hurt unit-l">explosive</span> damage does only