
begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = 1;
	question = "Dervish Malachai";
	text1 = "The Dervish is pretty messed up...  Zenbu's attack managed to swipe Malachai of his armor and also beat him into a pulp.  Combined that with the beating he received, he's gored pretty well.";
	text2 = "The Dervish is pretty messed up...  Casimir's attack managed to swipe Malachai of his armor and also beat him into a pulp.  Combined that with the beating he received, he's gored pretty well.";
	text3 = "_I'm...  Glad.  You're okay, right?_  He coughs up as much blood as he can manage to expel from his system.  Lots of it is still left standing in his mouth, but he swallows it down.  _I'm sorry about all of this...  I just..._";
	text4 = "His eyes glaze over a bit, but he's not dead yet.  Not completely.  He's hanging on fairly well, although it's pretty much inevitable.";
	text5 = "The Dervish is still barely grasping onto life.  He is absolutely covered in blood, most of it his own.  His bones are broken in multiple places, and he has a look of regret.";
	action = INTRO;
	code = 
		if(get_flag(99,0) == 1)
			remove_string(2);
		if(get_flag(99,0) == 2)
			remove_string(1);
	break;

begintalknode 2;
	state = 1;
	nextstate = -1;
	condition = get_flag(99,0) == 1 && get_flag(39,0) == 0;
	question = "Are you okay?";
	text1 = "That's a pretty stupid question to ask...  The man is lying with open wounds spewing out as much blood as he has left.";
	text2 = "_I...  No, not really...  But thank you for coming.  I was... afraid.  Really afraid.  But not anymore._";
	code = 
		set_flag(39,0,1);
break;

begintalknode 3;
	state = 1;
	nextstate = -1;
	condition = get_flag(99,0) == 2 && get_flag(39,0) == 0;
	question = "Casimir!  That bastard...!";
	text1 = "He seems surprised, just as much as when you first said his name.  _You said...  Casimir?  You...  did, you said Casimir...!_";
	code = 
		set_flag(39,0,1);
break;

begintalknode 4;
	state = 1;
	nextstate = -1;
	condition = get_flag(99,0) == 1 && get_flag(39,0) == 1;
	question = "What were you afraid of?";
	text1 = "_Dying alone...  Dying without friends...  I was scared fighting him, and that's why...";
	text2 = "_I'm sorry I managed to get you hurt like that.  You got pretty smushed as well, hunh?_";
	text3 = "He manages to chuckle, but large clots of blood are beginning to crawl like leeches down his face as he produces them.";
	code = 
		set_flag(39,0,2);
break;

begintalknode 5;
	state = 1;
	nextstate = -1;
	condition = get_flag(99,0) == 2 && get_flag(39,0) == 1;
	question = "What about Casimir, Dervish?";
	text1 = "_He...  Maxwell and him were friends once...  I tried to request him personally to join me here, too!_";
	text2 = "_But...  How do you know?  I won't doubt you with my final breaths...  I have no need of truth or lies anymore...  But how?_";
	text3 = "His enthusiasm is beginning to get the best of him.  Large clots of blood are beginning to crawl like leeches down his face as he produces them with every breath he takes.";
	code = 
		set_flag(39,0,2);
break;

begintalknode 6;
	state = 1;
	nextstate = -1;
	condition = get_flag(99,0) == 1 && get_flag(39,0) == 2;
	question = "Why didn't you tell me you'd be here?";
	text1 = "_It was...  A challenge of honor.  He wanted to fight me alone._";
	text2 = "_You didn't have to come...  I didn't want to have you die for my sake..._";
	text3 = "He coughs up a great deal of blood.  He is beginning to get pale.";
	code = 
		set_flag(39,0,3);
break;

begintalknode 7;
	state = 1;
	nextstate = -1;
	condition = get_flag(99,0) == 2 && get_flag(39,0) == 2;
	question = "I read his memoirs at the war party.";
	text1 = "_You...  That's odd.  But how could he transmogrify without..._";
	text2 = "He coughs up a great deal of blood.  He is beginning to get pale.";
	code = 
		set_flag(39,0,3);
