// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(98,0) == 0;
	question = "special";
	text1 = "At last, you have reached the northern end of the Western Reaches. There is an Avernite fort here. A small one, though it has received a lot of wagon and supply traffic.";
	text2 = "The walls are smooth, gently rounded, and emit a soft, green luminescence. It is vahnatai architecture, several decades old. The Avernites must have simply moved in and patched it up.";
	text3 = "There is a lone sergeant walking around in front of the fort. He wields a clipboard and uses it to inventory the equipment waiting to be taken inside the fort.";
	action = SET_SDF 98 0 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(98,2) == 0;
	question = "special";
	text1 = "You enter the low dusty tunnels under the soldier encampment. Tracks and a crude pathway lead north. From that direction, you can dimly hear the echoes of blasting and shouting. The dig must be that way.";
	text2 = "There is a closed gate to the south. Listening carefully, you can hear more shouting, but it sounds like drunken carousing. The faint odor of sweat and rotting garbage wafts from that direction.";
	text3 = "You can't see anyone through the gate. Only crumbling old vahnatai halls. Whoever is down there, they want to be left alone.";
	action = SET_SDF 98 2 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(98,3) == 0;
	question = "special";
	text1 = "You step into the ogre halls. It looks like this tribe has been living here for a long time.";
	text2 = "The early layers of garbage have had time to ossify, creating a solid platform for garbage to come. The walls, once lovely, are covered with smoke marks and grime.";
	text3 = "Ogres look out nervously at you from the barracks ahead. Then they duck back and watch you pass quietly. They're hungry, beaten-down looking creatures. Their chieftain must have powerful control over them.";
	action = SET_SDF 98 3 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The ogres in these chambers are tired and hungry-looking. Most of them show signs of injuries suffered at the dig. They seem beaten down, but they're still huge and strong. They would be dangerous if aroused to battle.";
	text2 = "When you try to talk to them, they look nervous. _Talk to Chief Gunza. We not challenge chief. Gunza leads us._";
	text3 = "Now that Gunza's challenger is dead, they seem even more defeated than before. They just stare at the floor and eat their miserable rations. They know what side your army is on.";
	text4 = "Now that Gunza is dead, they seem eager to claim allegiance to their new leader. _You from Hydera? Tell Hydera he is chief! We not fight Hydera! All hail great Hydera!_";
	code =
		clear_strings();
		as(1);
		if (gf(98,21) > 0)
			as(4);
			else if (gf(98,22) > 0)
				as(3);
				else as(2);
	break;
	
begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You get a good look at Hydera's rebel ogres. They are stronger and more confident than the creatures in Chief Gunza's lair, probably because they grabbed a few crates of food for themselves.";
	text2 = "They are still badly outnumbered, though, and they know it. They gnaw their dried meat and mutter, _Talk to Hydera. Chief Hydera. He is leader now._";
	text3 = "Now that Chief Gunza is dead, they are in a good mood. _You fight for us! You good little person! Soon we go! Take charge! Those cowards who follow Gunza pay, and soon!_";
	code =
		clear_strings();
		as(1);
		if (gf(98,21) > 0)
			as(3);
			else as(2);
	break;

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There is a mangy, savage cave wolf in this pen. It snarls at you when you get close. You keep a safe distance away.";

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




begintalknode 10;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There aren't many soldiers stationed out here, and their time so far out here in the wilderness has left them very isolated and nervous. You tell them what has been happening in the rest of Avernum. It doesn't cheer them up.";

begintalknode 11;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Several stone servants are hard at work hauling piles of rock out of the depths of the excavation. The stones they are moving look recently mined, and some of them show signs of melting, as if they were blasted loose.";
	text2 = "The servants, mindless creatures that they are, walk silently around you.";

begintalknode 12;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The two mages from the dig are currently here, sitting and quietly studying.";
	text2 = "Until Commander Rana orders them to return to work, they are resting here. Though they do take the time to complain extensively about the problems of working with the ogres.";

begintalknode 13;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The excavation doesn't have very many human workers. Two of them, exhausted, burly souls, are sitting here and resting. The work here has given them far more than their fair share of scrapes, bruises, and burns.";
	text2 = "When they realize that you are from the Castle, they fill your ear with complaints about the ogres and the troubles they cause. Then they suggest that you give the commander a hard time. They're not soldiers, so they're free to complain.";
	text3 = "They are very grateful for your help with the ogres situation. The thanks, pats on the back, and offers of mushroom ale are plentiful.";
	code =
		if (gf(98,1) == 0)
			rs(3);
			else rs(2);
	break;
	
begintalknode 14;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Chief Gunza is waiting for you in the dueling pit. He doesn't seem worried. He is more irritated than anything else.";
	text2 = "_You did not have to do this. You did not have to challenge me. Now I have to kill you. Have to save face. Show I am strong and unafraid. After, I will give bodies to commander to get peace between me and army._";
	text3 = "_You should put weapon down. Then end is quick and painless. Otherwise, I make you go slow._ You decline his generous offer. _Then challenge is accepted. You die!_";

begintalknode 15;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Chief Gunza is starting to look weak. Your last blow knocked him back a step. A brief look of concern crosses his massive face.";
	text2 = "_If I must die, I not die alone. I die with my pets, my beautiful pets!_";
	text3 = "_Pack, come! I call you!_";
	code =
		set_attitude(30019,10);
		set_act_at_dist(30019,1);
	break;

