sc: import starcraft unit sheet
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 25 Mar 2010 22:20:39 +0000 (22:20 +0000)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 25 Mar 2010 22:20:39 +0000 (22:20 +0000)
Converted from sc.shiar.nl.

sc-units.inc.pl [new file with mode: 0644]
sc.plp [new file with mode: 0644]

diff --git a/sc-units.inc.pl b/sc-units.inc.pl
new file mode 100644 (file)
index 0000000..2bdc715
--- /dev/null
@@ -0,0 +1,1783 @@
+my $FM = 1.58; # 1s at fast speed
+# toss shield += .65 per $FM
+# zerg regen  += .37 per $FM
+[
+
+{
+cat => 'base',
+req => ['nexus'], #TODO
+name => 'Probe',
+min => 50,
+gas => 0,
+build => 12.7*$FM, # 20
+size => 1,
+unit => 1,
+race => 'protoss',
+organic => 0,
+hp => 40,
+shield => 50,
+armor => 0,
+attack => {
+       ground => {
+               name => "Particle Beam",
+               damage => 5,
+               cmp => 7,
+       },
+       range => 1,
+},
+sight => 8,
+speed => 14,
+special => [],
+counter => ['vulture', 'dark templar'],
+},
+
+{
+cat => 'base',
+req => ['forge'],
+name => 'Cannon',
+trans => {
+       nl => 'kanon',
+},
+min => 150,
+gas => 0,
+build => 50,
+size => 3,
+unit => 0,
+race => 'protoss',
+hp => 200,
+shield => 50,
+armor => 0,
+attack => {
+       ground => {
+               damage => 20,
+               cmp => 27,
+       },
+       air => {
+               damage => 20,
+               cmp => 27,
+       },
+       range => 7,
+},
+sight => 11,
+detect => 1,
+speed => 0,
+special => [],
+counter => ['zergling', 'tank'],
+},
+
+{
+cat => 'ground',
+req => ['gateway'],
+name => 'Zealot',
+trans => {
+       nl => 'zeloot',
+},
+min => 100,
+gas => 0,
+build => 25*$FM, # 40
+size => 1,
+unit => 2,
+race => 'protoss',
+organic => 1,
+hp => 160,
+shield => 38,
+armor => 1,
+attack => {
+       ground => {
+               name => "Psi Blades",
+               damage => [16, 18, 20, 22],
+               cmp => [22, undef, undef, 30],
+       },
+       range => 1,
+},
+sight => 7,
+speed => 11,
+upgrade => [
+       {
+#              name => 'leg',
+               speed => 16 - 11,
+       },
+],
+special => [],
+counter => ['vulture'],
+},
+
+{
+cat => 'ground',
+req => ['gateway', 'cybernetics core'],
+name => 'Dragoon',
+trans => {
+       nl => 'dragonder',
+},
+min => 125,
+gas => 50,
+build => 32*$FM, # 40
+size => 3,
+unit => 2,
+race => 'protoss',
+organic => 0,
+hp => 180,
+shield => 44,
+armor => 1,
+attack => {
+       ground => {
+               name => "Phase Disruptor",
+               damage => [20, 22, 24, 26],
+               cmp => [20, 22, 24, 26],
+               type => 'explosive',
+       },
+       air => {
+               damage => [20, 22, 24, 26],
+               cmp => [20, 22, 24, 26],
+               type => 'explosive',
+       },
+       range => 4,
+},
+sight => 8,
+speed => 15,
+upgrade => [
+       {
+               attack => {
+                       range => 6 - 4,
+               },
+       },
+],
+special => [],
+counter => ['zergling', 'zealot', 'tank'],
+},
+
+{
+cat => 'ground',
+name => 'High Templar',
+trans => {
+       nl => 'hoge tempelier',
+       eo => 'alta templano',
+},
+min => 50,
+gas => 150,
+build => 31.7*$FM, # 50
+size => 1,
+unit => 2,
+race => 'protoss',
+organic => 1,
+hp => 80,
+shield => 50,
+armor => 0,
+attack => {
+},
+sight => 7,
+speed => 9,
+energy => 200,
+upgrade => [
+       {
+               name => "Psionic Storm",
+               min => 200,
+               gas => 200,
+       },
+       {
+               name => "Hallucination",
+               min => 150,
+               gas => 150,
+       },
+       {
+               name => "Khaydarin Amulet",
+               min => 150,
+               gas => 150,
+               energy => 250,
+       },
+],
+special => [
+       {
+               name => 'Psionic Storm',
+               abbr => 'ps',
+               desc => 'units in the area will receive upto 115 damage',
+               range => 9,
+               cost => undef,
+               duration => 2, #XXX
+       },
+       {
+               name => 'Hallucination',
+               abbr => 'hl',
+               desc => 'creates two illusionary duplicates of a unit for 3 minutes',
+               range => 7,
+               cost => undef,
+               duration => 180,
+       },
+],
+counter => ['vulture', 'ultralisk'],
+},
+
+{
+cat => 'ground',
+name => 'Dark Templar',
+trans => {
+       nl => 'donkere tempelier',
+       eo => 'malluma templano',
+},
+min => 125,
+gas => 100,
+build => 34*$FM, # 50
+size => 1,
+unit => 2,
+race => 'protoss',
+organic => 1,
+hp => 120,
+shield => 33,
+armor => 1,
+attack => {
+       ground => {
+               name => "Warp Blades",
+               damage => [40, 43, 46, 49],
+               cmp => [40, 43, 46, 49],
+       },
+       range => 1,
+},
+sight => 7,
+speed => 15,
+cloak => 1,
+special => [],
+},
+
+{
+cat => 'psionic',
+name => 'Archon',
+trans => {
+       nl => 'archont',
+       eo => 'arĥono',
+},
+min => 100,
+gas => 300,
+build => 13*$FM, # 20
+base => ['templar', 'templar'],
+size => 3,
+unit => 4,
+race => 'protoss',
+organic => 0,
+hp => 360,
+shield => 97,
+armor => 0,
+attack => {
+       ground => {
+               name => "Psionic Shockwave",
+               damage => [30, 33, 36, 39],
+               cmp => [45, undef, undef, 59],
+               splash => 1,
+       },
+       air => {
+               damage => [30, 33, 36, 39],
+               cmp => [45, undef, undef, 59],
+               splash => 1,
+       },
+       range => 2,
+},
+sight => 8,
+speed => 14,
+special => [],
+},
+
+{
+cat => 'psionic',
+name => 'Dark Archon',
+trans => {
+       nl => 'donkere archont',
+       eo => 'malluma arĥono',
+},
+min => 250,
+gas => 200,
+build => 13*$FM, # 20
+base => ['dark templar', 'dark templar'],
+size => 3,
+unit => 4,
+race => 'protoss',
+organic => 0,
+hp => 225,
+shield => 89,
+armor => 1,
+attack => {
+},
+sight => 10,
+speed => 14,
+energy => 200,
+upgrade => [
+       {
+               name => "Maelstrom",
+               min => 100,
+               gas => 100,
+       },
+       {
+               name => "Mind Control",
+               min => 200,
+               gas => 200,
+       },
+       {
+               name => "Argus Talisman",
+               min => 150,
+               gas => 150,
+               energy => 250,
+       },
+],
+special => [
+       {
+               name => 'Feedback',
+               abbr => 'fb',
+               desc => 'targeted unit will lose its mana and receive damage equal to that amount',
+               range => 10,
+               cost => 50,
+               duration => 0,
+       },
+       {
+               name => 'Mind Control',
+               abbr => 'mc',
+               desc => 'permanently gives you control over any unit',
+               range => 8,
+               cost => 150,
+               duration => -1,
+       },
+       {
+               name => 'Maelstrom',
+               abbr => 'ms',
+               desc => 'field stunning all organic units for a few seconds',
+               range => 10,
+               cost => 100,
+               duration => undef, #XXX
+       },
+],
+},
+
+{
+cat => 'aerial',
+name => 'Scout',
+trans => {
+       nl => 'verkenner',
+       eo => 'esploristo',
+},
+min => 275,
+gas => 125,
+build => 50.5*$FM, # 80
+size => 3,
+unit => 3,
+race => 'protoss',
+organic => 0,
+air => 1,
+hp => 250,
+shield => 40,
+armor => 0,
+attack => {
+       ground => {
+               damage => [8, 9, 10, 11],
+               cmp => [8, 9, 10, 11],
+       },
+       air => {
+               damage => [28, 30, 32, 34],
+               cmp => [38, undef, undef, 46],
+               type => 'explosive',
+       },
+       range => 4,
+},
+sight => 8,
+speed => 13,
+upgrade => [
+       {
+               sight => 10 - 8,
+       },
+       {
+               speed => 18 - 13,
+       },
+],
+special => [],
+},
+
+{
+cat => 'aerial',
+name => 'Corsair',
+trans => {
+       de => 'Korsar',
+},
+min => 150,
+gas => 100,
+build => 25.3*$FM, # 40
+size => 2,
+unit => 2,
+race => 'protoss',
+organic => 0,
+air => 1,
+hp => 180,
+shield => 44,
+armor => 1,
+attack => {
+       air => {
+               damage => [5, 6, 7, 8],
+               cmp => [19, undef, undef, 30],
+               splash => 1,
+               type => 'explosive',
+       },
+       range => 5,
+},
+sight => 9,
+speed => 17,
+special => [
+       {
+               name => 'Disruption web',
+               abbr => 'dw',
+               desc => 'creates a field in which no ground unit/structure can attack',
+               range => 9,
+               cost => 62-50,
+               duration => undef, #XXX
+       },
+],
+counter => ['devourer', 'valkyrie'],
+},
+
+{
+cat => 'aerial',
+name => 'Carrier',
+trans => {
+       nl => 'vliegdekschip',
+},
+min => 350,
+gas => 250,
+build => 88.5*$FM, # 140
+size => 3,
+unit => 6,
+race => 'protoss',
+organic => 0,
+hp => 450,
+shield => 33,
+armor => 4,
+attack => {
+       ground => {
+               damage => [6, 7, 8, 9],
+               cmp => [17, undef, undef, 49],
+               min => 25,
+               build => 12.7*$FM,
+               max => 4,
+       },
+       air => {
+               damage => [6, 7, 8, 9],
+               cmp => [17, undef, undef, 49],
+               min => 25,
+               build => 12.7*$FM,
+               max => 4,
+       },
+       range => 8,
+},
+sight => 11,
+speed => 10,
+special => [],
+counter => ['wraith', 'corsair', 'scourge'],
+},
+
+{
+cat => 'aerial',
+name => 'Arbiter',
+trans => {
+       nl => 'arbiter',
+},
+min => 100,
+gas => 350,
+build => 131, # 160
+size => 3,
+unit => 4,
+race => 'protoss',
+organic => 0,
+air => 1,
+hp => 350,
+shield => 43,
+armor => 1,
+attack => {
+       ground => {
+               damage => [10, 11, 12, 13],
+               cmp => [7, undef, undef, 9],
+               type => 'explosive',
+       },
+       air => {
+               damage => [10, 11, 12, 13],
+               cmp => [7, undef, undef, 9],
+               type => 'explosive',
+       },
+       range => 5,
+},
+sight => 9,
+speed => 12,
+upgrade => [
+       {
+               name => 'energy',
+               energy => 'more',
+       },
+],
+special => [
+       {
+               name => 'cloaks',
+               abbr => 'cs',
+               desc => 'cloaks nearby friendly units except for other Arbiters',
+               duration => -1,
+       },
+       {
+               name => 'Recall',
+               abbr => 'rc',
+               desc => 'creates a 5x5m wormhole which transports units to the Arbiter',
+               cost => 75-60,
+               duration => 0,
+       },
+       {
+               name => 'Stasis field',
+               abbr => 'sf',
+               desc => 'traps all non-burrowed units (3x3m) for 40 seconds, making them frozen and undamagable',
+               cost => 50-40,
+               range => 9,
+               duration => 40,
+       },
+],
+},
+
+{
+cat => 'robotic',
+name => 'Reaver',
+min => 200,
+gas => 100,
+build => 44.5*$FM, # 70
+size => 3,
+unit => 4,
+race => 'protoss',
+organic => 0,
+hp => 180,
+shield => 44,
+armor => 0,
+attack => {
+       ground => {
+               damage => 100,
+               cmp => 50,
+               splash => 1,
+               cost => 15,
+               build => 4.54*$FM,
+               max => 5,
+       },
+       range => 8,
+},
+sight => 10,
+speed => 5,
+upgrade => [
+       {
+               attack => {
+                       ground => {
+                               damage => 125 - 100,
+                               cmp => 63 - 50,
+                       },
+               },
+       },
+       {
+               attack => {
+                       ground => {
+                               splash => 2 - 1,
+                       },
+               },
+       },
+       {
+               attack => {
+                       ground => {
+                               max => 5,
+                       },
+               },
+       },
+],
+special => [],
+},
+
+{
+cat => 'robotic',
+name => 'Observer',
+trans => {
+       nl => 'observeerder',
+},
+min => 25,
+gas => 75,
+build => 25.35*$FM, # 40
+size => 1,
+unit => 1,
+race => 'protoss',
+organic => 0,
+air => 1,
+hp => 60,
+shield => 33,
+armor => 0,
+attack => {
+},
+sight => 9,
+detect => 1,
+speed => 9,
+upgrade => [
+       {
+               name => "Sensor Array",
+               min => 150,
+               gas => 150,
+               sight => 11 - 9,
+       },
+       {
+               name => "Gravitic Booster",
+               min => 150,
+               gas => 150,
+               speed => 13 - 9,
+       },
+],
+cloak => 1,
+special => [],
+},
+
+{
+cat => 'robotic',
+name => 'Shuttle',
+trans => {
+       fr => 'navette',
+},
+min => 200,
+gas => 0,
+build => 38*$FM, # 60
+size => 3,
+unit => 2,
+race => 'protoss',
+organic => 0,
+hp => 140,
+shield => 43,
+armor => 1,
+attack => {
+},
+sight => 8,
+speed => 13,
+transport => 1,
+upgrade => [
+       {
+               speed => 19 - 13,
+       }
+],
+special => [],
+},
+
+{
+race => 'terran',
+cat => 'base',
+name => 'SCV', # T-280 Space Construction Vehicle
+min => 50,
+gas => 0,
+build => 20,
+size => 1,
+unit => 1,
+race => 'terran',
+organic => 0,
+hp =>  60,
+shield => 0,
+armor => 0,
+attack => {
+       ground => {
+               damage => 5,
+               cmp => 10,
+       },
+       range => 1,
+},
+sight => 7,
+speed => 15,
+special => [],
+},
+
+{
+cat => 'base',
+name => 'Turret',
+trans => {
+       nl => 'toren',
+},
+min => 75,
+gas => 0,
+build => 30,
+size => 3,
+unit => 0,
+race => 'terran',
+hp => 200,
+shield => 0,
+armor => 0,
+attack => {
+       air => {
+               damage => 20,
+               cmp => 40,
+               type => 'explosive',
+       },
+       range => 7,
+},
+sight => 11,
+detect => 1,
+speed => 0,
+special => [],
+},
+
+{
+cat => 'barracks',
+name => 'Marine',
+trans => {
+       nl => 'marinier',
+},
+min => 50,
+gas => 0,
+build => 24,
+size => 1,
+unit => 1,
+race => 'terran',
+organic => 1,
+hp =>  40,
+shield => 0,
+armor => 0,
+attack => {
+       ground => {
+               damage => [6, 7, 8, 9],
+               cmp => [12, undef, undef, 18],
+       },
+       air => {
+               damage => [6, 7, 8, 9],
+               cmp => [12, undef, undef, 18],
+       },
+       range => 4,
+},
+sight => 7,
+speed => 11,
+upgrade => [
+       {
+               attack => {
+                       range => 5 - 4,
+               },
+       },
+],
+special => [
+       {
+               name => 'stim pack',
+               abbr => 'sp',
+               desc => 'doubles attack speed and faster movement for a few seconds at the cost of 10 health',
+               speed => 17,
+               attack => {
+                       ground => {
+                               cmp => [24, undef, undef, 36],
+                       },
+                       air => {
+                               cmp => [24, undef, undef, 36],
+                       },
+               },
+               duration => undef, #XXX
+       },
+],
+},
+
+{
+cat => 'barracks',
+name => 'Firebat',
+min => 50,
+gas => 25,
+build => 24,
+size => 1,
+unit => 1,
+race => 'terran',
+organic => 1,
+hp =>  50,
+shield => 0,
+armor => 1,
+attack => {
+       ground => {
+               damage => [16, 18, 20, 22],
+               cmp => [22, undef, undef, 30],
+               splash => 1,
+               type => 'implosive',
+       },
+       range => 2,
+},
+sight => 7,
+speed => 11,
+special => [
+       {
+               name => 'stim pack',
+               abbr => 'sp',
+               desc => 'doubles attack speed and faster movement for a few seconds at the cost of 10 health',
+               speed => 17,
+               attack => {
+                       cmp => [44, undef, undef, 60],
+               },
+               duration => undef, #XXX
+       },
+],
+},
+
+{
+cat => 'barracks',
+name => 'Ghost',
+trans => {
+       nl => 'geest',
+},
+min => 25,
+gas => 75,
+build => 50,
+size => 1,
+unit => 1,
+race => 'terran',
+organic => 1,
+hp =>  45,
+shield => 0,
+armor => 0,
+attack => {
+       ground => {
+               damage => [10, 11, 12, 13],
+               cmp => [14, undef, undef, 18],
+               type => 'implosive',
+       },
+       air => {
+               damage => [10, 11, 12, 13],
+               cmp => [14, undef, undef, 18],
+               type => 'implosive',
+       },
+       range => 7,
+},
+sight => 9,
+speed => 11,
+upgrade => [
+       {
+               sight => 11 - 9,
+       },
+],
+special => [
+       {
+               name => 'Cloak',
+               abbr => 'cl',
+               desc => 'has the ability to cloak',
+               cost => 13-10,
+               main => .5-.4,
+       },
+       {
+               name => 'Lockdown',
+               abbr => 'ld',
+               desc => 'disables a mechanical unit completely for one minute',
+               range => 8,
+               cost => 50-40,
+               duration => 60,
+       },
+       {
+               name => 'Nuclear Strike',
+               abbr => 'ns',
+               desc => 'guides a nuclear missile which will do 500 damage',
+               duration => 0,
+       },
+],
+},
+
+{
+cat => 'barracks',
+name => 'Medic',
+min => 50,
+gas => 25,
+build => 30,
+size => 1,
+unit => 1,
+race => 'terran',
+organic => 1,
+hp =>  60,
+shield => 0,
+armor => 1,
+attack => {
+},
+sight => 9,
+speed => 11,
+special => [
+       {
+               name => 'Healing',
+               abbr => 'hl',
+               desc => 'heals friendly biological units',
+               range => 2,
+               cost => undef,
+               duration => 0,
+       },
+       {
+               name => 'Restoration',
+               abbr => 'rs',
+               desc => 'removes harmful effects (Lockdown, Flare, Irradiate, Plague, Ensnare, Parasite) from a unit',
+               range => 6,
+               cost => undef,
+               duration => 0,
+       },
+       {
+               name => 'Optic Flare',
+               abbr => 'of',
+               desc => 'reduces the sight of target unit to 1',
+               range => 9,
+               cost => undef,
+               duration => 0,
+       },
+],
+},
+
+{
+cat => 'factory',
+name => 'Vulture',
+trans => {
+       nl => 'gier',
+},
+min => 75,
+gas => 0,
+build => 19*$FM, # 30
+size => 2,
+unit => 2,
+race => 'terran',
+organic => 0,
+hp =>  80,
+shield => 0,
+armor => 0,
+attack => {
+       ground => {
+               damage => [20, 22, 24, 26],
+               cmp => [20, 22, 24, 26],
+               type => 'implosive',
+       },
+       range => 5,
+},
+sight => 8,
+speed => 20,
+upgrade => [
+       {
+               speed => 28 - 20,
+       },
+],
+special => [
+       {
+               name => 'spider mine',
+               abbr => 'sm',
+               desc => 'burrows a mine (capable of doing 125+ damage to enemy units coming within range 3)',
+               amount => 3,
+               attack => {
+                       damage => 125,
+                       type => 'explosive',
+               },
+               duration => 0,
+    },
+],
+},
+
+{
+cat => 'factory',
+name => 'Tank',
+trans => {
+       nl => 'tank',
+},
+min => 150,
+gas => 100,
+build => 50,
+size => 3,
+unit => 2,
+race => 'terran',
+organic => 0,
+hp => 150,
+shield => 0,
+armor => 1,
+attack => {
+       ground => {
+               damage => [30, 33, 36, 39],
+               cmp => [24, undef, undef, 32],
+               type => 'explosive',
+       },
+       range => 7,
+},
+sight => 10,
+speed => 12,
+special => [
+       {
+               name => 'siege mode',
+               abbr => 'sg',
+               alt => 'Sieged Tank',
+               attack => {
+                       ground => {
+                               damage => [70, 75, 80, 85],
+                               cmp => [28, 30, 32, 34],
+                               splash => 1,
+                               type => 'explosive',
+                       },
+                       range => 12,
+               },
+               speed => 0,
+               duration => -1,
+       },
+],
+},
+
+{
+cat => 'factory',
+name => 'Goliath',
+trans => {
+       nl => 'goliat',
+},
+min => 100,
+gas => 50,
+build => 40,
+size => 3,
+unit => 2,
+race => 'terran',
+organic => 0,
+hp => 125,
+shield => 0,
+armor => 1,
+attack => {
+       ground => {
+               damage => [12, 13, 14, 15],
+               cmp => [16, undef, undef, 20],
+       },
+       air => {
+               damage => [20, 24, 28, 32],
+               cmp => [27, undef, undef, 44],
+               type => 'explosive',
+       },
+       range => 5,
+},
+sight => 8,
+speed => 13,
+upgrade => [
+       {
+               attack => {
+                       air => {
+                               range => 8 - 5,
+                       },
+               },
+       },
+],
+special => [],
+},
+
+{
+cat => 'starport',
+name => 'Wraith',
+min => 150,
+gas => 100,
+build => 60,
+size => 3,
+unit => 2,
+race => 'terran',
+organic => 0,
+air => 1,
+hp => 120,
+shield => 0,
+armor => 0,
+attack => {
+       ground => {
+               damage => [8, 9, 10, 11],
+               cmp => [8, 9, 10, 11],
+       },
+       air => {
+               damage => [20, 22, 24, 26],
+               cmp => [27, undef, undef, 35],
+               type => 'explosive',
+       },
+       range => 5,
+},
+sight => 7,
+speed => 17,
+special => [
+       {
+               name => 'Cloak',
+               abbr => 'cl',
+               desc => 'has the ability to cloak',
+               cost => 13-10,
+               maint => .5-.4, # /second
+       },
+],
+},
+
+{
+cat => 'starport',
+name => 'Battle Cruiser',
+trans => {
+       nl => 'slagkruiser',
+},
+min => 400,
+gas => 300,
+build => 160,
+size => 3,
+unit => 6,
+race => 'terran',
+organic => 0,
+air => 1,
+hp => 500,
+shield => 0,
+armor => 3,
+attack => {
+       ground => {
+               damage => [25, 28, 31, 34],
+               cmp => [25, 28, 31, 34],
+       },
+       air => {
+               damage => [25, 28, 31, 34],
+               cmp => [25, 28, 31, 34],
+       },
+       range => 6,
+},
+sight => 11,
+speed => 7,
+special => [
+       {
+               name => 'Yamato Gun',
+               abbr => 'yg',
+               desc => 'blast doing 260 damage to a target',
+               attack => {
+                       damage => 260,
+               },
+               range => 10,
+               cost => 75-60,
+       },
+],
+},
+
+{
+cat => 'starport',
+name => 'Science Vessel',
+trans => {
+       nl => 'wetenschapsvaartuig',
+},
+min => 100,
+gas => 225,
+build => 80,
+size => 3,
+unit => 2,
+race => 'terran',
+organic => 0,
+air => 1,
+hp => 200,
+shield => 0,
+armor => 1,
+attack => {
+},
+sight => 10,
+detect => 1,
+speed => 15,
+special => [
+       {
+               name => 'defensive matrix',
+               abbr => 'dm',
+               desc => 'gives target unit a shield of 250HP for one minute',
+               range => 10,
+               cost => 50-40,
+               duration => 60,
+       },
+       {
+               name => 'EMP',
+               abbr => 'ep',
+               desc => 'units in 3-matrix radius will lose all energy and shields',
+               range => 8,
+               cost => 50-40,
+       },
+       {
+       name => 'irradiate',
+               abbr => 'ir',
+               desc => 'organic units will suffer upto 250 damage over 30s',
+               range => 9,
+               cost => 38-30,
+               attack => {
+                       damage => 250,
+                       splash => 1,
+               },
+               duration => 30,
+       },
+],
+},
+
+{
+cat => 'starport',
+name => 'Valkyrie',
+trans => {
+       nl => 'walkure',
+},
+min => 250,
+gas => 125,
+build => 60,
+size => 3,
+unit => 3,
+race => 'terran',
+organic => 0,
+air => 1,
+hp => 200,
+shield => 0,
+armor => 2,
+attack => {
+       air => {
+               damage => [6, 7, 8, 9],
+               cmp => [23, undef, undef, 25],
+               splash => 1,
+               type => 'explosive',
+       },
+       range => 6,
+},
+sight => 8,
+speed => 19,
+special => [],
+},
+
+{
+cat => 'starport',
+name => 'Dropship',
+min => 100,
+gas => 100,
+build => 50,
+size => 3,
+unit => 2,
+race => 'terran',
+organic => 0,
+air => 1,
+hp => 150,
+shield => 0,
+armor => 1,
+attack => {
+},
+sight => 8,
+speed => 15,
+transport => 1,
+special => [],
+},
+
+{
+race => 'zerg',
+cat => 'base',
+name => 'Drone',
+min => 50,
+gas => 0,
+build => 13*$FM, # 20
+size => 1,
+unit => (1),
+race => 'zerg',
+organic => 1,
+hp => 40,
+shield => 0,
+armor => 0,
+attack => {
+       ground => {
+               damage => 5,
+               cmp => 7,
+       },
+       range => 1,
+},
+sight => 7,
+speed => 14,
+special => [],
+},
+
+{
+cat => 'base',
+name => 'Overlord',
+min => 100,
+gas => 0,
+build => 26*$FM, # 40
+size => 3,
+unit => -9,
+race => 'zerg',
+organic => 1,
+air => 1,
+hp => 200,
+shield => 0,
+armor => 0,
+attack => {
+},
+sight => 9,
+detect => 1,
+speed => 2,
+transport => 1,
+upgrade => [
+       {
+               sight => 11 - 9,
+       },
+       {
+               speed => 10 - 2,
+       },
+],
+special => [],
+},
+
+{
+cat => 'creep',
+name => 'Larva',
+trans => {
+       nl => 'larve',
+},
+min => 0,
+gas => 0,
+build => 14.3*$FM, # = 21.5
+size => 1,
+unit => 0,
+race => 'zerg',
+organic => 1,
+hp => 25,
+shield => 0,
+armor => 10,
+attack => {
+},
+sight => 4,
+speed => 0.1, #XXX
+special => [],
+},
+
+{
+cat => 'creep',
+name => 'Egg',
+trans => {
+       nl => 'ei',
+},
+min => 0,
+gas => 0,
+build => 0,
+size => 3,
+unit => 0,
+race => 'zerg',
+organic => 1,
+hp => 200,
+shield => 0,
+armor => 10,
+attack => {
+},
+sight => 4,
+speed => 0,
+special => [],
+},
+
+{
+cat => 'creep',
+name => 'Sunken Colony',
+min => 175,
+gas => 0,
+build => 20,
+size => 3,
+unit => 0,
+race => 'zerg',
+hp => 300,
+shield => 0,
+armor => 2,
+attack => {
+       ground => {
+               damage => 40,
+               cmp => 38,
+               type => 'explosive',
+       },
+       range => 7,
+},
+sight => 10,
+speed => 0,
+special => [],
+},
+
+{
+cat => 'creep',
+name => 'Spore Colony',
+min => 175,
+gas => 0,
+build => 20,
+size => 3,
+unit => 0,
+race => 'zerg',
+hp => 400,
+shield => 0,
+armor => 0,
+attack => {
+       air => {
+               damage => 15,
+               cmp => 30,
+       },
+       range => 7,
+},
+sight => 10,
+detect => 1,
+speed => 0,
+special => [],
+},
+
+{
+cat => 'hatchery',
+name => 'Zergling',
+min => 25,
+gas => 0,
+build => 19*$FM, # 14
+size => 1,
+unit => 0.5,
+race => 'zerg',
+organic => 1,
+hp => 35,
+shield => 0,
+armor => 0,
+attack => {
+       ground => {
+               damage => [5, 6, 7, 8],
+               cmp => [18, undef, undef, 29], # 29 is an estimate
+       },
+       range => 1,
+},
+sight => 5,
+speed => 14,
+upgrade => [
+       {
+               speed => 22 - 14,
+       },
+       {
+               attack => {
+                       ground => {
+                               cmp => [undef, undef, undef, 42 - 29],
+                       },
+               },
+       },
+],
+special => [],
+counter => ['archon', 'templar', 'firebat'],
+},
+
+{
+cat => 'hatchery',
+name => 'Hydralisk',
+min => 75,
+gas => 25,
+build => 18.5*$FM, # 28
+size => 2,
+unit => 1,
+race => 'zerg',
+organic => 1,
+hp => 80,
+shield => 0,
+armor => 0,
+attack => {
+       ground => {
+               damage => [10, 11, 12, 13],
+               cmp => [20, 22, 24, 26],
+               type => 'explosive',
+       },
+       air => {
+               damage => [10, 11, 12, 13],
+               cmp => [20, 22, 24, 26],
+               type => 'explosive',
+       },
+       range => 4,
+},
+sight => 6,
+speed => 11,
+upgrade => [
+       {
+               attack => {
+                       range => 5 - 4,
+               },
+       },
+       {
+               speed => 16 - 11,
+       },
+],
+special => [],
+},
+
+{
+cat => 'lair',
+name => 'Lurker',
+min => 125,
+gas => 125,
+base => 'hydralisk',
+build => 25.5*$FM, # 40
+size => 2,
+unit => 2,
+race => 'zerg',
+organic => 1,
+hp => 125,
+shield => 0,
+armor => 1,
+attack => {
+       ground => {
+               damage => [20, 22, 24, 26],
+               cmp => [16, undef, undef, 21],
+               splash => 1,
+       },
+       range => 6,
+},
+sight => 8,
+speed => 17,
+special => [],
+},
+
+{
+cat => 'lair',
+name => 'Queen',
+min => 100,
+gas => 100,
+build => 42.5*$FM, # 50
+size => 2,
+unit => 2,
+race => 'zerg',
+organic => 1,
+air => 1,
+hp => 120,
+shield => 0,
+armor => 0,
+attack => {
+},
+sight => 10,
+speed => 18,
+special => [
+       {
+               name => 'infest CC',
+               abbr => 'ic',
+               desc => 'assimilate a Terran Command Center to produce infested marines',
+               duration => 0,
+       },
+       {
+               name => 'parasite',
+               abbr => 'ps',
+               desc => "shares an infected unit's vision",
+               range => 12,
+               cost => 38-30,
+       },
+       {
+               name => 'ensnare',
+               abbr => 'es',
+               desc => 'slows units downto 1/2 speed',
+               range => 9,
+               cost => 38-30,
+               duration => undef,
+       },
+       {
+               name => 'Broodling',
+               abbr => 'sb',
+               desc => 'spawn one inside an enemy unit killing it',
+               range => 9,
+               cost => 75-60,
+       },
+],
+},
+
+{
+cat => 'lair',
+name => 'Broodling',
+min => 0,
+gas => 0,
+build => 0,
+size => 1,
+unit => 0,
+race => 'zerg',
+organic => 1,
+hp => 30,
+shield => 0,
+armor => 0,
+attack => {
+       ground => {
+               damage => [4, 5, 6, 7],
+               cmp => [8, 10, 12, 14],
+       },
+       range => 1,
+},
+sight => 5,
+speed => 19,
+special => [],
+},
+
+{
+cat => 'lair',
+name => 'Infested Terran',
+min => 100,
+gas => 50,
+build => 40,
+size => 1,
+unit => 1,
+race => 'zerg',
+organic => 1,
+hp => 60,
+shield => 0,
+armor => 0,
+attack => {
+       ground => {
+               damage => 500,
+               splash => 1,
+               type => 'explosive',
+       },
+       range => 1,
+},
+sight => 5,
+speed => 17,
+special => [],
+},
+
+{
+cat => 'lair',
+name => 'Scourge',
+min => 12,
+gas => 38,
+build => 20*$FM, # 15
+size => 1,
+unit => 0.5,
+race => 'zerg',
+organic => 1,
+air => 1,
+hp => 25,
+shield => 0,
+armor => 0,
+attack => {
+       air => {
+               damage => 110,
+       },
+       range => 1,
+},
+sight => 5,
+speed => 18,
+counter => ['cannon', 'goliath', 'hydralisk'],
+},
+
+{
+cat => 'lair',
+name => 'Mutalisk',
+min => 100,
+gas => 100,
+build => 26*$FM, # 40
+size => 1,
+unit => 2,
+race => 'zerg',
+organic => 1,
+air => 1,
+hp => 120,
+shield => 0,
+armor => 0,
+attack => {
+       ground => {
+               damage => [9, 10, 11, 12],
+               cmp => [9, 10, 11, 12],
+               splash => 1,
+       },
+       air => {
+               damage => [9, 10, 11, 12],
+               cmp => [9, 10, 11, 12],
+               splash => 1,
+       },
+       range => 3,
+},
+sight => 7,
+speed => 18,
+special => [],
+counter => ['templar', 'corsair', 'valkyrie'],
+},
+
+{
+cat => 'hive',
+name => 'Guardian',
+min => 150,
+gas => 200,
+build => 25.6*$FM, # 40
+base => 'mutalisk',
+size => 3,
+unit => 2,
+race => 'zerg',
+organic => 1,
+air => 1,
+hp => 150,
+shield => 0,
+armor => 2,
+attack => {
+       ground => {
+               damage => [20, 22, 24, 26],
+               cmp => [20, 22, 24, 26],
+       },
+       range => 8,
+},
+sight => 11,
+speed => 7,
+special => [],
+},
+
+{
+cat => 'hive',
+name => 'Devourer',
+min => 250,
+gas => 150,
+build => 25.6*$FM, # 40
+base => 'mutalisk',
+size => 3,
+unit => 2,
+race => 'zerg',
+organic => 1,
+air => 1,
+hp => 250,
+shield => 0,
+armor => 2,
+attack => {
+       air => {
+               damage => [25, 27, 29, 31],
+               cmp => [8, undef, undef, 9],
+               type => 'explosive',
+       },
+       range => 6,
+},
+sight => 10,
+speed => 15,
+counter => ['goliath', 'dragoon', 'scourge'],
+},
+
+{
+cat => 'hive',
+name => 'Defiler',
+min => 50,
+gas => 150,
+build => 32.5*$FM, # 50
+size => 2,
+unit => 2,
+race => 'zerg',
+organic => 1,
+hp => 80,
+shield => 0,
+armor => 1,
+attack => {
+},
+sight => 10,
+speed => 12,
+special => [
+       {
+               name => 'consume',
+               abbr => 'cs',
+               desc => 'gain energy by eating one of your own',
+               cost => -undef,
+               duration => 0,
+       },
+       {
+               name => 'dark swarm',
+               abbr => 'ds',
+               desc => 'protect 6x6m from ranged attacks for 60s',
+               range => 9,
+               cost => 50-40,
+               duration => 60,
+       },
+       {
+               name => 'plague',
+               abbr => 'pl',
+               desc => 'anything in its radius will loose 25 HP per second for 12s or until 1 HP left',
+               range => 9,
+               cost => 75-60,
+               duration => 12,
+       },
+],
+counter => ['archon', 'firebat'],
+},
+
+{
+cat => 'hive',
+name => 'Ultralisk',
+min => 200,
+gas => 200,
+build => 38.8*$FM, # 60
+size => 3,
+unit => 4,
+race => 'zerg',
+organic => 1,
+hp => 400,
+shield => 0,
+armor => 1,
+attack => {
+       ground => {
+               damage => [20, 23, 26, 29],
+               cmp => [40, 46, 52, 58],
+       },
+       range => 1,
+},
+sight => 7,
+speed => 16,
+upgrade => [
+       {
+               armor => 2,
+       },
+       {
+               speed => 21 - 16,
+       },
+],
+special => [],
+},
+
+]
diff --git a/sc.plp b/sc.plp
new file mode 100644 (file)
index 0000000..7ae2805
--- /dev/null
+++ b/sc.plp
@@ -0,0 +1,377 @@
+<(common.inc.plp)><:
+
+Html({
+       title => 'starcraft unit cheat sheets',
+       version => 'v1.0',
+       description => [
+               'Reference of StarCraft unit properties,'
+               . ' comparing various statistics of all the units in Brood War'
+               . ' including costs, damage, defense, speed, ranges, and abilities.',
+       ],
+       keywords => [qw'
+               starcraft game unit statistics stats comparison table sheet cheat
+               reference software attributes properties
+       '],
+       stylesheet => [qw'light'],
+});
+
+:>
+<h1>StarCraft unit cheat sheet</h1>
+
+<p>
+Unit properties as seen or measured in Brood War
+<span title="no known changes as of v1.16.1">version≥1.08</span>.
+</p>
+
+<style type="text/css">
+       .units {
+               border-spacing: 0;
+               width: auto;
+       }
+       .units th, .units td {
+               border-top: 1px solid #040;
+               padding: 0 0.2em;
+       }
+       .units {
+               border-bottom: 1px solid #040;
+       }
+       tr.alt td {
+               font-size: 70%;
+               border-top-style: dashed;
+       }
+       .units tr th:first-child {
+               padding-left: 0;
+       }
+       .units tr:hover:not(.race) {
+               background: #030;
+       }
+
+       table h3 {
+               padding: 1ex 0;
+               margin: 0;
+       }
+       .units th.cat {
+               font-size: 70%;
+               text-transform: uppercase;
+       }
+       .units td.cat {
+               border: 0;
+       }
+       .units thead th, .units tfoot th {
+               border: 0;
+               font-size: 70%;
+               font-weight: normal;
+       }
+       thead + * + tbody tr:first-child th {
+               border: 0; /* border below thead */
+       }
+
+       .unit-o {color: #FF8080} /* organic */
+       .unit-u {color: #8080FF} /* mechanic */
+       img.unit-o, img.unit-u {
+               margin-left: 0.2em;
+               vertical-align: middle;
+       }
+       .unit {
+               text-align: center;
+               white-space: nowrap;
+       }
+       .unit.unit-s {color: #CC7}
+       .unit.unit-m {color: #D86}
+       .unit.unit-l {color: #D77}
+       .hurt.unit-s::before {
+               content: '~';
+               color: #CC9;
+       }
+       .hurt.unit-l::before {
+               content: '*';
+               color: #D88;
+       }
+       .hurt .unit-splash {
+               position: absolute;
+       }
+       .hurtrel, .units .hurtrel {
+               padding-left: 1em;
+               font-size: 70%;
+               color: #AAA;
+       }
+       .unit-splash {
+               color: #8C8;
+       }
+       .unit-detect::before {
+               content: '!';
+               color: #4A4;
+               font-size: 70%;
+               vertical-align: super;
+       }
+       .unit-magic {
+               padding-left: 0.5em;
+       }
+
+       .val {
+               text-align: right;
+       }
+</style>
+
+<:
+sub coltoggle {
+       my ($name, $id) = @_;
+       return sprintf(
+               (defined $get{order} ? $get{order} eq $id : !$id) ? '%2$s ▼'
+                       : '<a href="?%s">%s</a>',
+               $id && "order=$id", $name
+       );
+}
+:><table class="units">
+<thead><tr>
+       <th></th>
+       <th><:= coltoggle('name', '') :></th>
+       <th class="val min"><img src="minerals.png" alt="min"></th>
+       <th class="val gas"><img src="gas.png" alt="gas"></th>
+       <th class="val time"><:= coltoggle(qw'build cost') :></th>
+       <th class="unit" colspan="2"><:= coltoggle(qw'size size') :></th>
+       <th class="val unit-hp">HP</th>
+       <th class="val unit-shield">shield</th>
+       <th class="val unit-armor">armor</th>
+       <th class="val hurt" colspan="2">ground</th>
+       <th class="val hurt" colspan="2">air</th>
+       <th class="val unit-range">range</th>
+       <th class="val unit-sight">sight</th>
+       <th class="val unit-speed">speed</th>
+       <th class="unit-magic">specials</th>
+</tr></thead>
+<tbody>
+<:
+sub showrange {
+       my ($row, @elements) = @_;
+       my ($min, $max);
+
+       my $value = $row;
+       $value = ref $value eq 'HASH' && $value->{$_} or last for @elements;
+       if (ref $value eq 'ARRAY') {
+               $min = $value->[0];
+               $max = $value->[-1];
+       }
+       else {
+               $min = $max = $value;
+       }
+       defined $min or return '';
+
+       if ($row->{upgrade}) {
+               for (@{ $row->{upgrade} }) {
+                       my $increase = $_ or next;
+                       $increase = ref $increase eq 'HASH' && $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 'cmp') {{
+               my $type = $row->{$elements[0]}->{$elements[1]}->{type} or next;
+               if ($type eq 'explosive') {
+                       $min /= 2;
+               }
+               elsif ($type eq 'implosive') {
+                       $min /= 4;
+               }
+               $min = int($min + .5);  # round halves up
+       }}
+
+       return $min == $max ? $min : "$min-$max";
+}
+
+       sub showattack {
+               my ($row, $area) = @_;
+               local $_ = $row->{attack}->{$area};
+
+               return '<td colspan="2" class="hurt">' unless $_;
+
+               my $tagbase = '<td class="val hurt';
+               if (ref $_ and $_->{type}) {
+                       if ($_->{type} eq 'explosive') {
+                               $tagbase .= ' unit-l';
+                       }
+                       elsif ($_->{type} eq 'implosive') {
+                               $tagbase .= ' unit-s';
+                       }
+               }
+               $tagbase .= '">';
+
+               my $out = showrange($row, 'attack', $area, 'damage');
+               $out .= '<span class="unit-splash">+</span>' if $_->{splash};
+               $out .= '<td class="val hurt hurtrel">' . showrange($row, 'attack', $area, 'cmp');
+               return $tagbase . $out;
+       }
+
+       sub showmagic {
+               my ($row) = @_;
+               my $specials = $row->{special} or return '';
+               return join ' ', map {
+                       sprintf '<span title="%s">%s</span>',
+                               join('',
+                                       $_->{name},
+                                       $_->{desc} ? ": $_->{desc}" : '',
+                                       $_->{range} ? sprintf(' (%s)', join ', ',
+                                               "range $_->{range}",
+#                                              "cost $_->{cost}",
+                                       ) : '',
+                               ),
+                               $_->{abbr},
+               } @$specials;
+       }
+
+       my $units = do 'sc-units.inc.pl';
+       die "Cannot open unit data: $_\n" for $! || $@ || ();
+       my $grouped = !exists $get{order};
+       if (exists $get{order}) {
+               $get{order} ||= '';
+               if ($get{order} eq 'size') {
+                       $_->{order} = $_->{unit}*8 + $_->{size} + $_->{hp}/512 + $_->{min}/8192 for @$units;
+               }
+               elsif ($get{order} eq 'cost') {
+                       $_->{order} = $_->{gas}*1.5 + $_->{min} + $_->{unit}/8 + $_->{build}/256/8 for @$units;
+               }
+               else {
+                       $units->[$_]->{order} = $_ for 0 .. $#$units;
+               }
+       }
+       my @rows = $grouped ? @$units : sort {$a->{order} <=> $b->{order}} @$units;
+
+       my ($race, $cat) = ('', '');
+       for (@rows) {
+               $race = $_->{race},
+               printf '</tbody><tbody id="%s"><tr class="race"><th colspan="18"><h2>%1$s</h2>'."\n", $race
+                       if $grouped and $race ne $_->{race};
+               $_->{cat} = $_->{race} if not $grouped;
+               my $sizechar = [qw/? s m l/]->[$_->{size}];
+               print(
+                       '<tr>',
+                       sprintf('<t%s class="cat">%s', $cat ne $_->{cat} ? ('h', $cat = $_->{cat}) : ('d', '&nbsp;')),
+                       '<td>' . $_->{name},
+                       '<td class="val min">' . ($_->{min} || '0'),
+                       '<td class="val gas">' . ($_->{gas} || ''),
+                       '<td class="val time">' . sprintf('%.0f', $_->{build} || '0'),
+                       sprintf('<td class="unit unit-%s">%s', $sizechar, ucfirst $sizechar),
+                       '<td class="val unit">' . join('',
+                               $_->{unit} ? $_->{unit} == .5 ? '½' : $_->{unit} : '&nbsp;',
+                               defined $_->{organic} && sprintf(
+                                       '<img class="unit-%s" src="s%s.png" alt="%s">',
+                                       $_->{organic} ? 'o' : 'u',
+                                       $_->{race} . ($_->{organic} ? 'o' : ''),
+                                       $_->{organic} ? 'o' : 'm'
+                               ),
+                       ),
+                       '<td class="val unit-hp">' . $_->{hp},
+                       '<td class="val unit-shield">' . ($_->{shield} ? $_->{shield}.'%' : '&nbsp;'),
+                       '<td class="val unit-armor">' . showrange($_, 'armor'),
+                       showattack($_, 'ground'),
+                       showattack($_, 'air'),
+                       '<td class="val unit-range">' . showrange($_, 'attack', 'range'),
+                       '<td class="val unit-sight">' . sprintf(
+                               $_->{detect} ? '<strong class="unit-detect">%s</strong>' : '%s',
+                               showrange($_, 'sight')
+                       ),
+                       '<td class="val unit-speed">' . showrange($_, 'speed'),
+                       '<td class="unit-magic">' . showmagic($_),
+                       "\n"
+               );
+
+               for my $alt (grep { $_->{alt} } @{ $_->{special} }) {
+                       print(
+                               '<tr class="alt"><td class="cat"><td colspan="9">' . $alt->{alt},
+                               showattack($alt, 'ground'),
+                               showattack($alt, 'air'),
+                               '<td class="val unit-range">' . showrange($alt, 'attack', 'range'),
+                               '<td class="val unit-sight">' . sprintf(
+                                       $alt->{detect} ? '<strong class="unit-detect">%s</strong>' : '%s',
+                                       showrange($alt, 'sight')
+                               ),
+                               '<td class="val unit-speed">' . showrange($alt, 'speed'),
+                               '<td>',
+                               "\n",
+                       );
+               }
+       }
+:>
+</tbody>
+</table>
+
+<h2>Legend</h2>
+
+<dl class="compact">
+<dt>cost
+       <dd>minerals+gas required to create one unit
+<dt>build
+       <dd>relative time needed to create at least one unit
+<dt>size
+       <dd><span class="unit unit-s">S</span>mall,
+               <span class="unit unit-m">M</span>edium,
+               or <span class="unit unit-l">L</span>arge unit damage
+       <dd>number of command points taken per unit
+       <dd><span class="unit unit-o">organic</span>/<span class="unit unit-u">mechanic</span> unit
+<dt>HP<dd>
+       total number of hitpoints (including shields)
+<dt>shield
+       <dd>percentage of HP in shields
+       <dd>shields always take full damage, irrelevant of unit size
+       <dd>does not take armor bonuses, but upgrades can decrease damage to any shield hit by upto 3
+<dt>armor
+       <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 large plasma hit of 12 to 4 armor 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
+               <span title="the time in which a dragoon fires a shot">a certain
+               amount</span> of time
+       <dd>splash damage<span class="unit-splash">+</span> hits nearby objects as well
+       <dd><span class="hurt unit-l">explosive</span> damage does only
+               50% damage to small units, 75% to medium, 100% to large
+       <dd><span class="hurt unit-s">concussive/plasma</span> damage does
+               25% to large, 50% medium, 100% to small units
+<dt>sight
+       <dd>range in which the unit detects other units
+       <dd><strong class="unit-detect">emphasis</strong> indicates ability to detect cloaked units
+<dt>range
+       <dd>maximum range of weapon (note siege tank also has a minimum range)
+<dt>speed
+       <dd>relative speed of movement (when in full motion, startup speed ignored)
+<dt>specials
+       <dd>special abilities
+       <dd>parentheses () indicated that it needs to be researched first
+       <dd>hover for description
+       <dd>range is maximum range required to activate
+       <dd>cost is percentage of total energy lost
+</dl>
+
+<p>
+When two values are given (1-2), second value indicates attribute after all
+possible upgrades.
+</p>
+
+<: exit :>
+<h2>Magic</h2>
+
+<ul class="maps"><:
+for (@$units) {
+       print '<li>', $_->{name};
+       print '<br>';
+#      my $units = {qw/protoss W  zerg B  terran R/}->{$_->{race}} x int($_->{unit} + .5);
+#      my $cost = int(($_->{min} + $_->{gas}) / 50 - $_->{unit}) || '';
+       my $units = {qw/protoss W  zerg B  terran R/}->{$_->{race}} x int($_->{gas} / 50) || '';
+       my $cost = int($_->{min} / 50) || 0;
+       my @desc;
+       push @desc, "Flying" if $_->{flying};
+       push @desc, "Cloaking" if $_->{cloak};
+       push @desc, "First Strike" if $_->{range} and $_->{range} >= 4;
+       my $att = $_->{attack}->{ground};
+       push @desc, "Trample" if $att and $att->{splash};
+       $att = $att->{damage} if $att;
+       $att = $att->[0] if ref $att eq "ARRAY";
+       $att = int($att / 5);
+       my $def = int($_->{hp} / 45);
+       printf "%s<br>%s<br>%s/%s", $cost . $units, join(",", @desc), $att, $def;
+}
+:></ul>
+