// TOWN DIALOGUE SCRIPT
//    Town 70: Fort Ganrick

begintalkscript;

variables;

short i,j,k,r1,choice;


begintalknode; // wheel
	tag = 1;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "This wheel will eventually control the gate to the south. Channels will be dug out of the stone, and chains will run from it to the gate mechanism.";
	text2 = "It's not ready yet. You spin the wheel a few times for fun, but nothing productive comes of it.";
	
begintalknode;
	tag = 2;
	state = -1;
	nextstate = -1;
	condition = gf(70,15) == 0;
	text1 = "You stumble groggily out of the cave that has been your unwilling home for several weeks. Your muscles are still sore from yesterday's digging. You've been working on these storage tunnels for weeks.";
	text2 = "You notice that the gate to the north is closed. Most Avernites have learned to resist claustrophobia, but seeing your lone route to the exit closed off makes you nervous. You can see Maxine on the other side. Maybe she knows what is happening.";
	text3 = "Before you proceed farther, however, you should protect your head with a helmet. Two crude helms of thick lizardskin wait for you on the table nearby. You should take advantage of them before you move on.";
	action = SET_SDF 70 15 1;
	
begintalknode;
	tag = 3;
	state = -1;
	nextstate = -1;
	condition = gf(70,17) == 0;
	text1 = "You enter the room you've spent several weeks expanding. Your worn tools wait on the floor, promising exhausting hours of chipping away at one of Avernum's unending walls.";
	text2 = "However, things do not go as planned. As you enter the cave, the ground shakes under your feet. Slightly at first, then harder. It doesn't feel like one of Avernum's many cavequakes. No. This is more ... local ...";
	text3 = "And then you hear cracking stone, and a cloud of dust pours out of the passage to the south. Then you hear the chattering of shrill voices. Something has dug its way into your fort.";
	text4 = "(You are about to enter combat mode. Once battle has begun, to attack an enemy, select the space it is standing in. You will also get tips about spells and abilities you can use.)";
	action = SET_SDF 70 17 1;
	code =
		toggle_quest(70,3);
		toggle_quest(71,1);
	
	break;
		
begintalknode;
	tag = 4;
	state = -1;
	nextstate = -1;
	condition = gf(70,19) == 0;
	text1 = "You hear shouting and running to the north, and then two Avernite soldiers run into the storeroom in a panic. They are new arrivals like you, green enough to be terrified of the goblins that are chasing them.";
	text2 = "";
	action = SET_SDF 70 19 1;
	
begintalknode;
	tag = 5;
	state = -1;
	nextstate = -1;
	condition = gf(70,21) == 0;
	text1 = "You have reached the completed storerooms and are pleased to find that some of the supplies are still here. Considering how little the Castle sent out here, even before the barriers blocked travel, this is a stroke of luck.";
	text2 = "One healing potion sits on the table in the alcove to the south, waiting for some lucky warrior to claim it.";
	text3 = "(To use a potion, open the inventory window and get a potion. To use an item, like a lamp, scroll, or potion, press the sunburst button next to it.)";
	action = SET_SDF 70 21 1;
	code =
		//### use item hint
		set_dialogue_pic(215);
	break;
	
begintalknode;
	tag = 6;
	state = -1;
	nextstate = -1;
	condition = gf(70,22) == 0;
	text1 = "You see a bow and javelins on the table to the north. They are crude and heavily used, perhaps dating to the earliest days of Avernum.";
	text2 = "When you attack an enemy, you will use your Default weapon. This can be a melee weapon (sword or spear) or a missile weapon (javelin or bow).";
	text3 = "(Get the javelins and equip them. You can switch your default weapon by pressing the buttons to the lower left, or by typing 's'.)";
	text4 = "(You can skip a character's turn in combat by clicking on it or pressing the Space Bar.)";	
	action = SET_SDF 70 22 1;
	code = 
		set_dialogue_pic(196);
	break;	
	
begintalknode;
	tag = 7;
	state = -1;
	nextstate = -1;
	condition = gf(70,23) == 0;
	text1 = "The door to the east is held shut by a padlock. That explains why goblins haven't looted it yet. If you pick the lock, you might be able to take advantage of Fort Ganrick's limited supplies.";
	text2 = "(Tool Use skill determines what doors you can open. Each lock and trap has a difficulty number attached to it. If the total Tool Use in your party is at least as high as the difficulty, you can bypass it.)";
	action = SET_SDF 70 23 1;
	
