// TOWN DIALOGUE SCRIPT
//    Town 15: Lava Ocean Camp

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

begintalkscript;

variables;
int i,j,k,choice;


// *** Ethass ***

begintalknode 1;
	state = -1;
	personality = 150;
	nextstate = 1;
	condition = 1;
	question = "Ethass";
	text1 = "Ethass glares at Silthokh. Her claws are clenched and her teeth grit, a clear sign that she's upset, but she says nothing. She turns to you as you approach. _Oh, hi there,_ she says.";
	text5 = "Ethass, still looking irritated at Silthokh, waits for your next question.";
	action = INTRO;

begintalknode 2;
	state = 1;
	personality = 150;
	nextstate = 1;
	condition = get_flag(15,3) == 0;
	question = "What was that argument all about?";
	text1 = "_Nothing,_ she mutters. _Nothing at all._ She refuses to say any more about it.";

begintalknode 3;
	state = 1;
	personality = 150;
	nextstate = 1;
	condition = 1;
	question = "How are you doing?";
	text1 = "_All right, I suppose,_ she replies. _This place is nasty and hot. I'll be glad to get out of here. It makes me uncomfortable. But then, this is the price we have to pay to get back to the homeland._";
	text3 = "_I am worried, just as worried as Silthokh and the others. We are running out of water. Food is not too short yet, although it is running out as well, but water is more important, especially around here. I... I have faith, but I am afraid._";
	action = DEP_ON_SDF 15 3 0;

begintalknode 4;
	state = 1;
	personality = 150;
	nextstate = 1;
	condition = get_flag(15,3) == 1;
	question = "Do you know anything about Phaedra's pregnancy?";
	text1 = "She frowns. _She's nearly nine months into her term,_ she says slowly, suspiciously, _so it should be ending soon. That's all I know._ She looks away, clearly not wanting to talk about it.";

// *** Phaedra ***

begintalknode 5;
	state = -1;
	personality = 151;
	nextstate = 4;
	condition = 1;
	question = "Phaedra";
	text1 = "Phaedra sits in her chair reading a book. She's still smiling, as cheerful as ever, and greets you with a bright, _Hello!_";
	text5 = "Phaedra reads her book, waiting for your next question.";
	action = INTRO;

begintalknode 6;
	state = 4;
	personality = 151;
	nextstate = 5;
	condition = 1;
	question = "How are you feeling these days?";
	text1 = "_Well, moving around is getting pretty difficult. Getting here was hard, as you might imagine. But I'm excited: my baby will be born any day now! It's just a little while yet._";
	text3 = "She smiles weakly. _It won't be long, yet. The little guy is just about ready to come out. I can't wait to play with my baby!_";
	action = DEP_ON_SDF 15 12 0;

begintalknode 7;
	state = 5;
	personality = 151;
	nextstate = 4;
	condition = 1;
	question = "Cool!";
	text1 = "_Isn't it?_ She grins broadly.";

begintalknode 8;
	state = 5;
	personality = 151;
	nextstate = 6;
	condition = 1;
	question = "Seriously, though, who's the father?";
	text1 = "_Why do you ask?_ she says, frowning. _Have you been talking with Silthokh?_";
	text3 = "She frowns deeply and will no longer respond. This is clearly something that she does not at all want to talk about. It must be a sensitive subject.";
	code =
	if (get_flag(15,12) == 1) {
		remove_string(1);
		end();
		}
	else
		remove_string(3);
break;

begintalknode 9;
	state = 6;
	personality = 151;
	nextstate = 4;
	condition = 1;
	question = "Not about you, no.";
	text1 = "_Good._ She looks mildly upset. _He's been saying things. Things that aren't very nice. He thinks I don't know._ She falls silent.";
	action = SET_SDF 15 2 1;

begintalknode 10;
	state = 4;
	personality = 151;
	nextstate = 4;
	condition = 1;
	question = "What are you reading?";
	text1 = "_It's a book of pastoral poetry. It's quite pretty. It speaks of the lonely solitude of long fishing trips into the giant lakes of the homeland, hours of nothing but the occasional bite of a fish to punctuate one's thoughts._";
	text2 = "She adds, _It also explains how the gods shaped these caves and made the fish, and the reasons why the sliths fish at different times of the year in different places, as the temperatures of the lakes change._";
	text3 = "She laughs. _It's all very... fascinating._";

