// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(29,0) == 0 && gf(29,3) == 0;
	question = "special";
	text1 = "This farmhouse looks like it has been abandoned for years. The floor is covered with dust and garbage, and cavequakes are wearing the walls away a few bricks at a time.";
	text2 = "However, though nobody lives here, it does not go without visitors. You can see faint tracks in the dust and debris on the floor. They lead up to the north wall, and then they stop.";
	text3 = "As you look around, you hear whistling. You look behind you and see that a lone soldier is approaching. He comes from the direction of Bargha.";
	action = SET_SDF 29 0 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(29,1) == 0;
	question = "special";
	text1 = "There is a small outpost hidden under the farmhouse above. This concealed lair has been here for a while, but the walls show signs of recent repair.";
	text2 = "Not far ahead, you can hear humans shouting to each other. Their cries are occasionally punctuated by some beast's loud, bestial roar. There is a battle going on in the next room.";
	action = SET_SDF 29 1 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(29,2) == 0;
	question = "special";
	text1 = "A lone soldier enters the abandoned farmhouse. You watch quietly from a distance. He doesn't notice you.";
	text2 = "He walks up to a bit of grey stone protruding from the north wall and jabs it three times quickly.";
	text3 = "A section of the stone wall slides away, revealing a narrow corridor. He steps through it, and it closes behind him.";
	action = SET_SDF 29 2 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(29,3) == 0;
	question = "special";
	text1 = "You round the corner and see where all of the noise was coming from. There are several members of Bargha's militia here, trying to restrain a prisoner. Alas for them, the prisoner is a giant, and it broke its chains.";
	text2 = "Based on the cages and other unpleasant implements you see in this room, this hidden outpost is a prison of some sort. You do question the wisdom of keeping giants around, though.";
	text3 = "The soldiers immediately see you. One of them shouts, _An Avernite!_ They drop the ropes holding the giant and draw their blades. The giant doesn't hesitate to take advantage of the opportunity.";
	action = SET_SDF 29 3 1;
	code =
		activate_hidden_group(44);
		change_max_health(3157,200);
		set_new_abil(3157,20);
	break;
	
begintalknode 5; // key case
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This case contains several leather cloaks, several hoods, and some truly unnerving metal implements. You leave this gruesome cargo alone.";
	text2 = "There is also a key hanging from a peg inside the door. You take it.";
	code =
		if (gf(29,14) == 0) {
			sf(29,14,1);
			set_spec_item(56,1);
			}
			else rs(2);
	break;



begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are several Barghans here, tending to the newly planted orchards under the watchful eye of patrolling guards.";
	text2 = "Whenever you get close to them, they shy away, and guards move to stand between you and them. Bargha is not a welcoming place.";

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are several Barghan soldiers patrolling the farmland, watching for invaders and keeping the orchard workers in line.";
	text2 = "They react to your approach by drawing their weapons and preparing to fight. Then they realize that you are Avernite soldiers. They sheathe their blades and silently stalk off. They must be under orders to let Avernites pass.";
//

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "There is an old nephil sitting at this table. Her farm is in ruins and her crops are dead, but she still keeps her farmhouse immaculately clean. She is very old for her kind. Her fur has streaks of gray and is missing in patches.";
	text2 = "She is working on making a thin mushroom stew. When you enter, she looks up at you and sighs.";
	text3 = "_Mrrrr. I heard rumors. Rumors of soldiers coming up here. Even in these dark times, there are rumors. I am Gret of Bargha. This is my little farm. I will not be taken off of it._";
	text5 = "Gret offers you some tea. Bits of dried fruit, from the trees outside, hang from her ceiling. That is what she must subsist on out here.";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Tell me about your farm.";
	text1 = "_Mrrr. It is a poor farm, but it is mine. I am growing fruit, as I am commanded. But I will stay here. I will not leave my home. Farrar can do what he likes to me._";

begintalknode 12;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "You were commanded to grow fruit?";
	text1 = "_Lord Farrar of Bargha and his underlings have told us farmers what we must grow now that the Blight has come. And there is wisdom in what they say. But the way they enforce their law is cruel._";

