----------------------------------------------------------------------
 * This file is part of Freedroid
 *
 * Freedroid is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Freedroid is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Freedroid; see the file COPYING. If not, write to the 
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
 * MA 02111-1307 USA
----------------------------------------------------------------------


If you have questions concerning FreedroidRPG, please send an email to:

freedroid-discussion@lists.sourceforge.net


Beginning of new chat dialog for character="XXXXX"
----------------------------------------------------------------------

<FirstTime LuaCode>
	show(0)
</LuaCode>

<EveryTime LuaCode>
	branch_to_pendragon = false
	show(90)
	if (has_cookie("murdered_koan")) then
		npc_says(_"You just killed him!")
		npc_says(_"How could you?")
		npc_says(_"You murderer!")
		npc_faction("crazy", _"Tania -- Avenging Koan")
		end_dialog()
	end

	if (has_quest(_"Tania's Escape")) then
		hide(1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 17, 18, 19, 90)
		if (not has_cookie("Tania_follow_tux")) then
			npc_says_random(_"I long to see the surface.", _"You are the most interesting hallucination yet.")
			show(90)
			if (not has_cookie("sagunsoff")) then		--Guns are still on
				hide(27)
				show(28)
			elseif (not has_cookie("Tania_guns_off")) then	--Guns are off, but you haven't told Tania yet
				hide(28)
				show(27)
			else						--Tania can escape, but you haven't decided to let her follow you yet
				hide(27, 28)
				show(40, 41)
			end
		elseif (not has_cookie("Tania_surface")) then --Tania is following you, but still Underground
			npc_says(_"I can't wait to leave this place.") 
			show(91)
		elseif (not has_cookie("Tania-stopped-by-Pendragon")) then --in the Western Desert
			if (not has_cookie("Tania-discussed-surface")) then
				add_cookie("Tania-discussed-surface")
				npc_says(_"It is so very bright and hot out here.") --thirsty dialog
				show(45, 46, 47)
			elseif (npc_damage_amount() > 10) then --skip to injury dialog
				next(55)
			else
				npc_says_random(_"Are we there yet?", _"How much longer?")
			end
			show(92)
		elseif ((not has_cookie("Tania-sent-to-Doc")) and (not has_cookie("Tania-set-free"))) then --at the Town Entrance, waiting for Spencer's OK
			hide(45, 46, 47, 49, 50, 51, 52, 53, 56, 57, 58, 59, 92)
			if (has_cookie("Tania_just-stopped-by-Pendragon")) then
				del_cookie("Tania_just-stopped-by-Pendragon")
				update_quest(_"Tania's Escape", _"Pendragon just stopped Tania and I at the town gate. Apparently he won't let her in, unless Spencer gives the go-ahead.")
				npc_says(_"It is OK. I'll wait here at the gate.")
				end_dialog()
			end
			show(93)
		elseif (not done_quest(_"Tania's Escape")) then --Town Entrance then (if Doc is alive) send her DocMoore's office, else set free (send to Bar)
			npc_says(_"What is the news?")
			tux_says(_"I talked to Spencer, and he said you were welcome to enter the town.")
			npc_says(_"That is great news!")
			if (has_cookie("Tania-sent-to-Doc")) then
				tux_says(_"He said you must first get checked out by Doc Moore though.")
				set_bot_destination("DocPatient-Enter")
			else --DocMoore is Dead!
				tux_says(_"He said you are free to go where you like.")
				set_bot_destination("BarPatron-Enter")
				add_cookie("Tania-at-Bar")
			end
			end_quest(_"Tania's Escape", _"I successfully brought Tania safely to the town. I hope she likes it here.")
			branch_to_pendragon = true
		else --"Tania's Escape" was a success!
			if ((not has_cookie("Tania-Doc-Cleared")) and (not has_cookie("Tania-set-free"))) then --send to Bar
				add_cookie("Tania-Doc-Cleared")
				heal_npc()
				npc_says(_"I have good news: the doctor says I'm healthy!")
				npc_says(_"Where should I go?")
				if (done_quest(_"Anything but the army snacks, please!")) then
					show(70)
				else
					show(71)
				end
			end
			show(94)
		end
	end

	if (branch_to_pendragon) then
		start_chat("Pendragon")
	end
</LuaCode>
----------------------------------------------------------------------

Nr=0 Text=_"Um, hi."
<LuaCode>
	npc_says(_"Oh! It happened! I have been waiting for you for 3226 hours!")
	hide(0) show(1, 3, 14, 19)