// *** Kass ***

begintalknode 15;
	state = -1;
	personality = 152;
	nextstate = 8;
	condition = 1;
	question = "Kass";
	text1 = "Kass paces the room, obviously unsettled. He nods to you as you walk in, but he says nothing.";
	text5 = "Kass waits patiently for your next question.";
	action = INTRO;

begintalknode 16;
	state = 8;
	personality = 152;
	nextstate = 8;
	condition = 1;
	question = "What am I supposed to do now?";
	text1 = "_Follow up your lead in the lava lizard cave to the west. Talas has cleared the way for you now, so you can see where it goes. Scout until you find another safe spot for us to approach._";
	text2 = "_Go back to your tent and rest. The Prophet, Pithoss, and I will meet to discuss our next move._";
	text3 = "_The Prophet and I have discussed, but we are at a loss. Did you find anything in the lava lizard cave that might help determine where to look next?_";
	text4 = "_Explore the lab in the east, and find out if there's a way out there. Report back either way._";
	text5 = "Kass's face is grave. _The Prophet, Pithoss, and I have met, and we have discovered a terrible reality: Silthokh is right. We are almost out of supplies._";
	text6 = "He looks away for a moment. _We must find a way out of this pit of fire, or we will all die._ His eyes return to you. _We have scried. There are two caves remaining in the Lava Ocean. One, to the north-east, cannot have an exit. It is too small._";
	text7 = "His eyes flash. _But the one to the south, it may very well have such an exit. It is through a small, difficult-to-see passage in a nook in the walls. Go to it. It is our last hope._";
	code =
	clear_strings();
if (get_flag(15,12) == 1) {
	add_string(5);
	add_string(6);
	add_string(7);
	toggle_quest(15,1);
	set_flag(15,13,1);
	}
else {
	if (get_flag(15,3) == 0)
		add_string(1);
	if (get_flag(15,3) == 1)
		add_string(2);
	if (get_flag(15,3) == 2)
		add_string(3);
	if (get_flag(15,3) == 3)
		add_string(4);
	}
break;

begintalknode 17;
	state = 8;
	personality = 152;
	nextstate = 8;
	condition = ((get_flag(17,1) == 1) && (get_flag(15,3) == 0));
	question = "I followed the path through the cave, but it doesn't lead out. (Tell him what you found.)";
	text1 = "Kass listens, frowning, as you explain that the ancient path out of the lava lizard cave is now blocked. _This is unfortunate,_ Kass says when you are done. _We have no other scouts, and we have no other possible ways out of here._";
	text2 = "He continues, _We may have to go back to Thassaka, but that would make this journey a difficult waste of time. I must meet with the others, and we will figure out what to do. In the meantime, go back to your tent and rest. Come back in a few hours._";
	code =
	toggle_quest(5,0);
	award_party_xp(10,60);
	set_flag(15,3,1);
break;

begintalknode 18;
	state = 8;
	personality = 152;
	nextstate = 8;
	condition = 1;
	question = "Why is everyone around here on edge?";
	text1 = "_Perhaps it is our location. We are on a small, rocky island in the midst of an ocean of lava. Monsters roam the land around us, and if they attack in large numbers, we will likely die._";
	text2 = "He shrugs, unconcerned. _There is no reason to worry, though._";

begintalknode 19;
	state = 8;
	personality = 152;
	nextstate = 8;
	condition = (get_flag(17,3) == 1) && (get_flag(15,3) == 2);
	question = "I read a note about a lab in the east. (Tell him about it.)";
	text1 = "He listens closely as you describe what you remember. When you are done, he says, _Yes, this is where you must go now. Investigate that lab. If you can find a way out there, clear it and then report back to us. If not... then the Goddess save us all._";
	code =
	set_flag(15,3,3);
	toggle_quest(6,1);
break;

begintalknode 20;
	state = 8;
	personality = 152;
	nextstate = 8;
	condition = (get_flag(17,3) == 0) && (get_flag(17,1) == 1);
	question = "I haven't found anything in the lava lizard cave about a way out.";
	text1 = "_Then you must go back and explore that area more. Surely they must have left some traces behind of some route. Come back when you have found something._";

