/*

	a simple disguise kit

	Marcus J. Ranum, 1990

	This works by overloading the player's description, and tagging
	their say() and emote() to new copies that echo differently,
	based on the type of creature the player is being.
*/


#define	DISNUM	#140

/* describe */
DISNUM.dsc = "a little metal box, with a label on the side reading, \"Acme Disguise Kit\". directions are printed in little letters on the side";

/* directions */
DISNUM.txt = "disguises: otter, teddydevil, toad, self";


func DISNUM.self
{
	@.emote("takes off the disguise, and puts it back into the disguise kit");

	#actor.say = #actor.osay;
	#actor.osay = NULL;
	#actor.emote = #actor.oemote;
	#actor.oemote = NULL;

	#actor.dsc = #actor.odsc;
	#actor.odsc = NULL;

	#actor.dsound = #actor.demot = NULL;
}


func DISNUM.teddydevil
{
	if(#actor.dsound != NULL ||  #actor.demot != NULL) {
		echo("you are already disguised.\n");
		return;
	}
	@.emote("puts on a teddydevil disguise from the disguise kit");

	#actor.osay = #actor.say;
	#actor.say = &DISNUM.Dsay;

	#actor.oemote = #actor.emote;
	#actor.emote = &DISNUM.Demote;

	#actor.odsc = #actor.dsc;
	#actor.dsc = str(#actor.nam," is a small red-furred teddydevil, with the usual little horns, pointy-tipped tail, and little hearted eyes.");

	#actor.dsound = "giggles";
	#actor.demot = "teddy-devilishly";
}


func DISNUM.otter
{
	if(#actor.dsound != NULL ||  #actor.demot != NULL) {
		echo("you are already disguised.\n");
		return;
	}
	@.emote("puts on an otter disguise from the disguise kit");

	#actor.osay = #actor.say;
	#actor.say = &DISNUM.Dsay;

	#actor.oemote = #actor.emote;
	#actor.emote = &DISNUM.Demote;

	#actor.odsc = #actor.dsc;
	#actor.dsc = str(#actor.nam," is a large, sleek otter, with velvety fur and dainty little paws. Perfectly groomed whiskers and neat little rounded ears create an effect that is both elegant and adorable");

	#actor.dsound = "chitters";
	#actor.demot = "otter-like";
}


func DISNUM.toad
{
	if(#actor.dsound != NULL ||  #actor.demot != NULL) {
		echo("you are already disguised.\n");
		return;
	}
	@.emote("puts on a toad disguise from the disguise kit");

	#actor.osay = #actor.say;
	#actor.say = &DISNUM.Dsay;

	#actor.oemote = #actor.emote;
	#actor.emote = &DISNUM.Demote;

	#actor.odsc = #actor.dsc;
	#actor.dsc = str(#actor.nam," is a large, lumpy toad, with beady little eyes, and a skin-tone that reminds you of a mud-puddle.");

	#actor.dsound = "croaks";
	#actor.demot = "toad-like";
}


func DISNUM.Dsay
{
	foreach $guy in (#actor._loc._ply) {
		echoto($guy,#actor.nam," ",#actor.dsound," \"");
		foreacharg $tmp
			echoto($guy,$tmp," ");
		echoto($guy,"\"\n");
	}
}


func DISNUM.Demote
{
	foreach $guy in (#actor._loc._ply) {
		echoto($guy,#actor.nam);
		foreacharg $tmp
			echoto($guy," ",$tmp);
		echoto($guy,", ",#actor.demot,"\n");
	}
}