</LuaCode>
----------------------------------------------------------------------

Nr=1 Text=_"You knew I would come?"
<LuaCode>
	npc_says(_"Of course, my little imaginary friend!")
	hide(1) show(2, 5)
</LuaCode>
----------------------------------------------------------------------

Nr=2 Text=_"Imaginary?! I am as real as you are."
<LuaCode>
	npc_says(_"This place is locked. Hermetically sealed and guarded by bots. So you can't possibly be anything more than the product of my imagination.")
	tux_says(_"But who are you?")
	npc_says(_"A figment of my imagination should know my name: Tania.")
	set_bot_name(_"Tania - lonely scientist")
	hide(2) show(12)
</LuaCode>
----------------------------------------------------------------------

Nr=3 Text=_"Where am I?"
<LuaCode>
	npc_says(_"In a prison, a luxurious prison. I am feeling quite lonely, as you can see. Big room, plenty of food, a waterfall behind the window...")
	hide(3) show(4, 6)
</LuaCode>
----------------------------------------------------------------------

Nr=4 Text=_"All I see through the window are ray emitters. And we are below ground level.."
<LuaCode>
	npc_says(_"Yes, I know. But I so badly want to see sun, rivers, trees... there definitely is waterfall behind them!")
	hide(4)
</LuaCode>
----------------------------------------------------------------------

Nr=5 Text=_"It is dark here."
<LuaCode>
	npc_says(_"The main power supply is down, so only the emergency lights work. Peter tried to switch it back on, but he didn't succeed.")
	hide(5)
</LuaCode>
----------------------------------------------------------------------

Nr=6 Text=_"This place doesn't look like a prison."
<LuaCode>
	npc_says(_"In the past it was a secret lab. You heard about those strength pills? They were invented here. Other pills too, but I was working on the strength ones.")
	hide(6) show(7, 8)
</LuaCode>
----------------------------------------------------------------------

Nr=7 Text=_"Can you give me some pills then?"
<LuaCode>
	npc_says(_"No, Peter ate them all. That killed him.")
	npc_says(_"*cries*")
	tux_says(_"They say that strength pills are absolutely safe!")
	npc_says(_"They are like money. Having money is good, but if you have too much, you can decide that you can do anything.")
	npc_says(_"Peter became not very strong, but very-very-very strong. He thought he could make an exit with his bare hands.")
	npc_says(_"*cries*")
	npc_says(_"If you go further down the corridor, you will find debris and a big stone. That is his grave.")
	hide(7) show(10, 11)
</LuaCode>
--------------------------------------------------------------------

Nr=8 Text=_"So you are a biologist? Could you heal me?"
<LuaCode>
	npc_says(_"That would be something different from what I've done in the last months at least. Some entertainment.")
	npc_says_random(_"Let me take a look at that... it's nothing some nanobots couldn't take care of.... You will be all fixed up in a minute.", _"You are now completely healed. You should take better care of yourself.")
	heal_tux()
</LuaCode>
----------------------------------------------------------------------

Nr=10 Text=_"You loved him?"
<LuaCode>
	npc_says(_"I still do.")
	hide(10)
</LuaCode>
----------------------------------------------------------------------

Nr=11 Text=_"But why not go out through the door?"
<LuaCode>
	npc_says(_"It is locked and very reliable. Even a tank would not be able to smash it! And if a door was broken, SADDs would attack, that's their program.")
	hide(11) show(18)
</LuaCode>
----------------------------------------------------------------------

Nr=12 Text=_"Autoguns have made a hole in the wall. I came through this hole."
<LuaCode>
	npc_says(_"Do you mean I can go out to the surface?!")
	npc_says(_"Oh god! I - I told Peter that he chose the wrong place, but he was so stubborn!")
	hide(12) show(13)
</LuaCode>
----------------------------------------------------------------------

Nr=13 Text=_"Yes, you can get to the surface. But the guns are still on."
<LuaCode>
	npc_says(_"All hope is lost! I'm a scientist, not a warrior.")
	hide(13) show(15)
</LuaCode>
----------------------------------------------------------------------

Nr=14 Text=_"It is strange to see a girl in such a beautiful dress here."
<LuaCode>
	npc_says(_"I'm going to spend all my life here! So forgive me some little indulgences.")
	hide(14)
</LuaCode>
----------------------------------------------------------------------