begintalknode 21;
	state = 8;
	personality = 152;
	nextstate = 8;
	condition = get_flag(15,3) == 1;
	question = "Do you know anything about Phaedra's pregnancy?";
	text1 = "His eyes widen momentarily at this non sequitur. _No, not at all. What makes you think that I would?_ You admit that you have no reason to think so. _No. I don't know anything about it._";
	text2 = "He adds, _Well... I do know that she left Vasskolis not long after you did when we arrived, and she visited Fort Dranlon, her former post. When she came back, months later, she was obviously pregnant. I imagine that she has a husband back there._";

// *** Pithoss ***

begintalknode 25;
	state = -1;
	personality = 153;
	nextstate = 12;
	condition = 1;
	question = "Pithoss";
	text1 = "Pithoss wanders the room, clearly agitated. He gives you a tense greeting as you approach, running his claws along his slith spear that he normally on his back but now is carrying openly in his hands.";
	text5 = "Pithoss paces as he waits for your next question.";
	action = INTRO;

begintalknode 26;
	state = 12;
	personality = 153;
	nextstate = 12;
	condition = 1;
	question = "What am I supposed to do now?";
	text1 = "_Ask Kass for that information. I am spending my time assisting Legare right now._";

begintalknode 27;
	state = 12;
	personality = 153;
	nextstate = 12;
	condition = 1;
	question = "What are you doing?";
	text1 = "_Considering the Khalthanad,_ he replies. You notice that he has a copy in his hand. _I think that all Avernite sliths forgot this poem after passing through the steel doors, but not all sliths forgot poetry._";
	text2 = "His eyes become distant. _Not long after the exile, the Darklings and the Bahssikavans began a savage war. Thsss would condone no disobedience, and the Bahssikavan rebellion was mutiny. As the war went on, Thsss began composing the Battle Chants._";
	text3 = "He continues, _They were told and re-told every year, expanded to include the new events in the war. Even after Thsss's death, more sections were composed. Finally, after the Darklings moved on and forgot the location of Bahssikava, they were complete._";
	text4 = "He finishes, _In my childhood, we continued to recite the Ancient Battle Chants, year after year, passing on the tradition. They were our Khalthanad, our heritage._ He looks back to you again. _I have a new understanding of them now._";
	text5 = "_I am thinking,_ he replies. _Silthokh is not wrong: we are short on water and other supplies. It is urgent that we get out of the Lava Ocean and find more hospitable land, or else we may not have enough strength to return to Thassaka._";
	text6 = "He sighs, his fingers running along the metal of his spear. _I am cursing the foul pride that led Kass to convince Legare not to return to Thassaka when it was still possible. We are nearly out of supplies. In a short time, we will have no water._";
	text7 = "He continues, _We knew that we were running short, and indeed, Silthokh has been continually warning us about it. Kass, however, did not want to retreat; he said that it would be inglorious and unbecoming. He convinced Legare of this, over my protests._";
	text8 = "His voice runs darker. _But now we cannot retreat; we do not have enough supplies to last us to Thassaka. If we cannot get out of here soon, we will all die._";
	code =
	clear_strings();
	if (get_flag(15,12) == 1) {
		add_string(6);
		add_string(7);
		add_string(8);
		}
	else {
		if (get_flag(15,3) == 1)
			add_string(5);
		else {
			add_string(1);
			add_string(2);
			add_string(3);
			add_string(4);
			}
		}
break;
	
begintalknode 28;
	state = 12;
	personality = 153;
	nextstate = 12;
	condition = get_flag(15,3) == 1;
	question = "Do you know anything about Phaedra's pregnancy?";
	text1 = "_Little,_ he says, apparently unsurprised that you would ask him. _I have heard that it is possible for humans to mate with sliths, although I have never seen the result of such a pairing, so I do not know for sure that this report is true.";
	text2 = "_Indeed,_ he continues, _although I never did, some Darklings occasionally raped human women during the raids, and I've never seen half-slith babies. Perhaps it is just a myth.";
	text3 = "_But if the stories are true, the father may be one of the sliths on this expedition, although just who remains a mystery._";
	
