// TOWN DIALOGUE SCRIPT
//    Town 33: Resting Cell #4

begintalkscript;

variables;

short i,j,k,r1,choice;

// Bohen

begintalknode;
	tag = 10;
	state = -1;
	nextstate = 1;
	question = "Bohen";
	text1 = "A vahnatai warrior sits near the fire, sharpening razordisks. She looks up at you grimly when you approach. You ask who she is. _I'm Bohen._";
	text2 = "She watches you carefully. She is not at all surprised by your presence. She must have heard about your arrival.";
	text5 = "The warrior continues to maintain the wicked edge on her blades. Occasionally, she shoots a look at the door to the north, but she never moves to pass through it.";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_Why are you sitting out here?_";
	text1 = "_I'm guarding Abra. Keeping him alive. He's trying to make my job harder._";

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_Who is Abra?_";
	text1 = "She stops sharpening the weapon long enough to jerk a long, multi-jointed thumb at the nearby mage, who is lost in thought. _Abra. My charge._";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_What are you guarding against?_";
	text1 = "_Have to protect him from chitrachs and hellhounds, while we go awaken our brethren. And things aren't getting easier._";

begintalknode;
	state = 3;
	nextstate = 2;
	question = "_Chitrachs and hellhounds are wandering around here?_";
	text1 = "_Yes. The friendly denizens of these caves._ Apparently, the vahnatai are capable of sarcasm.";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_How is Abra making things harder for you?_";
	text1 = "She looks at the entrance to the caves. _There's more hellhounds in there than I've ever seen, and I have traveled far. We must sneak in there to perform the Awakening. We could use some help._";
	text3 = "_You have killed the hellhounds, and now I am ready to enter. He, however, wishes to further wait and prepare. I feel that the delay is foolish, but I am but a guard._";
	action = DEP_ON_SDF 33 12 1;

begintalknode;
	state = 3;
	nextstate = -1;
	question = "_Where do you need to go to awaken your brethren?_";
	text1 = "She points to the north. _Hundreds of them are asleep in there, in the big blue crystals._";

begintalknode;
	state = 3;
	nextstate = -1;
	question = "_Perhaps I could be of help?_";
	text1 = "_Talk to Abra about it. He could pay you._";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(33,11) >= 1;
	question = "_We accidentally damaged the controls in the room with the coffins._";
	text1 = "_You should tell Abra._ She nods at the other vahnatai sitting by the fire. _I'm sure your news will only serve to make us more unhappy._";

begintalknode;
	state = 1;
	nextstate = 4;
	condition = gf(33,12) <= 1;
	question = "_What is through the door to the north?_";
	text1 = "_It's Resting Cell Number 4. Here, many vahnatai are frozen, waiting for us to bring them back to life. If you enter, please do not damage the tall, blue coffins. It would be murder._";

begintalknode;
	state = 4;
	nextstate = -1;
	condition = gf(33,11) == 0;
	question = "_Any other advice for me?_";
	text1 = "_Yes. Don't tinker with any controls unless you know exactly what you are doing._";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(33,12) > 1;
	question = "_I cleared out the halls to the north._";
	text1 = "_Be assured you have our gratitude. It makes my job easier._";

// Abra

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 28;
	question = "Abra";
	text1 = "There is a mage sitting here, meditating and moving his limbs in elaborate, hypnotic patterns. The vahnatai are many-jointed, which makes this a very strange sight.";
	text2 = "He opens his eyes and looks at you. _Welcome, outsider persons. I am Abra._";
	text5 = "Abra's limbs seem to move automatically. Some part of his brain is continuing to meditate while he speaks with you. _Is there anything else I can do for you?_";
	action = INTRO;