begintalknode;
	tag = 8;
	state = -1;
	nextstate = -1;
	condition = gf(70,25) == 0;
	text1 = "At last, you have found the path down to Fort Ganrick. The sounds of battle are still audible ahead, and you cannot tell whether the humans or nephilim are winning.";
	text2 = "You take a moment to rest, and then you ready your weapons. Perhaps a few additional swords on the Avernite side can turn the tide of the battle ...";
	text3 = "(Step on the sloped floor to go downstairs.)";
	action = SET_SDF 70 25 1;
	code =
		revive_party();
		sf(70,29,1);
	break;
	
begintalknode;
	tag = 9;
	state = -1;
	nextstate = -1;
	condition = gf(70,24) == 0;
	text1 = "You run out into the main body of Fort Ganrick. Sure enough, the nephilim found a way to infiltrate the fort and attack. Two of them are to the west, sneaking behind the barracks. When they see that you have spotted them, they charge.";
	text2 = "In the courtyard to the south, you can see guards fighting other nephilim. Happily, it appears that your team is getting the best of the invaders.";
	action = SET_SDF 70 24 1;
	code =
		set_attitude(30013,10);
	break;

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "You speak with one of the young soldiers. His Avernite skin, already pale from years in the underworld, has faded to a sickly white. He had never been in a battle when the bloodthirsty humanoids started flooding into the keep.";
	text2 = "You are able to learn little of value. Apparently, as grim as things look up here, things are worse down in the main fort. He mutters something about 'Cat People.'";
	text3 = "Now that the attack is over, you can only hope he calms down soon.";
	code =
		if (gf(70,29) == 0)
			rs(3);
			else rs(2);
	break;
	
begintalknode;
	tag = 14;
	condition = 1;
	text1 = "Horrarum falls to the ground, dead. He is far from the first to fatally underestimate the warriors of Avernum.";
	text2 = "You open the leather satchel hanging from his belt. Inside it, you find two scrolls. One of them is inscribed with magical runes. The other looks like a map. Interesting. You set the map aside, hoping to read it when the chaos has died down.";
	text3 = "(To read a map, use it in your inventory.)";

begintalknode; // soldier
	tag = 15;
	condition = 1;
	text1 = "The nephilim raid has put real fear into the soldiers here. They talk about nothing but the enemy fort to the east and their inability to send a proper force to attack it.";
	text2 = "One of them says, _Oh, the captain wants to see you._ He points at her office, in the north half of the fort.";
	text3 = "Now that the enemy nephilim to the east have been defeated, the soldiers here are a good deal more calm. Still very alert, of course, but no longer on the ragged edge of panic.";
	action = DEP_ON_SDF 70 9 1;
	code =
		if (gf(70,5) > 0)
			rs(2);
	break;
	
begintalknode;
	tag = 16;
	condition = 1;
	text1 = "The lizard says, _Hiss._ The torturous political and military upheaval recently experienced by Avernum seems to have left it emotionally unaffected.";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "You are now in combat. Characters will take turns moving and attacking. Each turn, you get a few action points. Everything you do (moving, using items, attacking, etc) costs action points. When you run out, your turn is over.";
	text2 = "To attack a foe, select the space it is standing in. The space your cursor is over will be tinted red. If there is an enemy in that space, it will glow.";
	code =
		set_dialogue_pic(169);//###
	break;

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";


// Maxine

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You look through the gate and see Maxine, hard at work. She is a skilled stoneworker, sent into Avernum not long before the Empire invaded. Her skin still shows a tiny remnant of color from being in the sun.";
	text2 = "She is behind the closed gate, fixing stone blocks in the frame with mortar. She nods and smiles when she sees you.";
	text3 = "_Sorry. Trapped you in there. Won't be long. At least you can dig uninterrupted._";
	text5 = "Maxine continues to put the final touches on stone blocks and mortar them into the gate. She pretends that you aren't there, hoping that you will leave her to her work.";
	action = INTRO;

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_Tell me more about yourself._";
	text1 = "She laughs. _I'm not a big soldier like you. Just another unfortunate who said the wrong thing, got the wrong man angry, and was sent down here._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_What did you say to get sent down here?_";
	text1 = "She frowns and suddenly becomes very distracted by her bucket of mortar. In Avernum, asking how you got sent into the underworld is poor manners.";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Why did you come out to Fort Ganrick?_";
	text1 = "_I had to help out somewhere, and I had skills to use. This fort needs to be finished. Once I was down here, your war against the Empire became my war._";

