// TOWN DIALOGUE SCRIPT
//    Town 29: Peninsula 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 = 290;
	nextstate = 1;
	condition = 1;
	question = "Pithoss";
	text1 = "Sliths don't show emotion as much as humans do, but Pithoss looks exhausted. The great warrior still carries a spear on his back and still stands taller than nearly any other slith, but he moves slower than he did at the start of the journey.";
	text2 = "_You are here,_ he says. _Good. I must tell you where to go now._";
	text5 = "_What else do you need to know?_ he asks.";
	action = INTRO;

begintalknode 2;
	state = 1;
	personality = 290;
	nextstate = 1;
	condition = (get_flag(29,1) == 0);
	question = "What should I do now?";
	text1 = "_Speak to Kass,_ Pithoss replies. _He is the one sending you on missions right now,_ he says darkly.";

begintalknode 3;
	state = 1;
	personality = 290;
	nextstate = 1;
	condition = ((get_flag(40,1) == 0) && (get_flag(29,1) > 0));
	question = "What should I do now?";
	text1 = "_Legare sought 'higher ground.' We think that means he climbed the mountain to the west. Kass has attempted to scry it, but it is blocked to his sight somehow; great magic is at work there._";
	text2 = "He continues, _We need you to climb the mountain and bring Legare back. No one else here can do it. Phaedra is still regaining her strength. Talas, Ithik, and Silthokh lack faith. Kass has not the physical might, and I do not possess magic._";
	text3 = "He frowns. _Kass and I would not be able to work together adequately, either._ He pauses momentarily but then continues. _So you must go and bring him back to us._";
	text4 = "He adds, _I do not know what you will find on the mountain. Be prepared for anything._";
	code =
	toggle_quest(10,1);
	set_flag(29,3,1);
break;

begintalknode 4;
	state = 1;
	personality = 290;
	nextstate = 1;
	condition = ((get_flag(40,1) == 2) && (get_flag(44,7) == 0));
	question = "What should I do now?";
	text1 = "Pithoss sighs. _After much conferring, we have decided that we must find Ethass. She was our companion on this expedition, and we must help her, regardless of how we feel about the Goddess._ He frowns. You'd guess that there was some argument about that.";
	text2 = "_Our scrying,_ he says, _indicates that she has gone south. We do not believe that she has gotten far, however. The river is blocked with a maze of rocks not far from here, and we do not think that she has passed that, preferring to turn west._";
	text3 = "He continues, _We need you to find her and bring her back. Do this with all haste; we fear that something may have happened to her. If we can, we will send help after you, although I am not sure what that will be._";
	text4 = "After a moment's though, he adds, _We assume that she is still possessed by the Goddess, but that may not be the case. If not, she may be in more danger than we have expected._";
	code =
	toggle_quest(11,1);
	set_flag(29,4,1);
break;

begintalknode 5;
	state = 1;
	personality = 290;
	nextstate = 1;
	condition = get_flag(44,7) == 2;
	question = "What should I do now?";
	text1 = "_Head south,_ Pithoss replies. _Britha knows the land from here to Danatha, so we do not need you to scout anymore. We will stop once more along the way and pitch camp right at the end of our journey along the river._";
	text2 = "His expression is not a pleasant one. _Something has gone wrong. We must deal with it before we finish our journey. But I won't talk about it now. Once we all arrive there, speak to me again, and I will give you more instructions._";
	code =
	if (get_flag(41,1) == 0)
		create_boat(3,29,54,36,0);
	set_flag(41,1,1);
	toggle_quest(10,1);
break;

begintalknode 6;
	state = 1;
	personality = 290;
	nextstate = 1;
	condition = (get_flag(29,1) > 0) && (get_flag(40,1) == 0);
	question = "What do you think about Legare's departure?";
	text1 = "Pithoss is visibly disturbed by the events of a short time ago. _It is not good for the expedition,_ he says. _Even those who don't believe that the Goddess is real are sure that Legare is our leader and is good for this expedition._";
	text2 = "His expression is grim but determined. _We must do everything in our power to bring him back._";

begintalknode 7;
	state = 1;
	personality = 290;
	nextstate = 1;
	condition = (get_flag(40,1) > 0) && (get_flag(44,7) == 0);
	question = "What do you think about Ethass and the Goddess?";
	text1 = "He shakes his head with disbelief. _I am as shocked as anyone else here. I never knew why the Goddess was secretive about her identity, but this makes as much sense as anything that I imagined. She was a dark goddess once, perhaps even still now._";
	text2 = "He slowly continues, _I am a believer in redemption, and if she desires to change, then it may be possible. Hathnazriakh has lied before, though, and because of her blessing, many cities of the homeland were blighted. I would not trust too quickly._";
	text3 = "He shakes his head. _We need to save her, if only for our friend Ethass._ After a moment, he adds darkly, _I am not encouraged by the Goddess's apparent anger at Legare, though. This cannot be good for the expedition._";