// *** Kass after Silthokh confrontation ***

begintalknode 35;
	state = -1;
	personality = 152;
	nextstate = 15;
	condition = 1;
	question = "Kass";
	text1 = "Kass looks infuriated after that confrontation, but he keeps it well in check. _Tell me,_ he says, _what did you find in the lab?_";

begintalknode 36;
	state = 15;
	personality = 152;
	nextstate = 15;
	condition = 1;
	question = "(Describe your experience.)";
	text1 = "Kass listens as you explain. _No way out, you say,_ he says. _Yes. This is bad._ He thinks very carefully for a moment. _I need to speak with the Prophet and Pithoss. Take some time to rest. In a few hours, I should be ready for you._";
	action = SET_SDF 15 5 2;

// *** Silthokh ***

begintalknode 40;
	state = -1;
	personality = 154;
	nextstate = 20;
	condition = 1;
	question = "Silthokh";
	text1 = "Silthokh stands before his goods, ";
	text5 = "_Yes, of course, what else can I do for you?_ Silthokh asks.";
	action = INTRO;

begintalknode 41;
	state = 20;
	personality = 154;
	nextstate = 20;
	condition = 1;
	question = "How's business?";
	text1 = "Silthokh shrugs. _I've seen worse,_ he says. _A few still have money of some kind and are willing to purchase some of my goods for their comfort. Others can barter._";
	text3 = "_Not good,_ he says plainly. _Not many have money still, and the few that do are not willing to part with it. We've moved almost entirely to bartering, but I can only convince a few people that what I have is worth buying._";
	text5 = "He looks away darkly. _No one is buying. We are stuck here in this hellish wasteland, and there is no hope._";
	code =
	clear_strings();
	if (get_flag(15,12) == 1)
		add_string(5);
	else {
		if (get_flag(15,3) == 0)
			add_string(1);
		else
			add_string(3);
		}
break;

begintalknode 42;
	state = 20;
	personality = 154;
	nextstate = 20;
	condition = 1;
	question = "Did you pick up anything in Thassaka?";
	text1 = "_Of course,_ he says. _In particular, I grabbed a few spellbooks. If you have any interest, let me know._";

begintalknode 43;
	state = 20;
	personality = 154;
	nextstate = 20;
	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.",6,2,2);
break;

begintalknode 44;
	state = 20;
	personality = 154;
	nextstate = 20;
	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 45;
	state = 20;
	personality = 154;
	nextstate = 20;
	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 46;
	state = 20;
	personality = 154;
	nextstate = 20;
	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 47;
	state = 20;
	personality = 154;
	nextstate = 20;
	condition = get_flag(15,3) == 0;
	question = "What was that argument with Ethass about?";
	text1 = "He scowls. _Nothing,_ he mutters.";

begintalknode 48;
	state = 20;
	personality = 154;
	nextstate = 21;
	condition = get_flag(15,3) == 1;
	question = "Do you know anything about Phaedra's pregnancy?";
	text1 = "His lips twist angrily. _She carries the spawn of demons,_ he says, _I know that much._";

begintalknode 49;
	state = 21;
	personality = 154;
	nextstate = 20;
	condition = 1;
	question = "How do you know that?";
	text1 = "_Because! If it were someone reputable, she wouldn't hide it like this, would she? It's someone she's ashamed of._";
	text2 = "His hands clench angrily. _It's bad enough to have any woman on this journey, but a pregnant woman, her belly thick, bulging, ripening and rottening, filling with blood and bile, ready to spew forth from between her legs...._ He trails off.";
	text3 = "His eyes find you again, having wandered off during his speech. _It is not good for the expedition,_ he says, shaking his head. _Not good at all._";
	
begintalknode 55;
	state = 20;
	personality = 154;
	nextstate = 20;
	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;

// *** Ithik ***

begintalknode 50;
	state = -1;
	personality = 155;
	nextstate = 30;
	condition = 1;
	question = "Ithik";
	text1 = "Ithik stands alone in this tent, pensive. He balances more heavily on one leg and then on the other, looking at you uncomfortably. There is clearly something on his mind.";
	text5 = "Ithik shifts from foot to foot, uncomfortably waiting for your next question.";
	action = INTRO;

