// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(97,0) == 0;
	question = "special";
	text1 = "There is a large farm here, at the base of the eastern wall of the Eastern Gallery. Over the last few months, they have largely abandoned their Blighted crops and turned to raising lizards. There are quite a few pens.";
	text2 = "If the sign at the entrance is to be believed, this is an Anama colony. When the farmers here see you, they get very nervous. Being soldiers, they don't stop you, but they are certainly not happy to see outsiders.";
	text3 = "Wherever they are, the Anama tend to keep their distance from the rest of society. That is what is necessary to be free from (what they see as) the corrupting influences of magic.";
	action = SET_SDF 97 0 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(97,6) == 0;
	question = "special";
	text1 = "Someone decided to spend eternity with a view. This sarcophagus looks out over a lovely vista. The lights of Silvar are visible in the mists to the south, and, if you lean out a bit, you can see the water to the southwest.";
	text2 = "However, the dead are jealous of their real estate. When you get close to the altar, you set off a magical trap. There is a flash of light, and defenders appear.";
	action = SET_SDF 97 6 1;
	code =
		activate_hidden_group(9);
		set_name(10538,"Guardian Spirit");
		set_boss_level(10538,1);
	break;
	


begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Anama Farms";
	text3 = "  Fine meat and skins.";
	text4 = "  Closed - We currently only deal with the army of Avernum. Many apologies.";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You try to talk to one of the Anama farmers, but they are both very busy and very nervous about talking to you.";
	text2 = "Raising the lizards and keeping them under control requires all of their concentration. One of them says, _Please find Teacher Jessica. She speaks for us to the outsiders._";
	text3 = "They are currently gathering their belongings and preparing their lizard caravan for the long journey west. One of them says, _Thank you for helping us. Forgive our rudeness, but we need to prepare for our departure._";
	code =
		if (gf(97,2) < 2)
			rs(3);
			else rs(2);
	break;

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are a lot of lizards at this farm. Their claws and teeth have been filed down, and they wear muzzles. Even then, many of the Anama bear scars which testify to how unpleasant working with these beasts can be.";
	text2 = "Right now, the Anama are preparing the lizards for the long journey west. Hiking through hundreds of miles of tunnels with these unfriendly beasts. That should be fun.";
	code =
		if (gf(97,2) < 2)
			rs(2);
	break;

//

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Teacher Jessica";
	text1 = "There is a middle-aged woman here, expertly using a steel dagger to skin a dead lizard.";
	text2 = "Even though she is covered with sweat and her robes are gruesomely stained, you can tell that she is a leader here. There is something about her confidence and the way that the other Anama are constantly looking to her.";
	text3 = "When you approach, she sets aside her dagger and nods to you. _Greetings. I am Teacher Jessica, of the Anama. We are peaceful people here, and Fort Duvno has said that we are to be left alone._";
	text4 = "_We provide supplies to the army, and we keep to ourselves. So I must ask you, politely, to leave._";
	text5 = "Teacher Jessica continues to efficiently butcher and skin the dead lizard. The Anama are no strangers to hard, humble work. She is quiet when she works, leaving it to you to ask questions.";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = gf(97,1) == 0;
	question = "Greetings to you.";
	text1 = "Teacher Jessica says, _And greetings to you as well. I hope your day greets you with good fortune. However, I must be impolite. We work to supply the army, but all of our dealings are with Fort Duvno directly._";
	text2 = "_In return for our help, we are to be left alone. So please, leave us in peace._ She returns to work.";
	action = END_TALK;
	
begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = gf(97,1) == 0 && gf(110,17) > 0;
	question = "Soussana, the innkeeper in Silvar, suggested that I come and see you.";
	text1 = "Teacher Jessica looks surprised. _Well, Soussana is eccentric in many ways. However, she is a good judge of character, and she knows that we need help. I suppose that I can speak with you. For a short time._";
	action = SET_SDF 97 1 1;
	
begintalknode 13;
	state = 10;
	nextstate = 11;
	condition = gf(97,1) > 0;
	question = "I'd like to know more about the Anama.";
	text1 = "She nods. _I appreciate your interest. Normally, we only receive mockery, or worse. But it would not be wise, in this place, for me to be too much a missionary._";
	text2 = "_I will only say that we Anama believe magic to be a corrupting influence in the world. The work of wizards may seem to be beneficial, but, in the end, it only does harm._";
	text3 = "_Perhaps, in a more peaceful time, I can tell you more. But, for now, it would not be politic._";

begintalknode 14;
	state = 10;
	nextstate = 12;
	condition = gf(97,1) > 0;
	question = "What do you do here?";
	text1 = "_As you can see, we raise lizards. Before, we were weak. We raised mushrooms, even though they were created by magic. Then the Blight came and punished us for our weakness._";
	text2 = "_Thus, the Blight is a lesson to us all. Instead, we work to supply the army._";