break;

begintalknode 8;
	state = 1;
	nextstate = -1;
	condition = get_flag(99,0) == 1 && get_flag(39,0) == 3;
	question = "I'd have come after you regardless!";
	text1 = "He smiles as best as he's able.  With the blood pooling in his mouth, though, it's a rather cruel parody of happiness.";
	text2 = "_Thank you, friend...  Back then, when we held hands in sorrow...  Were you put at ease?_";
	text3 = "He is... clinging onto life rather vehemently.  Has he not prepared himself to pass on yet?";
	code = 
		set_flag(39,0,4);
break;

begintalknode 9;
	state = 1;
	nextstate = -1;
	condition = get_flag(99,0) == 2 && get_flag(39,0) == 3;
	question = "What is it?";
	text1 = "_The duke...  Is there higher magic here...?  But what of it, then?_";
	text2 = "Suddenly, his eyes flare up with one final burst of life, and his expression becomes one of shock.";
	text3 = "_No!  I must tell you something first!_";
	code = 
		set_flag(39,0,4);
break;

begintalknode 10;
	state = 1;
	nextstate = -1;
	condition = get_flag(99,0) == 1 && get_flag(39,0) == 4;
	question = "I was...  Malachai, thank you.";
	text1 = "_I will no longer see my friends...  I--";
	text2 = "He twitches a bit to and fro, but no longer has the energy to move his limbs.  The pain is likely excruciating.";
	text3 = "_Please...  Hold my hand as I go..._";
	code = 
		set_flag(39,0,5);
break;

begintalknode 11;
	state = 1;
	nextstate = -1;
	condition = get_flag(99,0) == 2 && get_flag(39,0) == 4;
	question = "Tell me, then!";
	text1 = "_That beast...  Casimir...  He spoke to me of her...  Your sister._";
	text2 = "He twitches a bit to and fro, but no longer has the energy to move his limbs.  The pain is likely excruciating.";
	text3 = "_Listen...  There is far more here than I know...  But please!_";
	code = 
		set_flag(39,0,5);
break;

begintalknode 12;
	state = 1;
	nextstate = -1;
	condition = get_flag(99,0) == 1 && get_flag(39,0) == 5;
	question = "(Hold his hand)";
	text1 = "_Goodbye, son of Aaron...  And thanks...  Friend._";
	text2 = "His eyes let loose their grip and glaze over.  The blood that has not yet dried in his mouth flows back to his lungs now that his breathing has stopped.  His grip becomes tighter as the blood is lost on him.";
	text4 = "He is dead.  Dervish Malachai is dead.";
	action = END_TALK;
	code = 
		kill_char(10,3,0);
		set_flag(26,0,33);
		put_item_on_spot(45,44,482);
		set_flag(39,0,6);
break;

begintalknode 13;
	state = 1;
	nextstate = -1;
	condition = get_flag(99,0) == 2 && get_flag(39,0) == 5;
	question = "Please what?";
	text1 = "_Follow your heart...  This cruel drama feels wrong, but..._";
	text2 = "_Son of Aaron, this challenge is one of import for you...  I wish you luck.  Thank you for being with me...  Friend._";
	text3 = "His eyes let loose their grip and glaze over.  The blood that has not yet dried in his mouth flows back to his lungs now that his breathing has stopped.  His grip becomes tighter as the blood is lost on him.";
	text4 = "He is dead.  Dervish Malachai is dead.";
	action = END_TALK;
	code = 
		kill_char(10,3,0);
		set_flag(26,0,33);
		put_item_on_spot(45,44,482);
		set_flag(39,0,6);
break;

