// TOWN DIALOGUE SCRIPT
// 	Town 21: Mount Galthrax (L3)

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;
short dummy;

// *** Galthrax ***

begintalknode 1;
	state = -1;
	personality = 210;
	nextstate = 1;
	condition = 1;
	question = "Galthrax";
	text1 = "As you round this turn, you catch sight of the thing. The dragon is a dark red, with deep purple wings. His colors are deep, disturbingly so, and you fancy that he looks as though he bathes in the blood of his victims.";
	text2 = "You imagine for a moment this monstrous body dipped a pool of blood large enough to immerse it. How many lives would it take to get that much blood? A hundred? Two hundred? A thousand? You shudder and force yourself not to think about it.";
	text3 = "_Welcome to my home,_ the beast says. _I am not familiar with your customs. Perhaps where you are from, it is acceptable for guests to enter into their host's private chambers unannounced. These are not my ways, but I will be tolerant._";
	text4 = "_Come, let us talk._";
	code =
	run_town_script(23);
break;

begintalknode 2;
	state = 1;
	personality = 210;
	nextstate = 2;
	condition = 1;
	question = "What do you want to talk about?";
	text1 = "_Ah, it has been so long since I last had a visitor with whom I could truly converse. I have my servants, but they are so dead, you know._ He grins wickedly at his little joke.";
	text2 = "_The last time I was able to converse with intelligent beings regularly was on the surface, before the Empire started its mad plan to destroy all magical creatures. As you can imagine, that was long ago._ His eyes grow dark momentarily, remembering.";
	text3 = "He snaps back to reality. _We should start by getting to know one another, don't you think? But who should start, I wonder. I know: I will. I so rarely get to speak that it will be wonderfully freeing to talk about myself._";
	text4 = "Something seems very, very wrong here. The dragon has given no indication that his outward friendliness is anything but genuine, but you are seasoned enough adventurers to know that you are in a position of great peril.";
	text5 = "All you can really do is keep an eye out and play along, though.";
	code =
	run_town_script(23);
break;

begintalknode 3;
	state = 2;
	personality = 210;
	nextstate = 3;
	condition = 1;
	question = "Tell me about yourself, then.";
	text1 = "The beast smiles again, baring its menacing teeth. _My name, as I'm sure you know, is Galthrax. I have been living in this mountain for more than ten years. From where I came before then is not important now.";
	text2 = "_You must have come from the south; no one could have made it through my forces to the north without my knowledge. Thus you must know by now that I mine this mountain for resources and do extensive experiments on undead in my labs.";
	text3 = "_I do all this work not for my own amusement, but for the sake of my defense. There is a war, you see. A war between the evil sliths to the north and my poor, humble self._";
	code =
	run_town_script(23);
break;

begintalknode 4;
	state = 3;
	personality = 210;
	nextstate = 4;
	condition = 1;
	question = "How did this war happen?";
	text1 = "_They attacked me, of course. Those evil, heartless fiends came into my mountain and tried to murder me. I fought them off, with the help of my few servants. Of course, at that time I had far fewer, and the struggle was difficult._";
	text2 = "_I tried to negotiate with them, but they would not even speak to me. They wanted me dead. What was I to do? I fought off their assaults, year after year, until finally I decided that I could do this no longer._";
	text3 = "His dark, inhuman eyes stare right into yours. Even though he is many steps away, his face feels uncomfortably near. You can almost feel his hot, burning breath against your neck, searing your skin.";
	text4 = "_It was then that I decided to destroy Vasskolis._";
	code =
	run_town_script(23);
break;

begintalknode 5;
	state = 4;
	personality = 210;
	nextstate = 5;
	condition = get_flag(15,22) == 0;
	question = "Vasskolis? What is that?";
	text1 = "_Vasskolis is the slith city to the north of here. It is the source of all my troubles._ A slith city? Near here? In the homeland! Legare would be very interested in this. In fact, if you can reach it, your quest would be over.";
	text2 = "_Vasskolis is the slith city to the north of here. It is the source of all my troubles._ Vasskolis must be the city that you saw north of the mountain. It is, clearly, the object of your quest.";
	text3 = "_Once Vasskolis is destroyed, my troubles will be over._";
	code =
	if ((get_flag(19,4)) || (get_flag(19,8)))
		remove_string(2);
	else
		remove_string(1);
	run_town_script(23);