begintalknode 15;
	state = 10;
	nextstate = 14;
	condition = gf(97,1) > 0 && gf(97,2) < 2;
	question = "You would like for me to help you?";
	text1 = "She nods. _We have been looking for someone who travels and is not actively hostile to us. We have a small refuge here, but it will not last. We are too close to the Slith Horde. There is little food. And some would cause us harm._";
	text2 = "_We have heard rumors. There are some that would find a way back to the surface without using magic. We would go there. We would aid them in this endeavor. But first, we need to know where they are._";
	code = 
		set_flag(97,2,1);
		toggle_quest(105,1);
	break;

begintalknode 16;
	state = 10;
	nextstate = -1;
	condition = gf(97,2) > 1;
	question = "Do you need any more help?";
	text1 = "_Not from outsiders. Now we begin a great pilgrimage, and this is something we must do for ourselves. I thank you again. Now we must go and serve both our faith and Avernum._";
	action = END_TALK;

begintalknode 17;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Why can't you say more?";
	text1 = "_Because people rely on magic to solve the problems caused by magic. We are already feared and disliked. We would not want to be seen as speaking against the weapons of the army._";

begintalknode 18;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Can I join you?";
	text1 = "_No, sadly. I do not have the tools here to place the proper ... bonds upon you. When the war ends, travel to Ahonaria, in the Northern Reaches. That is the core of our faith in the underworld._";

begintalknode 19;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Where are the other Anama?";
	text1 = "_They are in Ahonaria. It is far to the north. Past the lands controlled by the Slith Horde, I am afraid._";
	text2 = "_They would not be driven out. They stayed to fight. I pray they are safe. By the time we here learned of the horde, we were cut off and unable to join our brothers and sisters._";
	
begintalknode 20;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "What do you provide to the soldiers?";
	text1 = "_Meat and skins. Happily, lizards can eat Blighted mushrooms without their skins and flesh suffering too much damage. Thus, we can survive. Fort Duvno receives everything we can spare, in return for its aid and protection._";

begintalknode 21;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "And nobody bothers you?";
	text1 = "She takes in a breath. _We ... There are brigands. Thugs. The occasional mob. Our kind is rarely welcome. Fortunately, being so close to Fort Duvno prevents harassment. Most harassment._";

begintalknode 22;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Can you teach me any spells?";
	text1 = "She shakes her head. _Normally, we are eager to share the secrets of our art. Our prayers provide power without the corruption of magic. However, I have never had the knack for conveying them to others._";
	text2 = "_It is truly a shame you cannot visit Ahonaria. They could easily help you._";

begintalknode 23;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "What do you think of the Blight?";
	text1 = "_I think that such diseases are part of nature. Every farmer knows so. However, through the use of magic, we came to rely on only one sort of crop. When it died, all went with it._";
	text2 = "_Thus magic, however used, leads us down the path to ruin._";

begintalknode 24;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "Where did you hear these rumors?";
	text1 = "_While trading in Fort Duvno, delivering one of our shipments. We learned of an effort by the army to dig a tunnel to the surface. They thought it foolish, but the idea fascinated us._";

begintalknode 25;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "You would not use portals?";
	text1 = "_In the past, the Anama have used portals to travel from the surface to the underworld and back. A bit of weakness, for which we are being punished._";
	text2 = "_If our kind cannot exist in the underworld without magic, we should not be here._";

begintalknode 26;
	state = 10;
	nextstate = -1;
	condition = gf(97,2) == 1 && gf(98,0) > 0 && gf(98,6) == 0;
	question = "The excavation you have heard of exists. I have been there.";
	text1 = "You tell Teacher Jessica about the Western Excavation, gently letting her know that they have not been hugely successful. She is not deterred.";
	text2 = "_That is a noble effort. Perhaps, with the right sort of help and dedication, they can succeed. Please go there and get us permission to join them. It could be greatly beneficial to both parties._";

begintalknode 27;
	state = 10;
	nextstate = -1;
	condition = gf(97,2) == 1 && gf(98,6) > 0;
	question = "I have been to the Western Excavation. You may join them.";
	text1 = "Teacher Jessica looks thrilled. _This is truly a miracle. A chance to prove salvation may be had, without magic! It sounds like a long, dangerous journey, but it is the best hope for us. For all of us._";
	text2 = "_We will prepare to depart instantly. I thank you. And here is a token for you. A holy artifact, untouched by magic._ She gives you a charm from around her neck.";
	text3 = "_Now excuse me. We must prepare. We will depart as soon as possible._";
	action = END_TALK;
	code = 
		set_flag(97,2,2);
		toggle_quest(105,3);
		award_party_xp(400,28);
		reward_give(468);
	break;		


//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 36;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 37;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 38;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 39;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 40;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 41;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 42;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 43;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 44;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

////

begintalknode 299;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		