// TOWN DIALOGUE SCRIPT
//    Town 92: Fort Haledon

begintalkscript;

variables;

short i,j,k,r1,choice;


begintalknode;
	tag = 1;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "The vahnatai guard looks at you with quiet loathing. The tolerant attitude toward outsiders you encountered in the cities to the east hasn't reached this remote land.";
	text2 = "One of them makes a snorting noise and points toward the warrior at the window in the east guardpost.";
	code =
		if (gf(92,20) > 0)
			rs(2);
		break;

// Mahr-Tel

begintalknode;
	tag = 10;
	state = -1;
	nextstate = 1;
	question = "Mahr-Tel";
	text1 = "You approach to speak with the commander, who is still overwhelmed with shame. He bows his head. _I am Mahr-Tel. Commander of Fort Haledon._ His voice quavers sadly.";
	text5 = "Mahr-Tel continues to stare at the floor. _Is there anything else you would know, outsider? We will not try to harm you again._";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_Tell me of your responsibilities._";
	text1 = "_I command this fort. It is a difficult job, because of its great remoteness._";

begintalknode;
	state = 2;
	nextstate = 6;
	question = "_This place is quite remote. It took us days to reach it._";
	text1 = "_Yes. Also, we get little news, tragically little, from our people. All we knew of you humans was that you stole our Crystal Souls and were terribly dangerous. Then you suddenly show up with orders. We were surprised!_";
	text2 = "He shakes his head sadly. _Several were convinced it was a trick._";

begintalknode;
	state = 6;
	nextstate = 7;
	question = "_I assure you, it is no trick._";
	text1 = "_The orders confirm your statement. The ones who attacked you thought you were evil beings come to fool us. I wanted to stop them but not, I confess, I was not forceful enough. I lead here. I am to blame._";

begintalknode;
	state = 7;
	nextstate = -1;
	condition = gf(92,21) == 0;
	question = "_Don't be too hard on yourself._";
	text1 = "_No, I am guilty of the attack on you, and of their deaths. And that is all there is to say._ He hangs his head, and his arms fall limply to his side.";
	action = SET_SDF 92 21 1;
	
begintalknode;
	state = 7;
	nextstate = -1;
	condition = gf(92,21) == 0;
	question = "_You failed._";
	text1 = "_Yes. With luck, I will soon die fighting the Empire. It is the best hope for me._";
	action = SET_SDF 92 21 1;

begintalknode;
	state = 1;
	nextstate = 3;
	question = "_I want to know more of this fort._";
	text1 = "_Fort Haledon, westernmost outpost of our tribe. Easily the most remote. It has become very important, because of the humans._";

begintalknode;
	state = 3;
	nextstate = 4;
	question = "_What humans?_";
	text1 = "_To the west is a tunnel, blocked by magical barriers. Just beyond it are human lands, choked with the forces of what you call the Empire._";

begintalknode;
	state = 4;
	nextstate = 5;
	question = "_Then the Empire threatens you as well?_";
	text1 = "_If they broke down the barrier and passed through, we could not stand against them. However, we could hold them off long enough for our people to prepare their defenses. That is our mission. Or, was our mission._";

begintalknode;
	state = 5;
	nextstate = -1;
	question = "_Was? What is this fort's mission now?_";
	text1 = "_Now, our mission is to aid you._";

begintalknode;
	state = 5;
	nextstate = 8;
	question = "_What sort of barriers have you erected against the Empire?_";
	text1 = "_A very powerful, though not impenetrable, magical barrier._";

begintalknode;
	state = 8;
	nextstate = -1;
	question = "_An impenetrable barrier? Can I pass it?_";
	text1 = "_When the attack on Ornotha begins, we will lower the barrier. You will be able to go through, following us. But remember, when the attack starts, move quickly, for we can't wait for you long before attacking._";

begintalknode;
	state = 1;
	nextstate = 9;
	question = "_Are you ready to attack Ornotha Ziggurat?_";
	text1 = "_When you give the word. We will head west through the barrier cavern, and proceed to the ziggurat. Hurry after us, please, so that our doom is not in vain._";

begintalknode;
	state = 9;
	nextstate = -1;
	question = "_Doom? You have no hope?_";
	text1 = "_No. We are strong here, but we haven't the force to take on the whole ziggurat. We will merely clear the way for you to pass through._";

// Haineux

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 50;
	question = "Haineux";
	text1 = "A vahnatai mage watches you through the window. Her lip curls in an expression of distaste. _I am Haineux, outsider._";
	text2 = "Surprisingly, he knows a little bit of your tongue.";
	text5 = "The vahnatai watches you grimly. You have spent enough time dealing with these creatures to recognize disgust when you see it.";
	action = INTRO;
	code =
		if (gf(28,9) > 0)
			rs(2);
	break;
	
begintalknode;
	state = 50;
	condition = gf(28,9) == 0;
	question = "_Greetings. May I speak with you?_";
	text1 = "You have exhausted Haineux's knowledge of your language. Or he is feigning ignorance. Either way, the conversation ends.";
	action = END_TALK;
	
begintalknode;
	state = 50;
	nextstate = 51;
	condition = gf(28,9) > 0;
	question = "_Greetings. May I speak with you?_";
	text1 = "_If you must. I guard the gate. I am forced to stand here._";

begintalknode;
	state = 51;
	nextstate = -1;
	condition = gf(92,13) == 0;
	question = "_Can you open the gate for me?_";
	text1 = "__";
	action = END_TALK;
	code =
	run_hardcode(112);
	break;