Nr=15 Text=_"Maybe is it possible to disable the guns?"
<LuaCode>
	npc_says(_"Theoretically yes, but in practice I'm not sure you would be able to do that.")
	hide(15) show(16)
</LuaCode>
----------------------------------------------------------------------

Nr=16 Text=_"How can I disable the guns?"
<LuaCode>
	npc_says(_"Somewhere in a distant part of the lab should be an SACD - Secret Area Control Datacenter. It controls all the defense systems in the base. If you manage to get to it, you would be able to control the base. However, it's very hard to find and get to the SACD.")
	hide(16) show(17)
</LuaCode>
----------------------------------------------------------------------

Nr=17 Text=_"I will disable the guns for you."
<LuaCode>
	npc_says(_"Thanks... please be careful. You will not be able to access the control center directly, it is behind a triple hermetic door. Try using the service tunnels.")
	add_quest(_"Tania's Escape", _"I have met a girl locked in a secret area. If I manage to disable the autoguns, she will be able to go to the surface and look at the sun again.")
	npc_says(_"It's dangerous to go alone! Take this!")
	add_item("EMP Shockwave Generator", 5)
	hide(17)
</LuaCode>
----------------------------------------------------------------------

Nr=18 Text=_"Why not just open them? There should be a way of unlocking the base."
<LuaCode>
	npc_says(_"To open the door you need to know the password. Only the commander of the area and his deputy knew it. The commander was killed by bots as soon as the assault started, and the deputy was in town, I don't know what happened to him.")
	hide(18)
</LuaCode>
----------------------------------------------------------------------

Nr=19 Text=_"Carpets, sofa, bookshelves. Where did you get all this?"
<LuaCode>
	npc_says(_"Peter did all he could to make this room comfortable. The sofa and armchair are from the commanders cabinet, the books are from the lounge...")
	hide(19)
</LuaCode>
----------------------------------------------------------------------

Nr=27 Text=_"The sentry guns are off. You can go now!"
<LuaCode>
	add_cookie("Tania_guns_off")
	npc_says(_"Thanks, thanks a lot! Now I will be able to see the sun, trees, rivers... I missed those so much!")
	npc_says(_"I hope these books will help you.")
	display_big_message(_"Tania is now free!")
	add_xp(1500)
	add_item("Source Book of Check system integrity",1)
	add_item("Source Book of Sanctuary",1)
	update_quest(_"Tania's Escape", _"Tania is free now, I got some books as reward.")
	tux_says(_"You could always come back with me to the town. There are people there.")
	npc_says(_"I'd love to, but you'll have to escort me.")
	hide(27) show(40, 41)
</LuaCode>
----------------------------------------------------------------------

Nr=28 Text=_"Where can I find that SACD?"
<LuaCode>
	npc_says(_"To the right from the entrance of the area, there is a hall. In the south part of this hall you will find a triple hermetic door. The control center is behind that door. But it is locked, so you will have to find another way there. The cable collectors may help you.")
</LuaCode>
----------------------------------------------------------------------

Nr=40 Text=_"I'm not ready to escort you to the town."
<LuaCode>
	next(99)
</LuaCode>
----------------------------------------------------------------------

Nr=41 Text=_"I'm ready to escort you to the town."
<LuaCode>
	add_cookie("Tania_follow_tux")
	update_quest(_"Tania's Escape", _"I have agreed to escort Tania to the town. Once I'm there I'll introduce her to Spencer.")
	set_bot_state("follow_tux")
	hide(8, 40, 41) next(91)
</LuaCode>
----------------------------------------------------------------------

Nr=45 Text=_"It isn't all like this, the town is very nice."
<LuaCode>
	hide(45, 46, 47) next(48)
</LuaCode>
----------------------------------------------------------------------

Nr=46 Text=_"I got lost in this desert once."
<LuaCode>
	hide(45, 46, 47) next(48)
</LuaCode>
----------------------------------------------------------------------

Nr=47 Text=_"It must be hard adjusting to the bright sunlight."
<LuaCode>
	npc_says(_"I was underground for so long.")
	npc_says(_"It is all so bright on my eyes.")
	hide(45, 46, 47) next(48)
</LuaCode>
----------------------------------------------------------------------