begintalknode;
	state = 28;
	nextstate = 29;
	question = "_What are you doing?_";
	text1 = "_I prepare to meet my doom._ His voice is appropriately grim.";

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_Doom from where?_";
	text1 = "_You see that door over there?_";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_Yes?_";
	text1 = "_Beyond it are some controls I need desperately to get at. There are also hellhounds, dozens of them._";
	text3 = "_Beyond it are some controls we need desperately to get at. There were hellhounds. Even though you've been through there, I'm sure there's plenty of other danger. We're waiting for reinforcements._";
	action = DEP_ON_SDF 33 12 1;

begintalknode;
	state = 31;
	nextstate = -1;
	question = "_Controls for what?_";
	text1 = "_Don't ask me what for. All I can tell you is that they would cause us all great harm were you to try to use them._";

begintalknode;
	state = 31;
	nextstate = 32;
	question = "_I take it you need to get past the hellhounds?_";
	text1 = "_Yes, it is my duty to sneak past them and use the controls, even if it means my doom. I prepare myself now._ He looks at you slyly. _Of course, with your assistance, my job would be easier. There would be a reward._";
	text3 = "_You have killed most of the hellhounds, but there are surely more, waiting to attack and ambush us. We are waiting and preparing, so that we can reach the controls safely. If I were to be killed, the mission would be a failure._";
	action = DEP_ON_SDF 33 12 1;

begintalknode;
	state = 32;
	nextstate = 33;
	question = "_Duty to whom?_";
	text1 = "_The vahnatai must be awakened. We need our strength to deal with the humans._";

begintalknode;
	state = 33;
	nextstate = -1;
	question = "_Only the humans who stole from you, right?_";
	text1 = "_There may be war with all of the aliens soon. We will be ready._";
	text3 = "_I appreciate what you have done for me here. However, I still believe that there may be war with all of you aliens soon. We will be ready._";
	action = DEP_ON_SDF 33 12 1;

begintalknode;
	state = 28;
	nextstate = 34;
	condition = gf(33,12) >= 1;
	question = "_You offered me a spirit prism. What is that?_";
	text1 = "_A powerful and rare tool of vahnatai magic. You may use it to imprison a small part of the spirit of another creature. This has certain valuable magical uses._";

begintalknode;
	state = 28;
	nextstate = 34;
	condition = gf(33,12) <= 1;
	question = "_Anything I can do to help you?_";
	text1 = "_These icy caverns to the north are occupied by a huge hellhound nest. Those, we could defeat. However, two massive ice lizards lurk in the main hall. This, I have seen._";
	text2 = "_Those lizards are too powerful for us.  Kill them, and we could sneak in. Help us, and I will give you a spirit prism._";
	action = SET_SDF 33 12 1;
	code =
		toggle_quest(24,1);
	break;
	
begintalknode;
	state = 34;
	nextstate = -1;
	question = "_Can you teach me how to use a spirit prism?_";
	text1 = "_No. I am only the crafter, not the mage. You should try going to Egli. Our finest mages are there._";
		
begintalknode;
	state = 28;
	nextstate = -1;
	condition = gf(33,12) == 1 && gf(33,13) == 1;
	question = "_I have killed one of the ice lizards._";
	text1 = "_I am not surprised. That is good fortune, and good fortune does not come to me. Yet, the job is half done._";

begintalknode;
	state = 28;
	nextstate = -1;
	condition = gf(33,12) == 1 && gf(33,13) >= 2;
	question = "_I have killed the two ice lizards._";
	code =
	run_hardcode(110);
	break;

begintalknode;
	state = 28;
	nextstate = -1;
	condition = gf(33,11) >= 1;
	question = "_We operated the controls to the north. They exploded. Is that bad?_";
	text1 = "He looks sick. _Oh, it is not a problem. Just more incredibly bad luck, hard work, and danger. Finding materials. Doing repairs, all while under constant attack.";
	text2 = "_Thank you for your efforts. Even if they did make everything far worse._";

begintalknode;
	state = 28;
	nextstate = -1;
	condition = gf(27,12) >= 1;
	question = "_I reawakened the vahnatai in a place much like this one._";
	text1 = "_Did you? It's nice to know that someone can succeed where we have failed. Even if that someone is an alien._";

