// TOWN DIALOGUE SCRIPT
//    Town 55: Gnass

begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode;
	tag = 1;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "What you thought was a lizard is, in fact, a baby slith. It crawls around on all fours, hissing, fighting for food, and trying to speak.";

begintalknode;
	tag = 2;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "Slithzerikai are not above eating unintelligent lizards for food. Several of them are in and around the eastern pen, awaiting their grim destiny.";

begintalknode;
	tag = 3;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "Many of the pallets in this common room are occupied by refugees. They are tired, hungry slithzerikai from villages to the north. They fled the Empire to come here.";
	text2 = "Each of them has a tale of woe. Sometimes, the Empire will deal with the humans of the underworld. Nephilim and sliths, on the other hand, are just killed.";
	
begintalknode;
	tag = 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "Gnass is watched over by slithzerikai watchers. They are alert for Empire raids from all directions. They politely decline to speak with you. Toth-Thsss, their chieftain, allows no distractions.";

// Pathass

begintalknode;
	tag = 10;
	state = -1;
	nextstate = 1;
	question = "Pathass";
	text1 = "You meet an ancient slithzerikai. His green scales are fading to a dark gray. He is sitting at this table, weary and bent.";
	text2 = "He nods solemnly. _I am Pathass._ You notice that he is wearing a holy charm, a symbol of a slith priest.";
	text5 = "Pathass looks up at you wearily. _What elssse would you like to know?_ He fingers the symbol of his priesthood idly.";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_What do you do for your village?_";
	text1 = "_I am the priessst for thisss village. It isss a great labor._";

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_I didn't realize that sliths had priests._";
	text1 = "_Yesss. We slithsss are a religiousss people._";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_Why is it such a labor?_";
	text1 = "_We worship our godsss, kind godssss, as besst we can. Many of our brethren in these caves worship dark godsss, of war and blood. We do not. It saddensss us, for they possesss our holy charm._";
	text3 = "_We worship our godsss, kind godssss, as best we can. It is easier, now that our meditationsss are aided once again by our charm. But the evil in the cavesss is still strong._";
	action = DEP_ON_SDF 55 15 1;

begintalknode;
	state = 3;
	nextstate = 4;
	condition = gf(55,15) <= 1;
	question = "_Your holy charm was stolen?_";
	text1 = "_Our people in these caves have a holy artifact. It was an amber charm of a lizard, ancient and very valuable to us. We are sure some of our people in these caves have it. Return it and we will reward you. There is a ritual I can give you to help you._";
	action = SET_SDF 55 15 1;
	code =
		toggle_quest(57,1);
	break;
	
begintalknode;
	state = 4;
	nextstate = -1;
	condition = gf(55,15) <= 1;
	question = "_Can you teach me the ritual I need to find the charm?_";
	text1 = "He mutters a brief chant, then repeats it several times. _When you find a place where the charm may be hidden, mutter this chant and it will hum in response to you. The charm is the only chanting stone in these caves._ (You take note of this.)";
	action = SET_SDF 55 11 1;

begintalknode;
	state = 4;
	nextstate = -1;
	question = "_What is the charm?_";
	text1 = "_A wondrousss item. A chanting stone. It takes our chantss and singsss them back to usss. It purifiesss and strengthensss our prayersss._";

begintalknode;
	state = 4;
	nextstate = 7;
	question = "_Any guess where the sliths with the charm might be?_";
	text1 = "_Very few of the evil slithsss of Sss-Thsss, the dead once-leader of the evil slithsss, remain. If you find a nest of them, search it well. There it may be._";

begintalknode;
	state = 7;
	nextstate = -1;
	condition = 1;
	question = "_Do you know about any 'nests'?_";
	text1 = "_The last time we were raided, we tracked the savagesss who attacked usss. We lost the trail in the Eastern Gallery, north of the ruinsss of Cotra._";
	text2 = "_Ask in the settlementsss of the Eastern Gallery. Maybe they have seen something._";


begintalknode;
	state = 1;
	nextstate = -1;
	question = "_You are a priest? Can you heal me?_";
	text1 = "_No. My powersss are limited, sssadly. I save them for my own peoplesss._";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = slith_present() == 0;
	question = "_Can you teach me magic?_";
	text1 = "_No. My teachingsss are only to be given to those of my race. I have sworn it, and can do no other._";

