// TOWN DIALOGUE SCRIPT
//    Town 61: Fort Remote

begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode;
	tag = 1;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "The guards of Fort Remote are a grim, weary lot, worn down by months of constant Empire attacks from the west.";
	text2 = "When you try to learn more, they suggest that you speak with the commander. Then they try to rest.";
	
// Commander Lori

begintalknode;
	tag = 10;
	state = -1;
	nextstate = 28;
	question = "Commander Lori";
	text1 = "You meet a middle-aged woman with very long, very curly, scarlet hair. She is studying maps at her desk. She looks up and gives you a grim smile.";
	text2 = "_I am Commander Lori, daughter of Rourke. Welcome to Fort Remote, soldier._ You note that she is dressed in simple white robes, with the symbol of a commander embroidered on the shoulder.";
	text5 = "Commander Lori says, _Anything else before I return to my work?_  Her robes are immaculately clean and unadorned. You note that she is unarmed.";
	action = INTRO;

begintalknode;
	state = 28;
	nextstate = 29;
	question = "_Are you the commander of this fort?_";
	text1 = "_Yes, as my father was before me. I organize our defenses and prepare for Empire attacks. Of which there are no shortage._";

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_May I ask what happened to your father?_";
	text1 = "_My father was slain when a horde of demons destroyed the old Fort Remote. You can still find the old fort's ruins, just to the east.  When he died, I joined the army and rose up to this position. Then I took his place._";
	text2 = "She looks down at her unusual garb, and smiles. _As you can see, I've made my way in my own style._";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_I take it that you don't care for uniforms._";
	text1 = "_I don't like uniforms, and I don't like uniform thinking. The Empire's forces in this area are unusual, and this fort needs to be unusual to deal with them. Happily, we Avernites are granted a lot of freedom to do what is best._";

begintalknode;
	state = 31;
	nextstate = 32;
	question = "_The enemy forts are unusual in what way?_";
	text1 = "_There are two large Empire outposts to the west, Kothtar and Angierach. They are unusual places, each in its own way._";

begintalknode;
	state = 32;
	nextstate = -1;
	question = "_What is Kothtar like?_";
	text1 = "_Kothtar is a site of magic and magical experimentation. Strange creatures come from there, including huge, amazingly strong mutant giants. Not the sort of thing an ordinary soldier has to deal with._";

begintalknode;
	state = 32;
	nextstate = 33;
	question = "_What's so unique about Angierach?_";
	text1 = "_A huge fort. Black stone, black magic. We know nothing about what goes on inside, except that prisoners that go in never come out, and it gives our priests splitting headaches to just get near the place._";
	text2 = "_There's a huge gate blocking access, and we can't get anyone through it. I suggest against a frontal attack, unless you want to die._";

begintalknode;
	state = 33;
	nextstate = 32;
	question = "_Suppose I wanted to get into Angierach? How could I do it?_";
	text1 = "_Hmm. A tough one. I've heard rumors that the Tower of Magi has a huge teleporter. That's all I should say, though. I'm not supposed to talk about it much._";
	
begintalknode;
	state = 32;
	nextstate = -1;
	question = "_Anything else to the west that I should know about?_";
	text1 = "_There was a dragon out there. Name of Sulfras. Powerful, but not openly hostile. She left us alone. We left her alone._";
	text2 = "_But with the Empire out there, running around? Who knows what's happened to her, if she's still alive._";


begintalknode;
	state = 28;
	nextstate = 34;
	question = "_How are the defenses of Fort Remote?_";
	text1 = "_They are much better now than they were when this fort was destroyed. They have to be. Never a shortage of raids._";

begintalknode;
	state = 34;
	nextstate = -1;
	question = "_There are lots of Empire raids?_";
	text1 = "_They haven't attacked in a while, which is strange, since, while the Empire doesn't have many troops to the west, if they broke past us they could run wild through the Great Cave. So I'm preparing our defenses, and looking for opportunities to attack._";
	text2 = "_That reminds me, I'm always looking for adventurers to go on missions._";

begintalknode;
	state = 34;
	nextstate = -1;
	question = "_Why are you unarmed?_";
	text1 = "_I am not unarmed. My strength is in magic, not steel. Don't worry on myÊaccount._";

begintalknode;
	state = 28;
	nextstate = 35;
	condition = gf(61,16) <= 1;
	question = "_Most commanders are looking to hire adventurers. How about you?_";
	text1 = "_I am. The Empire can get small groups past us. We don't know how. We, in turn, want to send spies west. To do this, I need to see a Blue Pass, so I can make forgeries. Bring one to me, and I will try to earn you a promotion at the Castle._";
	action = SET_SDF 61 16 1;
	code =
		toggle_quest(67,1);
	break;