begintalknode 16;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Chief Gunza pulls out a flask and takes a swig from it. It immediately invigorates him. _See? I have little battle tricks too! Now I beat you fiercely! Rrrahhhrrr!_";

begintalknode 17;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Even a creature as huge and powerful as Chief Gunza can't survive such an onslaught indefinitely. He collapses to the ground, bleeding from his many wounds.";
	text2 = "_Ahhhh ... Stupid little creature. I could have controlled ... Work could have resumed ... Just needed ... time ... more ... time ..._";
	text3 = "And then the chief of the ogre tribe dies.";

begintalknode 18;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Hydera pulls out a flask and takes a swig from it. It immediately invigorates him. _See? I have little battle tricks too! I as good as Gunza and you! Now I will rebel and win! Rrrahhhrrr!_";

begintalknode 19;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Hydera collapses to the ground, mortally wounded. His rebellion has come to its grim, but inevitable conclusion.";
	text2 = "As he lies dying, he says an inspirational speech, a gasped, soaring paean to the joy of freedom and the dignity of all living creatures. Then, his piece finally and decisively stated, he dies.";
	text3 = "A while later, you wonder if maybe you should write his words down so they can serve as an inspiration to all. Then you realize that, amidst all the stress and chaos of battle, you have forgotten the bulk of what he said. Oh well.";

begintalknode 20;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The wolf snarls at you. You back away.";



//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Sergeant Belos";
	text1 = "The sergeant walks up to greet you. _Another soldier! Don't see many of those out here in the back of beyond. Thought we'd been forgotten, we had._";
	text2 = "_I'm Sergeant Belos. Welcome to the Western Excavation. Now, all I need is to confirm you're allowed to be here, and we can let you in._";
	text5 = "Sergeant Belos continues to walk around and inspect the wagons and supplies. _They always send us just enough to get our work done, and no more. Don't know how they do it._";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = gf(98,10) == 0 && gf(177,6) == 0;
	question = "I don't actually have any orders. I just walked out here.";
	text1 = "_Ahhhh ... Sorry to hear that. After such a long journey, I hate to turn you back. But it's the commander's orders. Without orders, I have to turn you back. Can't have strangers poking around._";
	text2 = "He points to the north. _There's one of those pylons up there. If you know how to use it, you can head back. Otherwise, afraid you have a long walk._";
	text3 = "You try to talk him into letting you in, but you have no luck. _Orders are orders._";
	action = END_TALK;

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = gf(98,10) == 0 && gf(177,6) > 0;
	question = "I have been sent from the Castle to evaluate the status of the excavation.";
	text1 = "_Ahhhh ... Well, we knew this was coming, I suppose. Wouldn't turn you away. Not with you being from the Castle and all._";
	text2 = "Belos shouts a command and, a minute later, the gates begin to slowly open. _Welcome to the excavation._";
	code =
		sf(98,10,1);
	break;
	
begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = gf(98,10) > 0;
	question = "What is the status of the excavation?";
	text1 = "_Yes. Well. You should talk to the commander. He has more the bat's eye view of everything, you know. I just watch the supplies._ He waves his clipboard at you.";

begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = gf(98,10) > 0;
	question = "Can I get supplies and healing?";
	text1 = "_Well, anyone from the Castle can help themselves to everything they see. As for healing, talk to Isla. She can restore your strength._";

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = gf(98,10) > 0;
	question = "There is something else I need to know.";
	text1 = "_I ... Sorry. Just the sergeant. The quartermaster. I don't know anything. Just go in. The commander will help you. I'm not responsible for ... anything._";
	text2 = "He waves you in and returns to work.";
	action = END_TALK;

begintalknode 36;
	state = 30;
	nextstate = -1;
	condition = gf(98,10) == 0 && gf(170,0) >= 2;
	question = "Sergeant, I order you to open the gates.";
	text1 = "Belos notes your superior rank, sighs, and says, _Well, I don't see as I have a choice. I hope you have a good reason to be here, or the commander will be furious with me._";
	text2 = "Belos shouts a command and, a minute later, the gates begin to slowly open. _Welcome to the excavation._";
	code =
		sf(98,10,1);
	break;
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = "There is a powerful mage in this office, engaged in a deadly duel with a large pillar of stone. He is directing a stream of fire at the rock, trying different angles and intensities to break it down.";
	text2 = "You watch the spectacular display for a while. Eventually, he takes a break and looks at you. He isn't pleased to have to spend precious magic-using time talking to a mere soldier.";
	text3 = "_You ... You are new. Not a mere guard, either. I suppose the long-dreaded inspectors from the Castle have finally arrived. I am Incantor Timmons. Ask what you need to._";
	text5 = "Incantor Timmons says, _I suppose I must continue to talk to you. Not even a full wizard is entirely free from the bureaucracy. What do you want to know?_";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = 51;
	condition = 1;
	question = "What were you doing to that rock?";
	text1 = "_Several wizards of Avernum have been pulled from their important and significant duties to come to this remote hole and blast rocks into smaller rocks._";
	text2 = "_If we must suffer this indignity, we might as well perform the task efficiently. The sooner we succeed, the sooner we can be freed from this purgatory._";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "Can you teach me any spells?";
	text1 = "_What? You think I haven't suffered enough indignities? Go to the Tower Colony. They can teach you. I am to concentrate on my duties here, no matter how foolish and tedious._";
	