begintalknode 14;
	state = -1;
	nextstate = 2;
	question = "Anthony";
	text1 = "Anthony is gripping his sword nervously.  He is covered in large flecks of blood, but none of it appears to be his own.  You would expect him to be afraid, but he is actually somewhat collected.";
	text2 = "_You...  What happened?  Tell me!  Please._";
	text3 = "Well, okay.  He is somewhat frustrated.  But nobody can fault him on that count.";
	text5 = "Anthony is still sitting here, extremely distraught.";
	action = INTRO;

begintalknode 15;
	state = 2;
	nextstate = 3;
	question = "Malachai has just died.";
	text1 = "His head droops.  _I...  I know.  I heard him and that vile cat thing battling before.  I thought that the Dervish would live, but...  No, that was na•ve of me._";
	text2 = "_I saw everyone else being killed around me.  Janet was bleeding profusely, but was still on her feet.  Acacia was paralyzed with fear.  Gregor was still holding an axe._";
	text3 = "_Everyone else had already died.  The next thing I knew, metal claws were aimed towards my throat.  A quick feint to the side allowed me to escape unfazed, and the giant beast was distracted by the others for long enough to allow me to escape._";
	text4 = "_The others were so brave...  But they died.  All of them died, and for naught.  Tell me, was I wrong to flee?_";

begintalknode 16;
	state = 3;
	nextstate = 4;
	condition = get_flag(99,0) == 1;
	question = "I'm sorry, but you should have stayed.";
	text1 = "He shakes his head.  _I know...  I know.  I was a coward.  My life was not worth abandoning my friends.  My family.  I want to be forgiven...  But I know that it cannot be.  It cannot._";
	text2 = "_I...  Have damned myself, haven't I?_";

begintalknode 17;
	state = 3;
	nextstate = 4;
	condition = get_flag(99,0) == 2;
	question = "If you stayed, you would have simply died.";
	text1 = "_You are right...  Yes.  I fled and left my friends, but I can still live.  I can still do good.  You're right._";
	text2 = "He smiles weakly.  _Thank you...  I still feel guilty, but I know not to let that get in the way.  Thank you._";

begintalknode 18;
	state = 4;
	nextstate = 5;
	question = "What are you going to do now, Anthony?";
	text1 = "_I cannot stay here.  Actually, I have been considering...  What I could do._";
	text2 = "_You see, I am good at sneaking around...  Which explains why I am the only one the feline claws missed striking.  Also, in case you didn't know, my reconnaissance allowed for your raid on their war party._";
	text3 = "_All of this gave me an idea._";

begintalknode 19;
	state = 5;
	nextstate = 6;
	question = "What's your splendid idea?";
	text1 = "_Well, it's not easy...  But I could sneak through the occupied mines around the guards there.  That itself would be a task...  But I'm up to it.  I know some conveniently-placed switches and levers that will make my life a lot easier._";
	text2 = "_Then, I could sneak through the rockiest impasses leading towards the Nephil Fortress.  I have a copy of that building's layout, and there are some places where there are weak walls...  Hidden passages..._";
	text3 = "_My idea is to find whoever is responsible for commanding the nephil armies, and to kill that individual in its sleep.  I would likely be killed, but I would finally be able to exact justice and vengeance._";
	text4 = "_Would you...  Be interested in joining me?_";

begintalknode 20;
	state = 6;
	nextstate = -1;
	question = "It's absolutely hopeless.  No.";
	text1 = "He shrugs.  _I expected that.  I'll still be here for a while, so if you want to join me, let me know...  Otherwise, I'll go inside and try my best._";
	text2 = "_Anyway, thanks for the company._";
	action = END_TALK;
	code = 

		set_flag(26,0,36);

break;

begintalknode 21;
	state = 6;
	nextstate = -1;
	question = "You're insane.  But sure.";
	text1 = "He smiles broadly.  _Thanks!  No, really.  Thanks!_";
	text2 = "_The mines are down these stairs.  I assume, if you got here, that you have Malachai's Key.  If so, then let's go down to the mines._";
	text3 = "Anthony has joined your party.";
	action = END_TALK;
	code =

	add_char_to_party(6);
	set_flag(26,0,37);
 
break;

