// TOWN DIALOGUE SCRIPT
//    Town 45: Avernoss Camp

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

begintalkscript;

variables;
int i,j,k,choice;


//*** Pithoss ***

begintalknode 1;
	state = -1;
	personality = 450;
	nextstate = 1;
	condition = 1;
	question = "Pithoss";
	text1 = "Pithoss notes you grimly as you enter. He fingers his two-tined spear as you approach. _Good,_ he says, _you are here. We must speak._";
	text5 = "Pithoss holds his two-tined spear, casually wielding it as he waits for your next question.";
	action = INTRO;

begintalknode 2;
	state = 1;
	personality = 450;
	nextstate = 2;
	condition = 1;
	question = "What should I do now?";
	text1 = "Pithoss hisses roughly, _The barbarian chief's curse was more effective than we realized. When he died, he cursed Legare's soul, preventing it from reaching the proper realm of the Land of the Dead._ Your eyes widen.";
	text2 = "_Yes, I know that it sounds incredible,_ Pithoss says, _but it is true. Legare's soul is in the clutches of Nathaganth right now, and he is being tortured most foully. We must save him. We cannot move on before we do._";
	text3 = "He continues, _There is an island in the center of the lake near here, Lake Avernoss, and on that island is a portal to the Land of the Dead. It is normally hidden from mortals, but Althanazaria has blessed us so that we can find it. You must go there._";
	text5 = "_With Legare's soul freed,_ Pithoss says, _we can continue on our journey. According to Britha, Danatha is not far from here. It is up to you to lead the way: reach Danatha and the homeland! We will follow not long behind you._";
	code =
	if (get_flag(51,1) == 0) {
		remove_string(5);
		toggle_quest(13,1);
		set_flag(45,2,1);
		}
	else {
		remove_string(1);
		remove_string(2);
		remove_string(3);
		toggle_quest(14,1);
		}
break;

begintalknode 3;
	state = 2;
	personality = 450;
	nextstate = 1;
	condition = get_flag(51,1) == 0;
	question = "What do I do when I get there?";
	text1 = "_Once you enter the Land of the Dead, make your way to Nathaganth's kingdom, and find Legare. You must not over-reach yourselves: you need to rescue Legare, but you can accomplish very little else there. Fighting Nathaganth in his own home is sure doom._";
	text2 = "Seeing your skepticism, he adds, _Believe me. Just go in, get Legare, and get out of there. Nathaganth is a god, not just a demon, and you do NOT want any part of that._ He shudders. _I... know what it is to stand in the presence of a dark god._";
	text3 = "At that, you almost ask him to elaborate, but you notice the look on his face, and you think better of it.";

begintalknode 4;
	state = 2;
	personality = 450;
	nextstate = 1;
	condition = get_flag(51,1) != 0;
	question = "Where is Danatha?";
	text1 = "_Begin by heading northwest, leaving the river. There is a small secret passage in the corner of this cave. If you look very closely, you can find it. The tunnel beyond should lead you straight to Danatha._";
	action = SET_SDF 45 1 1;

begintalknode 5;
	state = 1;
	personality = 450;
	nextstate = 1;
	condition = 1;
	question = "How are you feeling?";
	text1 = "Pithoss growls. _Not well,_ he says, _for obvious reasons._ You know that Legare's death has hit everyone hard, so you can understand this.";
	text3 = "_Better, now,_ he says. _You did well in the Land of the Dead._";
	action = DEP_ON_SDF 51 1 0;

//*** Britha ***

begintalknode 10;
	state = -1;
	personality = 451;
	nextstate = 10;
	condition = 1;
	question = "Britha";
	text1 = "Britha is reciting a portion of the Khalthanad when you approach, and Ithik is listening. You catch only the last part, something about Khalthas's death and the succession thereafter. She smiles shyly as you approach and falls silent.";
	text5 = "Britha waits beside the fires for you next question.";
	action = INTRO;