begintalknode 53;
	state = 50;
	nextstate = 52;
	condition = 1;
	question = "How is the excavation going?";
	text1 = "The mage looks annoyed at the question. _Well, that's what you came to find out, isn't it? As if it wasn't a mad errand in the beginning. Digging randomly through tons of rock looking for an imaginary tunnel to the surface._";
	text2 = "_And then the commander decides to enlist ogres to help with the process. Mindless, grumbling brutes. It is no wonder that the process ground to a halt. And it is not my fault!_";
	
begintalknode 54;
	state = 51;
	nextstate = -1;
	condition = 1;
	question = "You didn't want to come here?";
	text1 = "_Nobody wants to come here._";
	
begintalknode 55;
	state = 51;
	nextstate = -1;
	condition = 1;
	question = "What would you be doing if you weren't here?";
	text1 = "_I would choose to work in the Tower Colony, attempting to find some way to alleviate the Blight. Or perhaps help in the battle against the Slith Horde._";
	text2 = "_But the Castle asked the Tower Colony for mages to come here. Kelner, the master of the tower, volunteered me._";
	
begintalknode 56;
	state = 52;
	nextstate = -1;
	condition = 1;
	question = "You don't believe that the tunnel exists?";
	text1 = "_Well, it might have, once. We did find signs that steep, upward-sloping tunnels were here. But then they were collapsed. Now it's just a jumble of countless tons of rock._";
	text2 = "_And that assumes that the tunnels went to the surface in the first place. Which I doubt._";
	
begintalknode 57;
	state = 52;
	nextstate = 53;
	condition = gf(98,4) < 6;
	question = "Tell me about the ogres.";
	text1 = "_Oh, no! Commander Rana gets to explain that singular bit of genius herself. Mindless creatures, getting in the way of the blasts of fire, always becoming injured due to their clumsiness. And then threatening us! Us!_";
	text2 = "_I am here now instead of at the dig because I threatened to incinerate the next ogre that bothered me._";
	
begintalknode 58;
	state = 53;
	nextstate = -1;
	condition = 1;
	question = "An ogre attacked you?";
	text1 = "_Not yet, but the creatures are clumsy, dumb, and have short tempers. It's only a matter of time before one of them blames us for its own idiocy and attacks._";

begintalknode 59;
	state = 53;
	nextstate = -1;
	condition = 1;
	question = "The ogres get injured?";
	text1 = "_So they claim. Clumsy, forgetful creature. Their thick hides keep them from feeling any sort of real pain, but the fire from our spells startles them._";

begintalknode 60;
	state = 52;
	nextstate = -1;
	condition = gf(98,4) >= 6;
	question = "Tell me about the ogres.";
	text1 = "_Commander Rana tells me that the problems with them have been settled. Good news, I suppose. Although, that doesn't change the fact that we don't have near enough resources to do what they want us to do. This is a doomed errand._";

// 70

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = "There is a small apothecary set up in this cavern. Workers at the excavation can come here to have their wounds treated. The shelves are worryingly bare of supplies.";
	text2 = "The healer is exhausted and her clothes are dirty. No patients are here right now, but this is clearly only a temporary lull. She has been very busy.";
	text3 = "When you enter, she inspects you. _Ahhh ... I see you had a difficult journey. I am Healer Isla. If you ever need a place to rest or have your wounds tended to, please come and see me._";
	text5 = "Healer Isla says, _How are you feeling? Doing all right? If you get banged up, please come see me. That is what I am here for._";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "I need to rest here for a while.";
	text1 = "_Of course. Of course. Please lie down, and I will tend to you._";
	text2 = "You rest for a few hours and Isla sees to your wounds. When you get up again, you feel restored.";
	code =
		revive_party();
	break;
	
begintalknode 72;
	state = 70;
	nextstate = 71;
	condition = 1;
	question = "Tell me about the excavation.";
	text1 = "_I know little about the day to day details of the digging. I only know that it is difficult and dangerous work. My task is to keep the workers here intact and able to keep at it._";
	text2 = "_We are far from civilization, and we never have enough workers. So that makes my job doubly difficult._";

begintalknode 73;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "What sort of injuries do you see?";
	text1 = "_Cuts and broken bones, mostly. From mishaps with tools, or falling rocks. Nothing a few quick spells can't resolve._";
	text2 = "_There are also nasty burns. Sadly, the mages are not as careful when directing their magic as they should be._";

begintalknode 74;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "Where are you from originally?";
	text1 = "_I was a healer in Formello, before it fell to the Slith Horde. After I lost my home, I traveled to the Castle and volunteered to help in the fight._";
	text2 = "_I did not expect to be sent somewhere like here. But then, if the work here succeeds, it will be a great boon for Avernum, so I won't complain._";

begintalknode 75;
	state = 70;
	nextstate = -1;
	condition = gf(98,1) > 0;
	question = "How has the excavation been going?";
	text1 = "_I don't know. I have heard that the problems with the ogres have been solved, but there is still much work to do, with slim hope of success._";
	text2 = "_Still, we are all grateful for your aid._";

