// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(134,0) == 0;
	question = "special";
	text1 = "You are at the edge of an orchard, one of the sources of the fruit Almaria uses to make its fine wines. With food being in such scarce supply, you would imagine that they had a lot of problems with thieves.";
	text2 = "Then you catch a glimpse of one of the guard dogs stalking the tall fungus. It is instantly very clear why this orchard has no problems with thieves at all.";
	action = SET_SDF 134 0 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(134,1) == 0;
	question = "special";
	text1 = "If the sign outside the gate is to be believed, this is a boatyard. The fresh, fungal smell of newly cut cavewood hangs in the air. Through the gate, you can see an open yard. Sawdust and tools are spread everywhere.";
	text2 = "There are no boats out in the yard, though. They must all be in the water, and no new ones are being constructed yet.";
	action = SET_SDF 134 1 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(134,2) == 0;
	question = "special";
	text1 = "You enter the boatyard. Sure enough, three newly-made boats are in the water, tied securely to the docks. A captain stands near them, inspecting them for defects. When you enter, he turns and walks toward you.";
	text2 = "The boats are very well made by Avernite standards. Wide, flat-bottomed craft, perfect for navigating the dark, cold waters of Avernum. And here they are, made for you. And your nearly impossible mission.";
	action = SET_SDF 134 2 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(134,3) == 0;
	question = "special";
	text1 = "You enter the wine storage tunnel. It is cool and dry, and casks of aging wine stretch off into the shadows.";
	text2 = "For some reason, you start to feel very nervous. All of this valuable wine, seemingly unguarded. The sign ahead warned of traps. It might be wise to believe it.";
	action = SET_SDF 134 3 1;

begintalknode 5; // hh
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You've never been this close to a hellhound without it attacking before. It's a vicious, powerful beast, all thick skin and muscle.";
	text2 = "Amazingly, its master has trained it well. It senses you are not an enemy and lets you pass.";


begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Warning! Old smuggler tunnel!";
	text3 = "  Sealed and trapped!";
	
begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  GREAT CAVE BOATYARD";
	
begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  KEEP OUT!";
	text3 = "  Wine Vaults are heavily trapped.";
	text4 = "  I don't want to have to mop your bits up.";
	text5 = "                       - Druella";


begintalknode 9; //
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are several guards at this outpost, who also put in long hours building and maintaining the boats. It's exhausting labor, but it beats fighting the Slith Horde.";
	text2 = "When you approach the gate, the guard looks at you and shakes his head. _Sorry, friend. We can't let anyone have access to the boats unless we get word about you. Direct orders from the Castle._";
	text3 = "You talk to the guards for a while. They are eager to hear about events elsewhere in Avernum. You tell them what you have seen. Not surprisingly, they seem very happy to be where they are.";
	code =
		if (gf(134,9) == 0)
			rs(3);
			else rs(2);
	break;
	
//

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Captain Dwight";
	text1 = "The Captain of this tiny outpost approaches you and shakes your hand. You wipe the sawdust he leaves behind off on your pants. _We were told to expect you. Glad that you made it._";
	text2 = "_I'm Captain Dwight, and there ..._ He waves at the four boats. _That is our work. We heard what you are about to sacrifice ... Accomplish. I meant accomplish, for Avernum. And we did the best we could._";
	text5 = "Captain Dwight looks at you with the reverence reserved for the imminently doomed. _Anything else I can do for you? Just say the word._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = gf(170,7) == 0;
	question = "What do I do now?";
	text1 = "_Just take a boat. Take your pick. Whichever one looks best. Then row north._";
	text2 = "_I don't know much about your mission, so I can't tell you more than that. I just hope you fare better than the last group._";

begintalknode 12;
	state = 10;
	nextstate = 13;
	condition = gf(170,7) == 0;
	question = "Can you give me any directions?";
	text1 = "_I can. I've been up and down this river many times. Go north. You'll soon find yourself in the Eastern Gallery. Then keep going straight north._";

begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = gf(170,7) > 0;
	question = "I completed the mission.";
	text1 = "He nods and looks at you with awe. _I heard. To sneak all that way through enemy territory, infiltrate their fortress, and ..._ He shakes his head.";
	text2 = "_It's amazing. It's an honor just to have met you._";

begintalknode 14;
	state = 10;
	nextstate = -1;
	condition = gf(170,7) > 0;
	question = "Can I still use the boats?";
	text1 = "_Of course. I was told that, until told otherwise, I would assist you in any way I can. So help yourself._";

begintalknode 15;
	state = 10;
	nextstate = -1;
	condition = gf(134,4) == 0;
	question = "Do you have any extra supplies for me?";
	text1 = "_Oh, of course! He points to the locker by the north wall. Take anything you need. We aren't likely to be attacked soon. Or, if we are, all is lost._ He laughs nervously.";

begintalknode 16;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Anything I need to know about using the boats?";
	text1 = "_Oh, they're as stable as we could make them. Just point it where you want to go and row. They should even handle rapids well if it comes to that. Though it probably won't._";

begintalknode 17;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "Tell me about the first group.";
	text1 = "_They were going same route as you. Up north past the Eastern Gallery, then east. But, instead of boats, they were using something called the Orb of Thralni. It'd help them fly, or so they hoped._";

