// TOWN DIALOGUE SCRIPT
//    Town 54: Patrick's Tower

begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode;
	tag = 1;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "You spend some time with the guards of Patrick's Tower. They all have in common that they seem to be recuperating from something. The main front with the Empire is to the north.";
	text2 = "Soldiers who are injured or broken are sent to Patrick's Tower to recover. Then, as soon as they can function again, they return to the front.";

// Patrick

begintalknode;
	tag = 10;
	state = -1;
	nextstate = 1;
	question = "Patrick";
	text1 = "A very old mage sits at the head of this long, marble table. He is very famous, a hero from the earlier days of Avernum. He is Patrick the Archmage, master of this tower. He looks very tired.";
	text2 = "When you approach, he turns and nods up at you. He simply says, _I am Patrick. Welcome to my home. Pardon me if I do not rise._";
	text5 = "Patrick stares down the length of his marble table, lost in thought. He sits alone in this huge hall, seemingly forgotten by all the soldiers and sages running around outside.";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_Am I interrupting you?_";
	text1 = "_No. Considering your recent experiences, your presence is welcome. I was just pondering our brothers below._";
	
begintalknode;
	state = 2;
	nextstate = -1;
	condition = 1;
	question = "_They are our brothers?_";
	text1 = "_Are they not? They are like us in so many ways. They certainly face the same common enemy._";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_Our brothers below?_";
	text1 = "_The vahnatai. The alien brothers you yourselves introduced us to. I think about our relations with them, and our experiments._";

begintalknode;
	state = 3;
	nextstate = 4;
	question = "_The vahnatai are a complicated people._";
	text1 = "_They must be. Life in these caves is such a fragile thing. Nothing should be able to live down here, but we manage, because of magic. It is our magic that created the glowing fungus that gives us light, and thus life._";
	text2 = "_But I have spoken with this Rentar-Ihrno, and I am worried._";

begintalknode;
	state = 4;
	nextstate = 5;
	question = "_What did Rentar-Ihrno have to say?_";
	text1 = "_She is the greatest mage of the vahnatai. We projected our minds so that our thoughts could meet. She told me of the deadly magics she would gladly release to protect her people._";
	text2 = "_What, I ask you, will happen when we compete with them for limited space and resources? Remember, she knows how to create quickfire!_";
	action = SET_SDF 29 18 1;

begintalknode;
	state = 5;
	nextstate = 6;
	question = "_Perhaps Rentar-Ihrno might teach me how to create quickfire._";
	text1 = "_It is doubtful, but, if you needed quickfire, she is the one you should talk to._ He thinks. _Come to think of it, the vahnatai were eager for your help. You might ask her about it. She may be willing to sell you the secret of its creation!_";
	text2 = "_We're trying to discover the secret of quickfire ourselves, in our laboratory._";

begintalknode;
	state = 6;
	nextstate = -1;
	question = "_Where is your laboratory?_";
	text1 = "_Oh! It is well hidden. I should tell you how to reach it. Go to my office, and search my desk. There is a button in one of the shelves. Press it and the way shall become clear to you._ (You take note of this.)";
	action = SET_SDF 54 9 1;

begintalknode;
	state = 1;
	nextstate = 8;
	question = "_What sort of magical research goes on here?_";
	text1 = "_Anything which protects us from the Empire. Anything which helps prolong the lives of Avernites. Anything which, in my judgment, increases the wisdom in the world and decreases the suffering._";
	text2 = "_It is hard._";

begintalknode;
	state = 8;
	nextstate = 9;
	condition = 1;
	question = "_How is it hard?_";
	text1 = "_I am old. Every day, I feel weaker. Seeing you, so young, so confident, makes me so jealous. If only._";
	
begintalknode;
	state = 9;
	nextstate = -1;
	condition = 1;
	question = "_If only what?_";
	text1 = "_I want to rest. Read. Enjoy my dwindling time with Hathwisa. Now ... No. I will not indulge in this whining, not when my people die horribly every day._";
	text2 = "_Stop encouraging my self-pity. There is work to be done._";
	
begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(54,18) == 0;
	question = "_Is there anything I can do for you?_";
	text1 = "_As a matter of fact, yes. I am engaged in a detailed study of the vahnatai, and it would help me study them if I owned some of their artifacts. Nothing special. Just things they use in day to day life._";
	text2 = "_Please bring me one of the strange, glowing cloaks they wear. I can pay you well for your troubles._";
	action = SET_SDF 54 18 1;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(54,18) >= 1 && gf(54,18) <= 4;
	question = "_What vahnatai item are you currently looking for?_";
	code =
		toggle_quest(56,1);
	run_hardcode(37);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(54,18) <= 4 && gf(54,18) >= 1;
	question = "_I might have the item you're looking for._ Discuss the vahnatai and show him your equipment.";
	code =
	run_hardcode(38);
	break;

begintalknode;
	state = 1;
	nextstate = 7;
	condition = gf(54,19) >= 1 && gf(16,11) == 0;
	question = "_We read in your journal that you have been thinking about killing Garzahd._";
	text1 = "He looks very annoyed. _My private journal? I gave you no permission to poke around in that. And all of my thoughts about Garzahd are in there. I have no more._";
	
begintalknode;
	state = 7;
	nextstate = -1;
	condition = 1;
	question = "_Garzahd needs to be destroyed._";
	text1 = "_Then go to The Castle and see King Micah. Perhaps you can help each other to achieve that end._";

// Rita

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 28;
	question = "Rita";
	text1 = "A young, blonde woman is wandering through the library, lost in thought. She has a bow slung over her shoulder.";
	text2 = "She shakes your hand, accidentally staining it with ink. _Welcome, soldier. I'm Rita, of the Cskany clan. I am the chief item researcher for this tower._";
	text5 = "Rita watches you calmly. She seems to find wandering warriors inherently interesting. You notice that her fingers are stained with ink, as if she's been doing a lot of writing. Which she probably has.";
	action = INTRO;

begintalknode;
	state = 28;
	nextstate = 29;
	question = "_What are you working on?_";
	text1 = "She smiles wearily. _I'm doing research. It's what I'm best at._";

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_What kind of research?_";
	text1 = "_I study magical items. Efficient use of enchanted equipment is necessary if we are to win the war. We get lots of weird magic, and I figure out what it does and how we should use it. Then I write a paper and it ends up on our shelves._";
	text2 = "She takes the bow off her shoulder and shows it to you. _Also, lately, I've been doing some archery._";

begintalknode;
	state = 30;
	nextstate = -1;
	question = "_Why?_";
	text1 = "_Because the Empire might attack us at any moment. If we have learned anything from the destruction of Cotra, it is that an assault can come from any direction at any time._";


begintalknode;
	state = 28;
	nextstate = 31;
	condition = gf(4,27) == 1;
	question = "_You're a magical researcher? Do you know anything about an Onyx Scepter?_";
	text1 = "She sighs. _I wish I was sure. It was a very interesting item. Now it is lost. I believe, however, that it was given to the dragon Sulfras. She lives in the caves to the west of Fort Remote._";

begintalknode;
	state = 31;
	nextstate = 32;
	question = "_Know about any other interesting artifacts?_";
	text1 = "_Well, practically everyone has heard of the Orb of Thralni, a magical sphere which enables the bearer to fly. It was stolen from the Castle._";

begintalknode;
	state = 32;
	nextstate = -1;
	condition = gf(64,5) == 0;
	question = "_Any idea who stole it or where it might be?_";
	text1 = "_I heard some rumors last time I was in the Castle. A researcher there told me that she thought it was in Kothtar, west of Fort Remote. Possible, I suppose._";
	code =
			if (gf(8,9) == 0)
				toggle_quest(136, 1);
	break;
	
begintalknode;
	state = 32;
	nextstate = -1;
	condition = gf(64,5) > 0;
	question = "_You mean this?_ Show it to her.";
	text1 = "She leans close and looks at the orb. _Yes. It is lovely. I hope you make good use of it. Don't break it._";

begintalknode;
	state = 28;
	nextstate = -1;
	condition = gf(8,17) > 0;
	question = "_Know anything about Demonslayer?_";
	text1 = "_Very little. It is too precious an artifact to be shown to a humble sage like me._";
	
// Marco

begintalknode;
	tag = 50;
	state = -1;
	nextstate = 55;
	question = "Marco";
	text1 = "You meet a tall, portly man. He's busily mixing up some goop in a metal bowl. The meal he's preparing smells delicious. That's unusual for Avernum.";
	text2 = "_Hello! I'm Marco. I'd shake, but, well ..._ He shows you his hands. They're covered with bits of dough.";
	text5 = "Marco continues to prepare a delicious, hearty meal. His cheeks are flushed. A pink, healthy glow penetrates the paleness that is the mark of all Avernites.";
	action = INTRO;

