// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(79,0) == 0;
	question = "special";
	text1 = "As you explore the Eastern Gallery, you start to notice certain, unnerving signs. Scratches on the rocky floor. Bits of shed chitin. Gnaw marks on the trees.";
	text2 = "You are entering lands infested with chitrachs. These huge, vicious insects are a plague upon Avernum. They are quick to anger. They eat flesh. And they swarm.";
	text3 = "Normally, soldiers are able to keep their numbers in the Eastern Gallery under control. Alas, in times of crisis, they are needed elsewhere, and the chitrachs breed. Enthusiastically.";
	action = SET_SDF 79 0 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(79,1) == 0;
	question = "special";
	text1 = "Interesting. There is a stone building out in the middle of this lake. Nobody has been out here for a while, giving the goblins a chance to move in. A nearby cave wall bears the sun symbol of Avernum.";
	action = SET_SDF 79 1 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(79,2) == 0;
	question = "special";
	text1 = "A recent cavequake has collapsed the ceiling ahead. If you want to find out what is hidden here, you will have to find another way in.";
	action = SET_SDF 79 2 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(79,3) == 0;
	question = "special";
	text1 = "You enter a small foundry, hidden in the tunnels under the Eastern Gallery. This is very odd. The production of steel usually happens in an open area, to keep from accidentally killing the workers.";
	text2 = "This foundry is unusual. It is small, hidden, and seems to utilize magic instead of mundane heat to draw forth the iron from the ore.";
	text3 = "Alas, some monstrous creatures were able to break in and surprise the workers. You can see them in the shadows, resting along the north wall. They are hideous, insectoid beasts with long, vicious, chitinous claws.";
	text4 = "Happily, they have not yet detected you.";
	action = SET_SDF 79 3 1;
	code =
		sf(79,2,1);
	break;
	
begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";




//

begintalknode 10; // get steel
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The vat is empty.";
	text2 = "The vat contains several small, slightly lumpy ingots of steel. Curious. If you look carefully, you can see that they glow slightly.";
	text3 = "It is as if they have been infused with bits of crystal or something else containing raw magical power. Interesting. You take them.";
	code =
		if (gf(79,9) == 0) {
			rs(1);
			set_spec_item(45,1);
			sf(79,9,1);
			}
			else {
				rs(2); rs(3);
				}
	break;

begintalknode 11;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  WARNING. TRAPS. KEEP OUT.";

begintalknode 12;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You hear a hissing and clicking, coming from all around you. The nearby piles of scree start to shift around on their own.";
	text2 = "And then chitrachs erupt out of the piles of stone. You have stumbled into an ambush!";
	text3 = "And then your chitrach-shaped brooch glows slightly. The strange sounds stop. Everything is still again.";
	code =
		if (has_spec_item(13) == 0)
			rs(3);
			else rs(2);
	break;

begintalknode 13;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You suddenly hear hissing and clicking, coming from all around you. This is followed by the sounds of long, chitinous legs scrabbling over rock surfaces.";
	text2 = "A swarm of chitrachs has detected you walking through their breeding cave. They are annoyed.";
	text3 = "You look down at your chitrach amulet. It is glowing very slightly. It flickers and then becomes dark. It must not have enough power to protect you.";
	code =
		if (has_spec_item(13) == 0)
			rs(3);
	break;
	

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

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

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

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 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 295;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "Sage Asterios's elaborate network of casks works exactly as intended. The flame reaches the final cache of firedust. A massive series of explosions shakes Cotra.";
	text2 = "Fire shoots up through cracks in the floor. Sections of the cave floor glow red and melt. The shockwave alone is enough to shatter your bones.";
	text3 = "And then, one by one, the walls of Cotra collapse. Soon, there is nothing left of them but long stacks of rubble.";
	text4 = "The city of Cotra, survivor of many wars, is gone forever. Only wreckage marks its passing.";
	
	
////

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