begintalknode 76;
	state = 70;
	nextstate = 72;
	condition = gf(98,1) == 0;
	question = "How has the excavation been going?";
	text1 = "_I have not been to the dig much recently, but it seems like the work is hardly continuing at all. We were relying on ogres to do much of the heavy digging, but the creatures are dissatisfied._";

begintalknode 77;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "Ogres? Why ogres?";
	text1 = "_Ahhh ... You would have to speak with the commander. Those sorts of decisions do not fall to me._";

begintalknode 78;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "Why are the ogres angry?";
	text1 = "_I don't know. I don't pretend to understand ogres. I do know that they tend to suffer more burns and breaks than ... Than I would expect. I wish the mages would be more careful._";

begintalknode 79;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "Do you ever treat the ogres?";
	text1 = "_Sometimes. Usually, when they are hurt, they retreat to their lair to recuperate._";
	text2 = "_The seriously wounded are brought here._ She points to one bed which is considerably larger than the others. _Don't worry. Whenever I treat an ogre, there are never fewer than three guards here._";

// 90

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Commander Rana";
	text1 = "The commander of this outpost is a tall, thin archer. Her bow is made of fine yew, imported from the surface. It is never far from her hand. Seems like wise behavior, out here in the wilderness.";
	text2 = "She looks up at you with the grim expression of one awaiting execution. _Word of your arrival preceded you. You are from the Castle, yes? I am Commander Rana. Welcome. I will tell you what has been happening in the excavation._";
	text3 = "_Though I will tell you the end of the story now. We have not been provided with enough resources for our work, so I have improvised as best I could. The ogres, for example. And, without help from you, the work might not be able to resume._";
	text5 = "Commander Rana sighs. _There is more we need to discuss? All right. But know that I did the best I could with what I was given._";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = 91;
	condition = 1;
	question = "Tell me about the excavation.";
	text1 = "_Well, it is a simple story, one you have probably already been told. But I am sure I can fill in some details._";
	text2 = "_This is the Western Excavation. We are working here to find a rumored route to the surface. If we had a tunnel to the surface, many of Avernum's current problems would be solved immediately._";
	text3 = "_As you can see, we are based in an abandoned vahnatai fortress. Its presence here was a stroke of good fortune for us._";
	
begintalknode 92;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "Can I get some supplies?";
	text1 = "_Feel free to take anything you find. We would not want to anger the Castle's envoys. If you require healing, visit Healer Isla._";

begintalknode 93;
	state = 91;
	nextstate = -1;
	condition = 1;
	question = "What makes people think there was a tunnel to the surface here?";
	text1 = "_Oh, this tale dates from the earliest days of Avernum. Supposedly the Empire knew about the route and concealed it, but a band of adventurers found it._";
	text2 = "_Then it was at least partially sealed. That is the tale. All of this happened, if it did happen, decades before we were born._";

begintalknode 94;
	state = 91;
	nextstate = -1;
	condition = 1;
	question = "Do you think the route exists?";
	text1 = "_There are so many tunnels in Avernum, twisting and turning in every direction, that it is only logical that one of them would return to the surface._";
	text2 = "_Is there such a tunnel here?_ She shrugs. _I came here because I was ordered to._";

begintalknode 95;
	state = 91;
	nextstate = -1;
	condition = 1;
	question = "Why was it fortunate to find the vahnatai fort?";
	text1 = "_Because we were given a nearly impossible task and nowhere near enough people to complete it. To at least be spared the need to construct our own quarters was a blessing._";
	text2 = "_Of course, when we got here, a tribe of ogres was already inhabiting the lower tunnels. So I was forced to ... improvise._";

begintalknode 96;
	state = 90;
	nextstate = -1;
	condition = get_quest_status(178) == 2;
	question = "I have a message for someone named Prenvil.";
	text1 = "_Ahhh ... That wily old scout is in the tunnels south of this fort. He's searching the twists and turns, looking for the surface route in his own way._";

begintalknode 97;
	state = 90;
	nextstate = 93;
	condition = gf(98,1) == 0;
	question = "Tell me about the ogres.";
	text1 = "_Well, when we arrived here and began to set up camp, there was a tribe of ogres in the lower tunnels. A little detail nobody had mentioned when I received my orders. I had barely enough troops to secure the site, let alone drive them out._";
	text2 = "_Happily, I was able to parley with their chief. Chief Gunza. He is a surprisingly cunning creature, for an ogre, and he had no desire to anger Avernum._";

begintalknode 98;
	state = 90;
	nextstate = 95;
	condition = gf(98,4) < 2;
	question = "Report the status of the excavation.";
	text1 = "_The status is poor. Slow. Difficult. But I think it would be best if you saw for yourself. I will order the way opened to the main dig. Go look at it. It will tell you everything you need to know._";
	code = 
		set_flag(98,4,1);
		toggle_quest(49,1);
		set_flag(98,23,1);
	break;

begintalknode 99;
	state = 93;
	nextstate = -1;
	condition = 1;
	question = "How many ogres are there?";
	text1 = "_About twenty, total. A decent force. With our soldiers and mages, we could have driven them out, though we would have suffered losses we could not afford._";
	text2 = "_Fortunately, another option presented itself._";