begintalknode 11;
	state = 10;
	personality = 451;
	nextstate = 10;
	condition = 1;
	question = "Who are you, again?";
	text1 = "She laughs. _My name is Britha, and I was born in the Empire of Khalthas._ These words, so simply spoken, are like the tremors of a cavequake, the shaking of the very ground upon which you stand. _I am from Danatha, a city a short distance away._";
	text2 = "She adds, _I am a scout, and I was looking for a barbarian army that did not exist. I found a barbarian fort that very much did exist, though, and I got captured._";

begintalknode 12;
	state = 10;
	personality = 451;
	nextstate = 11;
	condition = 1;
	question = "What do you think of these exiles returning?";
	text1 = "_I think they'd better be prepared to tell their story about ten thousand times in Danatha, because even if the descendants of Thsss have reformed, they are still the descendants of Thsss._";

begintalknode 13;
	state = 11;
	personality = 451;
	nextstate = 12;
	condition = 1;
	question = "People still remember Thsss?";
	text1 = "_Still remember!_ Britha laughs. _Yes, we remember the man who began our decline._ She shakes her head ruefully.";
	text2 = "_You see,_ she continues, _more than two hundred years ago, the Empire of Khalthas still looked strong on the outside. It was larger than we can even imagine. You've been to Vasskolis?_ You nod.";
	text3 = "_Vasskolis was easily connected to the center, then,_ she continues. _The journey you've made so far would've taken mere days and almost no effort just over two hundred years ago._";

begintalknode 14;
	state = 12;
	personality = 451;
	nextstate = 13;
	condition = 1;
	question = "So what happened?";
	text1 = "_Royal intrigue and power struggles gave way to outright civil war. Thsss was the first rebel to attempt to overthrow the Heir of Khalthas -- as we call our emperor -- but he was not the last. Thsss was banished, but the problems remained.";
	text2 = "_Another civil war began just a few short years later, and after that, another. Communication lines were disrupted. Refugees became bandits, and the barbarian sliths were born, the demon-worshipping monsters you've fought._";
	text3 = "_Not long after that, the barbarians began attacking the weak points of the empire. The river upon which you've been traveling was a fine target. Communications from Danatha north were disrupted; we lost touch with Vasskolis, Thassaka, Manikoss.";
	text4 = "_Since then, the empire has been fighting back the barbarians as best it can, but we've had one civil war in my lifetime, and another may be coming soon, with the incompetent king we have now._ She pauses. _But you didn't hear that from me._";

begintalknode 15;
	state = 13;
	personality = 451;
	nextstate = 10;
	condition = 1;
	question = "So the empire is falling apart?";
	text1 = "_Yes,_ she says. _But there is hope yet. Perhaps the exiles who began its disruption can now end the chaos._ She smiles modestly. _Or maybe you won't be able to do anything. I don't know. We'll see._";

//*** Ithik ***

begintalknode 20;
	state = -1;
	personality = 452;
	nextstate = 20;
	condition = 1;
	question = "Ithik";
	text1 = "Ithik is listening to Britha recite a part of the Khalthanad as you approach. He stares at her, rapt, as she moves through the words, her voice rising and falling, rhythmic with the meter. She stops, and Ithik turns to you.";
	text5 = "Ithik glances at Britha as he waits for your next question.";
	action = INTRO;

begintalknode 21;
	state = 20;
	personality = 452;
	nextstate = 20;
	condition = 1;
	question = "What are you doing now?";
	text1 = "_Watching over the body of the Prophet,_ Ithik replies. _The expedition is carrying him to the homeland, where we will bury him, finally at rest where he wanted to be all his life._";
	text3 = "_Watching over the body of the Prophet,_ Ithik replies. _The expedition is carrying him to the homeland, and from there, we will return him to Avernum, as he wished, and bury him in Bahssikava._";
	action = DEP_ON_SDF 51 1 0;