begintalknode;
	state = 1;
	nextstate = 6;
	condition = slith_present() > 0;
	question = "_Can you teach me magic?_";
	text1 = "He sighs. _I am old and tired, but I will teach all slithsss who come to this village. To see a slith fighting for the good of all against Empire makes me glad. For thisss, I will teach you._";

begintalknode;
	state = 6;
	nextstate = -1;
	question = "_I would be honored to learn from you._";
	text1 = "You conclude your training.";
	code =
		begin_shop_mode("Pathass","Because you have a slithzerikai with you, Pathass will share his rituals.",72,1,3);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(55,15) == 1 && has_spec_item(17) > 0;
	question = "_I found the charm you wanted._ (Give it to him.)";
	code =
	run_hardcode(138);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(55,15) >= 2;
	question = "_Have you decided what you would like to teach me?_";
	code =
	run_hardcode(41);
	break;

// Assotho

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 28;
	question = "Assotho";
	text1 = "You meet a tall, dignified slithzerikai. She sets aside her two-tined spear and bows in greeting. When she speaks, her voice is deep and softly sibilant.";
	text2 = "_I am Assotho, of the slithzerikai. Welcome to Gnass. I help the refugeesss here, and it is good to meet one not hungry or afraid._";
	text5 = "Assotho speaks softly with you, discussing the progress of the war. She tries to seem calm, but, as you speak, you detect hints of the turmoil and anger she feels inside.";
	action = INTRO;

begintalknode;
	state = 28;
	nextstate = 29;
	question = "_I wish to speak with you._";
	text1 = "_I have time, but it isss hard._ She slowly shakes her head. _I have been looking after and aiding the refugeesss that have fled to here._";

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_Refugees from where?_";
	text1 = "_The Empire is moving from slith village to slith village, killing all of our people they find. A few of them, the lucky onesss, make their way here. The rest end up in mass gravesss._";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_That sounds horrendous._";
	text1 = "_Yes. As hard as you humans find it to believe, the Empire is killing all of us, every last one. One day we will be able to prove it to you, although we hope it happens before we are all gone._";
	text2 = "_Yet, even knowing what they do of the Empire, The Castle will not believe what isss happening. They say we need evidence. All we have are tales of the hungry and scared._";
	code =
		if (gf(55,16) > 1)
			rs(2);
	break;
	
begintalknode;
	state = 31;
	nextstate = 32;
	condition = gf(55,16) <= 1;
	question = "_What if I could find that evidence for you?_";
	text1 = "_That would help me argue for justice and help for the slith peoplesss. I would wish you to tell me of a place where the slithsss were massacred._";
	action = SET_SDF 55 16 1;
	code =
		toggle_quest(58,1);
	break;
	
begintalknode;
	state = 32;
	nextstate = -1;
	question = "_Where should I look?_";
	text1 = "_Most of the slith villagesss were northeast of here. Look for a sign of a slith village destroyed by the Empire. I could then ssspread the word of the massacre and people would know what the Empire does to usss._";

begintalknode;
	state = 28;
	nextstate = -1;
	question = "_What do you do with the refugees?_";
	text1 = "_We can arm them, and help them fight. They will at least have the luck of dying fighting for their freedom, rather than ending up in the ground._";

begintalknode;
	state = 28;
	nextstate = -1;
	condition = gf(55,16) == 1 && gf(157,16) >= 1;
	question = "_I found the site of a massacred slith village. It's due northeast of here. There were no survivors._";
	code =
	run_hardcode(39);
	break;

begintalknode;
	state = 28;
	nextstate = -1;
	condition = gf(55,16) >= 2;
	question = "_We would like you to join us. Leave here and fight the Empire._";
	text1 = "For a minute, she considers it. Then she shakes her head. _I can fight. I will fight. However, I must fight here. Like the Empire raiders came to Cotra, they will come here._";
	text2 = "_When they do, they will find refugees tended to and trained by me. Then, they will not have another easy victory._";

// Lairgath

begintalknode;
	tag = 50;
	state = -1;
	nextstate = 55;
	question = "Lairgath";
	text1 = "There is a grievously wounded slith on this bed. his tail has been severed, and dirty bandages cover his body. He stares up at you through a haze of pain. _Sssss. I am Lairgath. Sssssss._";
	text5 = "Lairgath emits a long, drawn out hiss of agony. He is struggling valiantly to cling to life. Looking at his wounds, you have your doubts about whether he will succeed.";
	action = INTRO;