begintalknode;
	state = 55;
	nextstate = 56;
	question = "_What is it you do in Patrick's Tower?_";
	text1 = "_I'm the chef. Let me tell you, it's darned difficult!_";

begintalknode;
	state = 56;
	nextstate = 57;
	question = "_Why is it so difficult?_";
	text1 = "_I want to cook good food! It's what I take pride in! But what do I have to cook with? Mushrooms and mold! And bits of stringy lizard meat._ He grins. _At least, that's what it was like until recently._";
	text2 = "_Ya' see, it all got better when the Empire came!_";

begintalknode;
	state = 57;
	nextstate = 58;
	question = "_How so?_";
	text1 = "_They brought food with them, and we captured it! They brought dirt too, and we got some! I got actual, genuine garlic cloves! And fruit. And we got some other sorts of animals. Want a taste?_";
	text3 = "_They brought food with them, and we captured it! They brought dirt too, and we got some! I got actual, genuine garlic cloves! And fruit. And we got some other sorts of animals. If I had more, I'd offer it to you, but I have many mouths to feed._";
	action = DEP_ON_SDF 54 16 0;

begintalknode;
	state = 58;
	nextstate = -1;
	condition = gf(54,16) == 0;
	question = "_Yes, I'd love to try some._";
	text1 = "Marco puts some of the dough he's mixing in your mouth. It's cookie dough, made from real, actual flour. _Most of the captured food went to Dharmon, but some came here. If you want a real meal at last, Dharmon is to the west. That's where to go!_";
	text2 = "You barely hear what he says. The taste of the batter is overwhelming your senses. You sit down and spend some time savoring it.";
	action = END_TALK;
	code =
		sf(54,16,1);
	break;

begintalknode;
	state = 58;
	nextstate = -1;
	condition = gf(54,16) == 0;
	question = "_No thanks. Not interested._";
	text1 = "_Suit yourself._ He takes the cookie dough away, glad to not have to share. _More left for people with taste._";
	action = END_TALK;
	code =
		sf(54,16,1);
	break;

// Hathwisa

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 82;
	question = "Hathwisa";
	text1 = "You meet an elderly woman, a rarity in the harsh land of Avernum. Despite her increasing years, her waist-length black hair doesn't show the slightest sign of gray. She sits by a small fountain, embroidering.";
	text2 = "She gives you a warm smile as you approach. _Welcome, warrior. I am Hathwisa, lady of this tower._";
	text5 = "Hathwisa sits quietly. Her delicate fingers carry out intricate operations on the fabric in her hands. She is very calm and quiet, and with unmistakable poise.";
	action = INTRO;

begintalknode;
	state = 82;
	nextstate = 83;
	question = "_What do you do here in the tower?_";
	text1 = "_I live a quiet life, enjoying as much peace as I can while it is still possible. I also try to assist my husband, Patrick._";

begintalknode;
	state = 83;
	nextstate = -1;
	question = "_How do you help Patrick?_";
	text1 = "She shows you what she is embroidering onto the cloth. It's a magical rune of awe-inspiring complexity, unerringly formed with gold thread. She shows it to you without comment, but her pride in her work is clear.";

begintalknode;
	state = 83;
	nextstate = 84;
	question = "_How is Patrick?_";
	text1 = "She sighs. _The poor dear works himself too hard. But not as hard as he did before my illness._";

begintalknode;
	state = 84;
	nextstate = 85;
	question = "_Illness? What happened?_";
	text1 = "She continues making stitches as she speaks. _A deadly fever afflicted me a few years ago. I would have died, but for a band of adventurers. They brought graymold salve and healed me._";

begintalknode;
	state = 85;
	nextstate = 87;
	question = "_What is graymold salve?_";
	text1 = "_Remarkable stuff. It can heal practically any disease._ She brushes her hair out of her face and looks at you solemnly. _I owe my life to it._ ";
	
begintalknode;
	state = 87;
	nextstate = -1;
	condition = 1;
	question = "_Where might I obtain some?_";
	text1 = "_It used to be extremely rare. Now, last I heard, someone in Almaria is making it._";

