use utf8;

my %CONS = ( # producing building
	r => ["rally point", 'pm'],
);
my %UNIT = ( # any unit
	m => ["move", 'pm'],
	s => ["stop", 'pm'],
);
my %UNITF = ( # fighter
	p => ["patrol", 'pm'],
	h => ["hold", 'pm'],
);
my %UNITA = (
	a => ["attack", 'pm'],
);
my %UNITB = (
	b => ["burrow", 'ci'],
);
my %UNITH = (
	%UNITA,
	g => ["gather", 'pm'],
	c => ["return cargo", 'pm'],
);

'' => {
},

P => {
	desc => 'Protoss Probe',
	%UNIT, %UNITH,
	b => ["build structure", 'me modePb'],
	v => ["build adv$sign{_}anced structure", 'me modePv'],
},
Pb => {
	desc => 'Protoss Probe build',
	n => ["nexus", 'mo modePbn'],
	p => ["pylon", 'me'],
	a => ["assimi$sign{_}lator", 'me'],
	g => ["gate$sign{_}way", 'mo modePbg'],
	f => ["forge", 'mv modePbf'],
	c => ["photon cannon", 'me'],
	y => ["cyber$sign{_}netics core", 'mv modePby'],
	b => ["shield batt$sign{_}ery", 'me modePbb'],
},
Pbn => {
	desc => 'Protoss Nexus',
	%CONS,
	p => ["probe", 'co modeP'],
},
Pbg => {
	desc => 'Protoss Gateway',
	%CONS,
	z => ["zealot", 'co'],
	d => ["dragoon", 'cp'],
	t => ["high templar", 'cp modePbgt'],
	k => ["dark templar", 'cp modePbgk'],
},
Pbgt => {
	desc => 'Protoss High Templar',
	%UNIT, %UNITF,
	t => ["psionic storm", 'ci'],
	l => ["halluci$sign{_}nation", 'ci'],
	r => ["archon warp", 'cp'],
},
Pbgk => {
	desc => 'Protoss Dark Templar',
	%UNIT, %UNITF, %UNITA,
	r => ["dark archon meld", 'cp modePbgkr'],
},
Pbgkr => {
	desc => 'Protoss Dark Archon',
	%UNIT, %UNITF,
	f => ["feed$sign{_}back", 'pm'],
	c => ["mind control", 'ci'],
	e => ["mael$sign{_}strom", 'ci'],
},
Pbf => {
	desc => 'Protoss Forge',
	w => ["ground weap$sign{_}on$sign{_}s", 'mv'],
	a => ["ground armor", 'mv'],
	s => ["plasma shields", 'mv'],
},
Pby => {
	desc => 'Protoss Cybernetics Core',
	w => ["air weap$sign{_}on$sign{_}s", 'mv'],
	a => ["air armor", 'mv'],
	s => ["dragoon range", 'mv'],
},
Pbb => {
	desc => 'Protoss Shield Battery',
	r => ["recharge shields", 'pm'],
},
Pv => {
	desc => 'Protoss Probe advanced build',
	r => ["robotics facility", 'mo modePvr'],
	s => ["stargate", 'mo modePvs'],
	c => ["citadel of adun", 'mv modePvc'],
	b => ["support bay", 'mv modePvb'],
	f => ["fleet beacon", 'mv modePvf'],
	t => ["templar archives", 'mv modePvt'],
	o => ["observa$sign{_}tory", 'mv modePvo'],
	a => ["arbiter tribunal", 'mv modePva'],
},
Pvr => {
	desc => 'Protoss Robotics facility',
	%CONS,
	s => ["shuttle", 'co'],
	o => ["observer", 'cp'],
	v => ["reaver", 'cp modePvrv'],
},
Pvrv => {
	desc => 'Protoss Reaver',
	%UNIT, %UNITF, %UNITA,
	r => ["scarab", 'co'],
},
Pvs => {
	desc => 'Protoss Stargate',
	%CONS,
	s => ["scout", 'co'],
	c => ["carrier", 'cp modePvsc'],
	a => ["arbiter", 'cp modePvsa'],
	o => ["corsair", 'co modePvso ext'],
},
Pvsc => {
	desc => 'Protoss Carrier',
	%UNIT, %UNITF, %UNITA,
	i => ["inter$sign{_}ceptor", 'co'],
},
Pvsa => {
	desc => 'Protoss Arbiter',
	%UNIT, %UNITF, %UNITA,
	r => ["recall"],
	t => ["statis field"],
},
Pvso => {
	desc => 'Protoss Corsair',
	%UNIT, %UNITF, %UNITA,
	d => ["disrup$sign{_}tion web", 'ci'],
},
Pvc => {
	l => ["leg en$sign{_}hancem$sign{_}ent$sign{_}s", 'mv'],
},
Pvb => {
	s => ["scarab damage", 'mv'],
	c => ["reaver capacity", 'mv'],
	g => ["gravitic drive", 'mv'],
},
Pvf => {
	a => ["apial sensors", 'mv'],
	g => ["gravitic thrust$sign{_}ers", 'mv'],
	c => ["carrier capacity", 'mv'],
	d => ["disrup$sign{_}tion web", 'mv ext'],
	j => ["argus jewel", 'mv'],
},
Pvt => {
	desc => 'Protoss Templar Archives',
	t => ["psionic storm", 'mv'],
	h => ["halluci$sign{_}nation", 'mv'],
	k => ["khayda$sign{_}rin amul$sign{_}et", 'mv'],
#	c => ["mind control?", 'mv'], #TODO
	e => ["mael$sign{_}strom", 'mv'],
	t => ["argus talisman", 'mv'],
},
Pvo => {
	desc => 'Protoss Observatory',
	g => ["gravitic booster", 'mv'],
	s => ["sensor array", 'mv'],
},
Pva => {
	desc => 'Protoss Arbiter Tribunal',
	r => ["recall", 'mv'],
	s => ["stasis field", 'mv'],
	k => ["khayda$sign{_}rin core", 'mv'],
},

