/*
 *
 * Hamlet
 *
 * Persons
 *
 * code and data dealing with people (and horses)
 *
 */

var Person = new Object;
NUM_CHRS = 0;
function ch(name,pname,firstplace,description,talks,subjects,reactions,presents, mannerisms)
{
	Person[++NUM_CHRS] = new Object;
	Person[NUM_CHRS].id = NUM_CHRS;
	Person[NUM_CHRS].name = name.toLowerCase();
	Person[NUM_CHRS].fullname = name;
	Person[NUM_CHRS].pname = pname; // true for proper names
	Person[NUM_CHRS].firstplace = firstplace; // starting place
	Person[NUM_CHRS].description = description;
	Person[NUM_CHRS].talks = talks; // default talks
	Person[NUM_CHRS].subjects = subjects; // talks about specific tokens
	Person[NUM_CHRS].reactions = reactions; // reactions to 'foo claudius'
	Person[NUM_CHRS].presents = presents; // reactions to certain Things
	Person[NUM_CHRS].ishere = (pname ? name : ('A ' + name)) + ' is here.' ;
	Person[NUM_CHRS].mannerisms = mannerisms ? mannerisms : '';
	eval(name.toLowerCase() + ' = Person[' + NUM_CHRS + '];');
	eval('words(\'' + name.toLowerCase() + '\')');
}

function default_react(action,person)
{
	var str = '';
	if(action=='fight')
		str = 'You take a swing, but ' + the_person(person) + ' ducks it.'
	else if(action=='kiss')
		str = 'I don\'t think you and ' + the_person(person) +
		  ' are close enough for that.'
	else if(action=='wake' && asleep(person))
		str = capitalise(the_person(person)) + ' won\'t wake up.'
	else if(action=='wake')
		str = capitalise(the_person(person)) + ' isn\'t asleep!';

	if(str=='')
		return(false);

	say(str);
	return(true);
}

ch('horse',
false,
stable,
'A big chestnut horse with blotchy fur and a goofy expression on \
its face.',
'No one can talk to a horse, of course!',
'carrot::\"Neeeeeiiiiiggggghhhhhh!!!!\"',
'ride::You attempt to clamber up on to the horse\'s back. It immediately \
bucks and throws you to the ground. Ouch!/\
fight::The horse kicks you in the ribs. Oof!',
'carrot::*feed_horse()'
);
function feed_horse()
{
	take_away(carrot);
	say('The horse gulps the carrot down gratefully.');
	sgs('horse',0);
}

ch('ghost',
false,
balcony,
'He looks a little paler and more transparent than you remember \
him, but this is unmistakably the ghost of your late father. He \
is dressed in full armour and looks a little bit peeved, just \
as you would if you were dead.',
'\"Don\'t forget to avenge my death!\"\
/\"Wooooooooo!\"\
/\"Have you killed your uncle yet?\"\
/\"Never mind that, get a move on and kill Claudius!\"',
'ophelia::\"You could do better.\"\
/claudius::\"Kill the bastard!\"\
/bat::\"Nuisance, aren\'t they?\"\
/gertrude::\"Such a fine woman, your mother... take care of \
her, son.\"\
/robin::=A thoroughly decent bloke.\
/macbeth::\"Sshhh! That\'s bad luck!\"\
/mist::\"I just wanted to get your attention. It\'s gone now.\"',
'fight::Your attack passes harmlessly through the ghost.',
'body::The ghost rolls his eyes. \"I knew you\'d screw up.\"',
'The ghost clears his throat impatiently.');
ghost.speech = '\"Hey Dad,\" you say cheerily. \"What\'s up?\"\n\
\"Hamlet,\" says the old man after a sigh, \"you remember \
how I was found mysteriously dead in the orchard a couple of \
weeks back? Well... it\'s like this. Your uncle Claudius \
poisoned me so he could become king and marry your mother. \
I\'d be awfully grateful if you could kill him for me.\" \n\
\"All right,\" you say, \"I\'ll do it!\"\n\
Your life suddenly seems to have purpose.';
function talk_ghost()
{
	if(gs('ghosttalk')==0)
	{
		say(ghost.speech);
		sgs('ghosttalk',1);
		inc_score();			
	}
	else
		talk_to(ghost);
}