begintalknode;
	state = 82;
	nextstate = 86;
	condition = gf(54,22) == 0;
	question = "_Please tell me about the tower._";
	text1 = "She thinks silently, staring into the pattern of her embroidery. _Normally, I would not say this, but you have shown yourself to be exceptional. The Castle has hidden an artifact of unusual power under this tower. I suspect that it would be very useful to you._";
	text2 = "_If you were interested in obtaining it, the Castle would be the right place to start. Don't ask Patrick about it, though. He doesn't have any control over this item, and it vexes him._";

begintalknode;
	state = 86;
	nextstate = -1;
	condition = gf(110,9) == 0;
	question = "_What can you tell me about the item?_";
	text1 = "_Nothing. Nothing at all. I am stretching the rules merely by telling you that there is something to be found. And that one of your skill should find a way to see our king as soon as possible._";

begintalknode;
	state = 86;
	nextstate = -1;
	condition = gf(110,9) >= 1;
	question = "_Yes. Demonslayer. I already got it._";
	text1 = "_I am glad. Watch that blade carefully. I sense that it will serve you well before all is done._";
	code =
		sf(54,22,1);
	break;

begintalknode;
	state = 82;
	nextstate = -1;
	condition = gf(54,22) > 0;
	question = "_Anything else you can tell me about the tower?_";
	text1 = "_Only that this is a place of peace and knowledge, and I hope you take the chance to rest here._";
	
// Cochran

begintalknode;
	tag = 90;
	state = -1;
	nextstate = 109;
	question = "Cochran";
	text1 = "You meet a researcher of the tower, a gardener from the look of it. He approaches you with an air of total self-assurance.";
	text2 = "His hands and garb are stained with actual dirt, from the surface! It's remarkable. He greets you when you approach. His voice is deep and sure. _My name is Cochran._";
	text5 = "Cochran makes no move to brush off the dirt on his hands and clothes as he talks to you. Avernum has almost no dirt. Bare rock, sure. Gravel, sure. But real, healthy dirt, like from the surface, is very rare.";
	action = INTRO;

begintalknode;
	state = 109;
	nextstate = 110;
	question = "_That's real dirt, isn't it?_";
	text1 = "He picks a fleck of dirt from his clothes and shows it to you. _You bet. I'm the gardener here._";

begintalknode;
	state = 110;
	nextstate = -1;
	question = "_Where did you get the dirt from?_";
	text1 = "_Actual, honest-to-goodness dirt? It wasn't easy. The Empire brought some down with them to grow plants, and we captured a wagon full of it. A rare and wondrous find indeed!_";
	text2 = "He removes a pouch from his pocket and scrapes dirt from his clothes into it, so that none of it goes to waste.";

begintalknode;
	state = 109;
	nextstate = 111;
	question = "_How did you become a gardener?_";
	text1 = "_It's only my job of the moment. I'm an alchemist, you see, so they thought I was the natural choice for studying and working with plants._";

begintalknode;
	state = 111;
	nextstate = 112;
	question = "_What sort of alchemy did you deal with?_";
	text1 = "_Before this, you see, I did much research on mandrake. It's the rarest and most powerful reagent known. I have developed some complicated recipes for unleashing its magic._";
	
begintalknode;
	state = 112;
	nextstate = -1;
	condition = 1;
	question = "_Can you make a potion for me?_";
	text1 = "_That is not my job. I don't have the time or the materials. But ... I do miss it._";
	text2 = "_I'll tell you what. If you can bring me some mandrake, actual mandrake, I can take the time to make something from it for you._";
	code =
		sf(54,23,1);
		toggle_quest(74,1);
	break;
	
begintalknode;
	state = 109;
	nextstate = -1;
	condition = gf(54,23) > 0 && party_has_item(293) == 0;
	question = "_Can you make potions for me?_";
	text1 = "_Only if you have mandrake root._ You don't.";

	
begintalknode;
	state = 109;
	nextstate = 113;
	condition = gf(54,23) > 0 && party_has_item(293) > 0;
	question = "_Can you make potions for me?_";
	text1 = "_I can. Rare and powerful recipes, using the most powerful of ingredients, mandrake._";
	text2 = "_In my generosity, if you provide me the materials, I will make potions for you. You must choose whether you desire Speed, Power, Protection, or Wisdom. If you have the necessary extra materials, I can make what you need._";

	