begintalknode 100;
	state = 93;
	nextstate = 94;
	condition = 1;
	question = "And you and Chief Gunza came to an agreement?";
	text1 = "_We did. We needed labor. We were receiving a stream of supplies from the Great Cave. The ogres wanted food and, well, anything else we could give them._";

begintalknode 101;
	state = 94;
	nextstate = -1;
	condition = 1;
	question = "So you struck a deal with ogres.";
	text1 = "_Yes, yes, I know. They are treacherous, vicious, stupid creatures. All true. But I had a mission, and it was the only hope of completing it._";
	text2 = "_And it worked, at first. The wizards used their spells to loosen the rock. Ogres hauled it off. But then there were arguments. The ogres would get struck by spells, or they would go down the wrong tunnel and be crushed under rock._";
	text3 = "_So now we need the ogres, but we can't use them. And that is why we need help._";

begintalknode 102;
	state = 95;
	nextstate = -1;
	condition = 1;
	question = "How do I get there?";
	text1 = "_Go down the stairs outside our barracks and head north. Stay out of the ogre caves. Things between us and them are ... touchy right now._";

begintalknode 103;
	state = 95;
	nextstate = -1;
	condition = 1;
	question = "What should I do when I'm there?";
	text1 = "_Just wait. Something will go wrong quickly, I'm sure._";

begintalknode 104;
	state = 90;
	nextstate = -1;
	condition = gf(98,4) == 2;
	question = "I visited the excavation. Some ogre named Hydera commanded them all to leave.";
	text1 = "The commander nods. _Yes. That is how it goes. I knew this would happen. I've been waiting for this day. Everything in their tribe has broken down. Violence will result. The important thing now is to make sure that violence aids us._";
	text2 = "_The Castle didn't just send you to investigate, yes? You were sent to provide aid, if needed?_ You admit that this is true. _Well, now I know what needs to be done. Something might still be salvaged from this situation._";
	code = 
		set_flag(98,4,3);
		toggle_quest(49,3);
	break;

begintalknode 105;
	state = 90;
	nextstate = 96;
	condition = gf(98,4) == 3 || gf(98,4) == 4;
	question = "What do I need to do?";
	text1 = "_The ogres are led by Chief Gunza. He makes the ogres work. I give him supplies. But he hasn't been sharing the supplies. It is the ogre way. But the other ogres, who are getting burned and bashed, are annoyed._";
	text2 = "_That Hydera fellow you saw, he seems to be wanting to challenge Gunza. He even came to me, as if I would get involved._";
	text3 = "_Go below and talk to the ogres. See if you can find a way to end their little power struggle, preferably in a way that leaves me with a usable workforce._";
	code = 
		set_flag(98,4,4);
		toggle_quest(50,1);
		set_flag(98,16,1);
	break;

begintalknode 106;
	state = 96;
	nextstate = -1;
	condition = 1;
	question = "You want me to deal with the ogres?";
	text1 = "_Why not? I've been doing it. Just talk to them. Find out what it would take to get some of them to return to their labors._";

begintalknode 107;
	state = 96;
	nextstate = -1;
	condition = 1;
	question = "Will I need to kill some of them?";
	text1 = "_Most likely. I just hope you can keep from killing all of them. Talk to Chief Gunza first. I'm sure he will have some rich suggestions for what to do to get the tribe back under his thumb._";
	text2 = "_Of course, I don't care who you kill. They're just ogres, after all. Just as long as I am left with a placid tribe I can work with._";

begintalknode 108;
	state = 96;
	nextstate = -1;
	condition = 1;
	question = "I'm not sure I like treating the ogres this way.";
	text1 = "She chuckles. _What an odd bit of sentimentality. Sympathy toward ogres, the meanest, nastiest creatures in Avernum. Besides giants, of course._";
	text2 = "_Anyway, if this salves your conscience, you didn't make this situation. You only have to deal with it. We're all doing the best we can for the good of Avernum._";
	text3 = "_Just go talk to them. They are downstairs, and south. You might be able to find a solution that helps you sleep at night._";
	action = END_TALK;
	
begintalknode 109;
	state = 96;
	nextstate = -1;
	condition = 1;
	question = "I'll take care of them.";
	text1 = "She nods. _Good. It's a pleasure to receive actual assistance for once. Looking at you, I'm sure you can bash the mulish creatures back into line._";
	text3 = "_Just go talk to them. They are downstairs, and south. You might be able to find a solution that keeps some of them alive._";
	action = END_TALK;

begintalknode 110;
	state = 90;
	nextstate = -1;
	condition = gf(98,4) < 7 && gf(98,21) > 0 && gf(98,22) == 0;
	question = "I had to kill Chief Gunza, but Hydera is still alive.";
	text1 = "She nods. _That seems like a good solution. I have spoken with Hydera. I can work with him, and he might be able to keep his tribe in line._";
	text2 = "_Thank you for your help. You can report back to the Castle that work will resume. And that success, as always, looks extremely unlikely. But we will try._";
	text3 = "She has a guard bring you a reward: a beautifully made steel shortsword. Then she returns to her work, planning how to deal with the new set of circumstances.";
	code = 
		set_flag(98,4,7);
		sf(98,1,1);
		toggle_quest(50,3);
		award_party_xp(400,14);
		reward_give(65);
	break;
	action = END_TALK;