begintalknode;
	state = 35;
	nextstate = -1;
	condition = 1;
	question = "_Where might I look for one?_";
	text1 = "_I am aware that the Empire is building a new fort northwest of Fort Emerald. Perhaps you may have luck there._";
	
begintalknode;
	state = 28;
	nextstate = -1;
	condition = gf(61,16) == 1 && has_spec_item(4) > 0;
	question = "_I found a blue pass for you._ Show it to her.";
	code =
	run_hardcode(141);
	break;

// Fraitus

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 55;
	question = "Fraitus";
	text1 = "There is an wrinkled, withered wizard here, reading rituals from a dog-eared spell book. When you approach, he closes the book and looks up at you.";
	text2 = "_Greetings, adventurers, for I can tell from your look that that is what you must be. I am Fraitus._";
	text5 = "Fraitus says, _Anything else? Anything you want to know for your future travels?_ The ancient mage smells like dust.";
	action = INTRO;

begintalknode;
	state = 55;
	nextstate = 56;
	question = "_What is it you are studying?_";
	text1 = "_I am preparing spells of defense._";

begintalknode;
	state = 56;
	nextstate = 57;
	question = "_What sorts of spells do you use?_";
	text1 = "_Nothing complicated. Mass hastes, strength spells, and such. Things for when the Empire attacks._";

begintalknode;
	state = 57;
	nextstate = 58;
	question = "_So you expect an attack then?_";
	text1 = "_They've been pretty quiet recently. But you never know. This fort is well-defended enough to withstand their assaults, especially because of the runes._";

begintalknode;
	state = 58;
	nextstate = -1;
	question = "_Tell me more about the runes?_";
	text1 = "_The outer wall is supplemented with runes enchanted with powerful defensive magic. I helped create them. When we wish, anything near them is blasted to dust. Our walls are magically hardened as well._";
	text2 = "_This fort can fall, but it will take a mighty blow to defeat it._";

begintalknode;
	state = 55;
	nextstate = 60;
	condition = 1;
	question = "_How long have you been stationed here?_";
	text1 = "_Only a few months. I asked to be sent here. It's one of the few forts in Avernum I had not seen in my decades fighting for our land._";

begintalknode;
	state = 60;
	nextstate = -1;
	condition = 1;
	question = "_What do you think?_";
	text1 = "_It is small and boring. I hope that I die somewhere more pleasant._";

begintalknode;
	state = 55;
	nextstate = 59;
	condition = gf(61,11) >= 1;
	question = "_I need to find a wizard named Thompson. Have you seen him?_";
	text1 = "Fraitus looks startled. He looks around, then bends close to you. _Yes, he came here. He is in hiding in the tunnels below. He is convinced that the Empire wishes to destroy him. He came here one night, and the next morning he disappeared._";
	text2 = "_Before he was gone, though, he told me the secret of his hiding place, should someone need to find him._";

begintalknode;
	state = 59;
	nextstate = -1;
	question = "_I definitely need to see him._";
	text1 = "_He said that, to find him, you must look behind the painting in the eastern guest room. Press the button there, and you can enter his chambers._ (You take note of this.)";
	action = SET_SDF 61 9 1;

begintalknode;
	state = 55;
	nextstate = -1;
	question = "_Can you teach me any magic?_";
	text1 = "He laughs mirthlessly. _Oh, you're adventurers, all right. Always looking for advantage, where you can get it. But I must disappoint you. I am not a teaching mage. I don't have the knack._";

// Deltarian

begintalknode;
	tag = 50;
	state = -1;
	nextstate = 82;
	question = "Deltarian";
	text1 = "First you notice the long steel blade, wickedly sharp and polished to a shine. The next thing you notice is the man cleaning it. He is short, muscular, and shrouded in gray garments. They blend easily into the stone around him.";
	text2 = "He gives you a momentary glance and returns to his work. _I'm Blademaster Deltarian._";
	text5 = "Blademaster Deltarian continues to run the sharpening stone along the edge of his beautiful blade. You aren't sure if he knows that you are still here.";
	action = INTRO;

begintalknode;
	state = 82;
	nextstate = 83;
	question = "_What is it that a blademaster does exactly?_";
	text1 = "_Right now, sharpening my sword._";

begintalknode;
	state = 83;
	nextstate = 84;
	question = "_Do you tend to your blade often?_";
	text1 = "_Every day that it has been drawn forth from its sheath. That was what Master Kevtar told me to do. Always keep my blade sharp and clean._";

begintalknode;
	state = 84;
	nextstate = 85;
	question = "_Who is Master Kevtar?_";
	text1 = "_The finest bladesman I've ever had the pleasure to know. A sad story, really. He finally tired of the bloodshed, and retired._";

begintalknode;
	state = 85;
	nextstate = 86;
	question = "_Retired? But we are at war._";
	text1 = "_He has done more then his share of killing Empire warriors. He lives in solitude now, hidden away in the ruins. Not far to the north. I will go visit him soon. He taught me well, and I owe him that much._";