Z => {
	desc => 'Zerg Larva',
	d => ["drone", 'co modeZd'],
	z => ["zergling", 'cp'],
	o => ["overlord", 'co modeZo'],
	h => ["hydra$sign{_}lisk", 'cp modeZh'],
	q => ["queen", 'mv modeZq'],
},
Zd => {
	desc => 'Zerg Drone',
	%UNIT, %UNITH, %UNITB,
	b => ["basic mutat$sign{_}ion", 'me modeZdb'],
	v => ["advance$sign{_}d mutat$sign{_}ion", 'me modeZdv'],
},
Zdb => {
	desc => 'Zerg basic Drone mutation',
	h => ["hatche$sign{_}ry", 'mo modeZdbh'],
	c => ["creep colony", 'mo modeZdbc'],
	e => ["extrac$sign{_}tor", 'me'],
	s => ["spawning pool", 'mv modeZdbs'],
	v => ["evolution chamber", 'mv modeZdbv'],
	d => ["hydra$sign{_}lisk den", 'mv modeZdbd'],
},
Zdbh => {
	desc => 'Zerg Hatchery',
	%CONS,
	b => ["burrow", 'me'],
	s => ["select larvae", 'pm modeZ'],
	l => ["lair", 'mo modeZdbhl'],
},
Zdbhl => {
	desc => 'Zerg Lair',
	%CONS,
	b => ["burrow", 'me'],
	v => ["ventral sacs", 'mv'],
	a => ["antennae", 'mv'],
	p => ["pneumatized carapace", 'mv'],
	h => ["hive", 'mo modeZdbhlh'],
},
modeZdbhlh => {
	desc => 'Zerg Hive',
	%CONS,
	b => ["burrow", 'me'],
	v => ["ventral sacs", 'mv'],
	a => ["antennae", 'mv'],
	p => ["pneumatized carapace", 'mv'],
},
Zdbs => {
	desc => 'Zerg Spawning Pool',
	m => ["metabol boost", 'mv'],
	a => ["adrenal glands", 'mv'],
},
Zdbv => {
	m => ["melee attack$sign{_}s", 'mv'],
	a => ["missile attack$sign{_}s", 'mv'],
	c => ["carapace", 'mv'],
},
Zdbd => {
	desc => 'Zerg Hydralisk Den',
	m => ["muscular augments", 'mv'],
	g => ["grooved spines", 'mv'],
	l => ["lurker aspect", 'mv'],
},
Zdv => {
	desc => 'Zerg advanced Drone mutation',
},

