// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(129,0) == 0;
	question = "special";
	text1 = "The region east of the city of Dharmon is a rocky barren field, dotted with many pits and tunnels. Even after many years of settlement, lucky prospectors occasionally dig their way down to a new deposit of valuable crystals.";
	text2 = "There is practically nothing growing out here. Large areas of the Great Cave are unable to support anything but the smallest lichens or mold.";
	action = SET_SDF 129 0 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(129,1) == 0;
	question = "special";
	text1 = "You climb down a long, narrow tunnel into this cavern. It is thirty feet below the Great Cave, an unusually deep excavation for this area. This is how far down miners have to go to find anything valuable.";
	text2 = "It is cold down here. Icy cold. You immediately begin to shudder. And then you sense the lurking presence, waiting for you in the shadows ahead. You can feel its hunger.";
	text3 = "Whatever it is, its raw power radiates through these caves. You suspect that it is extremely dangerous.";
	action = SET_SDF 129 1 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(129,2) == 0;
	question = "special";
	text1 = "You enter one of this region's many abandoned mines. Most of the valuable crystals have been dug out and hauled away. Only the desperate come here now, hoping to find any leavings that were somehow left behind.";
	text2 = "Then you hear the loud rumble, and a wave of hot, sulfurous wind hits you. And then you hear the hissing. There are active calderas down here, and they have attracted something. Something that likes the heat.";
	action = SET_SDF 129 2 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are two wolves here, guarding their master. Wolves were sent down to Avernum with the first waves of explorers. They are wiry, sickly creatures, poor relations of their surface counterparts. But still very dangerous.";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You find a key on Wilkie's body.";
	code =

				set_spec_item(60,1);
	break;


//

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You meet the living epitome of the grizzled old prospector. He sits by his fire, gnawing on a stale roll. His pet wolves lurk nearby, keeping watch for intruders and hungry bats. Understandably, he keeps his blade close to hand.";
	text2 = "When he sees that you mean no harm, he motions for you to sit by his fire. He grunts, belches, and offers you a mug of water. He doesn't offer you any food.";
	text3 = "_Welcome, soldier. I'm Wilkie. You're lucky you caught me. I was about to head back to safety. But, before I go, I have an offer for you. Yes, you really are fortunate._";
	text5 = "Wilkie gnaws on his stale roll. A wolf occasionally comes over to get scratched behind the ear.";
	text6 = "_Yep,_ Wilkie mutters, _I really had better head back soon. Before I go, though, it'd be a pity if someone didn't get to take advantage of what I have to offer._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "How long have you been mining out here?";
	text1 = "_Since the lure of the crystals called me down to Avernum from the surface. Avernum, the land of adventure. Soon as I got to the portal, I jumped through and never looked back._";
	text2 = "_It's lonely work now, though. I'll have to be movin' on soon._";

begintalknode 12;
	state = 10;
	nextstate = 12;
	condition = 1;
	question = "Where are you planning to go?";
	text1 = "_Wherever there's food. I've been careful over the years. Saved my money, and my crystals. I don't have to beg. I can pay for my meals. I just need to find a place where I can buy them._";

begintalknode 13;
	state = 10;
	nextstate = 13;
	condition = has_spec_item(60) == 0;
	question = "You say you have an opportunity for me?";
	text1 = "He nods. _I got a claim. A good claim. There to the south. I'll hand it over to you. Good, valuable crystals. Only five hundred coins._";

begintalknode 14;
	state = 10;
	nextstate = -1;
	condition = has_spec_item(60) && gf(129,4) > 0;
	question = "I've been down in that mine. There was a monster down there!";
	text1 = "He feigns innocence. _Is there? Well, I hadn't been down there in a while. No way I could know about it. But you're still alive, so no harm done!_";

begintalknode 15;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I'll be going now.";
	text1 = "Wilkie nods and grunts. _Thanks for the company, soldier._";
	action = END_TALK;
	
begintalknode 16;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "When did you come down here?";
	text1 = "_On my twentieth birthday, twenty years ago!_";
	text2 = "He's only forty? He looks like he's twice that. The life of an Avernite miner must be a rough one.";

begintalknode 17;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Where are all the miners?";
	text1 = "_Gone. Gone to places where they think they can find food. A lot of them headed to the Great Portal, hoping to return to the surface._";
	text2 = "_Not me. I'm never going back to the Empire. I'm gonna stay here, where I'm free._";

begintalknode 18;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "So ... Where are your coins and crystals hidden?";
	text1 = "He frowns. _That's never a polite question to ask a miner out here._";

begintalknode 19;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Who still has food?";
	text1 = "_I've heard rumors there's meat and fish for ready money in the Abyss. It's rough up there, but I can handle it._";
	
begintalknode 20;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "What good does a mine do me? I'm no miner.";
	text1 = "_But this strike is so rich you just have to pick the stones up off the ground. I'd work it myself, I really would, but my supplies are just too low. I have to head back._";

begintalknode 21;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "And there's nothing down there but crystals?";
	text1 = "_Ahhhh ... I haven't been down in a few weeks, so I can't be sure. But most likely not._";

begintalknode 22;
	state = 13;
	nextstate = 10;
	condition = 1;
	question = "All right. I'll take it. (Pay 500 coins.)";
	text1 = "Alas, you don't have the money. _Sorry. A strike this rich, I need to be paid. I can't do charity._";
	text2 = "Wilkie collects your coins and hands you a key. _The mine is just to the south. Take some empty bags. You'll need them to haul the find away. As for me, I'm off. Back to civilization._";
	code =
		if (coins_amount() < 500)
			rs(2);
			else {
				rs(1);
				change_coins(-500);
				set_spec_item(60,1);
				}
	break;
	
begintalknode 23;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "Sorry. No deal.";
	text1 = "He sighs. _Then I'm stuck out here, far from civilization. And baths. Thanks for the company, soldier. But I think I want my solitude back._";
	action = END_TALK;
	
begintalknode 24;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "What do you eat out here?";
	text1 = "_Lately, roasted bat. Gamy, but it keeps me going. Fortunately, the Blight hasn't affected the animals and fish._";

//

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 = "";
		