// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(45,0) == 0;
	question = "special";
	text1 = "You are approaching an enormous keep, burrowed into the south wall of the cavern.";
	text2 = "There must have been a fortress here for a while, until Melanchion arrived. Then, through brute force and raw magical power, the dragon ripped the place apart and put it back together again.";
	text3 = "A series of black stone spires, tapered at the top like enormous fangs, lines the road to the dragon's citadel. Farther in is a massive stone wall. It is dotted with steel gates, lined with spikes and large enough for a dragon.";
	text4 = "As a display of raw, intimidating power, Melanchion could have done worse.";
	action = SET_SDF 45 0 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(45,1) == 0;
	question = "special";
	text1 = "There is a deep chasm not far from the fortress of Melanchion. It is surrounded by scree and rubble, and drafts of hot, sulfurous air constantly rise from it.";
	text2 = "You also hear creatures. The screeches of mindless, inhuman, hungry creatures constantly echo up to you. Like so much of Avernum, this chasm has earned its own infestation.";
	action = SET_SDF 45 1 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(45,2) == 0 && has_spec_item(5) > 0;
	question = "special";
	text1 = "When you approach the gates, they remain closed. Nobody is here to greet you. Nobody peers out from within.";
	text2 = "At a loss for what else to do, you take out the withered scale and raise it before you.";
	text3 = "Moments later, you hear a creaking, groaning sound. And, slowly, the gates begin to open.";
	text4 = "The dragon awaits.";
	action = SET_SDF 45 2 1;
	code =
		sf(45,6,1);
	break;
	
begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(45,3) == 0;
	question = "special";
	text1 = "The sounds of howling and screeching grow louder. Then they are joined by the even less reassuring sounds of claws scrabbling up rock walls.";
	text2 = "And then creatures climb over the ledges behind and ahead of you, determined to add your bones to the piles already here.";
	action = SET_SDF 45 3 1;
	code =
		activate_hidden_group(1);
		add_range_to_group(4860,4865,1);
		set_level(30001,28);
		set_attack_bonus(30001,10);
	break;
	
begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = get_sdf(45,4) == 0;
	question = "special";
	text1 = "When you get close to this pit, you find that the crude stone steps soon end in a sheer drop. If you slid down this tunnel, you wouldn't be able to climb back up. And you might well end up in a pool of lava.";
	text2 = "The air rising from the tunnel is very hot, and the sulfur scent is mixed with the reek of rotting flesh. Something very nasty is down there.";
	action = SET_SDF 45 4 1;



//

begintalknode 10;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Melanchion has created a variety of magical constructs. Some aid in construction. Others are here to defend the gates. They don't react to your approach. Maybe they can sense the presence of the scale.";

begintalknode 11;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Melanchion has left some human worshippers, all mindlessly loyal, to keep imps, wild beasts, and pests away from the gate. They have no interest in talking to outsiders.";
	text2 = "They wordlessly point at the gates to the south. Then they return to watching for prey and sharpening their blades.";
	
begintalknode 12;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You slide down the hole, thud onto the stone floor, and find yourself in a little slice of the infernal realms. It is a basalt cave, all jagged points of rock, surrounded by a pool of bubbling magma.";
	text2 = "The lava rings the outside of the room, and the basalt floor slopes upward from the edges to the center. There is a demon standing at the highest point.";
	text3 = "He is a massive creature. Twelve feet tall, all scales, teeth, claws, and muscle. He looks down at you and smiles.";

begintalknode 13;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The demon lets out a long, bellowing laugh. _What treat is this? What gift has been brought to the lair of Zahur Firecaller?_";
	text2 = "He peers closer. _Why, it is a tender little morsel! Are you another sacrifice, sent by Melanchion to feed me? It does not matter. You will be food and treasure, all in one lovely bundle._";
	text3 = "He points a claw at you. He is surrounded by a faint nimbus of blue energy.";

begintalknode 14;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Zahur Firecaller stops attacking for a moment. _Hrmmm. This contest is dull. And unappetizing. You will not be a delicious treat for me. And why? Because, unlike others of my realm, I do not like my meat raw._";
	text2 = "He makes a strange waving motion with his arms. He clenches his clawed hands into fists. The ground rumbles under your feet.";
	text3 = "And then, slowly, the lava starts to rise. Little by little, it creeps in from the edges of the chamber. Now you see why the demon stands at the highest point.";

begintalknode 15;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Zahur Firecaller looks down at his chest and notes with displeasure that a large chunk of it is gone, blasted away by your attack. Its body begins to fail. Chunks of it disappear in thick, greasy smoke.";
	text2 = "_Curse you, Melanchion. And curse ..._ It is unable to finish that sentence, as its head just dissolved.";
	text3 = "The ground rumbles again. The lava stops rising. A little bit of it oozes away, clearing a path out of this deathtrap.";

begintalknode 16;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Zahur Firecaller lets out a challenging roar. In moments, he is surrounded by several allies, called from the infernal realms.";
	text2 = "Each is surrounded by a cloud of motes of light, providing a powerful shield against your attacks.";

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

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

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

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

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

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

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

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

//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

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

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

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

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

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

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

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

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

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

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

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

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

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

begintalknode 44;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

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

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

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

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

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

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

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

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

////

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