// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(153,0) == 0;
	question = "special";
	text1 = "You enter the testing grounds of the Tower Colony. For many years, when a new spell or construct or concoction needed to be tested, it was brought here. The scorched, scarred rock bears mute testimony to many catastrophic failures.";
	text2 = "The most recent experiment seems to have been quite spectacular. There are several craters around the main testing platform.";
	text3 = "Each appears to have been made by an anvil, falling from a great height. The anvils still sit pertly in their holes.";
	text4 = "There is a lone demon standing in the middle of the testing platform. It looks at the devastation surrounding it with great interest.";
	action = SET_SDF 153 0 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(153,1) == 0;
	question = "special";
	text1 = "As you explore this remote fen, you hear a feline voice ahead, deep and gravelly. Sounds like a nephar. He shouts, _These are Fang Clan lands! Lands claimed by the nephar!_";
	text2 = "_We take little, just a wagon or two, and we don't kill. We're not worth your trouble, but if you trespass, we fight! Rrrahhrrr!_";
	action = SET_SDF 153 1 1;


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

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


	
begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You reach the chieftain of this small band of nepharim. He looks furiously at you. _Why you do this? Why you come here? We little brigands. We only take small caravans. We let people live. Just little thieves. Not worth stopping._";
	text2 = "_Now you slay those of Fang Clan! Now we must slay you and anger soldiers more. Ahrrrr. You were very foolish. Now you must pay for this inconvenience!_";
	
begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Galgath bows his head because he knows that he's been beat. He lays his mug of wine on the ground at your feet.";
	text2 = "_You couldn't let me rest, could you? How selfish of you. Still, I suppose my rest had to end eventually. Come, my servants! Back to the underworld!_";
	text3 = "And, with a roar of flame and a cloud of greasy, flatulent smoke, he is gone.";
	code =
		reward_give(279);
		reward_give(407);
	break;
	
begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There is a camp of refugees here. They're a tired, exhausted lot. They don't have much strength left for conversation, but they do invite you to sit with them for a bit.";
	text2 = "One of them mentions that they've been shaken down lately by some nephar bandits, though they don't know where the rogues come from.";
	text3 = "You mention to them that you recently destroyed a band of nephar bandits. They are very happy to hear about this. Apparently, those bandits have been shaking them down for a while.";
	code =
		if (gf(153,6) == 0)
			rs(3);
			else rs(2);
	break;
	
begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";


//

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "There is a bemused demon standing in this circle, surrounded by fresh anvil craters. The scaly creature grins at you. _Hssss ... I was wondering how long I would wait in this lovely, cool cave._";
	text2 = "_I am Galgath of the 34th Sphere, Warrior in Grah-Hoth's Mighty Legions, brought here to be amused by you ineffective mortals. And I have no intention of going._";
	text5 = "Galgath of the 34th Sphere says, _Are you mortals still here to beg me to leave? I still have no intention. Being trapped here suits me well._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Who are you, again?";
	text1 = "_Galgath of the 34th Sphere, Warrior in Grah-Hoth's Mighty Legions. Currently on vacation in the nice, cool, calm underworld._";

begintalknode 12;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "The 34th sphere?";
	text1 = "_Oh, don't ask me about infernal politics. I'm forgetting all that for a while._";

begintalknode 13;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Grah-Hoth's legions?";
	text1 = "_Well, not really. The mighty haakai lord Grah-Hoth was destroyed. Somewhere around here, I believe. But, until someone is strong enough to command the legions, the old name remains._";

begintalknode 14;
	state = 10;
	nextstate = 12;
	condition = 1;
	question = "So what's with all the anvils?";
	text1 = "_Yes. Funny story. One of your wizards wanted to test a new spell. So he summoned and bound me. And created the anvils, using pure magical power, and flung them at me. And, as you can see, the spell has an aiming problem._";

begintalknode 15;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "What wizard?";
	text1 = "_Fellow didn't say his name. Sure swore a lot, though._";

begintalknode 16;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "A spell to create, um, anvils?";
	text1 = "_Yes. Impractical, but I do admire the sense of style._";

begintalknode 17;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I destroy demons, not chat with them! Die, foul infernal! (Attack.)";
	text1 = "He sighs, disappointed. _Oh, all right. I knew this was coming. Best me in battle, and I will depart. But I will fight to preserve my vacation._";
	text2 = "_Oh, and one more thing._ He giggles as many small forms start to appear around him. _I do still have a small command in the infernal regions._";
	action = END_TALK;
	code =
		set_attitude(16545,10);
	break;
	
