// TOWN DIALOGUE SCRIPT
//    Town 106: Camp Samuels

begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode;
	tag = 1;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "A pack of raw recruits have been crammed into these barracks, women to the north and men to the south. Their training has left them too exhausted to do anything in their limited rest time but lie around and groan.";
	text2 = "And yet, when they see that it's you, they come to life. They gather around and ask for tales of your adventures and tips for survival. You reassure and advise them for a while. Then you leave them to rest.";


// Ray

begintalknode;
	tag = 10;
	state = -1;
	nextstate = 1;
	question = "Ray";
	text1 = "You meet a man with harsh features and long black hair. He is sharpening a broadsword with an oiled stone. Sparks fly from the blade as he runs his stone down it.";
	text2 = "He nods in greeting. _My name's Ray._";
	text5 = "Ray runs the sharpening stone down the blade with long, sure strokes. The steel broadsword is a quality piece of work.";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_Are you a recruit?_";
	text1 = "_Bite your tongue. I'm the smith here. They wanted someone making weapons near the Castle, someone really good, so they brought me from Dharmon. I can work steel._";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_A steelsmith is hard to find?_";
	text1 = "_It's hard to work the stuff down here. Takes a lot of fuel to generate that much heat. I'm one of the few that has the skill and equipment to do it. It helps to know some magic._";
	
begintalknode;
	state = 3;
	nextstate = -1;
	condition = 1;
	question = "_Can't you make the heat with magic?_";
	text1 = "_That's what we usually have to do, but that's the problem. Mages aren't common down here, are they?_";

begintalknode;
	state = 3;
	nextstate = -1;
	question = "_What sort of magic can you do?_";
	text1 = "He mutters a few words, and the steel of the blade begins to glow red hot. He starts to run the stone down it again. _I can make a weapon sharper than any you've seen. If you want to buy a truly fine blade, let me know._";

begintalknode;
	state = 1;
	nextstate = -1;
	question = "_I would like to purchase such a weapon._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Fine Weapons","Ray is a blacksmith from Dharmon, makers of the finest steel arms and armor in Avernum.",65,6,3);
	break;

begintalknode;
	state = 4;
	nextstate = -1;
	question = "_You would sell us blade? Doesn't the government take them all?_";
	text1 = "_I know of you. I know what you did in the vahnatai lands, what you're doing for Avernum. I see great things in you. I want to help._";
	
begintalknode;
	state = 1;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_All right._";
	action = END_TALK;
	
// Foulk

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 28;
	question = "Foulk";
	text1 = "This young, red haired man has long, nimble fingers. He's sitting at the table bending wire. He seems to be making a lockpick of some sort. He nods to you when you enter.";
	text2 = "_I'm Foulk._ There's lots of tools scattered around his half of the building.";
	text5 = "Foulk carefully works the length of wire with his fingertips. He shapes a piece into a long, elegant spiral, cuts it off the spiral with a stone knife, and begins to work on the next piece.";
	action = INTRO;

begintalknode;
	state = 28;
	nextstate = -1;
	question = "_You have lots of equipment here._";
	text1 = "_Of course. When you shop from me, you can also sell me your supplies._";

begintalknode;
	state = 28;
	nextstate = 29;
	question = "_What sort of work do you do?_";
	text1 = "_Well, they need tools around here. Need 'em for training, need 'em at the castle, need 'em everywhere. So they brought in a toolmaker._";

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_What sorts of tools can you make?_";
	text1 = "_They brought me in to make tools. You know. Hammers and shovels, stuff like that. Set me up here, near enough to the Castle to be useful._ He holds up a lockpick. _Beautiful pick, isn't it?_";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_That's one nice lockpick._";
	text1 = "_I often complained how hard it was to get fine locksmithing tools down here. So I started making 'em._ He leans close. _Look, I'll make a deal with you._";