break;

begintalknode 6;
	state = 5;
	personality = 210;
	nextstate = 6;
	condition = 1;
	question = "Do you think that killing all of those sliths is really the solution to your problems?";
	text1 = "_Oh, yes. I am quite certain of it. They attacked me first, after all. It is their fault. My actions are only in self defense. Surely you see the justice of my cause?_";
	code =
	run_town_script(23);
break;

begintalknode 7;
	state = 4;
	personality = 210;
	nextstate = 6;
	condition = get_flag(15,22) != 0;
	question = "Do you think that killing all of those sliths is really the solution to your problems?";
	text1 = "_Oh, yes. I am quite certain of it. They attacked me first, after all. It is their fault. My actions are only in self-defense. Surely you see the justice of my cause?_";
	code =
	run_town_script(23);
break;

begintalknode 8;
	state = 6;
	personality = 210;
	nextstate = 7;
	condition = 1;
	question = "Yes, I suppose I do.";
	text1 = "_Well, of course you do! You are civilized creatures, I can tell. I think I have taken a liking to you. In fact, I am sure of it. I would like to keep you around for longer, if I may._";
	code =
	run_town_script(23);
break;

begintalknode 9;
	state = 6;
	personality = 210;
	nextstate = 7;
	condition = 1;
	question = "Um....";
	text1 = "_Well, of course you do! You are civilized creatures, I can tell. I think I have taken a liking to you. In fact, I am sure of it. I would like to keep you around for longer, if I may._";
	code =
	run_town_script(23);
break;

begintalknode 10;
	state = 6;
	personality = 210;
	nextstate = -1;
	condition = 1;
	question = "No, I really don't.";
	text1 = "_How unfortunate. Well, I must regretfully admit that all this talking has grown tiresome -- tiring, I mean -- and I need to return to my work. I must ask you to leave._";
	text2 = "_Yes, it has been wonderfully diverting to host you, despite your unfortunate destruction of my servants, but I must now ask you to go. If you proceed any closer, I must call my guards and, with terrible misgivings, slay you._";
	text3 = "He smiles fiendishly again, his long teeth protruding from his vicious jaw. He continues to stare at you, watching for your next move.";
	code =
	run_town_script(23);
	end();
break;

begintalknode 11;
	state = 7;
	personality = 210;
	nextstate = 8;
	condition = 1;
	question = "How do you intend to do that?";
	text1 = "_I am offering you a place among my greatest warriors. Help me in my war against the unjust violators of my domain, and I will grant to you vast powers beyond any that you could earn by adventuring, and more than that, I will give you everlasting life._";
	text2 = "_You will never fear pain or suffering,_ he says, running his thick, monstrous tongue over his exposed teeth. _All things will live and die at your command. What say you? Will you come to my side and fight in my name?_";
	code =
	run_town_script(23);
break;

begintalknode 12;
	state = 8;
	personality = 210;
	nextstate = 9;
	condition = (character_in_party(906) >= 0) || (character_in_party(921) >= 0);
	question = "Yes, great master. I will serve you.";
	text1 = "As you speak those words, Phaedra turns and looks at you in utter horror. _No!_ she screams, drawing her blade. _If you do this, I will not stay with you any longer! Is this what you really want to do?_";
	code =
	play_sound(18);
break;

begintalknode 13;
	state = 9;
	personality = 210;
	nextstate = -1;
	condition = 1;
	question = "Er, no. I changed my mind.";
	text1 = "_Pity,_ the dragon says, glaring at Phaedra. _Well, I must regretfully admit that all this talking has grown tiresome -- tiring, I mean -- and I need to return to my work. I must ask you to leave._";
	text2 = "_Yes, it has been wonderfully diverting to host you, despite your unfortunate destruction of my servants, but I must now ask you to go. If you proceed any closer, I must call my guards and, with terrible misgivings, slay you._";
	text3 = "He smiles fiendishly again, his long teeth protruding from his vicious jaw. He continues to stare at you, watching for your next move.";
	code =
	run_town_script(23);
	end();
break;