ch('Horatio',
true,
outside_bedroom,
'Your best friend Horatio, an amiable man with a \
brown suit and a ginger afro. He looks a little more \
nervous than usual. In fact, he looks as though he\'s \
seen a ghost.',
'Horatio says: \"Hamlet! You\'re not going to believe \
this, but I saw your father\'s ghost out on the balcony \
last night!\"',
'ghost::\"I saw your father\'s ghost on the balcony!\"\
/ophelia::\"Pretty, but dim. I think you should get shot \
of her.\"\
/robin::=Nice fella.\
/laertes::\"He\'s a bit of a bully. The French are welcome \
to him, if you ask me.\"\
/claudius::\"Git, isn\'t he?\"\
/macbeth::\"Hi, careful what you\'re saying, Hammers, we \
don\'t want the place falling down!\"\
/rosencrantz::\"Ah, they\'re only following orders.\"\
/guildenstern::\"Ah, they\'re only following orders.\"\
/gertude::\"Oh no... I\'m staying well clear of that subject.\"',
'',
'',
'Horatio is shivering a bit.');

ch('Ophelia',
true,
ophelias_room,
'Ophelia is about your age, skinny, dark haired, and wearing \
a fluffy white dress and badly applied make-up. For some \
reason, she is your girlfriend. She\'s not particularly bad \
company, at least not until she opens her mouth.',
'\"Hewwo honeybunny!\" says Ophelia.\
/\"How\'th my wovewy boyfwiend Hamwetty-Wamwetty?\" croons \
Ophelia.\
/Ophelia gives you a big sloppy kiss on the cheek. Yeeuch!',
'laertes::\"Waerteth ith my wovewy bwother!\" says Ophelia. \
\"He\'th on howwiday in Fwance at the moment though.\"\
/postcard::\"It\'th fwom my bwother Waerteth!\"\
/polonius::\"My daddy?\" Ophelia\'s eyes widen. \"I\'d just \
die if anything howwibwe happened to him!\"\
/robin::=He\'th tho handthome!\
/ghost::\"Don\'t be a thiwwy biwwy, honey bunny!\" says \
Ophelia. \"Evewyone knowth there\'th no thuch thing ath \
ghothtth!\"\
/body::Ophelia looks confused. \"What dead body, Hamwet? \
Hath thomebody dwopped dead?\"\
/lake::Ophelia says, \"I wike my pwetty wake!\"\
/portrait::\"That\'th my daddy,\" says Ophelia, rushing over \
and hugging the portrait. \"I wove him I wove him I wove \
him!\"\
/window::\"I wike my nithe big window,\" says Ophelia. \"It \
giveth me a wovewy view!\"\
/lisp::\"Actually, I just put it on to be cute.\"\
/macbeth::\"Tthhhh! Don\'t you know it\'th bad wuck to thay \
the name of the howwid Thcottith man?\"\
/dress::\"Do you wike it?\" asks Ophelia, twirling. \"It wath tho \
exthpenthive, I jutht had to buy it!\"\
/nunnery::Ophelia sobs. \"You\'re thuch a meanie!\"',
'kiss::You kiss Ophelia carefully on the cheek, and try to be \
as subtle as possible about wiping your mouth afterwards.\
/fight::\"You\'re tho thiwwy, Hamwet,\" giggles Ophelia as she \
ducks your attack.',
'form::\"No, Hamlet. Acting ith no caweer for a wethpectable young lady.\"\
/bat::\"Yuch! That\'th howwid!\"\
/body::*ophelias_death()');
function ophelias_death()
{
	take_away(body);
	set_thingloc(body,ophelias_room);
	say('You drop the body at Ophelia\'s feet.\n\
She shrieks \"Thomebody\'th killed my daddy!\" then \
bursts into tears and hurls herself out of the window. \
A SPLOSH! comes from below.\n\
You feel a bit guilty.');
	set_personloc(ophelia,nowhere);
	sgs('ancfnrl',1);
	inc_score();
}