begintalknode 111;
	state = 90;
	nextstate = -1;
	condition = gf(98,4) < 7 && gf(98,21) == 0 && gf(98,22) > 0;
	question = "I had to kill Hydera, and Chief Gunza is still alive.";
	text1 = "She nods. _That seems like a good solution. Chief Gunza has now shown that he has powerful allies, and anyone who rebels against his rule will finish up dead. We should have strong ogre workers soon._";
	text2 = "_Thank you for your help. You can report back to the Castle that work will resume. And that success, as always, looks extremely unlikely. But we will try._";
	text3 = "She has a guard bring you a reward: a beautifully made steel shortsword. Then she returns to her work, planning how to deal with the new set of circumstances.";
	code = 
		set_flag(98,4,7);
		sf(98,1,1);
		toggle_quest(50,3);
		award_party_xp(400,14);
		reward_give(65);
	break;
	action = END_TALK;

begintalknode 112;
	state = 90;
	nextstate = -1;
	condition = gf(98,4) < 7 && gf(98,21) > 0 && gf(98,22) > 0;
	question = "I had to wipe out the ogres. There was no other way.";
	text1 = "She shakes her head. _I thought that this would be necessary. At least now we are rid of the ogres. We control this keep, and maybe the wizards can make more stone servants to help with the digging. Yes, this might still work._";
	text2 = "_Thank you for your help. You can report back to the Castle that work will resume. And that success, as always, looks extremely unlikely. But we will try._";
	text3 = "She has a guard bring you a reward: a beautifully made steel shortsword. Then she returns to her work, planning how to deal with the new set of circumstances.";
	code = 
		set_flag(98,4,7);
		sf(98,1,1);
		toggle_quest(50,3);
		award_party_xp(400,14);
		reward_give(65);
	break;
	action = END_TALK;

begintalknode 113;
	state = 90;
	nextstate = -1;
	condition = gf(98,4) == 7;
	question = "How is the excavation going?";
	text1 = "_Slowly. Carefully. Adapting to constantly changing circumstances. Knowing that, if we succeed, Avernum is saved. Please put in a good word for us at the Castle._";

begintalknode 114;
	state = 90;
	nextstate = -1;
	condition = gf(97,2) == 1 && gf(98,6) == 0;
	question = "Some Anama want to come and help you. (Describe them.)";
	text1 = "The commander seems genuinely amused. _Really? Anama? Along with wizards and ogres? This would truly be a circus._";
	text2 = "_And yet ..._ She thinks. _Anama are hard workers. They are skilled. Their rituals do have power. And they are not usually mad._";
	text3 = "She comes to a decision. _All right. They have to make their own way here, and we don't have a lot of food to spare. But if they are willing to work, we will have them. We can't afford to turn away assistance._";
	code =
		sf(98,6,1);
	break;
	
// 130 Chief Gunza

begintalknode 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Chief Gunza";
	text1 = "Ogres are not thoughtful creatures. They tend to resolve differences through shouting and horrible, clumsy violence. To rule them, one must be big, strong, and unhesitant about using one's size and strength against rivals.";
	text2 = "This ogre is old and wrinkled, and his hair is starting to go gray. He might be as old as twenty-five or thirty. And yet, enough power remains in his enormous bulk to enable him to compel the others to do his bidding.";
	text3 = "When he sees you, he snarls and says, _You here! You wait too long. I Chief Gunza. I ask little person commander for help. Steel to keep loud ogres in line. Now I challenged. Now you help me crush Hydera, so work start again._";
	text5 = "Chief Gunza snorts at you. _More talk? You little people. Talk talk talk. Way work get done, is crush those who talk back to you! Crush!_";
	action = INTRO;

begintalknode 131;
	state = 130;
	nextstate = 131;
	condition = 1;
	question = "Tell me about your tribe.";
	text1 = "_It is my tribe. Mine. I claim it. Other ogres do what I say, or I crush them. Is ogre way, old and wise!_";
	text2 = "_We get away from your Avernum. Come out to these tunnels. Find this fort for many years. Then Avernum come. We must deal with them._";
	
begintalknode 132;
	state = 130;
	nextstate = 133;
	condition = gf(98,4) < 5;
	question = "Why did the ogres walk off the job?";
	text1 = "_They are foolish. They not scared of my strength. They let Hydera fill heads with thoughts. Never good. Thoughts never bring good things._";
	text2 = "_They see me get food and not give much to them. Same with treasure. They get jealous. And Hydera is there, with thoughts._";

begintalknode 133;
	state = 130;
	nextstate = 135;
	condition = gf(98,4) == 3 || gf(98,4) == 4;
	question = "What do you need me to do to get you back to work?";
	text1 = "_You kill Hydera for me. You humans cause problems. Hydera too near you. He gets full of weak human ideas. You crush him. Rub him out and tribe sees I can't be denied._";
	text2 = "_Hydera hides in storage caves. I get gate open. You go challenge Hydera. Kill him. Then work starts again!_";
	code =
		sf(98,4,4);
		sf(98,17,1);
	break;
	
begintalknode 134;
	state = 130;
	nextstate = -1;
	condition = gf(98,4) >= 4 && gf(98,22) > 0 && gf(98,1) == 0;
	question = "I did what you wanted. Hydera is dead.";
	text1 = "The chief nods. _Good. Good. Lots of ogres lost, but ones still here scared. They obey me now. Go make more ogres. I command all._";
	text2 = "_Go tell your human commander. Ogres will work soon._ He thinks. _But not right away. Need to talk terms more. Time is wasting. Go._";
	