begintalknode 13;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "You refuse to leave your home?";
	text1 = "_Lord Farrar won't let anyone leave Bargha now. To enforce the law, all farmers must stay in the city to rest and come out to work at all other hours._";
	text2 = "_It is cruel, and I will not obey. I will not leave my home._";

begintalknode 14;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "What will he do to you?";
	text1 = "She shrugs. _I do not know. Some are punished cruelly. Others ignored. But we of the Abyss are used to suffering caused by refusal to obey foolish laws._";

begintalknode 15;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Do you have anything to sell?";
	text1 = "She shakes her head. _I am poor. I have retained nothing but what I need to live._";

begintalknode 16;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Can you tell me anything about Bargha?";
	text1 = "_Madmen come and go, but Bargha is my home. It is worse now. One day, it will be better. If I were younger, I would still use my bow to defend it._";

begintalknode 17;
	state = 10;
	nextstate = 13;
	condition = gf(85,10) == 3 && gf(29,2) == 0;
	question = "I am looking for someone. I think he is being hidden in a farmhouse near here.";
	text1 = "She thinks about this. _There is ... The ruined farmhouse to the north has made me suspicious. I see soldiers go in, sometimes. And they don't come out._";

begintalknode 18;
	state = 13;
	nextstate = 14;
	condition = 1;
	question = "Tell me more.";
	text1 = "_I don't know more. I keep wanting to hide outside and look in through the windows. See what they are doing in there. If I were younger I would._";

begintalknode 19;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "Why don't you?";
	text1 = "_I am old now, and my kind has a saying. Curiosity kills the nephil. So true._";


//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "There is a young priest standing here by the back wall of his cell. He sways slightly from side to side, and his eyes have a definite deranged look.";
	text2 = "His body lacks signs of obvious physical abuse, and yet whatever has happened here has affected him greatly. And not for the better. Still, he has maintained a few scraps of discipline and dignity.";
	text3 = "He notes the insignia on your shoulder. _You are from Avernum. Or, you claim to be. Some trick of Farrar's perhaps. No matter. My resources are limited. I must trust. I am Breck-Drayssa, servant of Melanchion, and I will not be broken._";
	text5 = "Breck-Drayssa stands in the back of the cell, swaying gently from side to side. _We still have business to complete._";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = 31;
	condition = 1;
	question = "What has happened to you?";
	text1 = "_I was ... I was captured. I came here with Hrramen-Drayssa. We tried to slip through Bargha. We were sighted. Hrramen escaped. I did not._";

begintalknode 32;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "How did you get into Bargha?";
	text1 = "_The mighty dragon Melanchion commands all the secret ways. And I would rather die than reveal them. As Farrar's thugs have been learning._";

begintalknode 33;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "So you were brought to this prison?";
	text1 = "_I was, right away. Lord Farrar is not so mad as to keep one of the mighty dragon's servants in his own home. He knows that such an insult to the great Melanchion would result in his doom._";

begintalknode 34;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "What have they done to you here?";
	text1 = "He shakes his head. _I will never say. What I have endured here will never leave this place. I will shake it off of me, forever._";

begintalknode 35;
	state = 30;
	nextstate = 32;
	condition = 1;
	question = "Tell me about Melanchion.";
	text1 = "_Melanchion is a dragon, the mightiest of his kind. One day, he will be master of Avernum. He has honored a few lesser creatures like myself by allowing us to serve him. I bear ... I bore his symbol with total obedience._";

begintalknode 36;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "How can you be so loyal to such a creature?";
	text1 = "_Until you have been in the presence of Melanchion, until you have felt his power and wisdom, you cannot understand._";
	text2 = "_There is something restorative about him. Something in his strength that flows into you. I hope being near him will help me to shake off what has ... happened to me here._";

begintalknode 37;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "What was the symbol you spoke of?";
	text1 = "_A golden claw, borne by all who serve the mighty drake. Lord Farrar's servants took mine and destroyed it before my eyes. As if that would shake me. That symbol was but a trinket._";
	text2 = "_The true power of Melanchion is in here._ He points at his chest.";