ch('Claudius',
true,
throne_room,
'Claudius is a tall, lanky, slimy looking man with beady eyes \
and an evil grin. He is wearing your dad\'s stately robes, which \
hang a little too baggily on him.',
'*talk_king()',
'gertrude::\"I\'ve had your mum!\"\
/robin::=A truly great man. Unlike you.\
/ophelia::\"That girl ought to go and jump in a lake.\"\
/macbeth::\"Oh, you don\'t believe that superstitious nonsense do \
you? MACBETH MACBETH MACBETH MACBETH MACBETH! See, doesn\'t do \
any harm.\"\
/ghost::\"I wouldn\'t count on anyone believing that story,\" says \
Claudius. \"Firstly, there\'s no such thing as ghosts. Secondly, if \
there were, they\'d be notorious liars.\"',
'fight::*fight_king()',
'crown::\"No thanks, I\'ve already got one.\"\
/chalice::Claudius sniffs the potion. \"What\'s this? A poisoned chalice? \
I\'m not falling for that one!\"',
'Claudius cackles to himself.');
function talk_king()
{
	say('\"I\'m glad I killed your dad!\"');
}
function fight_king()
{
	if(personloc(gertrude)!=nowhere)
	{
		say('Just as you are pulling your punch, Gertrude storms into the room.\n\
\"Hamlet!\" she snaps. \"How many times have I told you NOT to murder \
your relatives! I know it\'s difficult for a Shakespearian lead, but...\"\n\
You grudgingly apologise to both of them. Gertrude leaves, mollified.');
		return;
	}
	
	if(!in_inv(dagger))
	{
		say('You punch Claudius in the face. He hits you back. Oof!');
		return;
	}
	
	say('You take out your dagger, sneak up behind quietly Claudius, and \
stealthily stab him a dozen times in the back while screaming gutturally. \
He falls to the floor, bleeding, with a surprised expression on his face.\n\
His body vanishes in a cloud of convenient green smoke.\n\
Well, I guess that\'s your dad avenged.... you feel oddly unfulfilled. \
Maybe there is something else you have to do.');
	set_personloc(claudius,nowhere);
	inc_score();
}

ch('Gertrude',
true,
queens_bedchamber,
'Gertrude is your typical Scandinavian bombshell, with blonde \
pigtails hanging from a horned helmet, and an hourglass \
figure just slightly covered by a skimpy leather armour. She \
is rather attractive in a Mrs. Robinson sort of way. \
Why, if she wasn\'t your mother... er, anyway, there she is.',
'\"Look at you son, you\'re all grubby!\"\n\
Gertrude produces a tissue from a pocket, licks it, and \
wipes your face.\
/\"Gosh, I\'m thirsty!\"',
// Gertrude's speech about the body makes no sense if Polonius
// isn't dead yet. Oh well.
'claudius::\"Your uncle Claudius is a good man, \
and I won\'t have you calling him a murderer! Go to your room!\"\
/ghost::\"Don\'t tell ridiculous lies, son!\"\
/body::\"Oh, Hamlet... you really should be more careful.\"\
/curtain::\"Pay no attention to the man behind the curtain!\"\
/polonius::\"Pay no attention to the man behind the curtain!\"\
/robin::=A respectable young man. Why can\'t you be more like him?\
/flute::\"It\'s a hobby of mine.\"\
/chalice::\"I wouldn\'t say no to a drink...\"\
/macbeth::\"QUIET!\"\
/whisky::\"Oh no, I don\'t touch the strong stuff. Get me something sweet.\"\
/drink::\"I wouldn\'t say no to a drink...\"',
'kiss::Get a grip. She\'s your own mother.\
/swear::La, la, la, I\'m not listening\
/fight::\"HA-YAH!\" Gertrude blocks your attack with an expert karate chop.',
'form::\"Don\'t be stupid, son. I can\'t act.\"\
/whisky::\"Oh no, I don\'t touch the strong stuff. Get me something sweet.\"\
/chalice::*gertrude_dies()'
);
function gertrude_dies()
{
	take_away(chalice);
	say('Gertrude snatches the chalice and downs it.\n\
\"Thanks son, I\'m parched... glug glug... eeuch, I feel a bit \
queasy...\"\n\
She coughs for a few seconds, then collapses on the floor.\n\
Her body vanishes in a cloud of convenient green smoke.');
	set_personloc(gertrude,nowhere);
	inc_score();
}