begintalknode 51;
	state = 30;
	personality = 155;
	nextstate = 31;
	condition = 1;
	question = "What's wrong?";
	text1 = "He glances back and forth before he speaks, to make sure that no one can hear him. _We've been talking, Silthokh, Talas, and I. We're not sure about some of the things that have been happening on this expedition._";

begintalknode 52;
	state = 31;
	personality = 155;
	nextstate = 32;
	condition = 1;
	question = "What are you not sure about?";
	text1 = "_Any of it. It seems a little crazy to us for Legare to lead us into an ocean of lava and have us just sit here while you try to figure out how to get us out._";
	text2 = "He begins ticking off points on his claws. _We have only limited supplies of food, and if we run out, we will have a long and difficult trip back to Thassaka. And,_ he says, ticking off another, _monsters or barbarians may attack us on the way back._";
	text3 = "He ticks off another. _We've begun wondering about Phaedra. She's a human, the only important one in the expedition._ You are about to object, but _important_ clearly excludes Machrone. _She is pregnant, but none of us know how. I don't trust humans._";
	text4 = "He ticks off another. _We've begun wondering about Phaedra. She is pregnant, but none of us know how._ He looks about to say more, but he stops himself.";
	text5 = "He shakes his head. _Dark times._";
	code =
	if (species_in_party(0))
		remove_string(3);
	else
		remove_string(4);
break;

begintalknode 53;
	state = 32;
	personality = 155;
	nextstate = 32;
	condition = get_flag(15,1) == 1;
	question = "Is that what Silthokh was hassling Ethass about?";
	text1 = "_Yes. Ethass is Phaedra's best friend here. If anyone knows who the father of Phaedra's child is, it's Ethass._";

begintalknode 54;
	state = 32;
	personality = 155;
	nextstate = 32;
	condition = 1;
	question = "Why does it matter who the father is, anyway?";
	text1 = "_Because!_ Ithik's voice begins to rise out of control, but he calms himself. _Because,_ he continues, _we want to make sure that there are not traitors in our midst._ He does not seem inclined to elaborate.";

// Node 55 used by Silthokh

// *** Ithik w/ Talas around ***

begintalknode 57;
	state = -1;
	personality = 155;
	nextstate = 35;
	condition = 1;
	question = "Ithik";
	text1 = "Ithik glances at Talas, holding his silence while he waits for your next question.";

begintalknode 58;
	state = 35;
	personality = 155;
	nextstate = 35;
	condition = 1;
	question = "What's up?";
	text1 = "_Oh, nothing._ He doesn't seem to want to talk.";

begintalknode 59;
	state = 35;
	personality = 155;
	nextstate = 35;
	condition = get_flag(15,3) == 1;
	question = "Do you know anything about Phaedra's pregnancy?";
	text1 = "He looks very uncomfortable, glancing at Talas again. _No, nothing._";

// *** Talas ***

begintalknode 60;
	state = -1;
	personality = 156;
	nextstate = 40;
	condition = 1;
	question = "Talas";
	text1 = "Talas nods at you as you approach. He seems more tired than the last time you saw him, more worn out. The Lava Ocean must be taking its toll on him.";
	text5 = "Talas sighs, resting as he waits for your next question.";
	action = INTRO;

begintalknode 61;
	state = 40;
	personality = 156;
	nextstate = 40;
	condition = 1;
	question = "How are you holding up?";
	text1 = "_I'm fine,_ he says tiredly. _I was disappointed when I found out that we could not escape by the tunnel that you found, but we have enough food to survive for a short while longer. We are short of wood and other supplies, but we will make it._";
	text2 = "He adds grimly, _For a while, at least._";
	text3 = "He simply looks down, his expression alone speaking of the doom hanging over the head of the expedition.";
	action = DEP_ON_SDF 15 12 0;

begintalknode 62;
	state = 40;
	personality = 156;
	nextstate = 40;
	condition = get_flag(15,3) == 1;
	question = "Do you know anything about Phaedra's pregnancy?";
	text1 = "He looks uncomfortable and glances at Ithik. It appears that neither wishes to speak in front of the other. _No,_ he says.";