begintalknode;
	state = 11;
	nextstate = 10;
	condition = 1;
	question = "_I'd like to ask something else._";
	text1 = "_I can't stop you. You're on the other side of the gate._";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "_What is happening out in the fort?_";
	text1 = "_Don't know. Probably just building. I stay down here so that I don't get any news. It's just upsetting._";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "_Have you heard anything about the barriers?_";
	text1 = "_Just rumors, most likely meaningless. The barriers are still everywhere, blocking the roads to the rest of Avernum. The wizards can't do anything about them. We are in horrible trouble._";
	
begintalknode;
	state = 10;
	nextstate = 12;
	condition = 1;
	question = "_What's happening with this gate?_";
	text1 = "_I just needed to close it for a few minutes to place this frame. Won't be long._";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_Ahhhh! I can't stand being trapped in here! Let me out!_";
	text1 = "Maxine smiles. _Oh, you. Give me a minute. This won't be long. Don't you have a hole to dig?_ She returns to her work.";
	action = END_TALK;
	
begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_Take your time._";
	text1 = "_Oh, it won't be long. Why don't you go do your digging? Looks like you only have a few more years of it to go._ She returns to her work.";
	action = END_TALK;

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_I'll go get to work then._";
	text1 = "_Of course. Proud soldier of Avernum that you are. Digging out storerooms stinks, but at least we aren't getting killed._ She returns to her work.";
	action = END_TALK;

// Max extra

begintalknode;
	tag = 32;
	state = -1;
	nextstate = 20;
	condition = 1;
	question = "Name";
	text1 = "Maxine has dropped her tools and is wandering around dazed, not sure what is happening. You remember that she isn't a soldier. Just a stonemason, trapped in a terrible place.";
	text2 = "She looks at you. _What ... What is happening? Are we being attacked?_";

begintalknode;
	state = 20;
	nextstate = -1;
	condition = 1;
	question = "_It's just goblins. Not a problem._";
	text1 = "_But I heard more fighting. Toward the exit. It can't just be goblins, can it?_";
	
begintalknode;
	state = 20;
	nextstate = -1;
	condition = 1;
	question = "_Maybe the Empire has come for us at last._";
	text1 = "_What? The Empire? Already? It can't be! We're not ready._";
	
begintalknode;
	state = 20;
	nextstate = -1;
	condition = 1;
	question = "_You should leave these tunnels._";
	text1 = "_I don't think so. I'm going to hide down here. Unless more of them dig out. Then I'll ... I don't know!_ She crouches and buries her face in her hands.";
	action = END_TALK;
	
begintalknode;
	state = 20;
	nextstate = -1;
	condition = 1;
	question = "_Just stay here._";
	text1 = "_All right. That seems safest. But what ... What if more of them tunnel out? I don't know what to do!_ She crouches and buries her face in her hands.";
	action = END_TALK;


begintalknode;
	tag = 34;
	state = -1;
	condition = 1;
	question = "Name";
	text1 = "You stop and talk to Maxine briefly. She is understandably frightened and every noise makes her jump, but her dagger is in her hand and she is walking around listening for more invaders.";
	text2 = "You make sure she is unwounded and leave her to her hunt. She promises you that, if she sees an attacker, she will be very loud.";
	
// Captain Vidican

begintalknode;
	tag = 10;
	state = -1;
	nextstate = 244;
	question = "Captain Vidican";
	text1 = "This small woman wears the insignia of a captain, not to mention two long, vicious looking rapiers. She grants you a short, sharp bow.";
	text2 = "_I know you, though we haven't met. Storeroom detail, yes?_";
	text5 = "Captain Vidican waits impatiently to see what else you have to say. _Speak up. Too much work to do._";
	action = INTRO;


begintalknode;
	state = 244;
	nextstate = 252;
	condition = gf(70,2) == 0;
	question = "_I was building storerooms, yes. A good place for me._";
	text1 = "She looks you over. _No, when you came here, you had promise. Time to see if you live up to it. I'm Cecile Vidican. Captain Vidican, to you. I think we will have to give you more productive work than we have so far._";
		 
		