begintalknode 135;
	state = 130;
	nextstate = -1;
	condition = gf(98,1) > 0;
	question = "Why aren't the ogres back to work yet?";
	text1 = "Chief Gunza smirks. _I talk to commander. Commander weak. Little people weak. I get more food, more supplies. Then ogres come and I work them twice as hard!_";
	text2 = "_None to challenge me. I make ogres do what I want. Then we all happy. Now go. I need no more from you._";
	action = END_TALK;
	
begintalknode 136;
	state = 130;
	nextstate = -1;
	condition = gf(98,5) > 0 && gf(98,4) < 5;
	question = "I say you are no longer fit to lead the ogres.";
	text1 = "The chief opens his mouth. Then he closes it again. It takes him some time to parse what has happened. _You ... You talk to Hydera. His stupid human ideas, they land in ear of little weak creatures. Fill you with thoughts._";
	text2 = "_No more talk. You challenge me. Only one way to answer. With strength! Come to dueling pit. Now._";
	text3 = "The chieftain stands, and you get a good look at how huge he is. He grabs a club and heads toward the dueling pit.";
	code =
		sf(98,4,5);
	break;
	action = END_TALK;
	
begintalknode 137;
	state = 131;
	nextstate = -1;
	condition = 1;
	question = "You are only ruled by the strong?";
	text1 = "_Yes. All are only ruled by the strong. You have king. You no different from us._ You decide not to debate political philosophy with this creature.";
	
begintalknode 138;
	state = 131;
	nextstate = -1;
	condition = 1;
	question = "Why did you come out here?";
	text1 = "_Humans and nephil and such are small and frail, but there are many of them, and they work steel and magic. We ogres stay away from your kind when we can. You think we are dumb. And maybe we are dumb. But we not want to die._";
	
begintalknode 139;
	state = 131;
	nextstate = 132;
	condition = 1;
	question = "You deal with the humans?";
	text1 = "_We ogres respect the strong. Avernum is strong. We see Avernum wants our cave. Avernum wants caves, Avernum takes caves. So I offer human leader a good deal. Good for them. Good for tribe._";
	
begintalknode 140;
	state = 132;
	nextstate = -1;
	condition = 1;
	question = "What deal was that?";
	text1 = "_I make my ogres work hard for humans. Humans not kill us. They give us food and tools. Stupid humans. Their strength could get us to work without paying much food. But I strong and commander weak, so I get more._";
	text2 = "_But traitor Hydera, he spoils deal. And so you kill Hydera for me. And we work again._";
	text3 = "_And now traitor Hydera gone. Soon, work starts again. Strong win. Weak work. Is how all should be._";
	code =
		if (gf(98,22) == 0)
			rs(3);
			else rs(2);
	break;
	
begintalknode 141;
	state = 133;
	nextstate = -1;
	condition = 1;
	question = "You don't share the payment for their work with your tribe?";
	text1 = "The chief seems confused. _I stronger than them. Why should I share?_";
	
begintalknode 142;
	state = 135;
	nextstate = -1;
	condition = 1;
	question = "Why don't you kill Hydera?";
	text1 = "_Because I can get you to do it for me. Ogres see I command humans. That gives me real strength._";
	text2 = "_And, if I crush Hydera, I live, but I lose ogres. You kill, no loss for me._";
	
begintalknode 143;
	state = 135;
	nextstate = -1;
	condition = 1;
	question = "Maybe I can talk Hydera into returning to work.";
	text1 = "_No. I am challenged. You are challenged. If Hydera wins, no obedience for us all. Don't talk to Hydera. Don't listen to foolish ideas in head. Just strike him down!_";
	

	
		
// 150 Hydera

begintalknode 150;
	state = -1;
	nextstate = 150;
	condition = 1;
	question = "Hydera";
	text1 = "There is a huge, young ogre sitting in this chair, using it as a throne. It's a huge, luxurious, overstuffed chair of human size. You wonder why anyone bothered to drag it out here. The ogre looks ridiculous in it.";
	text2 = "It's easy to recognize this fellow. He's Hydera, the one who led his fellows away from the dig site. He looks up at you grimly and rests his hand on his club. He knows why you are here.";
	text3 = "He laughs. _So humans steal our lair. Gunza steals our treasure. And you come to fix it for you all. This is the way. So you here. You here with bad, proud Hydera and his ogres. Now what?_";
	text5 = "Hydera looks up from his chair. _More talk? I proud. I right. I not back down. What you say to Hydera now?_";
	action = INTRO;

begintalknode 151;
	state = 150;
	nextstate = 151;
	condition = 1;
	question = "Why didn't you want the ogres to work for us?";
	text1 = "_Ogres proud! Ogres warriors and not workers! But ogres not dumb. Not want to die. Respect strength. We work for humans because you pay, and because one day you go away._";
	text2 = "_But we are robbed by coward old Chief Gunza. For this, we not back down!_";
	
begintalknode 152;
	state = 151;
	nextstate = -1;
	condition = 1;
	question = "You fear our strength?";
	text1 = "_Not fear. Respect! We watch, we learn, so one day ogres not hide from weak little humans. One day we rise up and crush you and take what is ours! But not yet. Now is time for learning._";