ch('sailor',
false,
ship_denmark,
'A sailor in a blue suit. He has a big white beard and reeks \
of frozen fish fingers.',
'\"Arrrr!\"\
/\"All aboard!\"\
/\"Tickets please!\"\
/\"Shiver me timbers!\"',
'treasure::\"Arr, I buried mine many moons ago. Scuttle me if I can \
remember where though.\"\
/robin::=Arrr! There be one landlubber worth his salt!\
/macbeth::\"Less o\' the language, landlubber, ye might sink the ship!\"',
'fight::\"Arrr, ye mutinous dog!\"\nThe sailor punches you in the face. Ouch!',
'coins::\"Arr! I don\'t be wantin\' the scurvy stuff back. \
You keep it.\"\
/chest::\"Arr! I don\'t be wantin\' the scurvy stuff back. \
You keep it.\"\
/ticket::*do_ticket()');
function do_ticket()
{
	if(gs('tktused')==0)
	{
		sgs('tktused',1);
		inc_score();
	}
	
	var from = personloc(sailor);
	var to = 0;
	var to_country = '';
	if(from==ship_denmark)
	{
		to = ship_england;
		to_country = 'England';
	}
	else
	{
		to = ship_denmark;
		to_country = 'Denmark';
	}
	
	say('The sailor takes the ticket, nods his head with an \"Arrr!\", \
hands the ticket back to you, and accordingly sails the ship to ' +
to_country + '.');
	
	set_heroloc(to);
	for(var i=1;i<=NUM_THNG;++i)
		if(thingloc(Thing[i])==from)
			set_thingloc(Thing[i],to);
	for(var i=1;i<=NUM_CHRS;++i)
		if(personloc(Person[i])==from)
			set_personloc(Person[i],to);
}

ch('Othello',
true,
guardroom,
'Othello is a Venetian Moor, dressed in traditional garb. \
He bears an uncanny resemblance to Laurence Olivier \
with boot polish on his face.',
'\"I bet my wife\'s out cheating on me!\"/\
Othello mutters something like "My wife... brazen tart...\"',
'desdemona::\"I bet Desdemona\'s cheating on me again, the wench!\"\
/macbeth::\"Quiet there!\"\
/robin::=We could use more of his type in the service.\
/handkerchief::\"I gave Desdemona a handkerchief as a present \
once. She promised she\'d never give it away.\"',
'fight::*die(\'Othello pulls a scimitar out of his robes and neatly \
bisects you.\', randomDeath())',
'handkerchief::*do_hanky()');
function do_hanky()
{
	take_away(handkerchief);
	say('\"My handkerchief!\" Othello cries, grabbing it.\
\"So she is cheating on me, the little slapper! I\'m REALLY \
mad now!\" At that, he draws a scimitar from his robes, \
stabs himself through the heart, and falls down dead.\n\
His body vanishes in a cloud of convenient green smoke.');
	set_personloc(othello,nowhere);
	inc_score();
}