begintalknode;
	state = 31;
	nextstate = 28;
	question = "_Ok, what sort of deal?_";
	text1 = "_Most of my tools are boring. Cutting knives, hammers, screwdrivers, intricate things. I can't sell those. The army needs 'em too much. But some of my tools are works of art, and there isn't too much call for 'em._";
	text2 = "_So if you want to buy some, you can._";

begintalknode;
	state = 28;
	nextstate = -1;
	question = "_Can I purchase anything from you?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Foulk's Tools","Foulk is capable of making an unusually broad range of tools. Some of them are enchanted.",66,4,3);
	break;
	
begintalknode;
	state = 28;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 28;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_I am glad to hear it. Good day._";
	action = END_TALK;
	
// Lt. Krizsan

begintalknode;
	tag = 50;
	state = -1;
	nextstate = 55;
	question = "Lt. Krizsan";
	text1 = "You meet a small, sturdily-built woman, well-armed and radiantly attractive. She takes off her helm to greet you, revealing a pleasant smile and short hair.";
	text2 = "_I'm Commander Mariann, of the Krizsan clan. I see you're still alive. What brings you back to Camp Samuels?_";
	text5 = "Commander Krizsan wipes sweat off her brow with her sleeve. _Nice to hear you made something of yourself. What else do you want to know?_";
	action = INTRO;

begintalknode;
	state = 55;
	nextstate = -1;
	condition = 1;
	question = "_You remember me?_";
	text1 = "_I remember everyone who passed through these gates._";

begintalknode;
	state = 55;
	nextstate = 56;
	question = "_I just returned to look around._";
	text1 = "_Very well. Nothing has changed. I still head the training here at the camp. If anyone has questions or problems, I deal with them._";

begintalknode;
	state = 56;
	nextstate = 57;
	question = "_Has the training changed?_";
	text1 = "_Not a bit. I still take the kids who're ready to fight for their home and put them through the paces. Punish them, in other words._";

begintalknode;
	state = 57;
	nextstate = 58;
	question = "_What kind of 'punishment' do they go through?_";
	text1 = "She grins evilly. _Oh, you know! Weapons drills from sleep to sleep, not enough food, runs through the tunnels, the obstacle course. They're lying down now, recovering from the last forced march. Castle and back, with rocks on their backs._";
	text2 = "_No comfy beds. 'Beds are for the infirm!' That's what my grandpa used to say. Between you and me, I pity 'em. But I admire 'em too._";

begintalknode;
	state = 58;
	nextstate = 59;
	question = "_Why do you admire your recruits?_";
	text1 = "_The Empire knows this fort is here, and they've sent raiders at us twice. Each time, the raiders got killed. All of 'em. And it was the kids who killed them. Avernum grows people tough, and we learn fast._";
	text2 = "_Plus, we got a big advantage._";

begintalknode;
	state = 59;
	nextstate = -1;
	question = "_That advantage would be?_";
	text1 = "_Simple. Empire fighters, they fight 'cause they were told. 'Cause they have to. But us, we got something to fight for!_ She grins. _Magic helps. Steel helps. But some things are unbeatable!_";

begintalknode;
	state = 58;
	nextstate = 60;
	question = "_Who was your grandfather?_";
	text1 = "Her smile fades. _General Gabor Krizsan, Dervish Field Commander. Ironically enough, he was one of the Empire's few quality generals. Won so many battles he had a province named after him. This made him very popular._";
	text2 = "_So much so that the Emperor at the time had him assassinated. Despite having loyally served the Empire all his life. His whole family got exiled to Avernum. So here I am._";

begintalknode;
	state = 60;
	nextstate = -1;
	question = "_You were born in Avernum?_";
	text1 = "_Sure was. I'm a true native._ You can believe it. Her skin is pure, pale white.";

begintalknode;
	state = 55;
	nextstate = 61;
	question = "_What is this camp here for?_";
	text1 = "_Training! All of Avernum's best soldiers are taught what's what here. We bring them in, and we try to break them._ She gives you a close look. _I've been hearing about you, heard what you've been up to._";