begintalknode;
	state = 244;
	nextstate = 252;
	condition = gf(70,2) == 0;
	question = "_I was working in the back caves, but I'm eager to fight!_";
	text1 = "She smiles. _I'm glad to hear it. When you came here, you had promise. Time to see if you live up to it. I'm Cecile Vidican. Captain Vidican, to you. I think we will have to give you more productive work than we have so far._";

begintalknode;
	state = 252;
	nextstate = 244;
	condition = 1;
	question = "_Doing what?_";
	text1 = "_You were sent to us as a potential scout or raider. This is, as it happens, exactly what we need right now. Let's talk. You've been in the upper caves too long. I'll tell you what we need from you._";
	text2 = "Outside, you can hear the guards open the iron front gates. You are now free to leave the fort.";
	code =
		toggle_quest(100,3);
		toggle_quest(1,1);
		sf(70,5,1);
		sf(70,2,1);
		award_party_xp(600,2);
	break;	 

begintalknode;
	state = 244;
	nextstate = 245;
	condition = gf(70,9) <= 1 && gf(70,2) > 0;
	question = "_What would you like me to do?_";
	text1 = "_Before the Empire attacked, this was a peaceful mining area. Then the Fang Clan nephilim snuck up here, wiped out the miners, and got established. We were told to hold them in until we can root them out._";
	text2 = "_But that is no longer enough. The nephilim have built a crude fort to the east and grown belligerent and numerous. We need you to help weaken them. It's a small threat, compared to the Empire, so I shouldn't need to send more than you._";
	code =
		toggle_quest(2,1);
		sf(70,9,1);
	break;	 


begintalknode;
	state = 245;
	nextstate = -1;
	question = "_Are you sure that they will attack again?_";
	text1 = "_Yes. They've made raids in the past, but nothing like this newest raid. Small sorties we can handle, but we're not ready for a pitched battle yet._";
	text2 = "She thinks. _If we do get attacked, we'll need your help. Be sure to use the armory._";

begintalknode;
	state = 245;
	nextstate = -1;
	condition = party_has_item(486);
	question = "_I found this map on one of the raiders._ (Show it to her.)";
	text1 = "She looks it over. _Hmmm. That looks like the area around their fort, all right. Looks like it's showing a tunnel to the north of it. And ... 'Ghath?' Interesting._";
	text2 = "_We haven't been able to send a scout to the tunnels north of the nephilim fortress. Perhaps you should investigate._";
	text3 = "(You haven't actually looked at the map yet. It might be helpful. You can read it by using it in your inventory.)";
	code =
		if (gf(70,12) > 0)
			rs(3);
	break;

begintalknode;
	state = 245;
	nextstate = -1;
	condition = nephil_present() > 0;
	question = "_Will being a nephil exploring this area be a problem?_";
	text1 = "She shrugs. _Anyone who wants to pick up a sword and defend Avernum is fine with me._";

begintalknode;
	state = 245;
	nextstate = -1;
	condition = gf(71,20) < 2;
	question = "_You really think I'm strong enough to destroy the fortress?_";
	text1 = "_I don't know. Everything we do now is an act of desperation._";
	text2 = "_You might be able to get some help in Fort Draco, not far to the southwest. Go there and speak with Commander Anford. He might find a good way to use your skills. We need everyone. Even someone as inexperienced as you._";
	code =
		sf(71,20,1);
		toggle_quest(101,1);
	break;
	
begintalknode;
	state = 245;
	nextstate = 246;
	question = "_What can you tell me about the tribe?_";
	text1 = "_They're only just getting settled in. They're trying to match our strength. We're ahead, but they're catching up and getting aggressive. Hopefully, you can snuff them out before they attack again._";
	text2 = "_Find and kill their chief. He's a nasty nepharim. Do that, and that should blunt their spears enough for us to deal with them._";

begintalknode;
	state = 246;
	nextstate = 247;
	question = "_Describe their outpost._";
	text1 = "_The kitties have established their lair to the east. We don't have the troops for a frontal assault, but we have high hopes that a small band can sneak in and do some damage to keep them off guard. The hard part is getting inside._";
	text2 = "She pats her blades. _We have to do something before they attack again. We're ready, but not that ready._";