ch('gravedigger',
false,
graveyard,
'The gravedigger is a curious little fellow with straggly hair. \
He is wearing a straw hat, a pair of wellies, and for some reason, \
a pink dress. Under his arm he is carrying a big, rusty metal shovel.',
'\"I never wanted to be a gravedigger. I wanted to be a famous \
actress!\"',
'skull::\"Its name\'s Yorick,\" says the gravedigger. \"And it\'s my \
friend!\"\
/dress::\"What, this old thing? Just something I threw on.\"\
/macbeth::The gravedigger claps his hand over your mouth. \"Don\'t mention \
the Scottish Play!\"\
/robin::=Nice bloke. Gave me this dress.\
/shovel::\"No, you can\'t have my shovel!\" says the gravedigger. \
\"It\'s one o\' them fam\'ly heirlooms!\"/\
form::\"Just one audition... that could be my big break...\"/\
theatre::\"I always wanted to be a star of the stage... sigh...\"',
'fight::The gravedigger bashes you in the face with his shovel. SPANG!',
'form::*do_form()\
/bat::\"Sorry, mate,\" says the gravedigger, \"I only buries people.\"\
/body::=No way. My shift\'s nearly over!',
'The gravedigger displaces a few clods of earth with his shovel.\
/The gravedigger quietly hums a show tune.');
function do_form()
{
	take_away(form);
	say('The gravedigger gives a little squeal of glee. \
\"Oh my gosh!\" he says. \"At last, my chance to be a star!\"\n\
He grabs the form, kisses it, drops his shovel, and runs off.');
	set_thingloc(shovel,graveyard);
	set_personloc(gravedigger,nowhere);
	inc_score();
}

ch('Rosencrantz',
true,
lobby,
'Rozencrantz is one of the two royal guardsmen. He is tall, skinny and blonde \
and has a habit of curious habit of scratching his hair and whimpering.',
'\"Er... sorry, Hamlet, we\'d let you out, it\'s just that you\'re \
a bit nuts.\"',
'certificate::\"Well, if you could prove you were sane, that would \
resolve everything.\
/ghost::\"Aw, come on, Hammers, you don\'t really believe all that stuff, \
do you?\"\
/macbeth::\"I say, no need for that kind of language.\"\
/guildenstern::\"He\'s my best buddy!\"\
/robin::=Good bloke.\
/claudius::\"He\'s a tough boss, but if we do as he says, he doesn\'t torture us \
that often.\"',
'',
'certificate::*show_certificate()');

ch('Guildenstern',
true,
lobby,
'Guildenstern is one of the two royal guardsmen. He is short and fat, \
with a toothbrush moustache. In addition to his palatial uniform, \
he is wearing a bowler hat.',
'\"Er... sorry, Hamlet, we\'d let you out, it\'s just that you\'re \
a bit nuts.\"',
'certificate::\"Well, if you could prove you were sane, that would \
resolve everything.\"\
/macbeth::\"I say, no need for that kind of language.\"\
/ghost::\"Aw, come on, Hammers, you don\'t really believe all that stuff, \
do you?\"\
/rosencrantz::\"That klutz is always getting me into fine messes!\"\
/robin::=Good bloke.\
/claudius::\"He\'s a tough boss, but if we do as he says, he doesn\'t torture us \
that often.\"',
'',
'certificate::*show_certificate()');
function show_certificate()
{
	say('Rosencrantz and Guildenstern between them make a fairly \
good job of reading the certificate.\n\
\"Well,\" says Rosencrantz.\n\
\"This all seems to be in order...\" says Guildenstern.\n\
\"...your Highness...\"\n\
\"...your Royal Saneness...\"\n\
\"...so, er, we\'ll just be away then.\"\n\
They hand the certificate back to you and totter off.');
	
	inc_score();
	set_personloc(rosencrantz,nowhere);
	set_personloc(guildenstern,nowhere);
}