begintalknode ;
	state = 113;
	nextstate = -1;
	condition = party_has_item(290) && party_has_item(291) && party_has_item(293);
	question = "_Make a 'Speed' potion for me._ Give spiritual and energetic herbs and mandrake.";
	text1 = "He takes the materials, inspects them, and nods. Then he leaves. He needs to use the tower laboratory to actually make the potion.";
	text2 = "Eventually, he returns and hands you a bottle stoppered with wax. _Your potion. I reserved some of the leftover mandrake as payment._";
	action = REUSABLE;
	code =
		inc_flag(190,7,1);
		take_item(290);
		take_item(291);
		take_item(293);
		reward_give(228);
		play_sound(22);
	break;
	
begintalknode ;
	state = 113;
	nextstate = -1;
	condition = party_has_item(290) && party_has_item(291) && party_has_item(293);
	question = "_Make a 'Power' potion for me._ Give spiritual and energetic herbs and mandrake.";
	text1 = "He takes the materials, inspects them, and nods. Then he leaves. He needs to use the tower laboratory to actually make the potion.";
	text2 = "Eventually, he returns and hands you a bottle stoppered with wax. _Your potion. I reserved some of the leftover mandrake as payment._";
	action = REUSABLE;
	code =
		inc_flag(190,7,1);
		take_item(290);
		take_item(291);
		take_item(293);
		reward_give(229);
		play_sound(22);
	break;
	
begintalknode ;
	state = 113;
	nextstate = -1;
	condition = party_has_item(289) && party_has_item(290) && party_has_item(291) && party_has_item(293);
	question = "_Make a 'Protection' potion for me._ Give healing, spiritual and energetic herbs and mandrake root.";
	text1 = "He takes the materials, inspects them, and nods. Then he leaves. He needs to use the tower laboratory to actually make the potion.";
	text2 = "Eventually, he returns and hands you a bottle stoppered with wax. _Your potion. I reserved some of the leftover mandrake as payment._";
	action = REUSABLE;
	code =
		inc_flag(190,7,1);
		take_item(289);
		take_item(290);
		take_item(291);
		take_item(293);
		reward_give(237);
		play_sound(22);
	break;
	
begintalknode ;
	state = 113;
	nextstate = -1;
	condition = party_has_item(289) && party_has_item(290) && party_has_item(291) && party_has_item(292) && party_has_item(293);
	question = "_Make a 'Wisdom' crystal for me._ Give healing, spiritual and energetic herbs, graymold, and mandrake root.";
	text1 = "He takes the materials, inspects them, and nods. _This time, I will infuse a stone with power. A good stretch of my talents._ Then he leaves. He needs to use the tower laboratory to actually make the potion.";
	text2 = "Eventually, he returns and hands you a crystal. It is still damp with the powerful mixture it soaked in. _Your crystal. Staring into this stone will focus your thoughts. I reserved some of the leftover mandrake as payment._";
	action = REUSABLE;
	code =
		inc_flag(190,7,1);
		take_item(289);
		take_item(290);
		take_item(291);
		take_item(292);
		take_item(293);
		reward_give(242);
		play_sound(22);
	break;
	
begintalknode ;
	state = 113;
	nextstate = -1;
	condition = 1;
	question = "_That is all I need._";
	text1 = "_Then I will return to my research. Thank you for your visit._ You take a moment to enjoy the smell of the loam before you depart.";
	action = END_TALK;

// Jade

begintalknode;
	tag = 110;
	state = -1;
	nextstate = 136;
	question = "Jade";
	text1 = "You meet a small woman in long robes. Her hair is short and tied back, so that it doesn't dip into any of the bubbling concoctions she is working on.";
	text2 = "She moves quickly among the tables, vats, and magic circles of the laboratory. Your interruption irritates her. _I am Jade. What is it?_";
	text5 = "Jade hums tunelessly as she paces around the chamber. There are at least ten experiments in process, and she carefully tends to each of them.";
	action = INTRO;

begintalknode;
	state = 136;
	nextstate = 141;
	condition = 1;
	question = "_What is being researched here?_";
	text1 = "_New spells. New flora. New techniques for slaying the soldiers of the Empire._";

