use utf8;
use strict;

my $PPT = 32;  # tile size in pixels
my $FPS = 1000 / 56;  # frames per second on fast
# energy      += 8HP/frame ≈ .74 per second
# toss shield += 7HP/frame ≈ .65/s
# zerg regen  += 4HP/frame ≈ .37/s
my $SM = $FPS / $PPT;  # pixels per frame to tiles per second multiplication

[
'<span title="no known changes as of v1.16.1">version≥1.08</span>',

# protoss

{
cat => 'base',
req => ['nexus'],
name => 'Probe',
min => 50,
gas => 0,
build => 20,
suit => 1,
size => 23 / $PPT,
pop => 1,
cargo => 1,
race => 'protoss',
attr => {
	mech => 1,
},
hp => 20,
shield => 20,
armor => 0,
attack => [
	{
		anti => 1,
		name => "Particle Beam",
		damage => 5,
		cooldown => 22 / $FPS,
		range => 1,
	},
],
sight => 8,
speed => 4.92 * $SM,
counter => ['vulture', 'dark templar'],
special => [
	{
		name => 'worker',
		abbr => '⚒',
		desc => "warp-in buildings and gather minerals (65/minute) or gas (103/minute)",
	},
],
},

{
cat => 'base',
req => ['forge'],
name => 'Photon Cannon',
trans => {
	nl => 'kanon',
},
min => 150,
gas => 0,
build => 50,
suit => 3,
size => 2, # 41x33
race => 'protoss',
attr => {
	structure => 1,
},
hp => 100,
shield => 100,
armor => 0,
attack => [
	{
		anti => 3,
		name => 'STS/A Photon Cannon',
		damage => 20,
		cooldown => 22 / $FPS,
		range => 7,
	},
],
sight => 11,
detect => 1,
speed => 0,
counter => ['zergling', 'tank'],
},

{
cat => 'ground',
req => ['gateway'],
name => 'Zealot',
trans => {
	nl => 'zeloot',
},
min => 100,
gas => 0,
build => 40,
suit => 1,
size => 23 / $PPT, # x19
pop => 2,
cargo => 2,
race => 'protoss',
attr => {
	organic => 1,
},
hp => 100,
shield => 60,
armor => 1,
attack => [
	{
		anti => 1,
		name => "Psi Blades",
		damage => 8,
		count => 2,
		upgrade => 1,
		cooldown => 22 / $FPS,
		range => 15 / $PPT,
	},
],
sight => 7,
speed => 4 * $SM,
upgrade => [
	{
		name => 'Leg Enhancements',
		speed => (6 - 4) * $SM,
		min => 150,
		gas => 150,
		build => 133,
	},
],
counter => ['vulture'],
},

{
cat => 'ground',
req => ['gateway', 'cybernetics core'],
name => 'Dragoon',
trans => {
	nl => 'dragonder',
},
min => 125,
gas => 50,
build => 50,
suit => 3,
size => 32 / $PPT,
pop => 2,
cargo => 4,
race => 'protoss',
attr => {
	mech => 1,
},
hp => 100,
shield => 80,
armor => 1,
attack => [
	{
		anti => 3,
		name => "Phase Disruptor",
		damage => 20,
		upgrade => 2,
		type => 'explosive',
		cooldown => 30 / $FPS,
		range => 4,
	},
],
sight => 8,
speed => 5 * $SM,
upgrade => [
	{
		name => 'Singularity Charge',
		min => 150,
		gas => 150,
		build => 166,
		attack => [
			{
				range => 6 - 4,
			},
		],
	},
],
counter => ['zergling', 'zealot', 'tank'],
},

{
cat => 'ground',
name => 'High Templar',
trans => {
	nl => 'hoge tempelier',
	eo => 'alta templano',
},
min => 50,
gas => 150,
build => 50,
suit => 1,
size => 24 / $PPT,
pop => 2,
cargo => 2,
race => 'protoss',
attr => {
	organic => 1,
},
hp => 40,
shield => 40,
armor => 0,
sight => 7,
speed => 3.2 * $SM,
energy => 50,
capacity => 200,
upgrade => [
	{
		name => "Khaydarin Amulet",
		min => 150,
		gas => 150,
		energy => 62.5-50,
		capacity => 250-200,
	},
],
special => [
	{
		name => 'Psionic Storm',
		abbr => 'ps',
		min => 200,
		gas => 200,
		build => 120,
		desc => 'units in the area will receive upto 112 damage', # 14*8
		range => 9,
		cost => 75,
		duration => 3,
	},
	{
		name => 'Hallucination',
		abbr => 'hl',
		min => 150,
		gas => 150,
		build => 80,
		desc => 'creates two illusionary duplicates of a unit for 3 minutes',
		range => 7,
		cost => 80,
		duration => 3*60,
	},
],
counter => ['vulture', 'ultralisk'],
},

{
cat => 'ground',
name => 'Dark Templar',
trans => {
	nl => 'donkere tempelier',
	eo => 'malluma templano',
},
min => 125,
gas => 100,
build => 50,
suit => 1,
size => 25 / $PPT, # 24x26
pop => 2,
cargo => 2,
race => 'protoss',
attr => {
	organic => 1,
},
hp => 80,
shield => 40,
armor => 1,
attack => [
	{
		anti => 1,
		name => "Warp Blades",
		damage => 40,
		upgrade => 3,
		cooldown => 30 / $FPS,
		range => 15 / $PPT,
	},
],
sight => 7,
speed => 4.92 * $SM,
special => [
	{
		name => 'Cloaked',
		abbr => 'cl',
		desc => 'cloaked at all times',
		duration => -1,
	},
],
},

{
cat => 'psionic',
name => 'Archon',
trans => {
	nl => 'archont',
	eo => 'arĥono',
},
min => 100,
gas => 300,
build => 20,
base => ['templar', 'templar'],
suit => 3,
size => 32 / $PPT,
pop => 4,
cargo => 4,
race => 'protoss',
attr => {
	mech => 1,
},
hp => 10,
shield => 350,
armor => 0,
attack => [
	{
		anti => 3,
		name => "Psionic Shockwave",
		damage => 30,
		upgrade => 3,
		cooldown => 20 / $FPS,
		splash => 1,
		range => 2,
	},
],
sight => 8,
speed => 4.92 * $SM,
},

{
cat => 'psionic',
name => 'Dark Archon',
trans => {
	nl => 'donkere archont',
	eo => 'malluma arĥono',
},
min => 250,
gas => 200,
build => 20,
base => ['dark templar', 'dark templar'],
suit => 3,
size => 32 / $PPT,
pop => 4,
cargo => 4,
race => 'protoss',
attr => {
	mech => 1,
},
hp => 25,
shield => 200,
armor => 1,
sight => 10,
speed => 4.92 * $SM,
energy => 50,
capacity => 200,
upgrade => [
	{
		name => "Argus Talisman",
		min => 150,
		gas => 150,
		build => 166,
		capacity => 250-200,
	},
],
special => [
	{
		name => 'Feedback',
		abbr => 'fb',
		desc => 'targeted unit will lose its energy and receive damage equal to that amount',
		range => 10,
		cost => 50,
		duration => 0,
	},
	{
		name => 'Mind Control',
		abbr => 'mc',
		min => 200,
		gas => 200,
		build => 120,
		desc => 'permanently gives you control over any unit',
		range => 8,
		cost => 150,
		duration => 0,
	},
	{
		name => 'Maelstrom',
		abbr => 'ms',
		min => 100,
		gas => 100,
		build => 100,
		desc => 'field stunning all organic units for a few seconds',
		range => 10,
		cost => 100,
		duration => 180 / $FPS, # 7.5s fastest
	},
],
},

{
cat => 'aerial',
name => 'Scout',
trans => {
	nl => 'verkenner',
	eo => 'esploristo',
},
min => 275,
gas => 125,
build => 80,
suit => 3,
size => 36 / $PPT, # x32
pop => 3,
race => 'protoss',
attr => {
	mech => 1,
	flying => 1,
},
air => 1,
hp => 150,
shield => 100,
armor => 0,
attack => [
	{
		anti => 1,
		name => 'Dual Photon Blasters',
		damage => 8,
		upgrade => 1,
		cooldown => 30 / $FPS,
		range => 4,
	},
	{
		anti => 2,
		name => 'Anti-Matter Missiles',
		damage => 14,
		count => 2,
		upgrade => 1,
		type => 'explosive',
		cooldown => 22 / $FPS,
		range => 4,
	},
],
sight => 8,
speed => 5 * $SM,
upgrade => [
	{
		name => 'Apial Sensors',
		min => 100,
		gas => 100,
		build => 166,
		sight => 10 - 8,
	},
	{
		name => 'Gravitic Thrusters',
		min => 200,
		gas => 200,
		build => 166,
		speed => (6.67 - 5) * $SM,
	},
],
},

{
cat => 'aerial',
name => 'Corsair',
trans => {
	de => 'Korsar',
},
min => 150,
gas => 100,
build => 40,
suit => 2,
size => 36 / $PPT, # x32
pop => 2,
race => 'protoss',
attr => {
	mech => 1,
	flying => 1,
},
air => 1,
hp => 100,
shield => 80,
armor => 1,
attack => [
	{
		anti => 2,
		name => 'Neutron Flare',
		damage => 5,
		upgrade => 1,
		cooldown => 8 / $FPS,
		splash => 1,
		type => 'explosive',
		range => 5,
	},
],
sight => 9,
speed => 6.67 * $SM,
energy => 50,
capacity => 200,
upgrade => [
	{
		name => 'Argus Jewel',
		min => 100,
		gas => 100,
		build => 166,
		energy => 62.5-50,
		capacity => 250-200,
	},
],
special => [
	{
		name => 'Disruption Web',
		abbr => 'dw',
		min => 200,
		gas => 200,
		build => 80,
		desc => 'creates a field in which no ground unit/structure can attack',
		range => 9,
		cost => 125,
		duration => 24,
	},
],
counter => ['devourer', 'valkyrie'],
},

{
cat => 'aerial',
name => 'Carrier',
trans => {
	nl => 'vliegdekschip',
},
min => 350,
gas => 250,
build => 140,
suit => 3,
size => 64 / $PPT,
pop => 6,
race => 'protoss',
attr => {
	mech => 1,
	flying => 1,
},
hp => 300,
shield => 150,
armor => 4,
attack => [
	{
		anti => 3,
		dps => [17, undef, undef, 25],
		count => 4,
		range => 8,
	},
],
sight => 11,
speed => 3.33 * $SM,
special => [
	{
		name => 'Build Interceptor',
		alt => 'Interceptor',
		min => 25,
		build => 20,
		suit => 1,
		size => 16 / $PPT,
		pop => 0,
		race => 'protoss',
		attr => {
			mech => 1,
			flying => 1,
		},
		hp => 40,
		shield => 40,
		armor => 0,
		attack => [
			{
				anti => 3,
				name => 'Pulse Cannon',
				damage => 6,
				upgrade => 1,
				cooldown => 43 / $FPS, # approximately 37 according to liquipedia
				build => 20,
				range => 4,
			},
		],
		sight => 6,
		speed => 13.33 * $SM,
	},
],
upgrade => [
	{
		name => 'Carrier Capacity',
		attack => [
			{
				dps => [17, undef, undef, 24],
				count => 8-4,
			},
		],
	},
],
counter => ['wraith', 'corsair', 'scourge'],
},

{
cat => 'aerial',
name => 'Arbiter',
trans => {
	nl => 'arbiter',
},
min => 100,
gas => 350,
build => 160,
suit => 3,
size => 44 / $PPT,
pop => 4,
race => 'protoss',
attr => {
	mech => 1,
	flying => 1,
},
air => 1,
hp => 200,
shield => 150,
armor => 1,
attack => [
	{
		anti => 3,
		name => 'Phase Disruptor Cannon',
		damage => 10,
		upgrade => 1,
		cooldown => 45 / $FPS,
		type => 'explosive',
		range => 5,
	},
],
sight => 9,
speed => 5 * $SM,
energy => 50,
capacity => 200,
upgrade => [
	{
		name => 'Khaydarin Core',
		min => 150,
		gas => 150,
		build => 166,
		energy => 62.5-50,
		capacity => 250-200,
	},
],
special => [
	{
		name => 'cloaks',
		abbr => 'cs',
		desc => 'cloaks nearby friendly units except for other Arbiters',
		duration => -1,
	},
	{
		name => 'Stasis Field',
		abbr => 'sf',
		min => 150,
		gas => 150,
		build => 100,
		desc => 'traps all non-burrowed units (3x3m) for 40 seconds, making them frozen and undamagable',
		cost => 100,
		range => 9,
		duration => 1000 / $FPS,
	},
	{
		name => 'Recall',
		abbr => 'rc',
		min => 150,
		gas => 150,
		build => 100,
		desc => 'creates a 5x5m wormhole which transports units to the Arbiter',
		cost => 150,
		duration => 0,
	},
],
},

{
cat => 'robotic',
name => 'Reaver',
min => 200,
gas => 100,
build => 70,
suit => 3,
size => 32 / $PPT,
pop => 4,
cargo => 4,
race => 'protoss',
attr => {
	mech => 1,
},
hp => 100,
shield => 80,
armor => 0,
attack => [
	{
		anti => 1,
		damage => 100,
		cooldown => 60 / $FPS, # 30 after drop
		splash => 1,
		min => 15,
		build => 7,
		max => 5,
		range => 8,
	},
],
sight => 10,
speed => 1.78 * $SM,
upgrade => [
	{
		name => 'Scarab Damage',
		min => 200,
		gas => 200,
		build => 166,
		attack => [
			{
				damage => 125 - 100,
			},
		],
	},
	{
		attack => [
			{
				splash => 2 - 1,
			},
		],
	},
	{
		name => 'Increased Reaver Capacity',
		min => 200,
		gas => 200,
		build => 166,
		attack => [
			{
				max => 10-5,
			},
		],
	},
],
},

{
cat => 'robotic',
name => 'Observer',
trans => {
	nl => 'observeerder',
},
min => 25,
gas => 75,
build => 40,
suit => 1,
size => 32 / $PPT,
pop => 1,
race => 'protoss',
attr => {
	mech => 1,
	flying => 1,
},
air => 1,
hp => 40,
shield => 20,
armor => 0,
sight => 9,
detect => 1,
speed => 3.33 * $SM,
upgrade => [
	{
		name => "Sensor Array",
		min => 150,
		gas => 150,
		build => 133,
		sight => 11 - 9,
	},
	{
		name => "Gravitic Booster",
		min => 150,
		gas => 150,
		build => 166,
		speed => (5 - 3.33) * $SM,
	},
],
special => [
	{
		name => 'Cloaked',
		abbr => 'cl',
		desc => 'cloaked at all times',
		duration => -1,
	},
],
},

{
cat => 'robotic',
name => 'Shuttle',
trans => {
	fr => 'navette',
},
min => 200,
gas => 0,
build => 60,
suit => 3,
size => 40 / $PPT, # x32
pop => 2,
cargo => -8,
race => 'protoss',
attr => {
	mech => 1,
},
hp => 80,
shield => 60,
armor => 1,
sight => 8,
speed => 4.43 * $SM,
transport => 1,
upgrade => [
	{
		name => 'Gravitic Drive',
		min => 200,
		gas => 200,
		build => 166,
		speed => (6.67 - 4.43) * $SM,
	}
],
},

# terran

{
race => 'terran',
cat => 'base',
name => 'SCV', # T-280 Space Construction Vehicle
min => 50,
gas => 0,
build => 20,
suit => 1,
size => 23 / $PPT,
pop => 1,
cargo => 1,
race => 'terran',
attr => {
	mech => 1,
	organic => 1,
},
hp =>  60,
armor => 0,
attack => [
	{
		anti => 1,
		name => 'Fusion Cutter',
		damage => 5,
		cooldown => 15 / $FPS,
		range => 10 / $PPT,
	},
],
sight => 7,
speed => 4.92 * $SM,
special => [
	{
		name => 'worker',
		abbr => '⚒',
		desc => "construct or repair buildings and gather minerals (68/minute) or gas (103/minute)",
	},
],
},

{
cat => 'base',
name => 'Missile Turret',
trans => {
	nl => 'toren',
},
min => 75,
gas => 0,
build => 30,
suit => 3,
size => 2, # 33x49
race => 'terran',
attr => {
	structure => 1,
},
hp => 200,
armor => 0,
attack => [
	{
		anti => 2,
		name => 'Longbolt Missile',
		damage => 20,
		cooldown => 15 / $FPS,
		type => 'explosive',
		range => 7,
	},
],
sight => 11,
detect => 1,
speed => 0,
},

{
cat => 'barracks',
name => 'Marine',
trans => {
	nl => 'marinier',
},
min => 50,
gas => 0,
build => 24,
suit => 1,
size => 17 / $PPT, # x20
pop => 1,
cargo => 1,
race => 'terran',
attr => {
	organic => 1,
},
hp =>  40,
armor => 0,
attack => [
	{
		anti => 3,
		name => 'Gauss Rifle',
		damage => 6,
		upgrade => 1,
		cooldown => 15 / $FPS,
		range => 4,
	},
],
sight => 7,
speed => 4 * $SM,
upgrade => [
	{
		name => 'U-238 Shells',
		min => 150,
		gas => 150,
		build => 100,
		attack => [
			{
				range => 5 - 4,
			},
		],
	},
],
special => [
	{
		name => 'Stim Pack',
		abbr => 'sp',
		min => 100,
		gas => 100,
		build => 80,
		desc => 'doubles attack speed and faster movement for a few seconds at the cost of 10 health',
		speed => (6 - 4) * $SM,
		attack => [
			{
				anti => 3,
				cooldown => 7.5 / $FPS,
			},
		],
		duration => 220 / $FPS,
	},
],
},

{
cat => 'barracks',
name => 'Firebat',
min => 50,
gas => 25,
build => 24,
suit => 1,
size => 23 / $PPT, # x22
pop => 1,
cargo => 1,
race => 'terran',
attr => {
	organic => 1,
},
hp =>  50,
armor => 1,
attack => [
	{
		anti => 1,
		name => 'Flame Thrower',
		damage => 16,
		upgrade => 2,
		cooldown => 22 / $FPS,
		splash => 1,
		type => 'implosive',
		range => 1,
	},
],
sight => 7,
speed => 4 * $SM,
upgrade => [
],
special => [
	{
		name => 'Stim Pack',
		abbr => 'sp',
		min => 100,
		gas => 100,
		build => 80,
		desc => 'doubles attack speed and faster movement for a few seconds at the cost of 10 health',
		speed => (6 - 4) * $SM,
		attack => [
			{
				anti => 1,
				cooldown => 11 / $FPS,
			},
		],
		duration => 220 / $FPS,
	},
],
},

{
cat => 'barracks',
name => 'Ghost',
trans => {
	nl => 'geest',
},
min => 25,
gas => 75,
build => 50,
suit => 1,
size => 15 / $PPT, # x22
pop => 1,
cargo => 1,
race => 'terran',
attr => {
	organic => 1,
},
hp =>  45,
armor => 0,
attack => [
	{
		anti => 3,
		name => 'C-10 Canister Rifle',
		damage => 10,
		upgrade => 1,
		cooldown => 22 / $FPS,
		type => 'implosive',
		range => 7,
	},
],
sight => 9,
speed => 4 * $SM,
energy => 50,
capacity => 200,
upgrade => [
	{
		name => 'Ocular Implants',
		min => 150,
		gas => 150,
		build => 166,
		sight => 11 - 9,
#		special => {
#			ns => {
#				# nuke
#				range => 10-8,
#			},
#		},
	},
	{
		name => 'Moebius Reactor',
		min => 150,
		gas => 150,
		build => 166,
		energy => 62.5-50,
		capacity => 250-200,
	},
],
special => [
	{
		name => 'Personal Cloaking',
		abbr => 'cl',
		min => 100,
		gas => 100,
		build => 80,
		desc => 'has the ability to cloak',
		cost => 25,
		maint => 1, # per second
	},
	{
		name => 'Lockdown',
		abbr => 'ld',
		min => 200,
		gas => 200,
		build => 100,
		desc => 'disables a mechanical unit completely for one minute',
		range => 8,
		cost => 100,
		duration => 60,
	},
	{
		name => 'Nuclear Strike',
		abbr => 'ns',
		min => 200,
		gas => 200,
		pop => 8,
		desc => 'guides a nuclear missile which will do 500 damage',
		duration => 14+3,
		range => 8,
	},
],
},

{
cat => 'barracks',
name => 'Medic',
min => 50,
gas => 25,
build => 30,
suit => 1,
size => 17 / $PPT, # x20
pop => 1,
cargo => 1,
race => 'terran',
attr => {
	organic => 1,
},
hp =>  60,
armor => 1,
sight => 9,
speed => 4 * $SM,
energy => 50,
capacity => 200,
upgrade => [
	{
		name => 'Caduceus Reactor',
		min => 150,
		gas => 150,
		build => 166,
		energy => 62.5-50,
		capacity => 250-200,
	},
],
special => [
	{
		name => 'Healing',
		abbr => 'hl',
		desc => 'heals 2 HP of friendly biological units',
		range => 2,
		cost => 1,
		duration => 1,
	},
	{
		name => 'Restoration',
		abbr => 'rs',
		min => 100,
		gas => 100,
		build => 80,
		desc => 'removes harmful effects (Lockdown, Flare, Irradiate, Plague, Ensnare, Parasite) from a unit',
		range => 6,
		cost => 50,
		duration => 0,
	},
	{
		name => 'Optic Flare',
		abbr => 'of',
		min => 100,
		gas => 100,
		build => 80,
		desc => 'reduces the sight of target unit to 1',
		range => 9,
		cost => 75,
		duration => 0,
	},
],
},

{
cat => 'factory',
name => 'Vulture',
trans => {
	nl => 'gier',
},
min => 75,
gas => 0,
build => 30,
suit => 2,
size => 32 / $PPT,
pop => 2,
cargo => 2,
race => 'terran',
attr => {
	mech => 1,
},
hp =>  80,
armor => 0,
attack => [
	{
		anti => 1,
		name => 'Fragmentation Grenade',
		damage => 20,
		upgrade => 2,
		cooldown => 30 / $FPS,
		type => 'implosive',
		range => 5,
	},
],
sight => 8,
speed => 6.4 * $SM,
upgrade => [
	{
		name => 'Ion Thrusters',
		min => 100,
		gas => 100,
		build => 100,
		speed => (10 - 6.4) * $SM,
	},
],
special => [
	{
		name => 'Spider Mine',
		abbr => 'sm',
		min => 100,
		gas => 100,
		build => 80,
		alt => 'Spider Mine',
		desc => 'burrows a mine which will automaticaly target non-hovering enemy units',
		amount => 3,
		attr => {
			mech => 1,
		},
		hp => 20,
		suit => 1,
		size => 15 / $PPT,
		armor => 0,
		attack => [
			{
				anti => 1,
				damage => 125,
				splash => 1,
				type => 'explosive',
				range => 3, # to walk, melee to explode
			},
		],
		sight => 3,
		speed => 16 * $SM,
    },
],
},

{
cat => 'factory',
name => 'Tank',
trans => {
	nl => 'tank',
},
min => 150,
gas => 100,
build => 50,
suit => 3,
size => 32 / $PPT,
pop => 2,
cargo => 4,
race => 'terran',
attr => {
	mech => 1,
},
hp => 150,
armor => 1,
attack => [
	{
		anti => 1,
		name => 'Arclite Cannon',
		damage => 30,
		upgrade => 3,
		cooldown => 37 / $FPS, # 15 after drop
		type => 'explosive',
		range => 7,
	},
],
sight => 10,
speed => 4 * $SM,
special => [
	{
		name => 'Siege Mode',
		abbr => 'sg',
		min => 150,
		gas => 150,
		build => 80,
		alt => 'Sieged Tank',
		attack => [
			{
				anti => 1,
				name => 'Arclite Shock Cannon',
				damage => 70,
				upgrade => 5,
				cooldown => 75 / $FPS,
				splash => 1,
				type => 'explosive',
				range => 12, # minimum 2
			},
		],
		speed => 0,
	},
],
},

{
cat => 'factory',
name => 'Goliath',
trans => {
	nl => 'goliat',
},
min => 100,
gas => 50,
build => 40,
suit => 3,
size => 32 / $PPT,
pop => 2,
cargo => 2,
race => 'terran',
attr => {
	mech => 1,
},
hp => 125,
armor => 1,
attack => [
	{
		anti => 1,
		name => 'Twin Autocannons',
		damage => 12,
		upgrade => 1,
		cooldown => 22 / $FPS, # 15 after drop
		range => 6,
	},
	{
		anti => 2,
		name => 'Hellfire Missile Pack',
		damage => 10,
		count => 2,
		upgrade => 2,
		type => 'explosive',
		cooldown => 22 / $FPS,
		range => 5,
	},
],
sight => 8,
speed => 4.57 * $SM,
upgrade => [
	{
		name => 'Charon Boosters',
		min => 100,
		gas => 100,
		build => 133,
		attack => [
			{},
			{
				range => 8 - 5,
			},
		],
	},
],
},

{
cat => 'starport',
name => 'Wraith',
min => 150,
gas => 100,
build => 60,
suit => 3,
size => 38 / $PPT, # x30
pop => 2,
race => 'terran',
attr => {
	mech => 1,
	flying => 1,
},
air => 1,
hp => 120,
armor => 0,
attack => [
	{
		anti => 1,
		name => 'Burst Lasers',
		damage => 8,
		upgrade => 1,
		cooldown => 30 / $FPS,
		range => 5,
	},
	{
		anti => 2,
		name => 'Gemini Missiles',
		damage => 20,
		upgrade => 2,
		cooldown => 22 / $FPS,
		type => 'explosive',
		range => 5,
	},
],
sight => 7,
speed => 6.67 * $SM,
energy => 50,
capacity => 200,
special => [
	{
		name => 'Cloak',
		abbr => 'cl',
		min => 150,
		gas => 150,
		build => 100,
		desc => 'has the ability to cloak',
		cost => 25,
		maint => 1, # /second
	},
],
upgrade => [
	{
		name => 'Apollo Reactor',
		min => 200,
		gas => 200,
		build => 166,
		energy => 62.5-50,
		capacity => 250-200,
	},
],
},

{
cat => 'starport',
name => 'Battle Cruiser',
trans => {
	nl => 'slagkruiser',
},
min => 400,
gas => 300,
build => 133,
suit => 3,
size => 75 / $PPT, # x59
pop => 6,
race => 'terran',
attr => {
	mech => 1,
	flying => 1,
},
air => 1,
hp => 500,
armor => 3,
attack => [
	{
		anti => 3,
		name => 'ATS/A Laser Battery',
		damage => 25,
		upgrade => 3,
		cooldown => 30 / $FPS,
		range => 6,
	},
],
sight => 11,
speed => 2.5 * $SM,
energy => 50,
capacity => 200,
special => [
	{
		name => 'Yamato Gun',
		abbr => 'yg',
		min => 100,
		gas => 100,
		build => 120,
		desc => 'blast doing 260 explosive damage to a target',
		attack => [
			{
				anti => 3,
				damage => 260,
				type => 'explosive',
				range => 10,
			},
		],
		cost => 150,
	},
],
upgrade => [
	{
		name => 'Colossus Reactor',
		min => 150,
		gas => 150,
		build => 166,
		energy => 62.5-50,
		capacity => 250-200,
	},
],
},

{
cat => 'starport',
name => 'Science Vessel',
trans => {
	nl => 'wetenschapsvaartuig',
},
min => 100,
gas => 225,
build => 80,
suit => 3,
size => 65 / $PPT, # x50
pop => 2,
race => 'terran',
attr => {
	mech => 1,
	flying => 1,
},
air => 1,
hp => 200,
armor => 1,
sight => 10,
detect => 1,
speed => 5 * $SM,
energy => 50,
capacity => 200,
special => [
	{
		name => 'Defensive Matrix',
		abbr => 'dm',
		desc => 'gives target unit a shield of 250HP for one minute',
		range => 10,
		cost => 100,
		duration => 55,
	},
	{
		name => 'EMP Shockwave',
		abbr => 'ep',
		min => 200,
		gas => 200,
		build => 120,
		desc => 'units in 3-matrix radius will lose all energy and shields',
		range => 8,
		cost => 100,
	},
	{
    	name => 'Irradiate',
		abbr => 'ir',
		min => 200,
		gas => 200,
		build => 80,
		desc => 'organic units will suffer upto 250 damage over 30s',
		range => 9,
		cost => 75,
		attack => {
			damage => 250,
			splash => 1,
		},
		duration => 25,
	},
],
upgrade => [
	{
		name => 'Titan Reactor',
		min => 150,
		gas => 150,
		build => 166,
		energy => 62.5-50,
		capacity => 250-200,
	},
],
},

{
cat => 'starport',
name => 'Valkyrie',
trans => {
	nl => 'walkure',
},
min => 250,
gas => 125,
build => 50,
suit => 3,
size => 49 / $PPT, # x37
pop => 3,
race => 'terran',
attr => {
	mech => 1,
	flying => 1,
},
air => 1,
hp => 200,
armor => 2,
attack => [
	{
		anti => 2,
		name => 'Halo Rockets',
		damage => 6,
		upgrade => 1,
		cooldown => 64 / $FPS,
		splash => 1,
		type => 'explosive',
		count => 8,
		range => 6,
	},
],
sight => 8,
speed => 6.6 * $SM,
},

{
cat => 'starport',
name => 'Dropship',
min => 100,
gas => 100,
build => 50,
suit => 3,
size => 49 / $PPT, # x37
pop => 2,
cargo => -8,
race => 'terran',
attr => {
	mech => 1,
	flying => 1,
},
air => 1,
hp => 150,
armor => 1,
sight => 8,
speed => 5.47 * $SM,
transport => 1,
},

# zerg

{
race => 'zerg',
cat => 'base',
name => 'Drone',
min => 50,
gas => 0,
build => 20,
suit => 1,
size => 23 / $PPT,
pop => 1,
cargo => 1,
race => 'zerg',
attr => {
	organic => 1,
},
hp => 40,
armor => 0,
attack => [
	{
		anti => 1,
		name => 'Spines',
		damage => 5,
		cooldown => 22 / $FPS,
		range => 1,
	},
],
sight => 7,
speed => 4.92 * $SM,
special => [
	{
		name => 'worker',
		abbr => '⚒',
		desc => "morph into buildings and gather minerals (67/minute) or gas (103/minute)",
	},
],
},

{
cat => 'base',
name => 'Overlord',
min => 100,
gas => 0,
build => 40,
suit => 3,
size => 50 / $PPT,
pop => -9,
cargo => 0,
race => 'zerg',
attr => {
	organic => 1,
	flying => 1,
},
air => 1,
hp => 200,
armor => 0,
cargo => 0,
sight => 9,
detect => 1,
speed => .83 * $SM,
transport => 1,
upgrade => [
	{
		name => 'Ventral Sacs',
		min => 200,
		gas => 200,
		build => 160,
		cargo => -8,
	},
	{
		name => 'Antennae',
		min => 150,
		gas => 150,
		build => 133,
		sight => 11 - 9,
	},
	{
		name => 'Pneumatized Carapace',
		min => 150,
		gas => 150,
		build => 133,
		speed => (3.33 - .83) * $SM,
	},
],
},

{
cat => 'creep',
name => 'Larva',
trans => {
	nl => 'larve',
},
build => 20,
suit => 1,
size => 16 / $PPT,
pop => 0,
race => 'zerg',
attr => {
	organic => 1,
},
hp => 25,
armor => 10,
sight => 4,
speed => 0.1, # more or less
special => [
	{
		name => 'transform',
		alt => 'Egg',
		trans => {
			nl => 'ei',
		},
		suit => 3,
		race => 'zerg',
		organic => undef, # unchanged from parent
		hp => 200,
		armor => 10,
		sight => 4,
		speed => 0,
	},
],
},

{
cat => 'creep',
name => 'Sunken Colony',
min => 175,
gas => 0,
build => 20,
suit => 3,
size => 2, # 48x48
race => 'zerg',
attr => {
	structure => 1,
},
hp => 300,
armor => 2,
attack => [
	{
		anti => 1,
		name => 'Subterranean Tentacle',
		damage => 40,
		cooldown => 32 / $FPS,
		type => 'explosive',
		range => 7,
	},
],
sight => 10,
speed => 0,
},

{
cat => 'creep',
name => 'Spore Colony',
min => 175,
gas => 0,
build => 20,
suit => 3,
size => 2, # 48x48
race => 'zerg',
attr => {
	structure => 1,
},
hp => 400,
armor => 0,
attack => [
	{
		anti => 2,
		name => 'Seeker Spores',
		damage => 15,
		cooldown => 15 / $FPS,
		range => 7,
	},
],
sight => 10,
detect => 1,
speed => 0,
},

{
cat => 'hatchery',
name => 'Zergling',
min => 25,
gas => 0,
build => 28, # for 2
suit => 1,
size => 16 / $PPT,
pop => 0.5,
cargo => 1,
race => 'zerg',
attr => {
	organic => 1,
},
hp => 35,
armor => 0,
attack => [
	{
		anti => 1,
		name => 'Claws',
		damage => 5,
		upgrade => 1,
		cooldown => 8 / $FPS,
		range => 15 / $PPT,
	},
],
sight => 5,
speed => 5.49 * $SM,
upgrade => [
	{
		name => 'Metabolic Boost',
		min => 100,
		gas => 100,
		build => 80,
		speed => (8.36 - 5.49) * $SM,
	},
	{
		name => 'Adrenal Glands',
		min => 200,
		gas => 200,
		build => 80,
		attack => [
			{
				cooldown => (6 - 8) / $FPS,
			},
		],
	},
],
counter => ['archon', 'templar', 'firebat'],
},

{
cat => 'hatchery',
name => 'Hydralisk',
min => 75,
gas => 25,
build => 28,
suit => 2,
size => 21 / $PPT, # x23
pop => 1,
cargo => 2,
race => 'zerg',
attr => {
	organic => 1,
},
hp => 80,
armor => 0,
attack => [
	{
		anti => 3,
		name => 'Needle Spines',
		damage => 10,
		upgrade => 1,
		cooldown => 15 / $FPS,
		type => 'explosive',
		range => 4,
	},
],
sight => 6,
speed => 3.66 * $SM,
upgrade => [
	{
		name => 'Grooved Spines',
		min => 150,
		gas => 150,
		build => 100,
		attack => [
			{
				range => 5 - 4,
			},
		],
	},
	{
		name => 'Muscular Augments',
		min => 150,
		gas => 150,
		build => 100,
		speed => (5.57 - 3.66) * $SM,
	},
	{
		name => 'Lurker Aspect',
		min => 200,
		gas => 200,
		build => 120,
	},
],
},

{
cat => 'lair',
name => 'Lurker',
min => 125,
gas => 125,
base => ['hydralisk'],
build => 40,
suit => 2,
size => 32 / $PPT,
pop => 2,
cargo => 4,
race => 'zerg',
attr => {
	organic => 1,
},
hp => 125,
armor => 1,
attack => [
	{
		anti => 1,
		name => 'Subterranean Spines',
		damage => 20,
		upgrade => 2,
		cooldown => 37 / $FPS,
		splash => 'line',
		range => 6,
	},
],
sight => 8,
speed => 5.82 * $SM,
},

{
cat => 'lair',
name => 'Queen',
min => 100,
gas => 100,
build => 50,
suit => 2,
size => 48 / $PPT,
pop => 2,
race => 'zerg',
attr => {
	organic => 1,
	flying => 1,
},
air => 1,
hp => 120,
armor => 0,
sight => 10,
speed => 6.67 * $SM,
energy => 50,
capacity => 200,
special => [
	{
		name => 'Infest CC',
		abbr => 'ic',
		desc => 'assimilate a damaged Terran Command Center to produce infested marines',
		duration => 0,
	},
	{
		name => 'Parasite',
		abbr => 'ps',
		desc => "shares an infected unit's vision",
		range => 12,
		cost => 75,
	},
	{
		name => 'Ensnare',
		abbr => 'es',
		min => 100,
		gas => 100,
		build => 80,
		desc => 'slows units downto half speed',
		range => 9,
		cost => 75,
		duration => 25,
	},
	{
		name => 'Spawn Broodling',
		abbr => 'sb',
		min => 100,
		gas => 100,
		build => 80,
		desc => 'spawn one inside an enemy unit killing it',
		range => 9,
		cost => 150,

		count => 2,
		alt => 'Broodling',
		suit => 1,
		size => 19 / $PPT,
		pop => 0,
		attr => {
			organic => 1,
		},
		hp => 30,
		armor => 0,
		attack => [
			{
				anti => 1,
				name => 'Toxic Spores',
				damage => 4,
				upgrade => 1,
				cooldown => 15 / $FPS,
				range => 2 / $PPT,
			},
		],
		sight => 5,
		speed => 6 * $SM,
	},
],
},

{
cat => 'lair',
name => 'Infested Terran',
min => 100,
gas => 50,
build => 40,
suit => 1,
size => 17 / $PPT, # x20
pop => 1,
race => 'zerg',
attr => {
	organic => 1,
},
hp => 60,
armor => 0,
attack => [
	{
		anti => 1,
		name => 'Suicide',
		damage => 500,
		splash => 1,
		type => 'explosive',
		range => 3 / $PPT,
	},
],
sight => 5,
speed => 5.82 * $SM,
},

{
cat => 'lair',
name => 'Scourge',
min => 12,
gas => 38,
build => 30, # for 2
suit => 1,
size => 24 / $PPT,
pop => 0.5,
race => 'zerg',
attr => {
	organic => 1,
	flying => 1,
},
air => 1,
hp => 25,
armor => 0,
attack => [
	{
		anti => 2,
		name => 'Suicide',
		damage => 110,
		range => 3 / $PPT,
	},
],
sight => 5,
speed => 6.67 * $SM,
counter => ['cannon', 'goliath', 'hydralisk'],
},

{
cat => 'lair',
name => 'Mutalisk',
min => 100,
gas => 100,
build => 40,
suit => 1,
size => 44 / $PPT,
pop => 2,
race => 'zerg',
attr => {
	organic => 1,
	flying => 1,
},
air => 1,
hp => 120,
armor => 0,
attack => [
	{
		anti => 3,
		name => 'Glave Wurm',
		damage => 9,
		upgrade => 1,
		cooldown => 30 / $FPS,
		splash => 'bounce',
		range => 3,
	},
],
sight => 7,
speed => 6.67 * $SM,
special => [
	{
		alt => 'Cocoon',
		suit => 3,
		size => 32 / $PPT,
		attr => {
			organic => 1,
			flying => 1,
		},
		hp => 200,
		armor => 0,
		sight => 4,
		speed => 0,
	},
	#TODO: glaive
],
counter => ['templar', 'corsair', 'valkyrie'],
},

{
cat => 'hive',
name => 'Guardian',
min => 150,
gas => 200,
build => 40,
base => ['mutalisk'],
suit => 3,
size => 44 / $PPT,
pop => 2,
race => 'zerg',
attr => {
	organic => 1,
	flying => 1,
},
air => 1,
hp => 150,
armor => 2,
attack => [
	{
		anti => 1,
		name => 'Acid Spore',
		damage => 20,
		upgrade => 2,
		cooldown => 30 / $FPS,
		range => 8,
	},
],
sight => 11,
speed => 2.5 * $SM,
},

{
cat => 'hive',
name => 'Devourer',
min => 250,
gas => 150,
build => 40,
base => ['mutalisk'],
suit => 3,
size => 44 / $PPT,
pop => 2,
race => 'zerg',
attr => {
	organic => 1,
	flying => 1,
},
air => 1,
hp => 250,
armor => 2,
attack => [
	{
		anti => 2,
		name => 'Corrosive Acid',
		damage => 25,
		upgrade => 2,
		cooldown => 100 / $FPS,
		type => 'explosive',
		range => 6,
	},
],
sight => 10,
speed => 5 * $SM,
counter => ['goliath', 'dragoon', 'scourge'],
},

{
cat => 'hive',
name => 'Defiler',
min => 50,
gas => 150,
build => 50,
suit => 2,
size => 27 / $PPT, # x25
pop => 2,
cargo => 2,
race => 'zerg',
attr => {
	organic => 1,
},
hp => 80,
armor => 1,
sight => 10,
speed => 4 * $SM,
energy => 50,
capacity => 200,
special => [
	{
		name => 'Consume',
		abbr => 'cs',
		min => 100,
		gas => 100,
		build => 100,
		desc => 'gain energy by eating one of your own',
		cost => -50,
		duration => 0,
	},
	{
		name => 'Dark Swarm',
		abbr => 'ds',
		desc => 'protect 6x6m from ranged attacks for 60s',
		range => 9,
		cost => 100,
		duration => 60,
	},
	{
		name => 'Plague',
		abbr => 'pl',
		min => 200,
		gas => 200,
		build => 100,
		desc => 'anything in its radius will loose 25 HP per second for 12s or until 1 HP left',
		range => 9,
		cost => 150,
		duration => 12,
	},
],
upgrade => [
	{
		name => 'Metasynaptic Node',
		min => 150,
		gas => 50,
		build => 166,
		energy => 62.5-50,
		capacity => 250-200,
	},
],
counter => ['archon', 'firebat'],
},

{
cat => 'hive',
name => 'Ultralisk',
min => 200,
gas => 200,
build => 60,
suit => 3,
size => 38 / $PPT, # x32
pop => 4,
cargo => 4,
race => 'zerg',
attr => {
	organic => 1,
},
hp => 400,
armor => 1,
attack => [
	{
		anti => 1,
		name => 'Kaiser Blades',
		damage => 20,
		upgrade => 3,
		cooldown => 15 / $FPS,
		range => 25 / $PPT,
	},
],
sight => 7,
speed => 5.12 * $SM,
upgrade => [
	{
		name => 'Chitinous Plating',
		min => 150,
		gas => 150,
		build => 133,
		armor => 2,
	},
	{
		name => 'Anabolic Synthesis',
		min => 200,
		gas => 200,
		build => 133,
		speed => (8.1 - 5.12) * $SM,
	},
],
},

]