Nr=48 Text="BUG, REPORT ME! Tania node48 -- TANIA'S THIRST FOR WATER"
NO_TEXT
<LuaCode>
	number_of_liquid_items = 0
	if (has_item_backpack(_"Bottled ice") > 0) then
		number_of_liquid_items = number_of_liquid_items+ 1;
		show(49)
	end
	if (has_item_backpack(_"Industrial coolant") > 0) then
		number_of_liquid_items = number_of_liquid_items+ 1;
		show(50)
	end
	if (has_item_backpack(_"Liquid nitrogen") > 0) then
		number_of_liquid_items = number_of_liquid_items+ 1;
		show(51)
	end
	if (has_item_backpack(_"Barf's Energy Drink") > 0) then
		number_of_liquid_items = number_of_liquid_items+ 1;
		show(52)
	end
	if (number_of_liquid_items > 0) then
		npc_says(_"I hope we get there soon. I'm very thirsty.")
	else
		next(54)
	end
	show(53)
</LuaCode>
----------------------------------------------------------------------

Nr=49 Text=_"Would you like some bottled ice?"
<LuaCode>
	npc_says(_"Thank you very much.")
	npc_says(_"I feel very refreshed!")
	heal_npc()
	del_item_backpack("Bottled ice")
	update_quest(_"Tania's Escape", _"Tania wasn't prepared for the desert heat. I gave her some bottled ice, and she looked much more healthy.")
	hide(49, 50, 51, 52, 53)
</LuaCode>
----------------------------------------------------------------------

Nr=50 Text=_"I have some industrial coolant you could have."
<LuaCode>
	npc_says(_"I can't drink this.")
	if has_met("Ewald") then
		tux_says(_"I've seen the town bartender put it in drinks.")
		npc_says(_"I guess I'll give it a try then.")
		del_item_backpack("Industrial coolant")
		heal_npc()
		npc_says(_"I feel very cold, but better.") --TODO: freeze her here
		update_quest(_"Tania's Escape", _"Tania wasn't prepared for the desert heat. I gave her some Industrial coolant. At first she was hesitant, but she tried it.")
		hide(49, 50, 52, 53)
	else
		next(54)
	end
	hide(51)
</LuaCode>
----------------------------------------------------------------------

Nr=51 Text=_"Can I offer you some liquid nitrogen?"
<LuaCode>
	npc_says(_"I can't drink this.")
	next(54) hide(51)
</LuaCode>
----------------------------------------------------------------------

Nr=52 Text=_"You could have a bottle of Barf's Energy Drink if you are thirsty?"
<LuaCode>
	npc_says(_"Thank you very much.")
	npc_says(_"I feel very energetic!")
	heal_npc()
	del_item_backpack("Barf's Energy Drink")
	update_quest(_"Tania's Escape", _"Tania wasn't prepared for the desert heat. I gave her a bottle of Barf's Energy Drink. After downing it in a couple seconds, she looked much more energetic!")
	hide(49, 50, 51, 52, 53)
</LuaCode>
----------------------------------------------------------------------

Nr=53 Text=_"Sorry, I have nothing to offer you." --THIS WILL BE A LIE
<LuaCode>
	npc_says(_"I feel very ill.")
	update_quest(_"Tania's Escape", _"Tania wasn't prepared for the desert heat, but I decided not to share any of my liquids with her.")
	drop_dead()
	hide(49, 50, 51, 52, 53)
</LuaCode>
----------------------------------------------------------------------

Nr=54 Text="BUG, REPORT ME! Tania node54 -- NO LIQUID ITEMS" 
NO_TEXT
<LuaCode>
	number_of_liquid_items = number_of_liquid_items - 1
	if (number_of_liquid_items < 1) then 
		if (npc_damage_amount() > 10) then
			next(55)
		else
			npc_says(_"I feel a little faint, but I think I will survive.")
		end
		hide(53)
	end
</LuaCode>
----------------------------------------------------------------------

Nr=55 Text="BUG, REPORT ME! Tania node55 -- HANDLE INJURIES"
NO_TEXT
<LuaCode>
	injured_level = 0
	if (npc_damage_amount() > 10) then
		npc_says(_"I've am injured!")
		injured_level = 1
	elseif (npc_damage_amount() > 40) then
		npc_says(_"I've am badly injured!")
		injured_level = 2
	elseif (npc_damage_amount() > 60) then
		npc_says(_"I've am seriously injured!")
		injured_level = 3
	end

	if (has_item_backpack(_"Doc-in-a-can") > 0) then
		show(59)
	end
	if ((has_item_backpack(_"Antibiotic") > 0) and (injured_level < 3)) then
		show(58)
	end
	if ((has_item_backpack(_"Diet supplement") > 0) and (injured_level < 2)) then
		show(57)
	end
	show(56)