begintalknode;
	state = 141;
	nextstate = -1;
	condition = 1;
	question = "_Are they your experiments?_";
	text1 = "_No. They are the brainchildren of all of the mages of the Great Cave. I tend to them, keep them progressing, and record the results._";
	text2 = "_Everyone has ideas. I do the work._";
	
begintalknode;
	state = 136;
	nextstate = 137;
	question = "_What are you doing here?_";
	text1 = "_I was, before you interrupted me, tending to the experiments. When I have a free minute, I perform my concentration exercises. Before you interrupted me._";

begintalknode;
	state = 137;
	nextstate = 138;
	question = "_My apologies for the interruption. Why are you practicing your concentration?_";
	text1 = "She points at the magical circle in the corner, where a demon lurks. _I am struggling to maintain my concentration in the presence of an infernal force. It is not easy._";

begintalknode;
	state = 138;
	nextstate = 139;
	question = "_Why?_";
	text1 = "She sighs, exasperated by your persistence. _It takes great intelligence and purity of concentration to deal with and resist the dark forces. It is necessary, though. The Empire forces here deal with such creatures. Sometimes they send them against us._";

begintalknode;
	state = 139;
	nextstate = 140;
	question = "_How do you kill the creatures when you encounter them?_";
	text1 = "_Weaponry. Infernals are as vulnerable to sharp steel as anyone else._";
	text2 = "_I am more afraid of the Rakshasi, like the ones to the west who slew my assistant Baktris._";

begintalknode;
	state = 140;
	nextstate = -1;
	question = "_Tell me more._";
	text1 = "_Baktris was slain by a band of the foul, illusionist tiger-beasts. There is a colony of them to the west. Infernals can rend your flesh, but rakshasi destroy your mind._ A nearby pot starts to bubble over.";
	text2 = "_Now you are keeping me from my work. I must go._ She resumes her humming and walks away from you.";
	action = END_TALK;

// Kelli

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 163;
	question = "Kelli";
	text1 = "A robed woman is sitting at this table. She has short black hair and a distracted manner. Books are piled on the table in front of her. _My name is Kelli. Don't see many soldiers in the deep stacks._";
	text5 = "Kelli sits behind her barricade of dusty tomes, watching you. She doesn't seem comfortable dealing with strangers. Not an unusual property in a magical researcher.";
	action = INTRO;

begintalknode;
	state = 163;
	nextstate = 164;
	question = "_What are you working on?_";
	text1 = "_I am a mage of the tower. At the moment, I'm doing a little research._";

begintalknode;
	state = 164;
	nextstate = 165;
	question = "_Researching what?_";
	text1 = "_What else? I'm here to dig up intelligence on several sorts of monsters. Forewarned is forearmed._";

begintalknode;
	state = 165;
	nextstate = 166;
	question = "_What sort of monsters are you looking at now?_";
	text1 = "_The Castle wants me to look into two sorts of monsters: mutant giants and doomguards._";

begintalknode;
	state = 166;
	nextstate = -1;
	question = "_Giants are bad enough. Now there are mutant giants?_";
	text1 = "_I don't know much about these, but I do know this. Normally, the Empire kills all the giants they could find. However, some giants have been seen in their patrols. Larger, stronger, misshapen giants._";
	text2 = "_We don't know where they're from, but they're deadly. Much stronger than normal, and they serve the Empire. Very strange behavior for a giant._";

begintalknode;
	state = 166;
	nextstate = 167;
	question = "_What is a doomguard?_";
	text1 = "Her expression darkens. _They are legendary creatures, who we're starting to discover actually exist. They're suits of armor, almost impervious to damage. And, when you actually do manage to damage them, they split into two!_";
	text2 = "_Of course, the rumors may just be that. Rumors. I hope so._";

begintalknode;
	state = 167;
	nextstate = -1;
	condition = 1;
	question = "_How can such a creature be defeated?_";
	text1 = "_We aren't sure, but I have a guess. The blows delivered at them must be strong. A weak blow will cause the creature to split, and the new doomguards will still be powerful. A mighty blow leaves two weaker doomguards._";
	text2 = "_It is a strange and fascinating magic._";

// Captain Rabin