begintalknode;
	state = 86;
	nextstate = -1;
	question = "_Does he still teach?_";
	text1 = "_He's a solitary man, but he often welcomes visitors and potential students. He sometimes even teaches those with the willingness to learn and the money to pay._";

begintalknode;
	state = 86;
	nextstate = 87;
	question = "_Can I find him?_";
	text1 = "_I don't see why not. You fight for Avernum. I think he would be happy to teach you._";

begintalknode;
	state = 87;
	nextstate = -1;
	question = "_How can I find him?_";
	text1 = "_Go north to the ruins, a few miles away, and look around. If you are persistent, I'm sure you can locate him._";
	text2 = "He turns away a tiny amount. Barely perceptible, and yet enough to clearly convey that the conversation is done.";
	action = END_TALK;
	
// Mother Madge

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 109;
	question = "Mother Madge";
	text1 = "There is a priestess resting in this hall, quietly meditating and recovering her power before the next attack. Most of the fortresses in Avernum have a healer stationed there, and she must be Fort Remote's.";
	text2 = "She sits with her eyes closed, praying silently to herself. When she opens them, she seems agitated. _I am Mother Madge._";
	text5 = "Mother Madge smiles at you. She seems to be trying to keep you at your ease, but you can see how tired she is.";
	action = INTRO;

begintalknode;
	state = 109;
	nextstate = 110;
	question = "_Is all well with you?_";
	text1 = "_Perhaps soon. Right now I am preparing myself. People here need my protection._";

begintalknode;
	state = 110;
	nextstate = 111;
	question = "_How do you prepare yourself?_";
	text1 = "_I am storing my energies. Should we be attacked, and we will be, my energy will be all that stands between our wounded and death._";

begintalknode;
	state = 111;
	nextstate = -1;
	question = "_What sort of attack do you anticipate?_";
	text1 = "_We don't know what manner of bizarre creature will come from the west next. Demons? Undead? Mutant giants? We don't know, and we prepare the best we can._";

begintalknode;
	state = 110;
	nextstate = 112;
	question = "_How do you protect the fort residents?_";
	text1 = "_There are strong warriors here, and powerful mages. However, I am the only one who can heal. Let me know if that is something you need._";

begintalknode;
	state = 109;
	nextstate = -1;
	question = "_Can you heal me?_";
	text1 = "_You look well. I must conserve my power for those under my care._";

begintalknode;
	state = 109;
	nextstate = -1;
	condition = 1;
	question = "_Can you teach me any spells?_";
	text1 = "_I lack the power or time. I am sorry. Ask in the shrine in Dharmon._";

begintalknode;
	state = 109;
	nextstate = 113;
	question = "_You are the priestess of Fort Remote?_";
	text1 = "_Yes. I look after the poor soldiers stationed here, and I look after the shrine._";

begintalknode;
	state = 113;
	nextstate = -1;
	condition = gf(61,13) <= 1 && gf(61,12) == 0;
	question = "_Is it difficult to look after it?_";
	text1 = "_Not really, but it is not complete. The ankh, the symbol of healing and life for the altar, is a crude and crumbling thing. I wish I had a better symbol for it, but there is none to be found, and there are no resources to forge a new one._";
	action = SET_SDF 61 13 1;
	code =
		toggle_quest(66,1);
	break;
	
begintalknode;
	state = 109;
	nextstate = -1;
	condition = gf(61,13) == 1 && gf(61,12) == 0 && has_spec_item(8);
	question = "_I found a nice ankh._";
	text1 = "_Excellent! I will give you the honor of placing it onto the altar._";
	
begintalknode;
	state = 109;
	nextstate = -1;
	condition = gf(61,12) >= 1;
	question = "_I placed a new ankh on your altar._";
	text1 = "_You did?_ She grins. _Marvelous! We of Fort Remote thank you! It is a small comfort, but only small comforts are available to us now._";

// Angarahad

begintalknode;
	tag = 90;
	state = -1;
	nextstate = 136;
	question = "Angarahad";
	text1 = "There is a lovely young woman sitting below the tree, fishing. The two pools by Fort Remote have been stocked with fat cavefish, a useful source of slimy, unappealing meat.";
	text2 = "She doesn't get up when you approach, but she does nod and smile. _I'm Angarahad, the quartermaster here. I'm on my break, though. Sit and relax._";
	text5 = "Angarahad continues to sit there and fish. Occasionally, she hauls a slimy, pale fish out of the water. She throws back the ones that are too small or too gross.";
	action = INTRO;

begintalknode;
	state = 136;
	nextstate = 137;
	question = "_Why are you sitting out here?_";
	text1 = "_I'm taking my break before returning to my toil._";