begintalknode 14;
	state = 9;
	personality = 210;
	nextstate = -1;
	condition = 1;
	question = "Yes, I am resolved to serve the dragon.";
	text1 = "The dragon laughs."; 
	code =
	reset_dialog();
	add_dialog_str(0,"_Then I am leaving!_ Phaedra turns as if to go. However, before she can take a second step, an apparition appears in front of her. It is a reflection of her, a terrible, distorted reflection.",0);
	add_dialog_str(1,"Her nose is twisted to the left, and her left cheekbone is distorted as if smashed. Her right shoulder hunches forward, but the arm bends at the elbow at an impossible angle backwards. Her breasts are mashed and mangled, and her legs bruised and slashed.",0);
	add_dialog_str(2,"The apparition stares at Phaedra for a moment in hideous contemplation. Then a trickle of blood begins flowing from its forehead. That trickle soon becomes a flood, and the ghost tears in two, screaming. It explodes, vanishing.",0);
	add_dialog_str(3,"Phaedra falls to the ground, lifeless.",0);
	dummy = run_dialog(1);
	
	reset_dialog();
	add_dialog_str(0,"You turn back to the dragon, who surely must have cast the spell that killed Phaedra, but while you weren't paying attention, he moved closer to you. He is now less than an arm's length from you.",0);
	add_dialog_str(1,"Chuckling, he notes, _I should correct myself. I cannot grant you eternal life, but I can grant you eternal unlife._ His meaning becomes clear at this too late moment: you will become one of his undead servants, mindlessly serving his will forever.",0);
	add_dialog_str(2,"He lunges at you, biting just deep enough to hit an artery. Blood spurts out of you, and you are seasoned enough to know that no one can survive such a wound for more than a few minutes. You give in to the slumber, knowing that you will wake again soon.",0);
	add_dialog_str(3,"That was very, very stupid.",0);
	dummy = run_dialog(1);
	
	kill_char(1000,2,0);
	end();
break;

begintalknode 15;
	state = 8;
	personality = 210;
	nextstate = -1;
	condition = (character_in_party(906) < 0) && (character_in_party(921) < 0);
	question = "Yes, great master. I will serve you.";
	text1 = "The dragon laughs.";
	code =
	reset_dialog();
	add_dialog_str(0,"Something catches your attention out of the corner of your eye. You turn and are presented with the most dazzling light show you have ever seen. Mesmerized, you stare as the blue, yellow, purple, red, orange, and green colors flow across your vision.",0);
	add_dialog_str(1,"You turn back to the dragon, who surely must have cast the spell that caused these colors, but while you weren't paying attention, he moved closer to you. He is now less than an arm's length from you.",0);
	add_dialog_str(2,"Chuckling, he notes, _I should correct myself. I cannot grant you eternal life, but I can grant you eternal unlife._ His meaning becomes clear at this too late moment: you will become one of his undead servants, mindlessly serving his will forever.",0);
	add_dialog_str(3,"He lunges at you, biting just deep enough to hit an artery. Blood spurts out of you, and you are seasoned enough to know that no one can survive such a wound for more than a few minutes. You give in to the slumber, knowing that you will wake again soon.",0);
	add_dialog_str(4,"That was very, very stupid.",0);
	dummy = run_dialog(1);
	
	kill_char(1000,2,0);
	end();
break;

begintalknode 16;
	state = 8;
	personality = 210;
	nextstate = -1;
	condition = 1;
	question = "No, I don't think that's a good idea.";
	text1 = "_How unfortunate. Well, I must regretfully admit that all this talking has grown tiresome -- tiring, I mean -- and I need to return to my work. I must ask you to leave._";
	text2 = "_Yes, it has been wonderfully diverting to host you, despite your unfortunate destruction of my servants, but I must now ask you to go. If you proceed any closer, I must call my guards and, with terrible misgivings, slay you._";
	text3 = "He smiles fiendishly again, his long teeth protruding from his vicious jaw. He continues to stare at you, watching for your next move.";
	code =
	run_town_script(23);
	end();
break;

// *** Phaedra identification ***

begintalknode 198;
	state = -1;
	personality = 250;
	nextstate = 99;
	condition = 1;
	question = "Phaedra";
	text1 = "You ask Phaedra if she can identify your items for you. _I sure can,_ she replies, grinning.";

begintalknode 199;
	state = 99;
	personality = 250;
	nextstate = -1;
	condition = 1;
	question = "Please do, then.";
	text1 = "_Sure thing. Only 5 coins per item._ She flashes you another grin,  daring you to ask why she is charging you. You don't.";
	action = ID 5;