begintalknode;
	state = 61;
	nextstate = 70;
	question = "_How often do people break?_";
	text1 = "_Not often. They know that we're all fighting for our lives down here. They're eager to fight. We only lost one fellow in the last few months. Disappeared. Wish I knew what happened to him._";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = gf(106,11) <= 1;
	question = "_Perhaps I could find him for you._";
	text1 = "_It's not important. I'm sure you have better things to do. But, if you find out what happened to a strong young man, Avernum-born, named Locke, I would appreciate it._";
	action = SET_SDF 106 11 1;
	code =
		toggle_quest(48,1);
	break;
	
begintalknode;
	state = 55;
	nextstate = -1;
	condition = gf(106,11) == 1 && gf(20,11) == 0;
	question = "_I've found no trace of Locke._";
	text1 = "_Not surprised._";

begintalknode;
	state = 55;
	nextstate = 72;
	condition = gf(106,11) == 1 && gf(20,11) >= 1;
	question = "_I found out what happened to Locke. We think he became a miner near Fort Draco._";
	code =
	run_hardcode(30);
	break;
	
begintalknode;
	state = 72;
	nextstate = 73;
	condition = 1;
	question = "_How?_";
	text1 = "_I'll send a message, and that deserter will be drug back here in chains._";
	
begintalknode;
	state = 73;
	nextstate = -1;
	condition = 1;
	question = "_Will he be executed?_";
	text1 = "_Only if he flees again. Avernum can't afford to waste a single human, even a coward._";

// Lt. Faulkner

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 82;
	question = "Lt. Faulkner";
	text1 = "You meet a mage in long, flowing robes. Surprisingly, she is practicing feints and thrusts with a steel shortsword. The movements are sure and skilled.";
	text2 = "She turns to you, sweat pouring off her face. _I'm Captain Faulkner. I've been told you were trained here. Welcome back to Camp Samuels._";
	text5 = "Captain Faulkner is glad for the distraction of conversation. She's been training to the point of exhaustion.";
	action = INTRO;

begintalknode;
	state = 82;
	nextstate = 83;
	question = "_What is your responsibility here?_";
	text1 = "She grins proudly. _We build soldiers!_";

begintalknode;
	state = 83;
	nextstate = 84;
	question = "_So how does one build a soldier?_";
	text1 = "She points at the western building. _They're all in there, resting. Then I'll drill them with live steel at three-quarters speed for, I dunno', six or seven hours. Sometimes under fire._ She beams with pride. _And they can take it._";
	text2 = "_Sometimes, it's worth it being exiled._";

begintalknode;
	state = 84;
	nextstate = -1;
	condition = 1;
	question = "_Under fire?_";
	text1 = "_I fling balls of fire and ice at them from time to time. Keeps them alert._";

begintalknode;
	state = 84;
	nextstate = 85;
	question = "_Why were you exiled?_";
	text1 = "_I tried to get in the military up surface. I was proud of my region, then, and wanted nothing more than to put my magical skills to its service. But where I lived, they wouldn't allow it._";
	text2 = "_So I made a stink. And you know what happened when you made a stink._";
	
begintalknode;
	state = 85;
	nextstate = -1;
	condition = 1;
	question = "_Why were you turned away?_";
	text1 = "_They thought I was more loyal to the people of my land than to the Emperor. They were right, of course._";

begintalknode;
	state = 85;
	nextstate = -1;
	question = "_Yes?_";
	text1 = "_You end up in Avernum, of course. Where nobody will keep you from fighting, and there's always plenty to fight for._";

begintalknode;
	state = 82;
	nextstate = -1;
	question = "_There's lots of training here. Can I get trained?_";
	text1 = "_Nope. We train recruits, not soldiers. We don't have the variety of education available. Go to Almaria or Blosk._";

begintalknode;
	state = 82;
	nextstate = -1;
	question = "_Any place here I can rest?_";
	text1 = "_Sure. You can sleep in the small room just inside the south gate._";