ch('Richard',
true,
bosworth,
'King Richard III of England. He is a large man with a beard. He is \
crouched down, apparently in some pain, with blood on his armour.',
'\"A horse! A horse! My kingdom for a horse!\"\
/\"Oooh, I could really do with a horse right now...\"',
'horse::\"Could you get me one? I\'d let you be king!\"\
/robin::=I only wish he\'d coded this game a little better, so I could \
be called Richard III.\
/macbeth::\"Sssh! Don\'t go shouting that about, or there\'ll be trouble!\"',
'fight::*die(\'Richard produces an eight foot sword from nowhere, and promptly \
runs you through. Ouch.\', randomDeath());',
'');

ch('Banquo',
true,
outside_dunsinane,
'Banquo is short and rather smug looking. He is wearing a breastplate \
with a Scottish flag painted on it, and has a rapier hanging from his \
belt.',
'\"Can\'t talk now, I\'ve got a tower to guard!\"\
/\"No common scum in here\"',
'macbeth::\"Quiet! Don\'t you know anything?"\
/tower::\"Historic tower, this. Listed building, don\'t you know.\"',
'fight::*die("Banquo draws his sword, shows off with a few poncy fencing \
moves, and then cuts off your head.", randomDeath());',
''
);

ch('Laertes',
true,
nowhere,
'Ophelia\'s brother, Laertes, is a stocky youth with his hair over his \
eyes, dressed for a funeral. He is glowering at you with a look of \
undisguised hatred and muttering under his breath.',
'\"You killed my sister and my dad, you bastard!\"\
/\"You killed my dad and my sister. I\'m up for a fight.\"\
/\"Come on, Hamlet, let\'s fight this out like men!\"',
'fight::\"I\'ll be glad to fight you. How about daggers, right now?\"\
/ophelia::\"You tell me, you thug, you killed her!\"\
/polonius::\"You killed my dad you horrible little wanker!\"\
/robin::=At least he doesn\'t go around killing people\'s relatives!\
/claudius::\"He told me all about what you did while I was away.\"',
'fight::*fight_laertes()',
'body::\"OH PISS OFF!\"'
);
function fight_laertes()
{
	if(!in_inv(dagger))
	{
		say('Laertes sneers. \"No, not a fist fight. Go get yourself \
a dagger and we\'ll sort this out like real Shakespearians.\"');
		return;
	}

	var txt = 'Well, this is it. The big fight scene.\n';
	
	if(gs('sc')<MAX_SCORE-1)
	{
		die (txt + 'But somehow you don\'t quite feel ready for it.\n\
You\'re not really concentrating as you draw your dagger; you\'re just thinking \
that you haven\'t avenged your dad yet, and Claudius is still king, and \
this tunic isn\'t really your colour. Laertes gets the better of you \
and stabs you to death while your mind is elsewhere.');
		return;
	}

	// win... hooray!
	inc_score();
	die(txt + 'You and Laertes face each other, draw your daggers, \
pad nervously around each other... and you\'re off!\n\
After three bouts of exhilarating combat, you succesfully kill him! \
Hurrah! And all you got was a scratch!\n\
This scratch really stings though. Wait a minute! The cheating \
sod\'s been using a poisoned blade!\n\
So you die too. But to be honest, it comes as a bit of a relief. Maybe \
death will be a nice change. The undiscovered bourn and all that. Anyway,',
'The rest is silence');
}

ch('Macbeth',
true,
dunsinane,
'Macbeth is a wiry Scotsman with a cropped ginger beard and wide, \
rolling eyes. He is muttering to himself a bit.',
'\"Is it a dagger that I see before me?\"\
/Macbeth mutters something about witches.\
/Macbeth seems too busy hugging himself and rocking to take any \
notice of your questions.\
/Macbeth mutters something like, \"Theatre folk... they all hate me...\"',
'banquo::\"He\'s my guardsman. Leave him out of this.\"\
/dagger::\"It\'s been there a couple of days now... I can\'t seem to get rid of it.\"\
/robin::=Nice man\
/witch::\"She\'s a friend of mine, what about her?\"\
/theatre::\"Theatre folks hate me... must think I\'m bad luck or something.\"',
'',
'');

