// TOWN DIALOGUE SCRIPT
//    Town 5: Neoss

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;
int i,j,k,choice;


//*** Danoss ***

begintalknode 1;
	state = -1;
	personality = 50;
	nextstate = 1;
	condition = 1;
	question = "Danoss";
	text1 = "This slith looks much like an Avernite, with one difference: his scales are tinged blue! You've never seen such a thing. He also wears a necklace with an ankh on it.";
	text2 = "This cave is cold, colder than most slith villages, so he warms himself by the fire, occasionally feeding it one of the logs from the west. He looks at you uneasily, as does everyone around, waiting for your first move.";
	text5 = "_Yes? What else?_ he asks.";
	action = INTRO;

begintalknode 2;
	state = 1;
	personality = 50;
	nextstate = 1;
	condition = 1;
	question = "Who are you?";
	text1 = "_My name is Danoss. Our town is called Neoss. We are refugees from Nakhtha, southwest down the river._";
	text2 = "He looks at you uneasily, hesitant to continue. _We are a peaceful group. Please, we mean no harm._";
	text3 = "He continues, _Nakhtha was invaded by bandits a few years ago, and we have been living here ever since. We hide from the monsters, who are not good enough swimmers to find us here, but we five cannot survive here for long. Please help us._";
	code =
	if (get_flag(5,2))
		remove_string(2);
	else
		remove_string(3);
break;

begintalknode 3;
	state = 1;
	personality = 50;
	nextstate = -1;
	condition = get_flag(5,2) == 0;
	question = "Evil sliths, defend yourselves! (Attack.)";
	text1 = "They draw their weapons.";
	code =
	make_town_hostile();
	end();
break;

begintalknode 4;
	state = 1;
	personality = 50;
	nextstate = 1;
	condition = get_flag(5,2) == 0;
	question = "Don't worry. I'm not going to hurt you.";
	text1 = "Everyone in the village breathes a sigh of relief. _That is good,_ the slith replies in the ancient slith language you have learned. _With the barbarians around, we do not know what to expect. What do you wish to speak about?_";
	action = SET_SDF 5 2 1;

begintalknode 5;
	state = 1;
	personality = 50;
	nextstate = 2;
	condition = get_flag(5,2) == 1;
	question = "How can I help you?";
	text1 = "_Most of the residents of Nakhtha fled south to the nearby city of Thassaka. We were unable to, owing to the terrible luck of being in the wrong place at the wrong time._";
	text2 = "He continues, _The attack came while we were fishing on the lake, and when we returned, the whole area was crawling with barbarians. We could not pass._";
	text3 = "He looks directly at you. _Clear the way to Thassaka. If you eliminate the monsters and barbarians in our way, we may yet survive._";
	code =
	toggle_quest(1,1);
	set_flag(5,3,1);
break;

begintalknode 6;
	state = 2;
	personality = 50;
	nextstate = 1;
	condition = 1;
	question = "Can you give me anything to help me clear the path?";
	text1 = "He thinks for a moment. _We have no weapons that we can spare, but I can teach you a powerful spell. It's called 'Inferno.' It will hurt the cold-loving cryoas very badly._ (He teaches you the spell.)";
	text2 = "_Aside from the spell Inferno, there is little help I can give._";
	code =
	if (get_flag(5,4) == 0) {
		set_flag(5,4,1);
		set_flag(292,17,1); // give L1 Inferno
		set_flag(292,0,1); // awaken spellbook capacity
		remove_string(2);
		}
	else
		remove_string(1);
break;

begintalknode 7;
	state = 1;
	personality = 50;
	nextstate = 1;
	condition = get_flag(5,2) == 1;
	question = "I stopped some barbarians from defiling corpses to the north.";
	text1 = "_Yes, I know,_ he says. _Thank you very much for your work. I have little with which I can reward you, but I can teach you a powerful spell that you may find useful._ He teaches you the spell Filth.";
	text2 = "_Yes. Thank you again for that._";
	code =
	if (get_flag(5,5) == 0) {
		set_flag(5,5,1);
		set_flag(292,3,1); // give L1 Filth
		set_flag(292,0,1); // awaken spellbook capacity
		remove_string(2);
		}
	else
		remove_string(1);
break;

begintalknode 8;
	state = 1;
	personality = 50;
	nextstate = 1;
	condition = get_flag(5,2) == 1;
	question = "Tell me about the barbarians and the attack.";
	text1 = "He sighs. _I know little. When I was young, the elders said that long ago there were no barbarians, but for as long as I can remember, those beasts have been on our borders, pressing ever closer to our town._";
	text2 = "He continues, _They had grown more bold in the past few years, even attacking Nakhtha itself on one occasion. But this time they came in full force. None of us were there or saw what happened, but when we returned, barbarians walked the city walls._";
	text3 = "His voice wavers for a moment. _Where could we go? What could we do? We could not pass to get to Thassaka. We had lost contact with towns to the north many decades ago, so we could not reach Vasskolis. We fled here and have stayed ever since._";
	text4 = "He sighs again. _Since then we have held on as best we can, fighting against the inevitable._";

