
begintalkscript;

variables;

begintalknode 10;
	state = -1;
	nextstate = 10;
	question = "Elrilok";
	text1 = "This... thing. The being that turned this jaunt through a cave full of chitrachs into a living hell. It hovers in front of you, and unless you're mistaken, it's laughing.";
	text2 = "When it finishes, its hooded face turns to you. _I am Elrilok, the living dark. Welcome, my children, to my prison._";
	text3 = "When it finishes, its hooded face turns to you. _I am Elrilok, the living dark. Welcome, my child, to my prison._";
	code = 
		if(party_size() == 1)
			remove_string(2);
		else
		remove_string(3);
	break;
begintalknode 11;
	state = 10;
	nextstate = 11;
	question = "What are you?";
	text1 = "It laughs, a sound akin to genocide.";
	text2 = "_What am I? I am the dark. I am the evil. I am as ancient as these caves you dare call home, and long were they my realm._";

begintalknode 12;
	state = 11;
	nextstate = 12;
	question = "They were your realm? They aren't now?";
	text1 = "_They were, and they are again,_ Elrilok bellows. _Thanks to you, my children. You have freed me from the prison that those walking skeletons sealed me in, and now I will pick up my play where I left off._";
	text2 = "_They were, and they are again,_ Elrilok bellows. _Thanks to you, my child. You have freed me from the prison that those walking skeletons sealed me in, and now I will pick up my play where I left off._";
	text3 = "Its _play_? It can't be serious. This isn't play.";
	code = 
		if(party_size() == 1)
			remove_string(1);
		else
		remove_string(2);
	break;
begintalknode 13;
	state = 12;
	nextstate = 10;
	condition = get_flag(4,5) == 0;
	question = "Your play? That's sick!";
	text1 = "_No, that's not sick. You are, my silly children._";
	text2 = "_No, that's not sick. You are, my silly child._";
	text3 = "Elrilok waves a cloaked arm, and a crippling wave of nausea strikes you. However, your body refuses to move, even the basest reflexes.";
	text4 = "_Surely that's not all._";
	code = 
		if(party_size() == 1)
			remove_string(1);
		else
		remove_string(2);
		set_char_status(1000,7,20,1,0);
		set_flag(4,5,1);
	break;
begintalknode 14;
	state = 12;
	nextstate = 10;
	condition = get_flag(4,5) == 0;
	question = "Um... okay.";
	text1 = "Elrilok continues to float before you.";
	code = 
		set_flag(4,5,1);
	break;
begintalknode 15;
	state = 10;
	nextstate = -1;
	question = "What is this place?";
	text1 = "Elrilok sighs. Or you think it does, but it registers in your mind as a thousand funerals.";
	text2 = "_This is my dreary prison. But now, I leave it all behind._";

begintalknode 16;
	state = 10;
	nextstate = 14;
	condition = (get_flag(4,6) == 0) && (party_size() != 1);
	question = "Why did you bring us here?";
	text1 = "_Ah, it was my best plan ever. To think, aeons in wait, and it was this simple!_";
	text2 = "The sound of Elrilok's cheery voice, steeped in malice though it may be, makes you want to kill yourselves.";
	text3 = "_You see, the silly little mortals imprisoned me. Put me way down here in the dark. And it would take the touch of a willing mortal to release me. And you, of course, are those wonderful little fleshbags!_";
	text4 = "_Oh, the bugs were fun. Making them dig their tunnels closer and closer to me, until my prison's wall met the fresh cave air once again. I could play again! I made the bugs dance, I made them slaughter one another... so much fun!_";
	text5 = "_I moved rocks, and I moved you down here! So simple! And when you were trapped, I forced you down here, where I could break your tiny little souls myself. Broken souls will do anything to get fixed, so you were willing when you touched the door!_";

begintalknode 17;
	state = 10;
	nextstate = 14;
	condition = (get_flag(4,6) == 0) && (party_size() == 1);
	question = "Why did you bring me here?";
	text1 = "_Ah, it was my best plan ever. To think, aeons in wait, and it was this simple!_";
	text2 = "The sound of Elrilok's cheery voice, steeped in malice though it may be, makes you want to kill yourself.";
	text3 = "_You see, the silly little mortals imprisoned me. Put me way down here in the dark. And it would take the touch of a willing mortal to release me. And you, of course, are that wonderful little fleshbag!_";
	text4 = "_Oh, the bugs were fun. Making them dig their tunnels closer and closer to me, until my prison's wall met the fresh cave air once again. I could have fun again! I made the bugs dance, I made them slaughter one another... so much fun!_";
	text5 = "_I moved rocks, and I moved you down here! So simple! And when you were trapped, I forced you down here, where I could break your tiny little soul myself. Broken souls will do anything to get fixed, so you were willing when you touched the door!_";

begintalknode 18;
	state = 14;
	nextstate = -1;
	question = "What are you going to do now?";
	text1 = "It giggles. You instantly vow never to describe what you felt when it giggled.";
	text2 = "_What else? Play time!_";
	text3 = "Before you can say anything else, Elrilok waves its arms, and you are hurled up against the wall. At least it seems you can move again.";
	action = END_TALK;
	code = 
		set_flag(4,6,1);
		set_mobility(1000,1);
		relocate_character(0,27,22);
		relocate_character(1,28,22);
		relocate_character(2,28,23);
		relocate_character(3,28,24);
	break;