ch('Nell',
true,
inn,
'Mistress Nell Quickly, landlady of the Croaking Raven Inn, \
Elsinore. She is wearing a long green dress and is standing \
behind the bar with a calm, graceless air.',
'\"Welcome to our perfectly reputable establishment!\"\
/\"What can I get you, sir?\"\
/\"Are you going to stand there all day, or are you going to buy a drink?\"',
'door::*talk_suite()\
/suite::*talk_suite()\
/macbeth::\"Quiet! Don\'t you know that\'s bad luck!\"\
/robin::=Sorry love, it\'s his day off.\
/desdemona::\"She\'s one of our best, er, waitresses!\"',
'fight::Nell produces a rolling pin from behind the bar and \
hits you on the head with it. Ouch!',
'form::\"Gawd, no! I\'m a landlady, not an actress!\"\
/coins::*buy_drink()');
function talk_suite()
{
	if(gs('btdrnk')==0)
		say('\"The private suite? It\'s for paying customers \
only!\"');
	else
		say('\"Enjoy yourself!\"');
}

ch('Desdemona',
true,
private_suite,
'*describe_dessie();',
'\"Looking for a good time?\"\
/\"Hello, sailor!\"',
'othello::\"My husband? Promise you won\'t tell him you saw me here!\"\
/macbeth::Desdemona looks nervous. \"Sshhh!\"\
/robin::My god. He\'s _fantastic_.\
/handkerchief::\"That was a present from my husband."',
'kiss::Oh yeah... she\'s pretty good.\
/swear::Sorry, this game is strictly PG13.',
'');
function describe_dessie()
{
	var txt = 'Desdemona is a young thing in a tight little black \
dress, with a smile on her lips and a glint in her eye. You can \
understand why there are so many rumours about her.';
	if(gs('hnky')==0)
		txt += ' She is holding a handkerchief.';
	say(txt);
}

ch('witch',
false,
moorland,
'A cackling old hag in tattered black robes. She is wearing a \
plastic pointy hat held on by a piece of elastic, and has a pea \
green complexion.',
'\"This isn\'t my first adventure game, y\'know. I was in \'Granny\'s Garden\' \
on the BBC Micro!\"\
/The witch cackles in a horribly clicheed way.\
/\"Hubble, hubble, toil and trouble, and all that gack!\"\
/\"You shall be king hereafter!...\" The witch peers. \"Oh no, \
not you, sorry, someone else.\"\
/\"Not planning to drop any houses on me, are you?\"',
'book::The witch frowns. \"Thing is, I can\'t find all the ingredients for me \
recipe.\"\
/macbeth::The witch snaps, \"Less o\' the language, young lad!\"\
/chalice::\"Old family recipe that is, cure what ails ye!\"\
/bat::\"I needs one for me recipe!\"\
/skull::\"I needs one for me recipe!\"\
/salt::\"I needs some for me recipe!\"\
/robin::=I likes him, I does!\
/hairspray::\"Ooh yes, cosmetics is good for recipes. I once made a \
transmogrification potion using only lip salve.\"',
'fight::*fight_witch()',
'bat::*get_ingredient(bat)\
/skull::*get_ingredient(skull)\
/salt::*get_ingredient(salt)\
/hairspray::*get_ingredient(hairspray)'
);
function fight_witch()
{
	die('The witch points at you and mumbles something. \
The world starts to spin and you pass out. When you come round... \
something\'s different.',
'You have been turned into a newt');
}
function get_ingredient(th)
{
	take_away(th);
	sgs('wtch',parseInt(gs('wtch'))+1);
	inc_score();
	var txt = '\"Ooh, ta!\" says the witch, grabbing the ' + th.name + '.';
	if(parseInt(gs('wtch'))<4)
	{
		say(txt + ' \"That\'ll come in handy, that will!\"');
		return;
	}

	say(txt + ' \"Now I can make my special recipe!\"\n\
The witch turns her back on you for a moment, and there are a few \
coloured flashes. She turns back round, and hands you a golden chalice.');
	give_hero(chalice);
}