begintalknode 38;
	state = 30;
	nextstate = -1;
	condition = has_spec_item(3) == 0;
	question = "I was sent here to get a message from you.";
	text1 = "Breck-Drayssa nods. _I suspect a trick of Farrar's, but my strength fades. I must give you the message and hope it is no trick. Farrar has tried very hard to find where I have hidden it._";
	text2 = "He mutters a spell. There was a tiny leather pouch tied around his upper arm, hidden by a powerful charm. The pouch becomes visible. Breck removes a small scroll from it and hands it to you.";
	text3 = "You look at the scroll. It is written in code. The Castle will hopefully know how to decipher it.";
	text4 = "Breck-Drayssa says, _Now I must flee. I will slip back to ... to ..._ Your conversation is interrupted by the sound of shouting. Some of Lord Farrar's soldiers have discovered your intrusion.";
	text5 = "Breck says, _I must flee! I must return to the great drake! I still maintain some strength. We must fight our way out together._";
	code =
		set_spec_item(3,1);
		sf(29,6,1);
		award_party_xp(400,25);
		
		activate_hidden_group(45);
		add_range_to_group(3165,3170,43);
		set_level(30043,20);
		set_name(3170,"Accursed Wolf");
		set_name(3169,"Captain Korte");
		set_boss_level(3169,1);
		set_attack_bonus(3169,10);
		set_new_abil(3169,20);
		alert_char(30043);
	break;
	
//


begintalknode 50;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There is a lone soldier here, walking from Bargha toward the abandoned farmhouse. He is young and seems to have received the worst in armor and weaponry. When he sees you, he is very startled.";
	text2 = "Before you can talk to him, he lets out a yelp and scurries away.";

begintalknode 51;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The young soldier walks up to the north wall of the farmhouse. Then he looks around. When he sees you, he lets out a worried yelp. Then he turns and walks back toward Bargha.";
	text2 = "Whatever he came out here to do, it didn't get done. He'll probably come back later.";
	
begintalknode 52;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There is a chunk of gray stone protruding from the wall. It looks like a button or switch.";
	text2 = "You jab at it a few times, but nothing happens. You can't figure out how to operate it.";
	text3 = "You press it three times quickly. A section of the north wall slides away.";
	text4 = "You press it, but it won't move. It's stuck.";
	code =
		clear_strings();
		as(1);
		if (gf(29,4) > 0)
			as(4);
			else if (gf(29,2) > 0) {
				as(3);
				set_terrain(0,111,136,0);
				sf(29,4,1);
				}
				else as(2);
	break;

begintalknode 53;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There is a slithzerikai prisoner kneeling on the stone floor here, his back to you. You approach him to let him know that he is free.";
	text2 = "Then he turns to face you. He has a chunk of sharpened stone in his hand. One look at his eyes tells you that, whatever happened to him in here, it drove him completely mad.";
	text3 = "He lets out a long, furious hiss and leaps at you.";
	code =
		sf(29,7,1);
		set_attitude(3163,10);
		set_name(3163,"Mad Slith");
	break;
	
begintalknode 54;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Breck-Drayssa falls. As he does, one of the spells he cast in life fades away.";
	text2 = "There was a tiny leather pouch tied around his upper arm, hidden by Breck's spell. The pouch becomes visible. You find a small scroll inside it.";
	text3 = "You look at the scroll. It is written in code. The Castle will hopefully know how to decipher it.";
	text4 = "Your search is interrupted by the sound of shouting. Some of Lord Farrar's soldiers have discovered your intrusion.";
	code =
		set_spec_item(3,1);
		sf(29,6,1);
		
		activate_hidden_group(45);
		add_range_to_group(3165,3170,43);
		set_name(3170,"Charmed Wolf");
		set_name(3169,"Captain Korte");
		set_boss_level(3169,1);
		set_attack_bonus(3169,10);
		set_new_abil(3169,20);
		alert_char(30043);
	break;
	
begintalknode 55;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 56;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 57;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 60;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You realize that something is watching you from the water. You look down into the icy cold, murky liquid and see several worms staring back up at you. One of them extends a slimy proboscis from the water and sniffs.";
	text2 = "Then, before you can react, they swim away.";

begintalknode 61;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You realize that something is watching you from the water. You look down into the icy cold, murky liquid and see several worms staring back up at you. One of them extends a slimy proboscis from the water and sniffs.";
	text2 = "Before you can react, they surge out of the water. They must have smelled something they liked.";
	
////

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