begintalknode 22;
	state = 20;
	personality = 452;
	nextstate = 20;
	condition = 1;
	question = "What have you learned while talking with Britha?";
	text1 = "_That the Empire of Khalthas yet lives,_ Ithik says, his voice filled with awe. _Britha alone is enough for me to know that. She knows all of the oral traditions of the classical civilization, the Khalthanad, the lyric poets, the histories._";
	text2 = "He continues, _If only Legare could have met her. He was gone from camp before we returned, and then he... he did not come back. But he would have been amazed. Britha is a piece of the homeland, one small piece of the homeland that he could've seen._";
	text3 = "He sighs. _But the curse of the Goddess was true: he was never to see the homeland, any part of it, even such a minute part as Britha. She is the homeland. She is the civilization, its culture, its stories. And he never knew._";

//*** Phaedra ***

begintalknode 25;
	state = -1;
	personality = 453;
	nextstate = 25;
	condition = 1;
	question = "Phaedra";
	text1 = "Phaedra is talking casually with Machrone as you approach. She looks cheerful, as usual, but she also looks worn and tired from the stress of the journey and recent events. She can stand and walk around, though, so she must be recovered from childbirth.";
	text5 = "Phaedra leans against the low fence as she waits for your next question.";
	action = INTRO;

begintalknode 26;
	state = 25;
	personality = 453;
	nextstate = 25;
	condition = 1;
	question = "Where's the baby?";
	text1 = "_I asked Ethass to take care of her for a little while,_ Phaedra replies. _Arcadia's sleeping, I think._";

begintalknode 27;
	state = 25;
	personality = 453;
	nextstate = 25;
	condition = 1;
	question = "How are you feeling?";
	text1 = "_Better,_ she says. _My strength is back. I'm tired because of all this travel, but so is everyone else. I'm okay, though._ She smiles. _Pithoss and Kass were talking about having me get back to work soon._";
	text3 = "_All right,_ she says. _I'm ready to get to Danatha and rest for a long while, though,_ she admits, giggling. _I think everyone is._";
	action = DEP_ON_SDF 51 1 0;

//*** Machrone ***

begintalknode 35;
	state = -1;
	personality = 454;
	nextstate = 35;
	condition = 1;
	question = "Machrone";
	text1 = "Machrone is chatting with Phaedra as you approach. He is neither bothering anyone for an interview nor attempting to write down or distribute his findings, for perhaps the first time since you've known him. He looks calm but tired.";
	text5 = "Machrone patiently waits for your next question, his notepad away for once.";
	action = INTRO;

begintalknode 36;
	state = 35;
	personality = 454;
	nextstate = 35;
	condition = 1;
	question = "Why aren't you reporting?";
	text1 = "_I just finished a report on Legare's death,_ he replies. _In a short while, I'll try to interview the members of the expedition for their thoughts and reactions. But for the time being, I'm taking a break._";
	text3 = "_I'm about to start again,_ he says. _Phaedra's going to tell me about everything that happened in the Land of the Dead. But for right now, I'm making sure that she's okay._ He grins.";
	action = DEP_ON_SDF 51 1 0;

//*** Ethass ***

begintalknode 45;
	state = -1;
	personality = 455;
	nextstate = 45;
	condition = 1;
	question = "Ethass";
	text1 = "Ethass sits with Phaedra and Machrone's baby on her lap. The child doesn't seem to mind its reptilian guardian, sleeping contentedly in her arms. Ethass whispers a greeting as you approach, trying not to disturb the little one.";
	text5 = "Ethass holds little Arcadia, waiting for your next question.";
	action = INTRO;

begintalknode 46;
	state = 45;
	personality = 455;
	nextstate = 45;
	condition = 1;
	question = "Where's Phaedra?";
	text1 = "_Off for a moment,_ Ethass whispers in reply. _She asked me to take care of Arcadia while she's gone to talk to Machrone._ She smiles. _I was happy to._";

