// TOWN DIALOGUE SCRIPT
//    Town 76: Isolated Home

begintalkscript;

variables;

short i,j,k,r1,choice;

// Tori

begintalknode;
	tag = 10;
	state = -1;
	nextstate = 1;
	question = "Tori";
	text1 = "You meet a graying, stooped woman. She carries a shovel in one hand and a basket of mushroom spores, ready to be rubbed into the stone floor, in the other. She seems pleased to have visitors. _I'm Tori. Welcome to our safehouse._";
	text5 = "As Tori waits for your next question, she puts clots of mushroom spores on her finger tips and then rubs them into the stone at your feet. _Must keep working. The safehouse needs to feed itself._";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_Why are you in this isolated cave?_";
	text1 = "_Well, we live and think here. When we're not planting food, we do research. That's what this safehouse is for._";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_Safehouse? What are you hiding from?_";
	text1 = "_The Empire has been hunting down and killing Avernite mages, assassinating them by magical and non-magical means. Thus, these safehouses were created._";
	text2 = "_It's an ugly business, and will get uglier. That's why many of us are hiding._";

begintalknode;
	state = 2;
	nextstate = 6;
	question = "_What are you researching now?_";
	text1 = "_I'm trying to find better ways to get coordinates for the portal._";

begintalknode;
	state = 3;
	nextstate = 4;
	question = "_Can you tell me who is in hiding?_";
	text1 = "_Solberg is in his tower to the southwest of Formello. I am here. Erika is in her tower. And poor Thompson, he disappeared. Nobody knows where he has gone._";

begintalknode;
	state = 4;
	nextstate = -1;
	question = "_I want to see Solberg. Can you tell how to get to him?_";
	text1 = "_Not really. But if you find Solberg's tower, be careful. I hear the Empire has surrounded the place with demons to pen him in._";

begintalknode;
	state = 4;
	nextstate = -1;
	question = "_How can I reach Erika?_";
	text1 = "_Difficult. She lives in Empire lands, but you may be able to use the portal to get to her. Find people who have been trying to find portal coordinates. One of them may be able to help you._";
	text2 = "She thinks. _Try looking in the Castle! I know some people were researching this stuff there._";

begintalknode;
	state = 6;
	nextstate = 40;
	question = "_What can you tell me about the portal?_";
	text1 = "_There is a teleportation portal in the Tower of Magi! If you chant the right phrase when entering it, you can end up anywhere in Avernum! It's a wondrous device!_";

begintalknode;
	state = 40;
	nextstate = -1;
	question = "_It sounds very useful._";
	text1 = "_Go there and take a look at it. You may need magi clearance. You can get that at the Castle. Adventurers such as yourselves might be able to make great use of it._ ";
	
begintalknode;
	state = 4;
	nextstate = -1;
	question = "_Tell me about Thompson?_";
	text1 = "_A young mage, Avernum-born. Very skilled. Very promising._";
	text2 = "_I can't tell you more about him. We need to keep his location secret, to protect him from assassins._";

begintalknode;
	state = 4;
	nextstate = 5;
	condition = get_quest_status(106) > 0 && gf(191,11) == 0;
	question = "_I need to find out where Thompson went._";
	text1 = "Tori is unwilling to tell you, but you explain the situation. She sighs. _I hope this isn't a mistake._";
	text2 = "_He was researching in Blosk, trying to find new coordinates for the portal. Then he left, overnight. He went into hiding, and nobody knows where. It's passing strange. I understand his friend Bartholomew is beside himself with worry._";
	action = SET_SDF 10 11 1;

		
begintalknode;
	state = 5;
	nextstate = -1;
	question = "_Who is Bartholomew?_";
	text1 = "_His companion. They were doing research together in Blosk. You can still find Bartholomew there. He may know something about where Thompson is. Ask him about it._ (You take note of this.)";
	action = SET_SDF 10 11 1;

begintalknode;
	state = 1;
	nextstate = 7;
	question = "_It's very difficult to get out here._";
	text1 = "_It is meant to be. This is a safehouse for Avernum mages, to protect us from Empire assassins._";

begintalknode;
	state = 7;
	nextstate = -1;
	question = "_How do you know that I'm not an assassin?_";
	text1 = "_We know a lot about you. We knew you were coming, and we know that you're loyal to Avernum. The magical protections around this home are invisible and strong._";


// Ethridge

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 28;
	question = "Ethridge";
	text1 = "There is a young, irritated woman wandering around this apothecary, gathering the ingredients for some sort of mushroom mush. She wears a large battle-axe at her belt.";
	text2 = "When you approach, she looks at you briefly. _I'm Ethridge. Hi._ She brushes past you, concentrating on the mixture.";
	text5 = "Ethridge continues to work on her mushroom mush, but you occasionally manage to get her attention and ask a question. Her axe frequently hits a table or chair with a loud clunk.";
	action = INTRO;