begintalknode 153;
	state = 151;
	nextstate = -1;
	condition = 1;
	question = "What about the hurt ogres?";
	text1 = "He holds up an arm. It bears an ugly burn from a misplaced fireball. He slaps the fresh burn with his other hand, hard, and doesn't flinch. _Hurt? That all we care for hurt. Hurt make us strong!_";
	text2 = "_But to be hurt and then stolen from, that is too much._";
	
begintalknode 154;
	state = 151;
	nextstate = 152;
	condition = gf(98,21) == 0;
	question = "How does the chief steal from you?";
	text1 = "_We all work. We all get breaks and burns. Then food and goods come, and Gunza, fat Gunza who only sits, take the most and best and leaves rest for us._";
	
begintalknode 155;
	state = 152;
	nextstate = -1;
	condition = 1;
	question = "Isn't that his right as your chief?";
	text1 = "_It was. I challenge him. When you gone, I make sure Gunza not chief for long._ With only this pitiful band to help him, that doesn't seem likely. Without help.";
	
begintalknode 156;
	state = 150;
	nextstate = -1;
	condition = 1;
	question = "These other ogres have joined you.";
	text1 = "_Yes. Only a few. Few very brave, not fear death. But most are cowards. Most stay with Gunza._";
	text2 = "_But they weak. When we come out, they answer to Hydera! I sure of that now._";
	code =
		if (gf(98,21) == 0)
			rs(2);
	break;
	
begintalknode 157;
	state = 150;
	nextstate = 154;
	condition = gf(98,4) < 5;
	question = "Chief Gunza sent me here to kill you.";
	text1 = "_Yes. Your kind and weak old ogres work together. I understand. I ready to fight and die. Is what a challenge means. So few come to join me. Makes hard to get rid of Gunza. But I will not fail. I right and strong._";
	text2 = "He rises from his chair and grabs his club. _Come on! I ready!_";
	
begintalknode 158;
	state = 154;
	nextstate = -1;
	condition = 1;
	question = "Actually, I need to think about this a bit more.";
	text1 = "_What? Think? When battle is here? You little creatures so odd._ He plops back into chair. _Can't see how you do that. My head hurts. Go away._";
	action = END_TALK;
	
begintalknode 159;
	state = 154;
	nextstate = -1;
	condition = 1;
	question = "All right. Nothing personal, but you have to die. (Attack.)";
	text1 = "Hydera roars a command. In moments, all of his ogres are ready for a glorious, heroic fight to the death.";
	action = END_TALK;
	code =
		sf(98,20,1);
		set_attitude(30021,10);
		set_attitude(10630,10);
	break;
	
begintalknode 160;
	state = 154;
	nextstate = 155;
	condition = 1;
	question = "And there is no other way to peace?";
	text1 = "He lowers his club slightly and actually tries to think about it. _Hmmm. Well. Hmmmm. Well._";
	text2 = "_Not while Chief Gunza lives. But I not ready to go to him and say he no longer fit to lead. And kill him in dueling pit. That done, and I take control. Then I chief, and ogres come back to work._";
	text3 = "_But who challenge chief? We not ready. You little ones support him. I see nothing to do._";
	code =
		sf(98,5,1);
	break;
	
begintalknode 161;
	state = 155;
	nextstate = -1;
	condition = 1;
	question = "Yeah. I guess you're right. Die. (Attack.)";
	text1 = "Hydera roars a command. In moments, all of his ogres are ready for a glorious, heroic fight to the death.";
	action = END_TALK;
	code =
		sf(98,20,1);
		set_attitude(30021,10);
		set_attitude(10630,10);
	break;
	
begintalknode 162;
	state = 155;
	nextstate = -1;
	condition = 1;
	question = "Let me think about this more. There might be another way.";
	text1 = "_What? Think? When battle is here? You little creatures so odd._ He plops back into chair. _Can't see how you do that. My head hurts. Go away._";
	action = END_TALK;
	
begintalknode 163;
	state = 150;
	nextstate = 156;
	condition = gf(98,21) > 0;
	question = "I have killed Chief Gunza.";
	text1 = "_I know. All hear his death cry. He ... Did not think that would happen. Thought little humans liked Gunza. Let him steal from us._";
	text2 = "_Now I step out. I take control. Weak ogres follow Hydera, who Avernum army comes to help. And then I chief! And work resumes. You do good for me. Much good from fear of Hydera!_";
	
begintalknode 164;
	state = 156;
	nextstate = -1;
	condition = 1;
	question = "And you will share the payment for the work with the other ogres?";
	text1 = "_I ... What? Oh. I ... Well, I chief. I get more. But I give more than Gunza did. For a while. Is ogre way. Now go. Hydera gets ready. Hydera takes control!_ He reclines in his throne and begins to plan.";
	action = END_TALK;

	
	
////

begintalknode 299;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "Unfortunately, somehow, word of your crime spree here gets back to the Great Cave. Most of the soldiers have had to travel northeast to fight the slithzerikai, but enough are waiting for you when you get back south to hunt you down.";
	text2 = "You are jailed in Fort Remote. By the time you are able to get free, the multiple disasters that afflict Avernum have doomed you and all around you.";
	code =
		erase_char(30000);
	break;
		
		