begintalknode;
	state = 247;
	nextstate = -1;
	question = "_Tell me about the gate._";
	text1 = "_The kitties have a big, trapped gate in the front of their lair. It'll be hell to get through without a huge force. We think they must have a back way in, but we don't know where it is._";

begintalknode;
	state = 247;
	nextstate = -1;
	question = "_Are there other ways in?_";
	text1 = "_It is possible. Even likely. These tunnels are honeycombed with old mines. If you explore the area around the nephilim fort, who knows what you might find?_";
	
begintalknode;
	state = 248;
	nextstate = 249;
	question = "_Can I get some supplies for the assault?_";
	text1 = "_You can find supplies in the rooms to the east. Help yourself. We won't send you into the jaws of doom empty-handed. We don't have much to offer, I'm afraid. Little more than stone weapons, until Formello sends up something._";

begintalknode;
	state = 249;
	nextstate = 244;
	question = "_I passed Formello on the way up here. Tell us about it._";
	text1 = "She sighs. _Formello's the biggest town in these parts. It's where I grew up. It's a ways to the southeast. I've been all over, and Formello is the nicest place in Avernum by far._ She sighs again. _Of course, that's not saying much._";

		
begintalknode;
	state = 244;
	condition = gf(70,2) > 0;
	nextstate = -1;
	question = "_What is it you do here?_";
	text1 = "_I'm trying to help this fort get established. That's why you were sent here. There's a nephilim outpost to the east. Very hostile. Needs to be dealt with._";
	text3 = "_What do you think? I run this fort. Fight enemies of Avernum. Do what I'm told. It's easier now, since the nephilim are on the run. The Empire, though? Still out there and as dangerous as ever._";
	action = DEP_ON_SDF 70 9 1;

begintalknode;
	state = 244;
	nextstate = 253;
	condition = gf(70,2) > 0;
	question = "_Has there been much Empire activity up here?_";
	text1 = "She grimaces. _They haven't attacked up here much, but more than enough, let me tell you. The nephilim only made things worse._";
	text2 = "_Of course, their raids have slowed down now that the barriers are up._";
	text3 = "_Of course, their raids have started again now that the barriers are down._";
	code =
		if (gf(70,10) == 0)
			rs(3);
			else rs(2);
	break;
	
begintalknode;
	state = 253;
	nextstate = -1;
	condition = gf(70,10) == 0;
	question = "_Tell me about the barriers._";
	text1 = "_They appeared a few weeks ago. Massive magical barriers that cut off our roads and split Avernum into many little pieces._";
	text2 = "_At first, we thought the Empire made them. However, they seem to stop Empire soldiers too. Our wizards are working on it. That's all I know._";
		
		
begintalknode;
	state = 244;
	nextstate = -1;
	condition = gf(72,6) >= 1 && gf(70,9) == 1;
	question = "_It has been done. I have slain the nepharim chief._";
	code =
		run_hardcode(100);
	break;

begintalknode;
	state = 244;
	nextstate = 254;
	condition = gf(70,2) > 0;
	question = "_How is the war against the Empire going?_";
	text1 = "_Badly. I don't know many of the specifics. Been out here for a while. But definitely badly. Surprise nephilim raids don't help._";

begintalknode;
	state = 254;
	nextstate = -1;
	condition = 1;
	question = "_How are you recovering from the surprise attack?_";
	text1 = "_Badly, but we'll manage._ She shakes her head, disgusted with the whole situation. _We found the cracked walls they were able to use to get in. It will be repaired soon._";
	text2 = "_People are recovering from their wounds, and we'll get reinforcements as soon as we can._";


begintalknode;
	state = 244;
	nextstate = 250;
	condition = gf(70,9) >= 2 && gf(70,10) == 0;
	question = "_What else would you like for me to do for you?_";
	text1 = "_Well, normally, I would tell you to return to Silvar for more orders. However, since the magic barriers appeared, you can't get back there. So, until they are gone, explore._";
	text2 = "_If you can find a way to destroy the barriers blocking the roads, please do so._";
	text3 = "_Also, you might be able to provide some help to Fort Draco, not far to the southwest. Go there and speak with Commander Anford. He might find a good way to use your skills. We need everyone. Even someone as inexperienced as you._";
	code =
		if (gf(70,10) > 0)
			rs(2);
			else toggle_quest(1,1);
		if (gf(71,20) == 0) {
			sf(71,20,1);
			toggle_quest(101,1);
			}
			else rs(3);
	break;
	