begintalknode;
	tag = 150;
	state = -1;
	nextstate = 190;
	question = "Captain Rabin";
	text1 = "There is a bitter soldier slouching behind the desk. He has a three-day growth of stubble on his face. He looks at you blankly when you introduce yourself. _I'm Captain Rabin. Welcome to the quiet lands._";
	text5 = "Captain Rabin shakes his head sharply for a moment, trying to stay awake. He's been working very hard. Unusual, considering how far from the front you are.";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = 194;
	condition = 1;
	question = "_Quiet lands?_";
	text1 = "_We are a long journey from the main front. It is thought that an Empire raid here soon is unlikely._";

begintalknode;
	state = 194;
	nextstate = -1;
	condition = 1;
	question = "_Where is the Front?_";
	text1 = "_Well, there are several, honestly. West of Fort Dranlon. West of Fort Remote._";
	text2 = "_But there is only one place where Empire and Avernite soldiers fight daily. It is north of Dharmon. Then, when one of our warriors has body or mind broken, they come here for a time._";
	
begintalknode;
	state = 190;
	nextstate = 191;
	question = "_Who do you command?_";
	text1 = "_I run the garrison here. Such as it is._";

begintalknode;
	state = 191;
	nextstate = 192;
	question = "_The garrison is small?_";
	text1 = "He chuckles. _Yes. I take good care of the scattering of leftovers sent to watch this tower._";

begintalknode;
	state = 192;
	nextstate = 193;
	question = "_Leftovers?_";
	text1 = "_The old. The wounded. Those too weak to stand the pressure of the front. I have fifteen soldiers under my command. Not many, and flawed. All the seasoned troops are at the front, where I should be. I should be sent back there._";

begintalknode;
	state = 193;
	nextstate = -1;
	question = "_Why do you want to go back to the front?_";
	text1 = "_You may think I'm stupid, wanting to be at the front, where I could get burned or broken, instead of at my nice boring job here. But think on this. We break at the front, and we all die! The Empire will butcher us all._";
	text2 = "_If I'm going to die, I want to be up there, where I can fight the real fight. It's that simple._ He grimaces in frustration.";
	text3 = "Despite this bravado, you can see his energy fade with every passing second of conversation. You eventually leave him to rest. You suspect his time in battle has left him more damaged than he likes to admit.";
	action = END_TALK;

// Julz

begintalknode;
	tag = 170;
	state = -1;
	nextstate = 217;
	question = "Julz";
	text1 = "You meet a pale, friendly woman. She sits at a polished cavewood table, covered not with papers but with herbs and toadstools, bowls and powders. She graces you with a broad smile when you approach. _I'm Julz. Welcome._";
	text5 = "Julz happily gives you her full attention, grateful for a break from her alchemy. As you speak with her, you start to think that her long hair looks blue. It's probably a trick of the light.";
	action = INTRO;

begintalknode;
	state = 217;
	nextstate = 218;
	question = "_What are your responsibilities?_";
	text1 = "_I'm the person who coordinates what the mages here do with what the Castle wants them to do._";

begintalknode;
	state = 218;
	nextstate = -1;
	condition = 1;
	question = "_Is this coordination difficult?_";
	text1 = "_Mages are a ... disconnected lot of people. They are easy to distract. Normally this is not a problem. But then, we are normally not being invaded by the Empire._";
	text2 = "_I have a lot more to say on the subject, but I really want to get this potion done._";
	
begintalknode;
	state = 217;
	nextstate = 220;
	question = "_What alchemy are you working on?_";
	text1 = "_I'm worrying about a potion._";

begintalknode;
	state = 220;
	nextstate = 219;
	question = "_What kind of potion?_";
	text1 = "_I can't tell you what it is for, but I can tell you I'm short on ingredients. But I see you're a traveler. I can reward you well if you can obtain certain substances for me._";
	text3 = "_Now that I have the ingredients, the potion still takes a long time to make. Still, thank you for your help._";
	action = DEP_ON_SDF 54 17 3;

begintalknode;
	state = 219;
	nextstate = -1;
	condition = gf(54,17) <= 1;
	question = "_I'd be willing to get any substances you might need._";
	text1 = "_Ah! You'll help? Wonderful! The first thing I need is a borgia toadstool. They're very rare. They only exist in the lower caves. Very low caves. Perhaps some grow in vahnatai lands. It's worth a look._";
	action = SET_SDF 54 17 1;
	code =
		toggle_quest(54,1);
	break;
	
begintalknode;
	state = 217;
	nextstate = -1;
	condition = has_spec_item(28) > 0 && gf(54,17) == 1;
	question = "_I found a borgia toadstool for you._ Give it to her.";
	code =
	run_hardcode(36);
	break;

