// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(164,4) == 0;
	question = "special";
	text1 = "The region to the southwest is a hellish expanse of basalt and steaming fumaroles. It's miserably hot. Since the earliest days of Avernum, nobody has tried to settle here. Nobody sane, anyway.";
	text2 = "This region is very useful. The heat radiating out from here makes life in the Great Cave and around the Tower Colony tolerable. Being this close, on the other hand, stinks.";
	text3 = "You can see that a wide variety of unpleasant, heat-loving creatures have taken up residence here. You can see them wandering and flying around. Among the bones of their victims.";
	action = SET_SDF 164 4 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(164,5) == 0;
	question = "special";
	text1 = "You have found a ruined ... something. Someone built a little complex out here, using a strange greenish stone you haven't seen before. The architectural style is very strange, all rounded and covered with odd symbols.";
	text2 = "It looks like it has been abandoned for years, left to be slowly crumbled by the occasional cavequakes. And yet, it's not entirely empty. In the mold on the floor, you see some faint tracks. Bootprints.";
	action = SET_SDF 164 5 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(164,6) == 0;
	question = "special";
	text1 = "Being in the huge cavern outside was miserable. Down here is, amazingly, even worse.";
	text2 = "The searing, sulfurous air makes your lungs ache with every breath. The constantly vibrating ground and the roar of the fumaroles keep you constantly on the edge of panic. The vents look like they could erupt at any moment.";
	text3 = "And yet, someone is hiding down here. As you pass the cliff to the right, someone shouts something to you. You didn't hear him, so you shout that he should repeat himself.";
	text4 = "The dim figure, barely visible through the haze, says, _So, Erlanger has to send assassins? Now I know he is too weak to serve Almaria! It is all right. Come much farther, and the volcano will do Novice Ximun's work for him!_";
	text5 = "Before you can respond, he retreats to the east. Novice Ximun must have known someone would come for him.";
	text6 = "Before you can say that you have no idea what he's talking about, he retreats to the east.";
	action = SET_SDF 164 6 1;
	code =
		if (gf(149,29) == 0)
			rs(5);
			else rs(6);
	break;
	
begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(164,7) == 0;
	question = "special";
	text1 = "You pass an old, crumbling statue. It looks like it was of a vahnatai. Those alien creatures must have resided here once.";
	text2 = "As you walk on, you hear a loud rumbling behind you. One of the fumaroles has come to life, erupting and filling the passage with searing steam. Fortunately, you are just far enough away to avoid harm.";
	text3 = "However, the sound has attracted something to the south ...";
	action = SET_SDF 164 7 1;
	code =
		activate_hidden_group(43);
		sf(164,20,2);
		set_boss_level(17746,1);
		set_name(17746,"Putrescent Imp");
		set_new_abil(17746,11);
		set_coloradj(17746,4);
	break;
	
begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = get_sdf(164,8) == 0;
	question = "special";
	text1 = "You hear Novice Ximun again, shouting from the tunnel ahead. _Erlanger is a fool! I have pets too! See what I am capable of bending to my will!_ Then you hear gibbering and hissing, as something runs down the tunnel toward you.";
	text2 = "And, in a display of remarkably unfortunate timing, the fumarole behind you begins to hiss.";
	action = SET_SDF 164 8 1;
	code =
		activate_hidden_group(44);
		sf(164,22,2);

		set_name(17747,"Frenzied Imp");
		change_max_health(17747,40);
		alert_char(17747);
		set_name(17748,"Frenzied Imp");
		change_max_health(17748,40);
		alert_char(17748);
		set_name(17749,"Frenzied Imp");
		change_max_health(17749,40);
		alert_char(17749);
		set_name(17750,"Frenzied Imp");
		change_max_health(17750,40);
		alert_char(17750);
		set_name(17751,"Frenzied Imp");
		change_max_health(17751,40);
		alert_char(17751);
		set_name(17752,"Frenzied Imp");
		change_max_health(17752,40);
		alert_char(17752);
	break;

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = get_sdf(164,9) == 0;
	question = "special";
	text1 = "You cross the narrow bridge, being careful to not slip, fall, and face an inevitably fatal roasting. The cavequake that strikes when you are halfway across doesn't help.";
	text2 = "Nor does Novice Ximun's taunting. _You stumble into my trap once again, assassin! See how capable I am! How worthy of promotion!_ Figures begin to slowly form on the runes ahead.";
	text3 = "As they appear, you find that the cavequake shook something loose in the fumaroles behind you. They begin to hiss ...";
	action = SET_SDF 164 9 1;
	code =
		activate_hidden_group(45);
		sf(164,23,2);
	break;

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = get_sdf(164,10) == 0;
	question = "special";
	text1 = "You find, left behind for many years, the crumbling remains of vahnatai magic. There was a crystal pillar here. You have no idea what it was used for. It is covered with cracks, many left by rocks falling from the ceiling above.";
	text2 = "Only the faintest glow remains within the stone. You peer deeply into it and see nothing.";
	text3 = "Oh well. Some of the chunks of crystal the cavequakes knocked loose look quite lovely.";
	action = SET_SDF 164 10 1;

begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The novices are sworn to an oath of silence, but their sweaty, trembling, and terrified expressions tell you all you need to know about their state of mind.";

begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  BEWARE!";
	text3 = "  Infested land!";
	text4 = "  No food!";
	text5 = "  Keep out!";
//

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "At last, you have cornered Novice Ximun. As you face him, there is a fresh cavequake. The steam and sulfur that fill the air provide a nice, dramatic backdrop to your confrontation.";
	text2 = "The priest is young, and you can see the outline of plate armor under his robes. He holds a large blade in his hands with great confidence. The heat doesn't even make him sweat.";
	text3 = "The three acolytes behind him don't seem near as calm. In fact, they seem completely terrified, and perspiration soaks their robes.";
	text4 = "Ximun says, _So you think you have cornered me. You think we will be defeated. But, when we best you in honorable battle, Erlanger will see that he will have to face us himself. Then the old fossil will surely flee!_";
	text5 = "Novice Ximun says, _Oh. You're back. If you don't plan to fight us, please let us be so we can meditate and prepare. A full abbot, even a decrepit one, is not removed without the greatest of preparation._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "What on earth are you doing here?";
	text1 = "_We are engaged in a simple matter of church politics. Which, in the Church of the Prevailing Righteousness, tends to be very ... involved._";

begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = gf(149,29) != 1;
	question = "I really have no idea what you're talking about. I just want out of here.";
	text1 = "_What? You mean you weren't sent by ... Oh. My apologies. You sort of stepped into a matter of church politics. Just wait here. The fumaroles will die down soon enough._";
	text2 = "You sit and chat with Ximun for a while. Seems a nice, sincere fellow. A little crazed, but competent. When the volcanic activity calms down, you leave.";
	action = END_TALK;
	code =
		sf(164,20,1);
		sf(164,21,1);
		sf(164,22,1);
		sf(164,23,1);
		sf(164,24,1);
	break;
		
begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Enough prattling, madman. Defend yourself. (Attack.)";
	text1 = "_Yes! Honorable battle, at last! Now Erlanger will see that I am worthy of his post!_ He attacks. The unhappy acolytes, afraid they have no other choice, join him.";
	action = END_TALK;
	code =
		set_attitude(30047,10);
	break;
	
begintalknode 14;
	state = 10;
	nextstate = 11;
	condition = gf(149,29) == 1;
	question = "Yes, I was sent here by Erlanger.";
	text1 = "Novice Ximun nods, thrilled. The acolytes behind him don't share his enthusiasm. _I am sorry to hear it. It means that you must die._";
	text2 = "_But, when you are gone and news that his assassins failed spreads, Erlanger will be forced to step down out of shame. That is the way of things in our sect. Anything else to say before we join in honorable and dramatic battle?_";
	code =
		set_attitude(30047,10);
	break;