begintalknode;
	state = 28;
	nextstate = 29;
	question = "_What are you making?_";
	text1 = "_I'm working on a potion. Aids in combat. Very powerful, but difficult to make._";

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_So you're an alchemist?_";
	text1 = "_That's right. I'm making a recipe Erika taught me, years ago._";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_Can you show me how to make the potion?_";
	text1 = "_Yes, if you gave me a few years. Alchemy is a delicate art. If I don't you what you do, you'd probably end up killing yourself._";

begintalknode;
	state = 28;
	nextstate = -1;
	question = "_I want to buy a potion._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Ethridge's Potions","Ethridge doesn't have the materials to make a lot of potions, but the ones she can make are very high-quality.",18,4,3);
	break;

begintalknode;
	state = 30;
	nextstate = 32;
	question = "_Can you tell me about Erika?_";
	text1 = "_I studied under her, when she was still doing research at the Tower of Magi. I was an apprentice. This was about ten years ago. Powerful, deadly woman. The way this war is going, we could really use her knowledge._";

begintalknode;
	state = 32;
	nextstate = 33;
	question = "_How great is her knowledge?_";
	text1 = "_She hates the Empire, absolutely hates it. And she has the know-how and the power to do something about it. If only we could reach her tower._";

begintalknode;
	state = 33;
	nextstate = 34;
	question = "_Where is Erika's tower?_";
	text1 = "_Well, the Abyss is north of Dharmon, and her tower is west of the Abyss. And, the Abyss is solid Empire territory. The only way you could get to her would be to use the portal._";

begintalknode;
	state = 34;
	nextstate = -1;
	question = "_What portal, where?_";
	text1 = "_In the Tower of Magi. Ask Tori about it. She never stops talking about it._";

begintalknode;
	state = 28;
	nextstate = -1;
	question = "_What is the axe for?_";
	text1 = "_Defense. We were put here to keep us hidden from Empire assassins. We have magical protection ringing our home, but, well, I don't have that much faith in that._";

begintalknode;
	state = 28;
	nextstate = -1;
	question = "_I don't need anything else._";
	text1 = "She nods and silently resumes her work.";
	action = END_TALK;

// Cat

begintalknode;
	tag = 50;
	state = -1;
	nextstate = 55;
	question = "Cat";
	text1 = "You meet one of the cats in residence here. It's large and black.";
	text5 = "The cat meows.";
	action = INTRO;

begintalknode;
	state = 55;
	nextstate = 56;
	question = "_Hi there, cat._";
	text1 = "It jumps at a bit of lint. _Meow! Meow! Subvert the dominant paradigm! Meow!_";

begintalknode;
	state = 56;
	nextstate = -1;
	question = "_Uh, what was that?_";
	text1 = "_Meow! Meow!_ It walks away. Odd.";
	action = END_TALK;

// Cat

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 82;
	question = "Cat";
	text1 = "A kitten cowers away from you when you get close.";
	text5 = "The kitten meows plaintively.";
	action = INTRO;

begintalknode;
	state = 82;
	nextstate = -1;
	question = "_Greetings!_";
	text1 = "It meows. Then it loses interest in the conversation.";
	action = END_TALK;

// Cat

begintalknode;
	tag = 90;
	state = -1;
	nextstate = 109;
	question = "Cat";
	text1 = "A large, bony siamese cat without a tail walks up and starts sniffing at you.";
	text5 = "The tailless cat rubs up against you, shedding happily on your armor.";
	action = INTRO;

begintalknode;
	state = 109;
	nextstate = -1;
	question = "_What happened to your tail?_";
	text1 = "_Meow?_";

begintalknode;
	state = 109;
	nextstate = 110;
	question = "Pet the cat.";
	text1 = "_Meow! Meow! Meow!_";

begintalknode;
	state = 110;
	nextstate = -1;
	question = "_Meow?_";
	text1 = "_Meow! Meow!_ It seems pleased that you are communicating.";
	action = END_TALK;

// Tabby

begintalknode;
	tag = 110;
	state = -1;
	nextstate = 136;
	question = "Tabby";
	text1 = "This cat is sitting on a pile of pillows. It's openly staring at you. To your surprise the cat says, _Meow. Hi. They call me Tabby. Meow._";
	text5 = "The cat continues to chat with you. _Any more questions for humble Tabby? Hey._";
	action = INTRO;

begintalknode;
	state = 136;
	nextstate = -1;
	question = "_You can talk?_";
	text1 = "It purrs a bit. _Apparently._";

begintalknode;
	state = 136;
	nextstate = 137;
	question = "_Up to anything interesting?_";
	text1 = "It purrs a bit. _Nothing much. Just hanging out. Got any food?_";

begintalknode;
	state = 137;
	nextstate = -1;
	question = "_I don't have any food._";
	text1 = "The cat sniffs. _Liar. You have earned my undying enmity._ It turns its back on you.";
	action = END_TALK;

begintalknode;
	state = 137;
	nextstate = 138;
	question = "_Yes, I have food._ Feed the cat.";
	text1 = "It looks at your rations, sniffs at them disdainfully, and starts walking away.";

begintalknode;
	state = 138;
	nextstate = -1;
	question = "_Wait! I wanted to ask you some questions._";
	text1 = "_I don't have to talk to you. I'm a cat!_ It turns its back on you.";
	action = END_TALK;