begintalknode;
	state = 250;
	nextstate = 255;
	condition = gf(1,4) == 0;
	question = "_Definitely. Any ideas for where to look?_";
	text1 = "_Formello. It's the largest city in these parts, and powerful wizards live there. Perhaps they have some idea about what might be done to lower the barriers. I suspect that you could be of great use to the mayor there._";
	code =
		toggle_quest(102,1);
	break;

begintalknode;
	state = 255;
	nextstate = -1;
	condition = 1;
	question = "_How do I get to Formello?_";
	text1 = "_It is a long, hard journey. Travel east on the roads and then south. Follow the signs. Once there, insist on seeing the mayor. Don't let them turn you away._";
	text2 = "_And perhaps you should first visit Fort Draco, not far to the south. If you do work there, it might help you gain the strength you need to survive the roads to Formello. Good luck to you._";
	action = END_TALK;
	

begintalknode;
	state = 244;
	nextstate = -1;
	condition = gf(70,2) > 0 && gf(0,15) == 1;
	question = "_I rescued one of your soldiers. Name was Arum._";
	text1 = "She is surprised. _That was you? We are so grateful! Arum recovered quickly and is already out hunting for vengeance. And for you, a bounty ..._ She gives you a pouch of coins.";
	code =
		change_coins(50);
		award_party_xp(100,2);
		sf(0,15,2);
	break;

// 

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 271;
	question = "";
	text1 = "You meet a harried, balding man, sorting through account ledgers on his desk. He doesn't want to slow down his work to talk to you. _I'm Gridley,_ he mutters. _And I don't have much time to chat._";
	text5 = "Fort Ganrick's quartermaster watches you impatiently.";
	action = INTRO;

begintalknode;
	state = 271;
	nextstate = 272;
	question = "_What is your job here?_";
	text1 = "_I'm the quartermaster for Fort Ganrick. And I need help!_";

begintalknode;
	state = 272;
	nextstate = -1;
	question = "_What does a quartermaster do?_";
	text1 = "_I keep track of supplies. Well, that's supposed to be my job. But I also cook. And clean. And hold the soldiers' hands. And try to get everything in shape before we get attacked._";

begintalknode;
	state = 272;
	nextstate = -1;
	question = "_Since you give out supplies, you could give me stuff, right?_";
	text1 = "_Oh, you need things, do you? Ask Cecile, the captain, about supplies. She'll tell you what you can have. It won't be much._";
	
begintalknode;
	state = 271;
	nextstate = 275;
	question = "_Tell me about Fort Ganrick._";
	text1 = "_Lovely, isn't it? Put together in a hurry, staffed even faster. We keep asking Fort Draco for help, but they have their own problems. We do the best we can._";

begintalknode;
	state = 275;
	nextstate = -1;
	question = "_What do you ask Fort Draco for?_";
	text1 = "_We need help more than anything. More people, more supplies. As things are, we can't hold up under a serious attack. We keep asking Fort Draco for supplies, but the Empire has them so scared they won't spare anything to fight the nephilim._";
	text2 = "You passed Fort Draco when you first traveled to this fort. It's just a little way to the south.";
	text3 = "He thinks. _Say ... If you are ever there, could you tell Commander Anford that we are desperately short of javelins? I would love to hear his latest excuse for why he hasn't sent any to us in weeks._";
	code =
		if (gf(70,7) > 1)
			rs(3);
			else if (gf(70,7) == 0) {
				sf(70,7,1);
				toggle_quest(73,1);
				}
	break;
	

begintalknode;
	state = 271;
	nextstate = 1;
	condition = gf(70,7) == 2;
	question = "_Commander Anford says that they are already using and reusing all of the javelins they have._";
	text1 = "Gridley sighs. _You know something? I actually believe that excuse. Anford is getting so desperate that he's actually resorting to honesty. This is how bad things have gotten._";
	code =
		sf(70,7,3);
		award_party_xp(100,3);
		toggle_quest(73,3);
	break;
	
begintalknode;
	state = 271;
	nextstate = -1;
	condition = gf(70,9) == 1 && gf(72,6) == 0;
	question = "_I am on a mission to assault the nephilim._";
	text1 = "_I could not care less. Go see the captain if you need something._ He points to the north.";