</LuaCode>
----------------------------------------------------------------------

Nr=56 Text=_"There is nothing I can do about your injuries right now." 
<LuaCode>
	npc_says(_"I hope we get to the town soon.")
	hide(56, 57, 58, 59)
</LuaCode>
----------------------------------------------------------------------

Nr=57 Text=_"Here, take this Diet supplement." 
<LuaCode>
	npc_says(_"I feel better now.")
	del_item_backpack("Diet supplement")
	heal_npc()
	hide(56, 57, 58, 59)
</LuaCode>
----------------------------------------------------------------------

Nr=58 Text=_"I'm proscribing you some antibiotics." 
<LuaCode>
	npc_says(_"I feel much better.")
	del_item_backpack("Antibiotic")
	heal_npc()
	hide(56, 57, 58, 59)
</LuaCode>
----------------------------------------------------------------------

Nr=59 Text=_"I have a Doc-in-a-can. It should heal you right up." 
<LuaCode>
	npc_says(_"I feel fit as new!")
	del_item_backpack("Doc-in-a-can")
	heal_npc()
	hide(56, 57, 58, 59)
</LuaCode>
----------------------------------------------------------------------

Nr=70 Text=_"I think you would enjoy some of Michelangelo's cooking at the restaurant." 
<LuaCode>
	set_bot_destination("BarPatron-Enter")
	add_cookie("Tania-at-Bar")
	npc_says(_"It has been so long since I've had a nice meal.")
	hide(70)
</LuaCode>
----------------------------------------------------------------------

Nr=71 Text=_"You might try the bar. But stay away from the food. It is horrible." 
<LuaCode>
	set_bot_destination("BarPatron-Enter")
	add_cookie("Tania-at-Bar")
	npc_says(_"I really miss good food, especially lemon meringue pie.")
	npc_says(_"Oh well.")
	hide(71)
</LuaCode>
----------------------------------------------------------------------


Nr=90 Text=_"I think I have to go."  --Pre-"Tania's Escape" Quest
NO_TEXT
<LuaCode>
	hide(90) next(99)
</LuaCode>
----------------------------------------------------------------------

Nr=91 Text=_"Follow me to the Surface!" --"Tania's Escape" Quest (Underground)
NO_TEXT
<LuaCode>
	hide(91) next(99)
</LuaCode>
----------------------------------------------------------------------

Nr=92 Text=_"Follow me to the Town!" --"Tania's Escape" Quest (Western Desert)
NO_TEXT
<LuaCode>
	hide(92) next(99)
</LuaCode>
----------------------------------------------------------------------

Nr=93 Text=_"Wait here." --"Tania's Escape" Quest (Western Town Gate)
NO_TEXT
<LuaCode>
	hide(93) next(99)
</LuaCode>
----------------------------------------------------------------------

Nr=94 Text=_"See you later." --"Tania's Escape" Quest (Western Town Gate to Doctor's Office)
NO_TEXT
<LuaCode>
	hide(94) next(99)
</LuaCode>
----------------------------------------------------------------------

Nr=99 Text="BUG, REPORT ME! Tania node99 -- EXIT DIALOG"
NO_TEXT
<LuaCode>
	if (has_quest(_"Tania's Escape")) then
		hide(1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 18, 19)
		if (not has_cookie("sagunsoff")) then --still underground, guns on
			tux_says(_"I think I have to go.")
		elseif (not has_cookie("Tania_surface")) then --still underground
			tux_says(_"Follow me to the Surface!")
		elseif (not has_cookie("Tania-stopped-by-Pendragon")) then --"Tania's Escape" Quest (Western Desert)
			tux_says(_"Follow me to the Town!")
			npc_says(_"Lead on, my little penguin.")
		elseif (not has_cookie("Tania-sent-to-Doc")) then --"Tania's Escape" Quest (Western Town Gate)
			tux_says(_"Wait here.")
			npc_says(_"OK. But please, come back soon.")
		elseif (has_cookie("Tania-sent-to-Doc")) then --"Tania's Escape" Quest (Tania free in the town somewhere)
			tux_says(_"See you later.")
			npc_says_random(_"Please be safe!", _"Thanks again.", _"Please come back again, my little penguin.")
		end
	else
		npc_says_random(_"That's OK. But please, please, come back. I'm so lonely.", _"Please come back again and get me out of here.")
	end
	end_dialog()
</LuaCode>
----------------------------------------------------------------------

End of chat dialog for character="XXXXX"