ch('porter',
false,
tower1,
'*describe_porter()',
'The porter just mutters something under his breath.',
'macbeth::The porter mutters something to the effect of \"Shut it.\"\
/robin::The porter is silent. (It\'s the closest he gets to being positive \
about something.)',
'fight::*fight_porter()',
'whisky::*pass_out()'
);
function describe_porter()
{
	var txt = 'The typical Shakespearian porter. Red-nosed, balding, and \
generally irritating. He reeks of booze.';
	if(asleep(porter))
		txt += ' I wouldn\'t worry about him, though, and he is passed \
out unconscious on the floor.';

	say(txt);
}
function fight_porter()
{
	if(asleep(porter))
		say('You kick the porter hard in the ribs. \
He makes an \"mmf\" noise, and carries on sleeping.')
	else
		say('\"Oi! I\'ll get my union on to you!\"');
}
function pass_out()
{
	inc_score();
	take_away(whisky);
	sleep(porter);
	say('The porter gleefully snatches the whisky, upends it down \
his throat, and passes out on the floor.');
}

ch('Juliet',
true,
tower2,
'Juliet is a pretty little girl with dark hair in pigtails, \
wearing a Britney Spears style school uniform. She seems a bit \
sad about something.',
'\"Boo hoo! I think my boyfriend is dead!\"\
/\"Romeo is dead! Waaaah!\"\
/\"Without Romeo, I may as well kill myself!\"',
'romeo::Juliet just sniffs.\
/telegram::\"What?\" Juliet looks bright eyed for a second, then \
relapses into her tears.\
/britney::\"She\'s my idol!\"\
/robin::=He\'s out of my league.\
/monk::\"Friar John was supposed to tell me if there was any news... \
but he hasn\'t turned up. Boo hoo!\"\
/macbeth::\"Oh, do shut up. (Sob!)\"\
/hairspray::\"Oh no, you can\'t have that, I\'ll go all frizzy \
without it.\"',
'',
'telegram::*juliet_goes()'
);
function juliet_goes()
{
	take_away(telegram);
	say('Juliet takes the telegram and reads it, and her eyes light up.\n\
\"Oh goody! He\'s not dead at all! This is wonderful! Thank you \
thank you thank you!\"\n\
She picks herself up and scurries off.');
	set_personloc(juliet,nowhere);
	inc_score();
}

ch('monk',
false,
cell,
'Friar John is a portly monk with a bald head and sackcloth \
robes. He is sprawled cross-legged on the floor, blubbering loudly.',
'\"I\'m dead!\"\
/\"Friar Lawrence is going to kill me for this!\"\
/\"Boo hoo! My monastical career is over!\"\
/\"I\'ll never be Pope now!\"',
'juliet::\"I was supposed to get that telegram to her, but I got lost!\"\
/romeo::\"Juliet thinks he\'s dead! Now she\'ll probably kill herself, and \
it\'s all my fault! Boo hoo!\"\
/robin::=I don\'t think he likes us religious types much.\
/macbeth::\"Quiet! I\'ve had enough bad luck already!\"\
/telegram::\"Friar Lawrence gave it me to deliver to Juliet, but I \
got lost! What am I going to do?\"',
'',
''
);


// dummy Persons whom you never actually meet (alive)
ch('Polonius', true, nowhere, '', '', '', '', '');
ch('blacksmith', false, nowhere, '', '', '', '', '');
ch('crier', false, nowhere, '', '', '', '', '');
ch('Romeo', true, nowhere, '', '', '', '', '');
ch('Shakespeare', true, nowhere, '', '', '', '', '');