begintalknode;
	state = 55;
	nextstate = 56;
	question = "_Who did this to you?_";
	text1 = "_Empire troopsss. Slew my village. Fled._ He pauses to regain his strength, and continues. _I fled here. Rest, so I can fight._";

begintalknode;
	state = 56;
	nextstate = 57;
	question = "_Why do you want to fight?_";
	text1 = "His eyes light up with fury. _They killed my mate and my brood!_ His voice starts to rise, despite the pain speech causes him. _One day I will rise, and I will take up my sssspear, and I will have revenge!_";

begintalknode;
	state = 57;
	nextstate = -1;
	question = "_Revenge is sweet. But it will not replace your lost family._";
	text1 = "He sinks down to the bed. _It is all I have to live for. One day. Sssss. One day._ He closes his eyes and turns his head away from you, lost in pain.";
	text2 = "At first, you were sure Lairgath wouldn't survive his wounds. Now, seeing his fanatical desire for vengeance, you suspect he has the will to live after all.";
	action = END_TALK;

begintalknode;
	state = 57;
	nextstate = -1;
	question = "_I hope that you succeed. The Empire scum deserve to die._";
	text1 = "He nods. Even such a small movement is a struggle for him. _Yesss. They will pay. They. Will._ He nods off, claimed by merciful sleep.";
	text2 = "At first, you were sure Lairgath wouldn't survive his wounds. Now, seeing his fanatical desire for vengeance, you suspect he has the will to live after all.";
	action = END_TALK;

// Orho

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 82;
	question = "Orho";
	text1 = "A massive slith emerges from the smoky haze that fills this building. Muscles ripple under his leathery skin, and a pair of huge hammers hang from his belt.";
	text2 = "He nods when you approach, evaluating your weapons with a quick look. _I am Orho. Maker of spearsss to slay the Empire._";
	text5 = "_How else may I help you, traveler? I am willing to sell my work to slayersss of the Empire._ His voice is deep and clear, and he has a decent grasp of the human tongue.";
	action = INTRO;

begintalknode;
	state = 82;
	nextstate = 83;
	question = "_What are you working on?_";
	text1 = "He grabs a steel two-tined spear from the wall and holds it up for your inspection. _I forge weaponsss to fight the Empire!_";

begintalknode;
	state = 83;
	nextstate = 84;
	question = "_Impressive work._";
	text1 = "He gives you a toothy grin and twirls the heavy spear effortlessly. _Yesss. Traditional spear of the slithzerikai! Weapon we have used since timesss lost!_ He hands you the beautiful weapon reverently.";
	text2 = "_In the name of peace, we are letting some outsiderssss buy our weaponsss. Just ask._";

begintalknode;
	state = 84;
	nextstate = -1;
	condition = 1;
	question = "_Why don't you use spears like the humans make?_";
	text1 = "_The slith style is superior for our battle techniquesss. Yet, the two-tined spear is only for full warriors. The young use the simpler, cheaper type._";
	text2 = "_Also, some of our warriorsss with bigger strength use the human-styled halberd. There is no dishonor in thisss._";

begintalknode;
	state = 82;
	nextstate = -1;
	question = "_You fight the Empire?_";
	text1 = "His face is expressionless, but his eyes glint with anger. _In this time, when they murder usss for sport? I make my weapons to slay those of the Empire. They have no other purpose._";

begintalknode;
	state = 82;
	nextstate = -1;
	question = "_Can I purchase a weapon from you?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Orho's Slith Spears","Orho is willing to do you the honor of selling you his fine slith spears.",77,3,3);
	break;
	
begintalknode;
	state = 82;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 82;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Then I wish you good hunting. Slay those who come to hunt usss._";
	action = END_TALK;
	
// Eth-Ath

begintalknode;
	tag = 90;
	state = -1;
	nextstate = 109;
	question = "Eth-Ath";
	text1 = "You meet a small, delicately featured slith woman. She has been nervously watching you. Tiny sliths crawl around her feet, hissing and occasionally biting her feet.";
	text2 = "When you approach, she says, in a nervous voice, _I am Eth-Ath._ She is careful not to get too close to you.";
	text5 = "Eth-Ath continues to avoid being close to you. She is scared of outsiders. Considering that she is watching over the young of the tribe, this is reasonable.";
	action = INTRO;