begintalknode 9;
	state = 1;
	personality = 50;
	nextstate = 2;
	condition = get_flag(5,2) == 1;
	question = "What is near here?";
	text1 = "_Nothing good,_ Danoss replies darkly. _The city southwest of here, Nakhtha, was sacked and taken over by barbarians. All around are monsters, cold-breathing cryoas. Your only hope of safe territory is to head south to Thassaka._";
	text2 = "He continues, _Thassaka is a beacon of hope in the onrushing darkness. There they remember the name of the Empire of Khalthas. If you can reach that, you're safe. But other than Thassaka, there is no shelter anywhere near here_";
	text3 = "_That is,_ he adds with a laugh, _unless you can reach Vasskolis._";

begintalknode 10;
	state = 2;
	personality = 50;
	nextstate = 1;
	condition = 1;
	question = "I come from Vasskolis.";
	text1 = "_Truly? Then the city lives?_ He stares at you as you tell him the story. _Exiles? The followers of Thsss have returned at last? By all the gods, we have lived to see strange times indeed._";

begintalknode 11;
	state = 2;
	personality = 50;
	nextstate = 1;
	condition = 1;
	question = "The Empire of Khalthas?";
	text1 = "_Yes. Where have you been? This was all once part of the great empire, before the collapse. Khalthas was one of our ancestors._ He sees that you don't know what he's talking about.";
	text2 = "_The history of the empire is far too long to tell now. It is enough that it wasn't always this way. Once the peace spread all through these caves, to Vasskolis and beyond. There were no barbarians, no threats to our lives._";
	text3 = "He continues, _But then, several generations ago, the barbarians came. They plagued the entire northern empire, until we could no longer send messengers south to the capital. Since then, we have been on our own in these dark times._";

// *** Pokhess ***

begintalknode 15;
	state = -1;
	personality = 51;
	nextstate = 5;
	condition = 1;
	question = "Pokhess";
	text1 = "This slith is pacing near two tall, blue objects. She looks at them and then looks down again, thinking. She doesn't seem to notice you.";
	text5 = "Pokhess keeps pacing.";
	action = INTRO;

begintalknode 16;
	state = 5;
	personality = 51;
	nextstate = 5;
	condition = 1;
	question = "What are you thinking about?";
	text1 = "She looks up at you. _These blue crystal pillars,_ she replies. _They are strange. There were many of them in this cave before we came, but we had to get rid of a number of them in order to make room for our crops and our houses._";
	text2 = "She pauses. _I wonder if that wasn't a mistake. I don't know what they are, but sometimes I think I can feel them watching me, as if something were inside, staring out._ She shivers. _They are very strange._";

// *** Voness ***

begintalknode 20;
	state = -1;
	personality = 52;
	nextstate = 10;
	condition = 1;
	question = "Voness";
	text1 = "This slith is sitting in front of a beautiful painting with a small piece of parchment in her lap and a couple of paintbrushes nearby. Every now and then she makes a new mark on the parchment.";
	text2 = "She looks up at you as you approach. _Greetings,_ she says.";
	text5 = "Voness looks up at her painting and then down at her small drawing, making a new line.";
	action = INTRO;

begintalknode 21;
	state = 10;
	personality = 52;
	nextstate = 11;
	condition = 1;
	question = "What are you doing?";
	text1 = "_Making a new painting,_ she replies. _I like to paint. It takes my mind off the impending doom._";

begintalknode 22;
	state = 11;
	personality = 52;
	nextstate = -1;
	condition = 1;
	question = "What doom?";
	text1 = "She looks up at you. _Look around. Monsters everywhere. Barbarians. Civilization ending. Doom._ She doesn't seem inclined to talk.";

// *** Fakhth ***

begintalknode 30;
	state = -1;
	personality = 53;
	nextstate = 20;
	condition = 1;
	question = "Fakhth";
	text1 = "This slith stands, warming his claws at the fire. He looks bigger and stronger than most sliths, and he carries a two-tined spear with him. He must be a warrior.";
	text5 = "Fakhth stands still near the fire, keeping warm.";
	action = INTRO;

begintalknode 31;
	state = 20;
	personality = 53;
	nextstate = 20;
	condition = 1;
	question = "What are you doing?";
	text1 = "_Keeping warm in this terrible climate,_ he replies. _Cold is harsh on us, as you know, and this cave is horribly cold. I have to heat up a little before I go out fishing on the lake again._";
	text2 = "_Keeping warm in this terrible climate,_ he replies. _Cold is harsh on sliths, not how it is for you warm-bloods, and this cave is horribly cold. I have to heat up a little before I go out fishing on the lake again._";
	code =
	if (species_in_party(3) == 1)
		remove_string(1);
	else
		remove_string(2);
break;

// *** Thenekh ***

begintalknode 40;
	state = -1;
	personality = 54;
	nextstate = 30;
	condition = 1;
	question = "Thenekh";
	text1 = "This slith appears to be tending the lizards. Even now, he doesn't look as though he wants to talk to you, so you back away.";

// *** All sliths before you say that you won't harm them ***

begintalknode 199;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "Slith";
	text1 = "This slith looks at you uncomfortably and avoids conversation. It won't talk with you.";