begintalknode 18;
	state = 10;
	nextstate = -1;
	condition = gf(167,4) == 0;
	question = "Why are you still here?";
	text1 = "_Because I refused to leave. Annoyed the old wizard who summoned me to no end. But he's fading a bit, and I think he didn't want to fight me. So here I stay._";
	text2 = "_Want to know more? Find my summoner. Now I am bored. You tire me._ The creature sits down, leans back, and smiles. _Go away. I'm on vacation._";
	action = END_TALK;
	
begintalknode 19;
	state = 10;
	nextstate = 13;
	condition = gf(167,4) == 1;
	question = "I have been sent to get you to leave.";
	text1 = "_Ahhh. Well, I am not leaving. I have made it quite clear. I am enjoying my time here. I am not going. You want me to leave? Make me._";
	
begintalknode 20;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "You like being imprisoned? Don't you miss your home?";
	text1 = "_Buddy, have you ever actually been to the infernal realms? Most of my comrades in arms dream of being captured and held by some wizard. I just got lucky._";

begintalknode 21;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "All right. If this is what I have to do to be rid of you. (Attack.)";
	text1 = "He sighs, disappointed. _I knew that wizard would send someone along soon enough. Best me in battle, and I will depart. But I will fight to preserve my vacation._";
	text2 = "_Oh, and one more thing._ He giggles as many small forms start to appear around him. _I do still have a small command in the infernal regions._";
	action = END_TALK;
	code =
		set_attitude(16545,10);
	break;

begintalknode 22;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "Hmmm. I'll just be going.";
	text1 = "The creature sits down, leans back, and smiles. _Do what you need to do. In the meantime, I'm on vacation._";
	action = END_TALK;

begintalknode 23;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I want to know about something else.";
	text1 = "The creature sits down, leans back, and smiles. _The Tower Colony is behind you. It's full of talkers. Leave me alone. I'm on vacation._";
	action = END_TALK;


// Sage Laurel

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Sage Laurel";
	text1 = "There is a young mage here, sitting cross-legged before a straw mat. It is covered with paper and inkpots, and she is calmly illuminating a vellum scroll.";
	text2 = "She looks at you, smiles, and answers your unspoken question. _Just because we are doomed doesn't mean I can't keep busy. I am Sage Laurel, scribe and, unwillingly, citizen of the road. But I still am available for hire._";
	text5 = "The young sage continues to work on her scroll, the pen effortlessly dancing across the page. She switches to a different ink. _This contains a touch of drake's blood. Very useful for the right sort of scroll._";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = 31;
	condition = 1;
	question = "Where are you from?";
	text1 = "_Once, New Harston. Then Silvar. Then the Great Portal. Then the misfortune, and now I don't know where I will go. And I suppose, in the end, it won't matter._";

begintalknode 32;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Where is New Harston?";
	text1 = "_Very far to the north. Destroyed, rebuilt, and destroyed again. I doubt there will ever be a New New Harston._";

begintalknode 33;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Why won't it matter?";
	text1 = "_Because there is no food and no escape._ She speaks quietly. _I don't tell the others about our inevitable fate. It would upset them. But you have seen what is happening. You understand._";

begintalknode 34;
	state = 30;
	nextstate = 32;
	condition = 1;
	question = "You think we are doomed?";
	text1 = "_I know we are. It is sad, but we must all accept it and live the rest of our lives the best we can. The portal is gone. There is little food left. The Slith Horde is coming._";
	text2 = "_I accept it, and I will spend my final days as I choose._";

begintalknode 35;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "Perhaps the portal will be rebuilt.";
	text1 = "_Don't fool yourself. The crystal that exploded? I've seen it. Crystals like that are rare and require years of work to be suitable for such a job._";
	text2 = "_It would be extremely difficult to replace it in the best of circumstances. Which these are not. Don't burden yourself with too much hope._";

begintalknode 36;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "What will you do?";
	text1 = "She holds up the scroll she's working on, inspects it, and smiles. _Lovely, isn't it? A little extra beauty in an ugly world._ She sets it aside to dry and begins another.";

begintalknode 37;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "Can I buy a scroll from you?";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Sage Laurel",
		  "Sage Laurel is still furiously making scrolls as if she actually believes Avernum has a chance of survival.",
		  42,3,0);	
	break;


begintalknode 38;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "Good day.";
	text1 = "_And the same to you. I hope you can find a fulfilling way to spend your last days._";
	text2 = "Wow. What a cheery lady.";
	action = END_TALK;

//

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