// *** Silthokh ***

begintalknode 10;
	state = -1;
	personality = 291;
	nextstate = 10;
	condition = 1;
	question = "Silthokh";
	text1 = "Silthokh notes your approach. His expression is even more displeased than it has been before, and he offers only a grunt when you greet him.";
	text5 = "Silthokh stands silently waiting your next question.";
	action = INTRO;
	
begintalknode 11;
	state = 10;
	personality = 291;
	nextstate = 10;
	condition = (get_flag(29,1) > 0) && (get_flag(40,1) == 0);
	question = "What do you think of Legare's departure?";
	text1 = "He shakes his head. _I am not happy that he left, but I won't lie. I don't believe that the Goddess is real. I have seen nothing that would make me believe it._";
	text2 = "He pauses for a moment and then adds, _Bring him back. We need him to finish this journey._";
	
begintalknode 12;
	state = 10;
	personality = 291;
	nextstate = 10;
	condition = (get_flag(40,1) > 0) && (get_flag(44,7) == 0);
	question = "So, the Goddess was Hathnazriakh.";
	text1 = "Silthokh's eyes blaze with fury. _I knew that Legare was hiding something! I smelled demons in this camp from the beginning, even if I didn't quite know who they were with. But no one believed me._";
	text2 = "He growls. _Well, now we all get to suffer for worshipping the darkest evil goddess in the entire pantheon. This will end badly for all involved, mark my words._";
	
begintalknode 13;
	state = 10;
	personality = 291;
	nextstate = 10;
	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.",10,2,2);
break;

begintalknode 14;
	state = 10;
	personality = 291;
	nextstate = 10;
	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 15;
	state = 10;
	personality = 291;
	nextstate = 10;
	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 16;
	state = 10;
	personality = 291;
	nextstate = 10;
	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 17;
	state = 10;
	personality = 291;
	nextstate = 10;
	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;

// *** Phaedra ***

begintalknode 20;
	state = -1;
	personality = 292;
	nextstate = 15;
	condition = 1;
	question = "Phaedra";
	text1 = "Phaedra sits in her chair, smiling as always, with her baby in her lap. Her good cheer is a stark contrast with just about everyone else in the expedition at this point.";
	text5 = "Phaedra sits and smiles as she waits for your next question.";
	action = INTRO;

begintalknode 21;
	state = 15;
	personality = 292;
	nextstate = 15;
	condition = 1;
	question = "How are you and the baby?";
	text1 = "_Both well,_ she replies. _I'm still not recovered enough to do much work, but I haven't felt anything wrong with me yet. Arcadia seems to be doing fine, too. She cries a healthy amount, which is good, or so I'm told._ She laughs.";
	text2 = "_Quite well,_ she replies. _I'm almost strong enough to get back to fighting the bad guys. Another couple of days and I'll be ready, I think. Arcadia is also okay. She doesn't need sleep except when I'm most wide-awake, and vice-versa._ She grins.";
	code =
	if (get_flag(40,1) == 0)
		remove_string(2);
	else
		remove_string(1);
break;

begintalknode 22;
	state = 15;
	personality = 292;
	nextstate = 15;
	condition = (get_flag(29,1) > 0) && (get_flag(40,1) == 0);
	question = "What do you think about Legare's departure?";
	text1 = "Phaedra's smile vanishes for a brief moment before hesitantly returning. _He... he'll be back. He has wanted this for too long to give it up now. He's just being dramatic. He'll come back and all will be forgiven._";
	text2 = "She swallows probably harder than she intended. _At least, I hope so,_ she adds.";

begintalknode 23;
	state = 15;
	personality = 292;
	nextstate = 15;
	condition = (get_flag(40,1) > 0) && (get_flag(44,7) == 0);
	question = "What do you think about Ethass and the Goddess?";
	text1 = "Phaedra bites her lower lip lightly. _Ethass is a very good friend,_ she says. _She's been taking care of me. Please make sure that nothing happens to her._";
	text2 = "She thinks more, and she continues, _But Hathnazriakh was a deadly enemy of the sliths. I read about her in some of the pastoral poetry. She was considered the most vindictive and cruel of all the dark gods, tormenting her victims for hours or days._";
	text3 = "She shakes her head. _I don't know what to think. The Goddess was good, and I have to believe that Althanazaria was, because the sliths did, but Hathnazriakh was terribly evil. They just don't fit together. I can't understand it._";