begintalknode 47;
	state = 45;
	personality = 455;
	nextstate = 45;
	condition = 1;
	question = "How's the baby?";
	text1 = "_Peaceful, right now,_ she whispers. _I don't want to wake her up, though._";

//*** Silthokh ***

begintalknode 55;
	state = -1;
	personality = 456;
	nextstate = 55;
	condition = 1;
	question = "Silthokh";
	text1 = "Silthokh, as always, is selling his wares. Now he has a small wooden table on which to place them, so you can see the sorts of things that he sells. You get the feeling that he offers different things to you and to other members of the expedition.";
	text5 = "Silthokh adjusts one of his trinkets, waiting for your next question.";
	action = INTRO;
	
begintalknode 56;
	state = 55;
	personality = 456;
	nextstate = 55;
	condition = 1;
	question = "Where do you get all this stuff?";
	text1 = "_While you're off fighting monsters, I'm combing the surroundings for anything that might be useful._ He bares his teeth in a smile. _Usually I can scavenge quite a lot._";
	
begintalknode 57;
	state = 55;
	personality = 456;
	nextstate = 55;
	condition = 1;
	question = "What do you think of recent events?";
	text1 = "_Legare's death is not good for any of us,_ Silthokh says darkly. _Even if everything that he believed had been a lie -- which it appears that it was not -- his faith and conviction kept everyone else going._";
	text2 = "After a moment's thought, he adds, _Except for me, of course. I'm here for the money._ His lips curl into a smile, baring his teeth.";
	text3 = "_I will be glad to move on to Danatha,_ he says, _where the real profits are to be had. The centers of slith civilization are still rich, even if the outer regions have fallen apart. Or so I am hoping._";
	action = DEP_ON_SDF 51 1 0;
	
begintalknode 58;
	state = 55;
	personality = 456;
	nextstate = 55;
	condition = 1;
	question = "Can I buy items from you?";
	text1 = "You finish shopping.";
	code =
	begin_shop_mode("Silthokh's Items","Silthokh has a variety of miscellaneous items at reasonable prices, and he will buy your excess, too.",11,2,2);
break;

begintalknode 59;
	state = 55;
	personality = 456;
	nextstate = 55;
	condition = 1;
	question = "Can I buy mage spells from you?";
	text1 = "You finish shopping.";
	code =
	begin_shop_mode("Silthokh's Spells","Silthokh picked up some spellbooks in Thassaka, and he's willing to let you look at them for a price.",7,3,-1);
break;

begintalknode 60;
	state = 55;
	personality = 456;
	nextstate = 55;
	condition = 1;
	question = "Can I buy priest spells from you?";
	text1 = "You finish shopping.";
	code =
	begin_shop_mode("Silthokh's Spells","Silthokh picked up some spellbooks in Thassaka, and he's willing to let you look at them for a price.",8,3,-1);
break;

begintalknode 61;
	state = 55;
	personality = 456;
	nextstate = 55;
	condition = 1;
	question = "Can you identify my items?";
	text1 = "_Of course, for a small fee. Just to cover my costs, you understand._";
	action = ID 5;
	
begintalknode 62;
	state = 55;
	personality = 456;
	nextstate = 55;
	condition = 1;
	question = "Can you teach me anything?";
	text1 = "You finish shopping.";
	code =
	begin_shop_mode("Silthokh's Recipes","Silthokh, from years of digging up alchemical ingredients, knows how to make a variety of potions. He'll teach you for a small price.",14,2,-1);
break;

//*** Talas ***

begintalknode 65;
	state = -1;
	personality = 457;
	nextstate = 65;
	condition = 1;
	question = "Talas";
	text1 = "Talas is tinkering with a machine as you approach him. He shifts one part into place, squints at it for a moment, and then shifts it back. _Hmm,_ he says, fiddling with it some more.";
	text5 = "Talas continues to work on the machine as he waits for your next question.";
	action = INTRO;