begintalknode 15;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "You need those flunkies behind you to help you? Battle me alone!";
	text1 = "He thinks about it. _Yes, that would be fair. I will give them the choice. We shall see how loyal they are. Those who do not wish to support me in our quest may depart without dishonor!_";
	text2 = "The acolytes, who, when they decided to support Ximun, didn't realize that it would involve spending weeks in these hellish pits, waste no time fleeing out into the tunnels.";
	text3 = "Ximun tries not to let his disappointment show. _Fine. I do not need the support of those striplings to deal with you._";
	code =
		erase_char(17758);
		erase_char(17759);
		erase_char(17760);
	break;

begintalknode 16;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Actually, I would like to aid you.";
	text1 = "_What? A challenger enlisting outside assassins? It is unheard of! An established abbot, old and honored, may do such a thing, but a young, healthy challenger? You mock me!_";

begintalknode 17;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Why don't you just go somewhere else and start a new church? The Abyss or something?";
	text1 = "_Because it is important to first make sure the established churches have strong, sure leadership. And, believe me, Erlanger is not what we need in this time of war._";

begintalknode 18;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "All right. Let's fight then.";
	text1 = "_At last! I can strike the first blow in my glorious campaign!_";
	action = END_TALK;


//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "Novice Ximun falls to one knee, gasping and spitting blood. _No ... No ... I ... I thought I was stronger. I thought I could deal with anything. But I was tested, and I was weak._";
	text2 = "He shakes his head. _And, if I cannot defeat you, how can I unseat ... No. I was wrong. I see that now. And there is only one thing to do._";
	text3 = "He looks up at you. _You have bested me. I yield. I will go ... elsewhere._";

begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "Too late. Die! (Keep fighting.)";
	text1 = "_What? You refuse an honorable surrender? What sort of monsters are Erlanger enlisting?_ He rises unsteadily to his feet. _Well, I have strength in me yet. My honorable quest will not end in cowardice!_";
	action = END_TALK;

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "All right. I'll let you go.";
	text1 = "Novice Ximun bows deeply to you. Then he tends to his wounds. As he does, he says, _Now I will go elsewhere. I will spread our faith. I will not show my face again until I have regained my honor._";
	text2 = "_Perhaps ... Perhaps the Abyss. Yes. I will go there. I will show those ruffians the face of honor._ He waits until the fumaroles behind you have died down. And then you are alone in the cavern.";
	action = END_TALK;
	code =
		award_party_xp(150,15);
		sf(164,2,1);
		sf(164,20,1);
		sf(164,21,1);
		sf(164,22,1);
		sf(164,23,1);
		sf(164,24,1);
		erase_char(30047);
	break;

//


begintalknode 50;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There is a hideous, demonic creature hiding in this alcove. It is smaller and less muscular than most of its kind, but there is something about its face, its ghoulish, grinning face, that instantly fills you with fear.";
	text2 = "It is squatting among the dry old bones, playing with them. There is something about the skulls and femurs that it finds extremely amusing. It looks up at you and lets out a long, shrill cackle. The sound sends shudders up your spine.";
	text3 = "And then it considers whether to advance upon you. The bone collection is so amusing that it is determined to add to it.";

begintalknode 51;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Once again, you catch up with the cackling demon. Its unearthly demonic constitution has enabled it to recover from its wounds. It now finds you, if anything more amusing than before.";
	text2 = "The air around the demon begins to grow even hotter. It very quickly ramps up from painful to agonizing.";


begintalknode 52;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The demon has now received several grievous wounds. Instead of being angry, however, it only laughs harder.";
	text2 = "And then it dissolves into a thick, gray cloud of sulfurous smoke. As you watch, the gas coasts out of the cave and across the basalt to the north.";


begintalknode 53;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Once again, you have beaten down the cackling demon. And, once again it laughs. Even harder now, bent over helpless with gales of mirth. You swing at the horror, trying to take advantage of its distraction.";
	text2 = "And, before your blow can connect, it disappears. Once again, it forms a sickly cloud of vapor, which floats over the water to the north.";


begintalknode 54;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "";



////

begintalknode 299;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		