begintalknode;
	state = 271;
	nextstate = -1;
	condition = gf(70,9) == 1 && gf(72,6) > 0;
	question = "_I slew the nephar chieftain._";
	text1 = "_And? Not my concern. Tell the captain about it._";

begintalknode;
	state = 271;
	nextstate = 276;
	condition = gf(70,8) <= 1;
	question = "_Say... can you get me any extra supplies?_";
	text1 = "He thinks. _No. Nothing you don't earn. But I'll tell you what. There was a shipment of arrows and bolts being sent up here. Disappeared. Brigands, I think._";
	text2 = "_If you ever find a sign of what happened to it, let me know, and I'll see what I can do. Try looking to the south. You might find something._";
	action = SET_SDF 70 8 1;
	code =
		toggle_quest(3,1);
	break;
	
begintalknode;
	state = 276;
	nextstate = 277;
	condition = 1;
	question = "_No other clues for me?_";
	text1 = "_Well I sent out trackers, of course. It didn't do much good. They did find a few broken arrows on the path near the Verdant Valley, but I'm not sure if they were some of our arrows._";

begintalknode;
	state = 277;
	nextstate = -1;
	condition = 1;
	question = "_Verdant Valley? Sounds lovely._";
	text1 = "_It's not. Name is a joke more than anything. I mean, plenty of green things grow in there. Mold. Slimes. Goblins. But it's not a friendly place. Good cave for brigands to hide in, perhaps._";
				
		
begintalknode;
	state = 271;
	nextstate = -1;
	condition = gf(70,8) == 1 && gf(7,11) >= 1;
	question = "_I found the lost shipment of arrows. They were stolen and used by some brigands._";
	code =
	run_hardcode(1);
	break;

begintalknode;
	state = 271;
	nextstate = -1;
	condition = gf(70,8) >= 2;
	question = "_Any more supplies for me?_";
	text1 = "_No! You've taken enough from us! Look somewhere else!_ Tired of you, he gets back to work.";
	action = END_TALK;


begintalknode;
	state = 271;
	nextstate = 278;
	condition = 1;
	question = "_I'd like to trade with you._";
	text1 = "_You mean that you want to actually replace the precious goods you take away? Well, there's a first for everything. I'm happy to barter for whatever you scavenged on the battlefield._";
		
begintalknode;
	state = 278;
	nextstate = -1;
	condition = 1;
	question = "_Let me see what you can spare._";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Ganrick Supplies",
		  "Gridley can only spare a little bit of equipment, and it's not quality stuff. The Castle really doesn't send decent supplies out here.",
		  0,6,0);	
	break;


begintalknode;
	state = 278;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 278;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Then let me get back to work. I need to determine what all the nephilim raiders destroyed._ He returns to his papers.";
	action = END_TALK;


// 

begintalknode;
	tag = 50;
	state = -1;
	nextstate = 298;
	question = "";
	text1 = "A scrawny man wearing the plain robes of an apprentice mage is reclining on the bed. He seems to have a headache. _I'm Ian. Who are you?_ He looks you over. _Oh. Soldiers. Go away._";
	text5 = "_You soldiers are still here? Will my torments ever end? What now?_";
	action = INTRO;

begintalknode;
	state = 298;
	nextstate = -1;
	question = "_What are you doing back here?_";
	text1 = "_Go away. I have a headache._";


begintalknode;
	state = 298;
	nextstate = -1;
	condition = gf(70,3) == 0;
	question = "_Ummm ... Are you aware that the fort was just attacked?";
	text1 = "He presses the heels of his hands into his eyes. _What? Is that what that sound was? Well, the attack sounds over. Leave me alone._";
	action = SET_SDF 70 3 1;
	
begintalknode;
	state = 298;
	nextstate = -1;
	condition = gf(70,10) == 0;
	question = "_You know magic. Do you know how to bring down the magical barriers?_";
	text1 = "_Of course not. If I did, I wouldn't be stuck here. I saw them appear. They blocked the passage just south of where I camped. A little further south, and I would have died in my sleep. I have no idea what to do about them._";
	text2 = "He stops speaking. The act of speech is making his headache much worse.";
	
begintalknode;
	state = 298;
	nextstate = 299;
	question = "_What's wrong with soldiers?_";
	text1 = "_You're here to help against the nephilim, right? I thought so. Well go run off and do something, there's a good chap. My head hurts._";