begintalknode;
	state = 137;
	nextstate = -1;
	question = "_Do you get many breaks?_";
	text1 = "_In a place like this, you need to rest when you can. You can go a week without seeing a single foe, and then it'll be non-stop fighting for two weeks. You grab quiet when you can._";

begintalknode;
	state = 137;
	nextstate = 138;
	question = "_How is it you toil then in Fort Remote?_";
	text1 = "_I'm the quartermaster. I get the supplies from Dharmon. Keep the weapons sharp. That sort of thing._";

begintalknode;
	state = 137;
	nextstate = 139;
	question = "_Do you get enough supplies?_";
	text1 = "_Barely. The rakshasi keep killing off the merchants._";

begintalknode;
	state = 139;
	nextstate = -1;
	question = "_Who are the rakshasi?_";
	text1 = "_Magical cat people. A bunch of them came from the surface with the Empire, attracted to easy prey and easy loot. There's a fortress full of them to the east. Fortunately, they don't come here, so you're safe from them now._";
	text2 = "_Just be careful when you head east._";

begintalknode;
	state = 139;
	nextstate = 140;
	condition = gf(61,14) == 0;
	question = "_Are you looking for anything in particular?_";
	text1 = "_I'm glad you asked that, traveler! We get much of what we need with barter. I have a line on a bunch of quality bows from Patrick's Tower, but they want scrolls on magic in return.";
	text2 = "_If you can bring me something like that, I'll give you a good price._";
	action = SET_SDF 61 14 1;
	code =
		toggle_quest(68,1);
	break;
	
begintalknode;
	state = 140;
	nextstate = -1;
	condition = 1;
	question = "_Why don't they just give you the bows?_";
	text1 = "_Your naivete is so sweet. Nobody gives anything for free, even when we're on the same side._";

begintalknode;
	state = 136;
	nextstate = -1;
	condition = party_has_item(212) == 0 && gf(61,14) >= 1;
	question = "_I don't have any magical papers for sale._";
	text1 = "_Pity._";

begintalknode;
	state = 136;
	nextstate = -1;
	condition = party_has_item(212) > 0 && gf(61,14) >= 1;
	question = "_I have some papers for you._ Sell them.";
	code =
	run_hardcode(47);
	break;

// Mawrrr

begintalknode;
	tag = 110;
	state = -1;
	nextstate = 163;
	question = "Mawrrr";
	text1 = "You encounter a rare sight. It's a nephil in an Avernite fortress, wearing an immaculately clean apron. He bows to you. _I am Mawrrr._";
	text5 = "Mawrrr makes another tiny bowing motion. It's very strange to see one of his kind stationed in a fortress of Avernum.";
	action = INTRO;

begintalknode;
	state = 163;
	nextstate = 164;
	question = "_Are you employed at this fort?_";
	text1 = "_Mrrr. I am honored to do the cooking for this fort._";

begintalknode;
	state = 164;
	nextstate = 165;
	question = "_How did you wind up being the cook here?_";
	text1 = "He makes a soft purring noise. _This is where I ended up. I wanted to leave my people, to do travel, you see._";

begintalknode;
	state = 165;
	nextstate = 166;
	question = "_Where have you traveled?_";
	text1 = "_I wanted to see this land. I traveled this Great Cave everywhere, but with the battles, I needed a place to stop. I ended here, where I earned employing._ He gives you a proud, toothy grin.";

begintalknode;
	state = 166;
	nextstate = 167;
	question = "_You mean employment as the fort chef?_";
	text1 = "_Yes. It is strange, working for human tastes, I do fine. Though sometimes people are joking._";

begintalknode;
	state = 167;
	nextstate = 168;
	question = "_How do people joke with you?_";
	text1 = "_They say I like wanting to put rats in the stew. But I would not do that. The rats here are not good enough._ You can't tell whether he's joking or not. You decide not to think about it.";

begintalknode;
	state = 168;
	nextstate = -1;
	question = "_Well, rats aren't exactly a human delicacy._";
	text1 = "_I would not serve rats to humans. They would not be liking them, and I want all of them to myself!_ He purrs hungrily.";

begintalknode;
	state = 163;
	nextstate = -1;
	condition = species_in_party(2) > 0;
	question = "_It is good to meet another nephil fighting for Avernum._";
	text1 = "_Our kind has no happy history with the humans of Avernum. We have a sad war for many years. But our kind, we know that the Empire is the true enemy, the one that will kill us all without guilt._";

begintalknode;
	state = 163;
	nextstate = -1;
	condition = species_in_party(2) == 0;
	question = "_I rarely meet any nephilim fighting for Avernum._";
	text1 = "_You are not of our kind. You know not our history in the Empire, the fear, the massacres._";
	text2 = "_Our kind has no happy history with the humans of Avernum. We have a sad war for many years. We know now, though, that the Empire is the true enemy, the one that will kill us all without guilt._";