begintalknode 18;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "What happened to them?";
	text1 = "_Nobody knows. Never heard from them again. That's what you get for trusting in fickle magic instead of good, solid Avernite wood._";

begintalknode 19;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "I can't explore the rest of the Eastern Sea?";
	text1 = "_Well, you can, if you think it's wise. But I imagine, for your mission, you'll go pretty much north._";
	text2 = "_You can always take side journeys later._ The _If you live._ goes unspoken.";
	
begintalknode 20;
	state = 13;
	nextstate = 14;
	condition = 1;
	question = "Then where do I go?";
	text1 = "_You pass Fort Dranlon on your east and keep upriver to the north. Then you'll pass into the northern caverns. Watch the west shore. Look for a place where they were trying to make a portal pylon._";

begintalknode 21;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "And then?";
	text1 = "_Disembark and head east. That's all I can tell you. No more easy sea travel. You'll be on foot, and there's nothing more I can tell you from there._";

begintalknode 22;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "Tell me about that pylon.";
	text1 = "_Some mages tried to make it to send warriors past slith lines. Ferried them up there myself._";
	text2 = "_They couldn't finish it in time. As I hear tell, the Manburner found and killed them herself._";
	text3 = "_I'm sure, when the slithzerikai are defeated, finishing that pylon will be a top priority._";

// Druella

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "There is an unarmed woman looking after this small winery. Though, considering the hellhounds patrolling outside, you don't have to ask how she can feel safe out here.";
	text2 = "She watches you suspiciously as you enter, neither nervous nor pleased to see one of Avernum's soldiers. _Welcome to our humble winery,_ she says. _I am Druella. To what do I owe the pleasure of a visit from one of Avernum's warriors?_";
	text5 = "Druella says, calmly, _Do you wish to know more? Or perhaps buy some wine? Sadly, even soldiers have to pay. Despite what some of your fellows may have thought on earlier visits._";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = 31;
	condition = 1;
	question = "How are things going out here?";
	text1 = "_Poorly. All of my time goes to defending what is mine from looters, instead of making wine. The fruit of my trees makes very poor food. Sour and not nourishing. But that does not stop the hungry._";
	text2 = "_However, we do not need help. From you or anyone._";

begintalknode 32;
	state = 30;
	nextstate = 32;
	condition = gf(134,5) == 0;
	question = "Your defenses are impressive.";
	text1 = "She nods. _We've always had trouble with pests in these fields. In the end, training hellhounds was the only solution._";

begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = gf(134,5) == 0;
	question = "I would like to buy some wine.";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Druella's Winery",
		  "Druella has managed to keep a fine selection of wine in stock. And she refuses to give any discounts to anyone for any reason.",
		  36,4,0);	
	break;
	
begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = gf(134,5) > 0;
	question = "I would like to buy some wine.";
	text1 = "_Alas, I do not trade with thieves, no matter what insignia they wear. I have to ask you to leave. Good day._";

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = gf(134,5) > 0;
	question = "I triggered your trap downstairs.";
	text1 = "_And I suspected you would. I honor our soldiers, but your sense of entitlement can be disturbing. But I would not be foolish enough to act against any of your lot._";
	text2 = "_So I simply must ask you to leave. Good day._";

begintalknode 36;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "What do you do when looters come?";
	text1 = "_Usually I don't get to see them. The hounds are trained to snarl before they attack. They'll usually wait as long as ten seconds. Then they kill._";
	text2 = "_Looters learn pretty quick. They stay away._";

begintalknode 37;
	state = 31;
	nextstate = 33;
	condition = 1;
	question = "You don't need anything nasty cleared out of your basement?";
	text1 = "_A typical adventurer question. No. I can look after my own place, unlike that numbskull Noam in Almaria. There are no pests in my basement._";
	text3 = "_Only yourself,_ she says pointedly.";
	action = DEP_ON_SDF 134 5 0;
	
begintalknode 38;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "They can be trained?";
	text1 = "_If you're motivated and harsh enough. Yes._";
	text2 = "";

begintalknode 39;
	state = 33;
	nextstate = 34;
	condition = gf(134,5) == 0;
	question = "No undead?";
	text1 = "_No._";
	text2 = "";

begintalknode 40;
	state = 34;
	nextstate = 35;
	condition = 1;
	question = "No bugs?";
	text1 = "_No, not since we got the hellhounds. They love to eat chitrachs. Who knew?_";

begintalknode 41;
	state = 35;
	nextstate = 30;
	condition = 1;
	question = "No hellhounds?";
	text1 = "_There are plenty of hellhounds. That's why I don't need your help. You'd best be moving on if you're looking for this sort of work._";


begintalknode 43;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "The stone you just stepped on makes an ominous clicking sound. You hear stone grinding on stone behind you. And then snarling.";
	code =	
		sf(134,5,1);
		set_terrain(1,535,597,0);
		activate_hidden_group(13);
	break;

begintalknode 45;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "The woman in this bedroom is very annoyed. _What are you doing? I didn't invite you in here! Getoutgetoutgetout!_";
	text2 = "You leave.";
	
//

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 = "Unfortunately, the Great Cave was a poor place to begin your life of crime. Most of the soldiers have had to travel northeast to fight the slithzerikai, but enough remain down here 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;