begintalknode;
	state = 109;
	nextstate = -1;
	question = "_Don't be afraid. I mean no harm._";
	text1 = "_You are not slith. You may be kind to those like you, but outsidersss are always hurting usss._";
	text3 = "_That a slith comes to visit me does not make my distrust less. Many sliths are savage and bent. I never lose alertnessss in guarding the brood of Gnass._";
	code =
		if (species_in_party(3))
			rs(1);
			else rs(3);
	break;

begintalknode;
	state = 109;
	nextstate = 110;
	question = "_What work do you do here in Gnass?_";
	text1 = "She thinks it over. Then she decides that it's safe to tell you. _I am our brood-keeper, stranger. I look over our younglingsss._";

begintalknode;
	state = 110;
	nextstate = 111;
	question = "_What does a brood-keeper do?_";
	text1 = "She looks protectively towards the young playing in the pools. Her expression plainly says that, if you want to do anything to them, you'll have to kill her first. _I guide our children._";

begintalknode;
	state = 111;
	nextstate = -1;
	question = "_How do you guide them?_";
	text1 = "_Our people are being killed by the humansss. Our children are our only true hope for revenge. I teach them of the Empire. Tell them our ways.  What they must know to fight for our people._";

// Othoss

begintalknode;
	tag = 110;
	state = -1;
	nextstate = 136;
	question = "Othoss";
	text1 = "A slith with a large, carved staff is keeping an eye on the mushroom fields and the wandering lizards. She isn't very good at it, though. She seems lost in thought.";
	text2 = "Your approach distracts her from her distraction. _Oh. Outsider. I am Othoss. Welcome._";
	text5 = "Othoss says, _What else may I tell you? I am ever eager to help._ She looks pleased to have visitors from outside Gnass. ";
	action = INTRO;

begintalknode;
	state = 136;
	nextstate = 137;
	question = "_You seem distracted._";
	text1 = "_Well, normally I am a mage and stone shaper. Instead I am forced to watch the fieldsss._";

begintalknode;
	state = 137;
	nextstate = -1;
	question = "_Is magic important to sliths?_";
	text1 = "_Our slithsss guard our magical secretsss closely. They have sacred value to usss. They are much of our power._";

begintalknode;
	state = 137;
	nextstate = -1;
	question = "_What does a stone shaper do?_";
	text1 = "_I mold stone into statue. These stone forms of our ancestorsss are our way of paying homage. Our statuesss have great value to usss._";

begintalknode;
	state = 136;
	nextstate = 139;
	question = "_Why are you watching the fields?_";
	text1 = "_The servantsss need watching and guarding. Their master is off fighting the Empire. It takesss time from my magic._";

begintalknode;
	state = 139;
	nextstate = -1;
	question = "_Guarding the servants? Why? Aren't they free to leave?_";
	text1 = "_Alasss, many slithsss reach adulthood without intelligence. These are used as servantsss, for growing food and for simple jobss. We look after the simple onesss and help them. That is what I am doing now._";

begintalknode;
	state = 139;
	nextstate = -1;
	condition = 1;
	question = "_What magic would you be doing?_";
	text1 = "_Thingsss that have no value in time of war. There is no worry, though. If Empire invadersss come, I drop my staff and summon fire and ice._";

// Uss

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 163;
	question = "Uss";
	text1 = "This small slith stares at you with fear. When you get close, it begins to shake in terror. Its small, sharp teeth rattle together. _I Uss. No hurt._";
	text5 = "Uss quivers nervously. _May I be other where now?_";
	action = INTRO;

begintalknode;
	state = 163;
	nextstate = -1;
	question = "_Hello, little one._";
	text1 = "_Don't hurt me. I not mean slith. Not savage._ It speaks the words haltingly.";

begintalknode;
	state = 163;
	nextstate = 165;
	question = "_I won't hurt you._";
	text1 = "_Not bad! No hit me! Not bad to human. Not bad to slith._";

begintalknode;
	state = 165;
	nextstate = -1;
	question = "_Calm down, of course you aren't bad._";
	text1 = "He backs away. _Humans hit slithsss. Hit me no! Not bad!_ The simple little creature runs away.";
	action = END_TALK;