begintalknode;
	state = 299;
	nextstate = 300;
	question = "_You have a headache?_";
	text1 = "_Yes. From my journey. Wake me if we get attacked._";

begintalknode;
	state = 300;
	nextstate = 301;
	question = "_Perhaps you should be defending this fort a bit more aggressively?_";
	text1 = "He's getting angry. _Look, I've had a hard trip, and I shouldn't be here anyway. I'm supposed to help in an attack, and I will. Until then, leave me alone._";

begintalknode;
	state = 301;
	nextstate = 302;
	question = "_Journey? Where from?_";
	text1 = "_From the Tower._";

begintalknode;
	state = 302;
	nextstate = 303;
	question = "_What Tower?_";
	text1 = "He moans angrily and grips his head tightly in his hands. _From the Tower of Magi. Perhaps you've heard of it. A place where magi can learn and grow and gain power without having to fight kitties and sliths and whatever. It's far to the south. Too far._";
	text2 = "_Now will you please go away?_ He rolls over on the bed and grumbles at you obscenely.";

begintalknode;
	state = 303;
	nextstate = -1;
	question = "_Sliths?_";
	text1 = "_Yes, the slithzerikai. The lizard people. You haven't forgotten them, have you? There's still some around here, the nasty kind, as vicious as ever._ Finally tired of you, he shuts his eyes tightly and pretends to sleep.";
	action = END_TALK;

begintalknode;
	state = 301;
	nextstate = -1;
	question = "Leave him.";
	text1 = "As you depart, he sighs in relief.";
	action = END_TALK;


// nephil

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 400;
	condition = 1;
	question = "Name";
	text1 = "The stairs down to the rest of Fort Ganrick are to the south, but they are guarded. You see the foes waiting to ambush you, and you immediately realize who is behind the assault. The goblins here are led by a nephil warrior.";
	text2 = "The nephilim are a race of fierce, clannish feline warriors. The Empire has slaughtered most of their number, sending a few survivors down to Avernum. Of late, the Avernites have made peace with some of their clans, but others remain determined to get revenge on humanity.";
	text3 = "This large hunter snarls and hisses when he sees you. _Mrrrr! It is luck! Human prey for Horrarum of the Fang Clan. Easy prey!_";
	code =
		set_level(30012,1);
		set_attitude(30012,10);
	break;
	
begintalknode;
	state = 400;
	nextstate = -1;
	condition = 1;
	question = "Where are you from?";
	text1 = "_Mrrar! Our mighty castle in the caves! Humans here neglect it too long. Now Fang Clan is strong and ready to take these lands!_";
	text2 = "You remember hearing the other soldiers passing on rumors about nephilim sightings to the east. Maybe those should have been taken more seriously.";
	
begintalknode;
	state = 400;
	nextstate = -1;
	condition = 1;
	question = "You are not with the Empire?";
	text1 = "Horrarum spits on the stone floor. _Empire? Empire is great enemy! When we take these caves, we make ready! Ready for vengeance on Empire when they come here! We destroy all and gnaw their bones!_";
	text2 = "Nephilim? Beating the Empire? Seems unlikely.";

begintalknode;
	state = 400;
	nextstate = 401;
	condition = 1;
	question = "You think I am easy prey?";
	text1 = "_Warriors of this fort are dregs. They run when we come. We hunt you all and take fort for our own. First victory for Fang Clan!_";

begintalknode;
	state = 401;
	nextstate = -1;
	condition = 1;
	question = "How about this? Leave now, and you can live.";
	text1 = "Horrarum bares his teeth and lets out a long hiss. _Flee? At our moment of triumph? Never!_ He leaps ahead of the goblins, eager to claim his prey.";
	action = END_TALK;

begintalknode;
	state = 401;
	nextstate = -1;
	condition = 1;
	question = "You can have the fort. Just let me go!";
	text1 = "Horrarum bares his teeth and lets out a long hiss. _I had heard Avernites were cowards. I thought it was lies. Die in your shame!_ He leaps ahead of the goblins, eager to claim his prey.";
	action = END_TALK;

begintalknode;
	state = 401;
	nextstate = -1;
	condition = 1;
	question = "Your assault ends here. (Attack.)";
	text1 = "Horrarum is eager for battle. He leaps ahead of the goblins, blade out and teeth bared.";
	action = END_TALK;
	