// *** Ethass ***

begintalknode 30;
	state = -1;
	personality = 293;
	nextstate = 20;
	condition = 1;
	question = "Ethass";
	text1 = "Ethass looks less comfortable than you've seen her before. If you read her face correctly, she has tear-streaks from recent crying still on her cheeks, and her eyes are drawn and tired. Something is on her mind.";
	text5 = "Ethass waits quietly for your next question.";
	action = INTRO;

begintalknode 31;
	state = 20;
	personality = 293;
	nextstate = 20;
	condition = 1;
	question = "What's wrong?";
	text1 = "_Nothing,_ Ethass says, looking away. She will say nothing more about it.";
	text2 = "_I... I'm just worried about Legare,_ she says hesitantly. _That's all._";
	text3 = "She just looks away. The question seems somewhat silly at this point, really.";
	code =
	clear_strings();
	if (get_flag(40,1) == 0)
		add_string(1);
	else {
		if (get_flag(44,7) == 0)
			add_string(2);
		else
			add_string(3);
		}
break;
	
begintalknode 32;
	state = 20;
	personality = 293;
	nextstate = 20;
	condition = 1;
	question = "What are you doing?";
	text1 = "_I've been taking care of Phaedra,_ she says, _and sometimes helping with other things that need doing. Like most of the people here, I just go wherever Kass or Pithoss tells me._";
	text3 = "_Trying to get better,_ she says. _The barbarians were... not very nice to me._";
	action = DEP_ON_SDF 44 7 0;

// *** Kass ***

begintalknode 40;
	state = -1;
	personality = 294;
	nextstate = 25;
	condition = 1;
	question = "Kass";
	text1 = "Kass paces uncomfortably near the entrance to the temple. He hardly even glances at you as you approach, looking upset.";
	text5 = "Kass paces as he waits for your next question.";
	action = INTRO;

begintalknode 41;
	state = 25;
	personality = 294;
	nextstate = 25;
	condition = get_flag(44,7) == 0;
	question = "Where is Legare?";
	text1 = "_He has... sought higher ground,_ replies Kass. _That must mean that he journeyed up the mountain to the west. More than that, we do not know, but Pithoss can tell you what you need to do._";
	text3 = "_He is in his tent, meditating,_ replies Kass. _This has been a very complicated time for him, so he is attempting to process it all._";
	action = DEP_ON_SDF 40 1 0;

begintalknode 42;
	state = 25;
	personality = 294;
	nextstate = 25;
	condition = 1;
	question = "What should I do now?";
	text1 = "_Go to Pithoss for that information. He... he is the one who has decided our course of action._ Kass shakes his head doubtfully.";

// *** Talas ***

begintalknode 50;
	state = -1;
	personality = 295;
	nextstate = 30;
	condition = 1;
	question = "Talas";
	text1 = "Talas stands in the shrine of the Goddess, morbidly doing little. He offers you a muted greeting as you approach.";
	text5 = "Talas stands, waiting for your next question.";
	action = INTRO;

begintalknode 51;
	state = 30;
	personality = 295;
	nextstate = 30;
	condition = 1;
	question = "What's wrong?";
	text1 = "_Nothing in particular,_ he replies. _I'm nervous, but I'm not sure why._ He hesitates. _I... I think that Silthokh and Ithik are fed up with Kass sending you on ridiculous quests, which delays our progress. This must boil over soon._";
	text3 = "_With Legare gone,_ Talas replies darkly, _I do not know how we can possibly reach the homeland. I would go on -- I need no leader to drive me -- but I know many here who would turn around and go back to Thassaka, if that were even possible._";
	text5 = "He groans. _We've been worshipping a dark goddess this whole time, that's what's wrong. I couldn't believe in the Goddess without evidence, but now we have it aplenty, and I cannot bear what we know._";
	text6 = "Shaking his head, he continues. _Our expedition is cursed, and this temple which I have built is an abomination, a tribute to the goddess who has caused as much suffering to slithkind all the others put together. Have we any reason for hope?_";
	text7 = "_Legare is dead,_ Talas says bluntly. _Many who have questioned their faith will now lose it. Can we reach Danatha now?_ He shakes his head dismissively. _I will continue, as will the others, but we must finish this soon, or we will fall apart._";
	code =
	clear_strings();
	if (get_flag(29,1) == 0)
		add_string(1);
	else {
		if (get_flag(40,1) == 0)
			add_string(3);
		else {
			if (get_flag(44,7) == 0) {
				add_string(5);
				add_string(6);
				}
			else
				add_string(7);
			}
		}
break;