begintalknode 66;
	state = 65;
	personality = 457;
	nextstate = 65;
	condition = 1;
	question = "What is that you're you working on?";
	text1 = "_This hunk of junk?_ Talas says. _It's an old, broken-down piece of metal that I found in Thanopolen. I'm trying to take it apart and see how it works, but I'm not sure that I'm finding anything. It seems like it was designed by an iguana._";
	text2 = "Evidently, _iguana_ is a slang slith term for a fool.";

begintalknode 67;
	state = 65;
	personality = 457;
	nextstate = 65;
	condition = 1;
	question = "What do you think of the expedition's chances now?";
	text1 = "Talas grunts. _I don't know,_ he says. _Ithik's been talking with that Britha girl, and she says that Danatha is not far away. We just might survive._";
	text2 = "After a moment, he adds, _But I don't really know what the point is, now. Legare's dead. He's the one who really wanted to get there. I think I'd be just as happy going back to Avernum._";
	text3 = "He thinks this over and checks himself. _No,_ he concludes eventually, _there is much to be found in the homeland. There is much to be learned here. Yes, I think we'll make it, and the journey will have been worth it._";
	text4 = "He shakes his head. _That's why they don't ask me whether we should do something or not. They decide that we ought to, and then they ask me how we can do it._ He chuckles quietly.";

//*** Kass ***

begintalknode 75;
	state = -1;
	personality = 458;
	nextstate = 75;
	condition = 1;
	question = "Kass";
	text1 = "Kass was deep in thought when you walked in, so deep that he didn't even notice you until you intruded into his line of vision, at which point he jumped, startled. He looks upset about something as well.";
	text5 = "Kass continues thinking as he waits for your next question.";
	action = INTRO;

begintalknode 76;
	state = 75;
	personality = 458;
	nextstate = 75;
	condition = 1;
	question = "What are you doing?";
	text1 = "_I am,_ Kass says slowly, _considering the status of the expedition. We are very near the end of our journey, I think, but we cannot move on just yet. Something is wrong._ He pauses. _But you must speak to Pithoss about that._";
	text2 = "He frowns deeply. _Pithoss... he... has an idea about what we should do now. The Goddess... Althanazaria... gave us some disturbing information, and... you must speak to him about it. I will keep my thoughts to myself._";
	text3 = "_I am preparing the appropriate remarks for our entrance into Danatha,_ Kass says. _We must inform them that the children of Thsss have returned, having finally learned the virtues of patience and peace. We will have to speak quickly to avert a war._";
	action = DEP_ON_SDF 51 1 0;

begintalknode 77;
	state = 75;
	personality = 458;
	nextstate = 75;
	condition = 1;
	question = "Have you heard anything from Britha?";
	text1 = "_Yes,_ he says. _I've spoken with her about the current status of the homeland. She says that the empire's leadership is lacking in talent, and that our reception may be less warm than we might like. She also says...._ He drifts off into thought.";
	text2 = "Resuming, he says, _We are bringing the Prophet's body to the homeland, because then he will at least be buried in the land that he sought for his entire life. If only he could have made it, just to be in the land, to see the place._";
	text3 = "He adds, _He wanted to be there, you know, in the place, and he would not have been happy anywhere else, no matter what we found there. The land would have been enough._ He drifts off into his own thoughts again.";
	text4 = "_Yes,_ he says. _I've spoken with her about the current status of the homeland. She says that the empire's leadership is lacking in talent, and that our reception may be less warm than we might like._";
	text5 = "He adds, _But I have spoken with her about what we might do to avoid raising an alarm in the city, and I believe that we have a plan figured out. We should be able to enter without causing war._";
	code =
	if (get_flag(51,1) == 1) {
		remove_string(1);
		remove_string(2);
		remove_string(3);
		}
	else {
		remove_string(4);
		remove_string(5);
		}
break;