begintalknode;
	state = 50;
	nextstate = -1;
	condition = gf(92,13) >= 1;
	question = "_Not all humans are bad. I don't wish to fight you._";
	text1 = "She shakes her head. _I never dreamed of fighting with or for humans. But orders are orders, and we obey the council at Olgai. You may pass. That is all._";

begintalknode;
	state = 50;
	nextstate = -1;
	condition = gf(92,13) >= 1;
	question = "_There is something I want to know._";
	text1 = "_I will follow orders, but I will not speak with you. You do not have my trust. Please leave me._";
	action = END_TALK;

// Strossen-Ihrno

begintalknode;
	tag = 50;
	state = -1;
	nextstate = 55;
	question = "Strossen-Ihrno";
	text1 = "A vahnatai mage stares into the glowing crystal with fierce concentration. He seems to be trying to move or create something with his mind.";
	text2 = "After a few minutes of this, however, he stops and looks up at you. _I am Strossen-Ihrno._";
	text5 = "Strossen-Ihrno says, _What? What else do you want? I would return to creation._ He seems eager to return to his crystal.";
	action = INTRO;

begintalknode;
	state = 55;
	nextstate = -1;
	question = "_Can you teach me magic?_";
	text1 = "He shakes his head. _Only if I am ordered to share our secrets with the outsiders. And maybe not even then. I have had no such orders._";

begintalknode;
	state = 55;
	nextstate = 56;
	question = "_What were you trying to create?_";
	text1 = "He shakes his head irritably. _You have interrupted my work, outsider._";

begintalknode;
	state = 56;
	nextstate = 57;
	question = "_Oh, I'm so sorry._";
	text1 = "_Creations are very delicate things!_";

begintalknode;
	state = 57;
	nextstate = -1;
	question = "_I can imagine._";
	text1 = "_Yes!_ He is getting angry.";

begintalknode;
	state = 57;
	nextstate = 58;
	question = "_What were you trying to make, again?_";
	text1 = "He looks at you in disgust. _Leave me, human! Deliver your spurious orders and leave me alone! Deliver your false orders to our commander, and leave us alone._";
	text3 = "Resigned to the interruption, he shakes his head. _I am attempting to create quickfire, humans._";
	action = DEP_ON_SDF 92 4 0;

begintalknode;
	state = 58;
	nextstate = 59;
	condition = gf(92,4) >= 1;
	question = "_What is quickfire?_";
	text1 = "_It is the deadliest and most powerful of the magical barriers._";

begintalknode;
	state = 59;
	nextstate = 60;
	question = "_Can anyone learn to create it?_";
	text1 = "_It is a wondrous secret. But alas, only Rentar-Ihrno can make it._";

begintalknode;
	state = 60;
	nextstate = 61;
	question = "_Who might Rentar-Ihrno be?_";
	text1 = "_Rentar-Ihrno is the greatest vahnatai mage. I asked her to show me how to make it, but she refused. Her price was too high._ He shakes his head. _A selfish woman._ (Rentar-Ihrno knows how to make quickfire. You take note of this.)";
	action = SET_SDF 29 18 1;

begintalknode;
	state = 61;
	nextstate = -1;
	question = "_What was her price?_";
	text1 = "_She wanted me to go on some deadly mission. It isn't worth that much to me._";
	text2 = "_Now, please leave me. I must learn, so this fort can be defended._";
	action = END_TALK;
	
begintalknode;
	state = 61;
	nextstate = -1;
	question = "_She might not always be so selfish._";
	text1 = "_I'll ask her about it again someday, but I have little optimism._";
	text2 = "_Now, please leave me. I must learn, so this fort can be defended._";
	action = END_TALK;

// Selar

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 82;
	question = "Selar";
	text1 = "There is a vahnatai woman here, inventorying supplies. She looks up. _I am Selar, humans. What do you want of me?_ She looks worried by your presence.";
	text5 = "Selar stares at you, unable to control her fear and revulsion.";
	action = INTRO;

begintalknode;
	state = 82;
	nextstate = 83;
	question = "_Are you in charge of supplies?_";
	text1 = "_Yes, I'm the quartermaster here._";

begintalknode;
	state = 83;
	nextstate = -1;
	question = "_Exactly what is a quartermaster?_";
	text1 = "She looks away from you. _I am not allowed to deal with outsiders._";
	text3 = "She looks up from her records. _I look after the supplies of the fort. It's hard to keep everything stocked._";
	action = DEP_ON_SDF 92 4 0;

begintalknode;
	state = 82;
	nextstate = -1;
	condition = gf(92,4) == 0;
	question = "_Can I have anything?_";
	text1 = "_If our commander allows it. Or if you will choose to act as a common thief._";
	text2 = "That is the end of the conversation.";
	action = END_TALK;

begintalknode;
	state = 83;
	nextstate = 84;
	condition = gf(92,4) >= 1;
	question = "_How are your supplies holding up?_";
	text1 = "_We're too far away from everyone. It's hard to get what we need. However, in your case, we can be generous._";

begintalknode;
	state = 84;
	nextstate = -1;
	question = "_What things can I take?_";
	text1 = "Her expression sours. _The orders say you are to be given all you want. No offense, but we have very little to spare. Still, help yourself to our limited resources. Please. Take all you want._";
	text2 = "She doesn't sound the least bit sincere. That is the end of the conversation.";
	action = END_TALK;
	