// Ith

begintalknode;
	tag = 150;
	state = -1;
	nextstate = 190;
	question = "Ith";
	text1 = "A hulking slith with a vacant look walks up and stares at you. _I Ith,_ it grunts.";
	text5 = "Ith stands uncomfortably close to you. _Me need work. What else you want know?_";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = 191;
	question = "_Can I help you?_";
	text1 = "_I want see soldiersss._ The words come slowly and haltingly.";

begintalknode;
	state = 191;
	nextstate = 192;
	question = "_Now you've seen me. What do you think?_";
	text1 = "_You small. Ith big._";

begintalknode;
	state = 192;
	nextstate = 193;
	question = "_You like soldiers?_";
	text1 = "_It ... it ..._ It struggles to find a word. _It good. I farm!_";

begintalknode;
	state = 193;
	nextstate = 194;
	question = "_You're a farmer?_";
	text1 = "_I farm good! I farm for Groth. Groth gone._";

begintalknode;
	state = 194;
	nextstate = -1;
	question = "_Where did Groth go?_";
	text1 = "_He kill bad human, not good as you! He help us grow things. I sad he gone._ His head drops sadly. He wanders off.";
	action = END_TALK;

// Toth-Thsss

begintalknode;
	tag = 170;
	state = -1;
	nextstate = 217;
	question = "Toth-Thsss";
	text1 = "This mighty slith paces the town, keeping a watchful eye on everything. He's huge, and he keeps his mighty steel spear handy at all times.";
	text2 = "When he sees that an outsider has come to Gnass, he sniffs and looks you over. _Welcome to my village, soldier. I am Toth-Thsss. I watch Gnass._";
	text5 = "Toth-Thsss says, _What else do you want to know, soldier?_ He is watching you closely as he patrols Gnass. He must have a deep (and understandable) distrust of strangers.";
	action = INTRO;

begintalknode;
	state = 217;
	nextstate = 218;
	question = "_What is your role here in Gnass?_";
	text1 = "_I am chief. I take the responsibility for these people._";

begintalknode;
	state = 218;
	nextstate = -1;
	question = "_So you lead here._";
	text1 = "_In a way. We sliths have chiefsss, who tell the people what to do, then they decide whether or not to do it. Much like what you humansss have._";

begintalknode;
	state = 217;
	nextstate = 219;
	question = "_How do your people fare?_";
	text1 = "_The Empire wishes to slay usss. The Avernitesss wish to fight with usss. And my tribe has their own wishesss._";

begintalknode;
	state = 219;
	nextstate = -1;
	question = "_What has the Empire done?_";
	text1 = "_They kill usss by the hundredsss. Many, many of usss come here for help and to fight, and we do our best._";

begintalknode;
	state = 219;
	nextstate = -1;
	question = "_How is your relationship with the Avernites?_";
	text1 = "_Once, we fought you. Now, we are becoming fast friends, united in hating the Empire. It is a strange world indeed._";

begintalknode;
	state = 219;
	nextstate = 220;
	question = "_What do your people wish for?_";
	text1 = "_Our priest wishes to recover a holy charm our people brought with us when we fled our ancestral home. He is Pathass. You should ask him of it._";
	text3 = "_I heard you recovered our holy charm, our last treasure from our ancestral home. I thank you._";
	action = DEP_ON_SDF 55 15 1;

begintalknode;
	state = 220;
	nextstate = -1;
	question = "_Where was your ancestral home?_";
	text1 = "_We sliths came to these caves many years ago. We were thrown from our people, our home nation, now lost to us forever, because our clan was too violent._";
	text2 = "_Now, some of usss are not that way anymore, but we are banished forever from our home. We know not how to go there, even if that is what we were trying._";

begintalknode;
	state = 217;
	nextstate = 221;
	condition = species_in_party(3);
	question = "_Do you get many visitors here?_";
	text1 = "_No, though it is good to see a visitor slith. It is good to see slithsss wandering the land, making thingsss better for our home._";

begintalknode;
	state = 221;
	nextstate = -1;
	condition = species_in_party(3) == 0;
	question = "_How do you feel about the humans?_";
	text1 = "_I will work with them. respect them. But there is no affection between usss, and may never be. The anger over the recent war between them and usss runs deep in all._";