begintalknode;
	state = 217;
	nextstate = -1;
	condition = gf(54,17) == 2 || gf(54,17) == 3;
	question = "_What other ingredients do you need for your potion?_";
	text1 = "_I need some graymold salve. It's difficult stuff to find, but if you could get the toadstool, you can get the salve. I'm sure one of Avernum's alchemists can make it._";
	code =
		sf(54,17,3);
		toggle_quest(55,1);
	break;

begintalknode;
	state = 217;
	nextstate = -1;
	condition = gf(54,17) == 3 && party_has_item(495) > 0;
	question = "_I got some graymold salve for you._ Give it to her.";
	code =
	run_hardcode(36);
	break;

begintalknode;
	state = 217;
	nextstate = -1;
	question = "_What are the books to the south?_";
	text1 = "She smiles mischievously. _Those books contain powerful knowledge. And who, in my position, would not want to keep it private? I wouldn't share it with anyone who didn't help me._";
	text3 = "_Why don't you read them and find out? If you have trouble understanding them, you may need a Deciphering Lens. Patrick has been known to give them out to adventurers who help him._";
	action = DEP_ON_SDF 54 17 2;

begintalknode;
	state = 217;
	nextstate = -1;
	question = "_You seem unusually cheery._";
	text1 = "_What is the point in being otherwise?_";

// Felix

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 244;
	question = "Felix";
	text1 = "This cat boldly walks up and stares at you curiously. You stare back at it. Then, unexpectedly, it says, _Hi. I'm Felix._ He talks! How cute!";
	text5 = "Felix sits down and cleans himself with his tongue. He seems completely unconcerned about whether or not the conversation continues.";
	action = INTRO;

begintalknode;
	state = 244;
	nextstate = -1;
	question = "_You talk._";
	text1 = "_I'm sure it's not the strangest thing you've ever seen. Meow._";

begintalknode;
	state = 244;
	nextstate = 245;
	question = "_Find any tasty mice?_";
	text1 = "_Nah, I don't hunt much. Usually Jade feeds me. I'm her familiar._";

begintalknode;
	state = 245;
	nextstate = -1;
	question = "_A familiar? What's that?_";
	text1 = "_Magical servant. Friend for life. Someone to feed eternally. That sorta' thing._ It makes a small, adorable sighing motion. _Actually, I could stand to be fed a little bit more often._";

begintalknode;
	state = 245;
	nextstate = 246;
	question = "_Who is Jade?_";
	text1 = "_My mistress. A mighty wizard. But she'd have to be, to have me! She's in the laboratory now._";

begintalknode;
	state = 246;
	nextstate = -1;
	question = "_Where is the laboratory?_";
	text1 = "_It's around here somewhere. Real secret, and stuff._ It stretches, meows, and continues. _She doesn't let me in there. Jealous of my intelligence, I guess._";

// Patrick

begintalknode;
	tag = 210;
	state = -1;
	nextstate = 271;
	question = "Patrick";
	text1 = "A massive infernal stands in the pentagram. It stares at you with hate in its eyes.";
	text5 = "The infernal continues to stare at you. It clearly wants to kill you, but powerful magical bonds hold it in its place.";
	action = INTRO;

begintalknode;
	state = 271;
	nextstate = 272;
	question = "_Why are you imprisoned?_";
	text1 = "It doesn't move. It just watches you.";

begintalknode;
	state = 272;
	nextstate = 273;
	question = "_Answer me._";
	text1 = "You get absolutely no reaction. This creature only stares. As it does, you start to feel confused. A strange feeling. A discomfort. A disconnection. That could only be cured by breaking the magic circle.";

begintalknode;
	state = 273;
	nextstate = -1;
	condition = 1;
	question = "Break the circle.";
	text1 = "As you move to free the infernal, Jade runs up and grabs you. _Stop, you fool! It is playing with your mind!_ You concentrate, and the foggy feeling fades.";
	text2 = "The infernal chuckles. _So close._";
	action = END_TALK;

begintalknode;
	state = 273;
	nextstate = -1;
	condition = 1;
	question = "_Stop it, demon._";
	text1 = "The infernal chuckles. _I was close. Soon, I will succeed._";
	action = END_TALK;
	
