use utf8;

my %CONS = (
	r => "rally point",
);
my %UNIT = (
	m => "move",
	s => "stop",
	p => "patrol",
	h => "hold",
	a => "attack",
	b => "burrow",
	g => "gather",
	c => "return cargo",
);

{

key => {
	(map { 'P'.$_ => $UNIT{$_} } qw'm s a g c'),
	Pb => "build structure",
	Pv => "build adv$sign{_}anced structure",

	Pbn => "nexus",
	Pbp => "pylon",
	Pba => "assimi$sign{_}lator",
	Pbg => "gate$sign{_}way",
	Pbf => "forge",
	Pbc => "photon cannon",
	Pby => "cyber$sign{_}netics core",
	Pbb => "shield batt$sign{_}ery",

	(map { 'Pbn'.$_ => $CONS{$_} } 'r'),
	Pbnp => "probe",

	(map { 'Pbg'.$_ => $CONS{$_} } 'r'),
	Pbgz => "zealot",
	Pbgd => "dragoon",
	Pbgt => "high templar",
	Pbgk => "dark templar",

	(map { 'Pbgt'.$_ => $UNIT{$_} } qw'm s p h'),
	t => "psionic storm",
	l => "halluci$sign{_}nation",
	r => "archon warp",

	(map { 'Pbgk'.$_ => $UNIT{$_} } qw'm s p h a'),
	Pbgkr => "dark archon meld",

	(map { 'Pbgkr'.$_ => $UNIT{$_} } qw'm s p h'),
	Pbgkrf => "feed$sign{_}back",
	Pbgkrc => "mind control",
	Pbgkre => "mael$sign{_}strom",

	Pbfw => "ground weap$sign{_}on$sign{_}s",
	Pbfa => "ground armor",
	Pbfs => "plasma shields",

	Pbyw => "air weap$sign{_}on$sign{_}s",
	Pbya => "air armor",
	Pbys => "dragoon range",

	Pbbr => "recharge shields",

	Pvr => "robotics facility",
	Pvs => "stargate",
	Pvc => "citadel of adun",
	Pvb => "support bay",
	Pvf => "fleet beacon",
	Pvt => "templar archives",
	Pvo => "observa$sign{_}tory",
	Pva => "arbiter tribunal",

	(map { 'Pvr'.$_ => $CONS{$_} } 'r'),
	Pvrs => "shuttle",
	Pvro => "observer",
	Pvrv => "reaver",

	(map { 'Pvrv'.$_ => $UNIT{$_} } qw'm s p h a'),
	Pvrvr => "scarab",

	(map { 'Pvs'.$_ => $CONS{$_} } 'r'),
	Pvss => "scout",
	Pvsc => "carrier",
	Pvsa => "arbiter",
	Pvso => "corsair",

	(map { 'Pvsc'.$_ => $UNIT{$_} } qw'm s p h a'),
	Pvsci => "inter$sign{_}ceptor",

	(map { 'Pvsa'.$_ => $UNIT{$_} } qw'm s p h a'),
	Pvsar => "recall",
	Pvsat => "statis field",

	(map { 'Pvso'.$_ => $UNIT{$_} } qw'm s p h a'),
	Pvsod => "disrup$sign{_}tion web",

	Pvcl => "leg en$sign{_}hancem$sign{_}ent$sign{_}s",

	Pvbs => "scarab damage",
	Pvbc => "reaver capacity",
	Pvbg => "gravitic drive",

	Pvfa => "apial sensors",
	Pvfg => "gravitic thrust$sign{_}ers",
	Pvfc => "carrier capacity",
	Pvfd => "disrup$sign{_}tion web",
	Pvfj => "argus jewel",

	Pvtt => "psionic storm",
	Pvth => "halluci$sign{_}nation",
	Pvtk => "khayda$sign{_}rin amul$sign{_}et",
#	Pvtc => "mind control?", #TODO
	Pvte => "mael$sign{_}strom",
	Pvtt => "argus talisman",

	Pvog => "gravitic booster",
	Pvos => "sensor array",

	Pvar => "recall",
	Pvas => "stasis field",
	Pvak => "khayda$sign{_}rin core",

	Zd => "drone",
	Zz => "zergling",
	Zo => "overlord",
	Zh => "hydra$sign{_}lisk",
	Zq => "queen",

	(map { 'Zd'.$_ => $UNIT{$_} } qw'm s a g c b'),
	Zdb => "basic mutat$sign{_}ion",
	Zdv => "advance$sign{_}d mutat$sign{_}ion",

	Zdbh => "hatche$sign{_}ry",
	Zdbc => "creep colony",
	Zdbe => "extrac$sign{_}tor",
	Zdbs => "spawning pool",
	Zdbv => "evolution chamber",
	Zdbd => "hydra$sign{_}lisk den",

	(map { 'Zdbh'.$_ => $CONS{$_} } 'r'),
	Zdbhb => "burrow",
	Zdbhs => "select larvae",
	Zdbhl => "lair",

	(map { 'Zdbhl'.$_ => $CONS{$_} } 'r'),
	Zdbhlb => "burrow",
	Zdbhlv => "ventral sacs",
	Zdbhla => "antennae",
	Zdbhlp => "pneumatized carapace",
	Zdbhlh => "hive",

	(map { 'Zdbhlh'.$_ => $CONS{$_} } 'r'),
	Zdbhlhb => "burrow",
	Zdbhlhv => "ventral sacs",
	Zdbhlha => "antennae",
	Zdbhlhp => "pneumatized carapace",

	Zdbsm => "metabol boost",
	Zdbsa => "adrenal glands",

	Zdbvm => "melee attack$sign{_}s",
	Zdbva => "missile attack$sign{_}s",
	Zdbvc => "carapace",
	Zdbdm => "muscular augments",
	Zdbdg => "grooved spines",
	Zdbdl => "lurker aspect",
},

mode => {
	P => 'Protoss Probe',
	Pb => 'Protoss Probe build',
	Pbn => 'Protoss Nexus',
	Pbg => 'Protoss Gateway',
	Pbgt => 'Protoss High Templar',
	Pbgk => 'Protoss Dark Templar',
	Pbgkr => 'Protoss Dark Archon',
	Pbf => 'Protoss Forge',
	Pby => 'Protoss Cybernetics Core',
	Pbb => 'Protoss Shield Battery',
	Pv => 'Protoss Probe advanced build',
	Pvr => 'Protoss Robotics facility',
	Pvrv => 'Protoss Reaver',
	Pvs => 'Protoss Stargate',
	Pvsc => 'Protoss Carrier',
	Pvsa => 'Protoss Arbiter',
	Pvso => 'Protoss Corsair',
	Pvt => 'Protoss Templar Archives',
	Pvo => 'Protoss Observatory',
	Pva => 'Protoss Arbiter Tribunal',

	Z => 'Zerg Larva',
	Zd => 'Zerg Drone',
	Zdb => 'Zerg basic Drone mutation',
	Zdbh => 'Zerg Hatchery',
	Zdbhl => 'Zerg Lair',
	Zdbhlh => 'Zerg Hive',
	Zdbs => 'Zerg Spawning Pool',
	Zdbd => 'Zerg Hydralisk Den',
	Zdv => 'Zerg advanced Drone mutation',
},

}