begintalknode 52;
	state = 30;
	personality = 295;
	nextstate = 30;
	condition = 1;
	question = "What are you doing?";
	text1 = "_Checking the shrine for any possible defects,_ he replies. _It withstood the journey to here from the old camp very well, but it's always good to check._";
	text2 = "He adds grimly, _And it keeps one's mind off of less pleasant matters._";
	text3 = "_Contemplating our doom,_ he says. _We've abandoned the construction of the shrine, so I have nothing else to do._ He coughs.";
	text5 = "_I'm looking at this shrine one last time. We're going to leave it here when we move on. The Goddess -- Althanazaria -- told us that it was not necessary._ He sighs. _So much work... for nothing._";
	code = 
	clear_strings();
	if (get_flag(44,1) == 0) {
		add_string(1);
		add_string(2);
		}
	else {
		if (get_flag(44,7) == 0)
			add_string(3);
		else
			add_string(5);
		}
break;

// *** Ithik ***

begintalknode 60;
	state = -1;
	personality = 296;
	nextstate = 35;
	condition = 1;
	question = "Ithik";
	text1 = "Ithik stands here, staring out at the waters, whispering soft lines of poetry to himself. Every now and then, he takes out a book -- it's the Khalthanad -- and refers to it.";
	text5 = "Ithik continues reciting while he waits for your next question.";
	action = INTRO;

begintalknode 61;
	state = 35;
	personality = 296;
	nextstate = 35;
	condition = 1;
	question = "What are you doing?";
	text1 = "_I'm memorizing a part of the Khalthanad,_ Ithik replies. _It comes from the part during which Khalthas is in mid-conversation with the goddess on the mountain._";
	text2 = "He continues, _Sometimes when I worry or doubt about our unknown goddess, I remember that Khalthas faced such anxiety as well, and he conquered it. The great ones of history overcome._";
	text3 = "He adds, _I wonder if the sliths of the classical age ever tried to figure out who Khalthas's goddess was. They must have. I bet they thought that it was Sothana, the queen of the gods, or Althanazaria, a goddess of the hunt._";
	text4 = "As an afterthought, he adds, _More likely Sothana, the more glorious of the two._ He leaves unspoken the question of the identity of Legare's goddess.";
	text5 = "_I'm memorizing part of the Khalthanad,_ Ithik replies. _Khalthas is wandering, lost, after speaking with his goddess -- _ he pauses for a moment over the awkwardness of that reference after the recent revelations _ -- and is seeking a new kingdom._";
	text6 = "He continues, _It gives me hope to think that, once, Khalthas was just as directionless and confused as this expedition is right now._";
	code =
	if (get_flag(40,1) == 0) {
		remove_string(5);
		remove_string(6);
		}
	else {
		remove_string(1);
		remove_string(2);
		remove_string(3);
		remove_string(4);
		}
break;

begintalknode 62;
	state = 35;
	personality = 296;
	nextstate = 35;
	condition = (get_flag(40,1) > 0);
	question = "What do you think about the Goddess?";
	text1 = "He shakes his head. _I don't know what to think. Pithoss tells me that Hathnazriakh used the faith of the cults of Althanazaria against the homeland sliths, poisoning their cities and silently destroying them. This was a terrible evil._";
	text2 = "He sighs. _On the other hand, Legare believes in her, and without him, I don't know where this expedition could go. And she claims to have reformed. But can a dark goddess really reform? Could Nathaganth simply stop being evil, if he chose?_";
	text3 = "He shrugs. _I don't know what to think, really._";
	text4 = "He shakes his head. _I'm willing to accept her story,_ he says, _but it all seems very strange. I don't know what to think._";
	code =
	if (get_flag(44,7) == 0) {
		remove_string(1);
		remove_string(2);
		remove_string(3);
		}
	else
		remove_string(4);
break;

begintalknode 63;
	state = 35;
	personality = 296;
	nextstate = 35;
	condition = get_flag(42,3) == 1;
	question = "How's Britha?";
	text1 = "_I've told her the whole story. She seems to be taking it pretty well. When she found out that most of us were exiles, she didn't try to kill us, which was about as much as I had hoped for. Give her time, and she'll come around._";

// *** Britha ***

begintalknode 70;
	state = -1;
	personality = 297;
	nextstate = -1;
	condition = 1;
	question = "Britha";
	text1 = "Britha is bandaging one of her wounds. She doesn't seem inclined to talk to you at the moment.";

// *** Pithoss before everything ***

begintalknode 70;
	state = -1;
	personality = 298;
	nextstate = -1;
	condition = 1;
	question = "Pithoss";
	text1 = "You approach Pithoss to talk to him, but he looks too busy. He won't speak to you just now.";