// Town 29: Peninsula Camp
// Two pens are 6 x 8 and 8 x 8; lizard pen is 5 x 4
// All tents and portables are 4 x 4
begintownscript;

variables;

short choice,i,j,k;
string dlgstr;

body;

beginstate INIT_STATE;
	set_crime_tolerance(2);
	
	set_name(6,"Machrone"); // type 78
	set_char_dialogue_pic(7,585,0); // Phaedra
	set_name(8,"Kass"); // type 36
	set_char_dialogue_pic(8,583,0);
	set_name(9,"Talas"); // type 112
	set_char_dialogue_pic(9,582,0);
	set_name(10,"Silthokh"); // type 111
	set_name(11,"Legare"); // type 119
	set_name(12,"Pithoss"); // type 112
	set_char_dialogue_pic(12,580,0);
	set_name(13,"Ithik"); // type 112
	set_level(13,60);
	set_name(14,"Ethass"); // type 111
	set_char_dialogue_pic(14,584,0);
	set_name(15,"Bitey");
	set_name(16,"Hissy");
	set_name(17,"Snarly");
	set_name(82,"Britha");
	
	if (get_flag(290,7))
		make_town_hostile();
	
	change_outdoor_location(1,10,22,13);
	
	if (get_flag(29,0) == 0) {
		march_party(44,26);
		march_party(43,26);
		march_party(42,26);
		march_party(41,26);
		force_view_center(41,26);
		force_instant_terrain_redraw();
		create_boat(4,29,54,22,0);
		set_flag(29,0,1);
		message_dialog("Once you arrive, you pitch your own tent, but you have no opportunity to rest. Kass wants you to speak to him immediately.","");
		}
	
	if ((get_flag(43,0)) && (get_flag(43,1) == 0)) // Talas in Thanopolen
		erase_char(9);
	
	if ((get_flag(29,1) > 0) && (get_flag(40,1) == 0)) {
		erase_char(11); // Legare fled and not yet returned
		erase_char(9);
		}
	
	if ((get_flag(40,1) > 0) && (get_flag(44,7) == 0))
		erase_char(14); // Ethass fled and not yet returned
	
	if ((get_flag(42,3)) && (get_flag(44,7)))
		activate_hidden_group(4);
	
	if ((get_flag(42,3)) && (get_flag(44,7) == 0))
		erase_char(13);
	
	if (get_flag(44,7) == 1)
		set_state_continue(11);
	
if (get_flag(40,1) != 1)
	end();
	
	set_flag(40,1,2);
	
	message_dialog("With the Goddess's words, you feel yourself lifting into the air. You and Legare fly smoothly down the mountain on the wind of the Goddess's breath, taking in an incredible panoramic of the land you have traveled before you return to the camp.","");
	
	toggle_quest(10,0);
	
	march_party(29,7);
	march_party(29,8);
	march_party(29,9);
	march_party(30,9);
	force_view_center(33,11);
	activate_hidden_group(2);
	set_character_facing(9,6);
	force_instant_terrain_redraw();
	
	message_dialog("The entire expedition crowds around as you arrive in the temple. Legare speaks to them.","");
	
	i = 0;
	while (char_ok(i) == 0)
		{i = i + 1; }
	
	text_bubble_on_char(77,"Some of you have doubted.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(77,"");
	text_bubble_on_char(77,"I understand this.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(77,"");
	force_instant_terrain_redraw();
	
	reset_dialog();
	add_dialog_str(0,"_I myself even doubted for a time,_ he continues, his voice broadly reaching the whole room amid cries of _No!_ and _How?_ But he affirms, _Yes, it is true. I doubted. But what I saw on that mountain has renewed my faith._",0);
	add_dialog_str(1,"His voice lifts. _The Goddess is real, and we cannot doubt any more._",0);
	add_dialog_str(2,"But before he can continue, Silthokh interrupts him, shouting from the crowd.",0);
	run_dialog(1);
	
	text_bubble_on_char(52,"Not this again!");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(52,"");
	text_bubble_on_char(52,"I will not believe in a Goddess");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(52,"");
	text_bubble_on_char(52,"that I cannot see!");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(52,"");
	force_instant_terrain_redraw();
	
	message_dialog("Unsettled murmuring begins in the crowd now. Legare looks around, amazed at how far the mutiny has come, that Silthokh would be willing to challenge him to his face. The scene could grow ugly again.","Suddenly Ethass begins pushing her way through the crowd.");
	
	relocate_character(51,33,15);
	set_character_facing(51,7);
	text_bubble_on_char(51,"Stop it!");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(51,33,14);
	set_character_facing(51,0);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(66,31,14);
	set_character_facing(51,6);
	relocate_character(51,32,13);
	set_character_facing(51,1);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	set_character_facing(51,0);
	relocate_character(51,32,12);
	set_character_facing(51,0);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(51,32,11);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	text_bubble_on_char(51,"");
	text_bubble_on_char(51,"Just stop it!");
	set_character_facing(51,4);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(51,"");
	force_instant_terrain_redraw();
	
	message_dialog("Ethass's face is completely messy with tears. She has been sobbing.","_Don't you all remember that he has led us this far?_ she cries. _You would all still be in Thassaka, or in Vasskolis, or in Gnass, or in wherever you came from if it weren't for him! You cannot turn on him!_ Then, whispering, _I cannot lose him again._");
	
	text_bubble_on_char(51,"I... I love him.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(51,"");
	force_instant_terrain_redraw();
	
	reset_dialog();
	add_dialog_str(0,"Everyone is staring at Ethass making a scene, but you turn to see Legare, and you are shocked to see that he is not merely unsurprised, but is looking at Ethass with the most tenderness and compassion that you have ever seen in his eyes.",0);
	add_dialog_str(1,"He loves her, too. And like Phaedra and Machrone, they had been keeping it secret.",0);
	add_dialog_str(2,"And then, something happens.",0);
	run_dialog(1);
	
	play_sound(-65);
	erase_char(51);
	activate_hidden_group(3);
	text_bubble_on_char(67,"And there will be no more doubt.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	force_instant_terrain_redraw();
	
	message_dialog("For a moment you cannot fathom what you are seeing. Ethass's skin has begun to glow with a blue light, a bright incandescence that speaks of magic, but you can feel no recognizable light spell around her. Then you realize what it is.","The Goddess has taken possession of Ethass's body.");
	
	text_bubble_on_char(67,"I am the Goddess.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(67,"Those of you who did not believe,");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(67,"I forgive you.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(62,"You... are the Goddess?");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(62,"");
	force_instant_terrain_redraw();
	
	message_dialog("Ithik speaks, his voice filled with awe. Ethass, as the Goddess, nods. _Then... may I ask you a question?_ Ithik asks.","_Please,_ she replies smoothly.");
	
	text_bubble_on_char(62,"Are you the goddess of the Khalthanad?");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(62,"");
	text_bubble_on_char(67,"Yes.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(67,"I was the one who spoke to Khalthas");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(67,"on the mountaintop.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(62,"What is your name?");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(62,"");
	text_bubble_on_char(67,"I am called Althanazaria.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	force_instant_terrain_redraw();
	
	message_dialog("This is it! This is the answer that you have been seeking since you first came to Bahssikava! The Goddess is Althanazaria, the traditional slith goddess of fertility, healing, birth, and the hunt! She was a great deity in the classical pantheon.","Almost everyone rejoices at this news, but you notice that Pithoss's expression grows much darker.");
	
	set_character_facing(80,2);
	text_bubble_on_char(80,"Althanazaria?");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(80,"");
	text_bubble_on_char(80,"I know that name.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(80,"");
	force_instant_terrain_redraw();
	
	message_dialog("_What, Althanazaria,_ he continues, his voice filled with scorn as he sees the Goddess turn to him with a confused expression. _Did you not realize that we had a Darkling on this expedition? Did you not know that one here has read the words of Thsss?_","Ethass as the Goddess lets out a mild cry, but Pithoss continues.");
	
	reset_dialog();
	add_dialog_str(0,"_We Darklings worshipped many gods of the dark pantheon,_ Pithoss continues, _but one of our greatest was the goddess Hathnazriakh, goddess of sex and pain and death._ He growls.",0);
	add_dialog_str(1,"_She was the consort of the lord of all demons, Nathaganth, to whom such spawn as Grah-Hoth and Nolagh-Khar were just servants. Hathnazriakh and Nathaganth were the queen and king of our dark pantheon, the crown royalty of darkness._",0);
	add_dialog_str(2,"His voice descends into a deep hiss. _And in the Ancient Battle Chants, the poems written by Thsss himself, it is related that Hathnazriakh appeared to the homeland sliths in a disguise and convinced them to worship her._ His claws clench and unclench.",0);
	add_dialog_str(3,"_She abused them for centuries in this false identity, taking their worship and pretending to help them, but with subtlety betraying them in every way she could. The cities with her shrines eventually sickened and died._",0);
	add_dialog_str(4,"With all the finality of a death sentence, he pronounces, _The name Hathnazriakh used to hide her identity and abuse the sliths for centuries was... Althanazaria._",0);
	run_dialog(1);
		
	text_bubble_on_char(80,"Hathnazriakh, begone!");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
		
	text_bubble_on_char(80,"");
	text_bubble_on_char(80,"We will not suffer your presence!");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(80,"");
	force_instant_terrain_redraw();
	
	message_dialog("Chaos erupts. Legare, Pithoss, Silthokh, Talas, and everyone else in the room shout furiously, trying to make sense of the events of the past few minutes. You stand helplessly, watching the Goddess attempt to speak.","Finally, Legare silences the room with an agonized cry: _Hathnazriakh,_ he shouts.");
	
	set_character_facing(67,0);
	text_bubble_on_char(77,"Hathnazriakh, leave now.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(77,"");
	text_bubble_on_char(77,"Go.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(77,"");
	text_bubble_on_char(67,"Please... I can explain.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(77,"No more lies.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(77,"");
	text_bubble_on_char(77,"GET AWAY FROM ME.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(77,"");
	text_bubble_on_char(77,"I RENOUNCE YOU.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 6);
	
	text_bubble_on_char(77,"");
	force_instant_terrain_redraw();
	
	message_dialog("Legare's words hang in the air like arrows on their way to piercing their target's heart. The Goddess stares at him, and so does everyone else: the unshakable faith that has driven the expedition this far has been abandoned.","The words, like arrows, hit home.");
	
	text_bubble_on_char(77,"");
	text_bubble_on_char(67,"I... I will go.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(67,"But know this, Legare:");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(67,"because you have lost faith,");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(67,"you will NEVER see the homeland.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 6);
	
	text_bubble_on_char(67,"");
	force_instant_terrain_redraw();
	
	message_dialog("With that, she runs, ethereal tears streaming down her radiant face.","");
	
	relocate_character(67,32,10);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(67,31,9);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(67,30,8);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(67,30,7);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(67,30,6);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(67,30,5);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	reset_dialog();
	add_dialog_str(0,"For a long moment, no one moves or speaks. Then Legare's voice rises, breaking the silence. _Please, everyone, get back to what you were doing. We will need to get moving soon, and we all need to prepare._",0);
	add_dialog_str(1,"For a tense moment, no one moves. Then Ithik and Talas begin to make their ways to the exit, and everyone else does the same.",0);
	add_dialog_str(2,"Legare turns, breathing shallowly, and kneels before the altar. Kass, who has been silent this whole time, turns to you and says, _You'd better get some rest. We will figure out what to do, and in the meantime, you should sleep._",0);
	add_dialog_str(3,"You return to your tent and drift to sleep.",0);
	run_dialog(1);
	
	// End cut scene.
	set_character_facing(9,4);
	j = 35;
	while (j <= 81) {
		erase_char(j);
		j = j + 1;
		}
	
	force_view_center(1,1);
	march_party(44,26);
	march_party(43,26);
	march_party(42,26);
	march_party(41,26);
		
	force_instant_terrain_redraw();
	
	message_dialog("You sleep for several hours, with troubled dreams and unsettling visions. After many hours of wakelessness but none of rest, you rise, unsteady, to face whatever new task awaits you.","");

	force_view_center(41,26);
	force_instant_terrain_redraw();
	
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;	
if (get_crime_level() == 0)
	end();
if (get_flag(290,7) > 0)
	end();
	
	print_str_color("You have made the expedition angry with you.",1);
	make_town_hostile();
	set_flag(290,7,1);
break;

beginstate 10; // speaking to Kass cut scene
	
	set_flag(29,1,1);
	
	reset_dialog();
	add_dialog_str(0,"You approach Kass to speak to him. _Greetings!_ he says. _Good to see that you're awake. I have another mission for you._",0);
	add_dialog_str(1,"He continues, _Near here, there is a beautifully wrought golden statue in the shape of a wolf nursing a baby. It will make the perfect centerpiece for the altar._",0);
	add_dialog_str(2,"Kass cuts off suddenly. Silthokh has approached, and several others, including Ithik, are with him. You move off to the side, and Kass stands before them.",0);
	run_dialog(1);
	
	activate_hidden_group(1);
	march_party(26,25);
	march_party(27,25);
	march_party(28,25);
	march_party(29,25);
	force_view_center(31,25);
	relocate_character(8,31,22);
	set_character_facing(9,4);
	relocate_character(10,31,27);
	set_character_facing(10,0);
	relocate_character(13,33,27);
	set_character_facing(13,0);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	text_bubble_on_char(10,"What are you doing, Kass?");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(10,"");
	text_bubble_on_char(10,"Why are you sending them");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(10,"");
	text_bubble_on_char(10,"on useless quests like these,");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(10,"");
	text_bubble_on_char(10,"when we have a journey to make?");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(10,"");
	text_bubble_on_char(10,"We need to reach the HOMELAND,");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(10,"");
	text_bubble_on_char(10,"not decorate your foolish shrine.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(10,"");
	force_instant_terrain_redraw();
	
	reset_dialog();
	add_dialog_str(0,"Again Silthokh is challenging Kass's authority, and again you are put between the two. On the one hand, Silthokh is right: a golden statue for the altar? This cannot possibly be required by the Goddess.",0);
	add_dialog_str(1,"On the other, however, Kass is the spokesperson for Legare, and Legare is the unquestioned leader of this expedition. No one would be here if not for him. Arguing with Kass is tantamount to arguing with Legare, which is all but sacrilege.",0);
	add_dialog_str(2,"What do you say?",0);
	add_dialog_choice(0,"(Nothing.)");
	add_dialog_choice(1,"Silthokh is right. Let's stop this foolishness.");
	add_dialog_choice(2,"Stand down, Silthokh. We must do what the Goddess requires.");
	set_flag(29,2,run_dialog(1) - 1);
	if (get_flag(29,2) == 0) {
		message_dialog("You keep quiet. Anything you could say would just make things worse.","Kass objects, _But the Goddess commands this!_ Before he can say more, Silthokh begins speaking again.");
		}
	if (get_flag(29,2) == 1) {
		text_bubble_on_char(13,"We all agree, Kass:");
		force_instant_terrain_redraw();
		pause(get_flag(290,0) * 5);
		
		text_bubble_on_char(13,"");
		text_bubble_on_char(13,"we must keep going,");
		force_instant_terrain_redraw();
		pause(get_flag(290,0) * 5);
		
		text_bubble_on_char(13,"");
		text_bubble_on_char(13,"not search for trinkets.");
		force_instant_terrain_redraw();
		pause(get_flag(290,0) * 5);
		
		text_bubble_on_char(13,"");
		text_bubble_on_char(8,"But the Goddess commands this!");
		force_instant_terrain_redraw();
		pause(get_flag(290,0) * 5);
		
		text_bubble_on_char(8,"");
		force_instant_terrain_redraw();
		
		message_dialog("Before Kass can even respond to you or Ithik, Silthokh begins speaking again.","");
		}
	if (get_flag(29,2) == 2) {
		text_bubble_on_char(8,"That's right!");
		force_instant_terrain_redraw();
		pause(get_flag(290,0) * 5);
		
		text_bubble_on_char(8,"");
		text_bubble_on_char(8,"We must be obedient to her will");
		force_instant_terrain_redraw();
		pause(get_flag(290,0) * 5);
		
		text_bubble_on_char(8,"");
		text_bubble_on_char(8,"in ALL things,");
		force_instant_terrain_redraw();
		pause(get_flag(290,0) * 5);
		
		text_bubble_on_char(8,"");
		text_bubble_on_char(8,"and she commands this.");
		force_instant_terrain_redraw();
		pause(get_flag(290,0) * 5);
		
		text_bubble_on_char(8,"");
		force_instant_terrain_redraw();
		
		message_dialog("He glares at Silthokh, but Silthokh fires back without missing a beat.","");
		}
	
	text_bubble_on_char(10,"The Goddess commands this.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(10,"");
	text_bubble_on_char(10,"The GODDESS.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(10,"");
	text_bubble_on_char(10,"This charade must end.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(10,"");
	text_bubble_on_char(10,"The Goddess is FALSE.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(10,"");
	text_bubble_on_char(18,"Hey!");
	text_bubble_on_char(22,"No!");
	text_bubble_on_char(28,"Yes!");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 2);
	
	text_bubble_on_char(31,"What!");
	text_bubble_on_char(25,"Blasphemy!");
	text_bubble_on_char(20,"I agree!");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 2);
	
	text_bubble_on_char(18,"");
	text_bubble_on_char(22,"");
	text_bubble_on_char(28,"");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 2);
	
	text_bubble_on_char(31,"");
	text_bubble_on_char(25,"");
	text_bubble_on_char(20,"");
	force_instant_terrain_redraw();
	
	message_dialog("The whole crowd erupts into shouting. Silthokh has said the unthinkable, unthinkable not because it is not true, but because it is too subversive and dangerous. You glance back and forth as the mob seems ready to riot.","");
	
	text_bubble_on_char(10,"Listen!");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 4);
	
	text_bubble_on_char(10,"");
	force_instant_terrain_redraw();
	
	reset_dialog();
	add_dialog_str(0,"_We have seen no miracles,_ continues Silthokh, _only magic tricks! What have we seen him do? He located Lost Bahssikava, opened the gates to the homeland, and parted the river when we were attacked._",0);
	add_dialog_str(1,"Ithik snorts and begins speaking. _But he GREW UP in upper Bahssikava. He knew where it was because his ancestors stayed there when all others left. That is no miracle._",0);
	add_dialog_str(2,"_Nor,_ resumes Silthokh, _do we know what he did for those twenty years in isolation in the tunnels under Bahssikava. He could have wandered through Ancient Bahssikava and found the route into the homeland. From there, he could have opened the doors._",0);
	add_dialog_str(3,"Talas speaks now, his voice calmer than the others, with not condemnation but fact. _The parting of the river showed magical power, but it didn't have to be divine. Erika had that kind of power when she was alive, and she had no blessing from a deity._",0);
	add_dialog_str(4,"_We have seen no miracles,_ Silthokh repeats, _only magic tricks. Legare may not even be a prophet. The Goddess may not even exist._",0);
	run_dialog(1);

	reset_dialog();
	add_dialog_str(0,"As they speak, you remember suddenly the words of Khassper: a strange slith passed through Ancient Bahssikava and did NOT come back. Legare must have gone through Ancient Bahssikava, but he came to Avernum by some other path.",0);
	add_dialog_str(1,"Perhaps he even passed through the steel doors, unlocking them from the other side. Silthokh could be right.",0);
	add_dialog_str(2,"Suddenly, Pithoss's voice rings out from the east. He has emerged from his tent.",0);
	run_dialog(1);
	
	relocate_character(9,34,19);
	set_character_facing(9,4);
	relocate_character(12,35,25);
	set_character_facing(12,0);
	text_bubble_on_char(12,"Kass, what are you doing?");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(12,"");
	force_instant_terrain_redraw();
	
	force_view_center(35,25);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	message_dialog("_You have not received permission from Legare to give these quests,_ Pithoss continues. _You are usurping his authority!_","Kass recoils with anger.");
	
	force_view_center(31,20);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	message_dialog("_The PROPHET would want me to do this,_ Kass says confidently. _Should we bother him with every mundane detail in the day-to-day running of the expedition? He has higher matters to attend to._","");
	
	force_view_center(35,25);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	message_dialog("_Even if that were true,_ Pithoss says slowly, _are you honestly acting for the greater glory of the Goddess? I don't think she would approve of this IDOLATRY._","He continues, laying the pronouncement in soft, sibilant tones. _I think you are acting for yourself and your own glory._");
	
	force_view_center(31,25);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(9,34,20);
	text_bubble_on_char(9,"I agree.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(9,34,21);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(9,34,22);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(9,34,23);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	relocate_character(9,33,24);
	set_character_facing(9,3);
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	set_character_facing(9,0);
	text_bubble_on_char(9,"");
	text_bubble_on_char(9,"It was I who built this temple, Kass,");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(9,"");
	text_bubble_on_char(9,"not the Goddess.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(9,"");
	force_instant_terrain_redraw();
	
	message_dialog("Kass opens his mouth to shout, to condemn this heresy and damn all the ones who have participated in it, but you can see several in the distance who are nodding. Many have lost faith, or perhaps they never had it.","Before Kass can speak, though, Pithoss cuts him off.");
	
	text_bubble_on_char(12,"We must not fight.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(12,"");
	text_bubble_on_char(12,"Let us consult Legare.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(12,"");
	force_instant_terrain_redraw();
	
	message_dialog("_Yes,_ Kass says, _THE PROPHET will know what to do._ He stresses those words, contrasting with Pithoss omitting the title. Despite the acrimony, you walk with them as they go to Legare.","But when you arrive at his room, it is empty!");
	
	erase_char(11);
	set_terrain(9,39,15);
	march_party(11,37);
	march_party(11,38);
	march_party(11,39);
	march_party(11,40);
	set_character_facing(0,2);
	set_character_facing(1,2);
	set_character_facing(2,2);
	set_character_facing(3,2);
	relocate_character(8,9,39);
	set_character_facing(9,2);
	relocate_character(12,6,39);
	set_character_facing(12,2);
	force_view_center(11,39);
	force_instant_terrain_redraw();
	
	text_bubble_on_char(12,"There is a note!");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(12,"");
	force_instant_terrain_redraw();
	
	message_dialog("Pithoss reads it aloud. _The lack of faith among the members of this expedition makes me fear for our safety. We are all in the Goddess's hands. The exodus can only occur by her grace._","Pithoss's claws tremble as he reads the next section. _I have gone to higher ground upon which to pray for guidance. If you have true faith, brave the dangers of the mountain to reach me. The Goddess be with you always, whatever your decision._");
	
	set_character_facing(12,6);
	text_bubble_on_char(12,"We must think on this.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(12,"");
	force_instant_terrain_redraw();
	
	message_dialog("Pithoss turns to you. _Forget about fetching items for the shrine. Rest now, and then come speak to me. I need some time to figure out what we will do._","You return to your tent to sleep.");
	
	march_party(44,26);
	march_party(43,26);
	march_party(42,26);
	march_party(41,26);
	
	relocate_character(10,50,26);
	set_character_facing(10,6);
	relocate_character(13,54,53);
	set_character_facing(13,6);
	relocate_character(12,39,41);
	set_character_facing(12,0);
	erase_char(9);
	
	i = 18;
	while (i <= 34) {
		erase_char(i);
		i = i + 1;
		}
		
	set_terrain(9,39,11);
		
	force_instant_terrain_redraw();
	
	reset_dialog();
	add_dialog_str(0,"You sleep for a short time, but for longer, you lie awake, thinking. You have journeyed a great distance, across the ruins of a great slith empire, from Vasskolis to Nakhtha to Thassaka to the Lava Ocean to the strange cave with What-Is-It food.",0);
	add_dialog_str(1,"Some questions have been answered, such as the identity of the father of Phaedra's child, but you cannot help but realize that more pressing ones yet remain: is the Goddess real? If so, who is she, and why is she helping the expedition?",0);
	add_dialog_str(2,"You cannot help but believe that the crystal pillars you have found everywhere are connected with this somehow, and that the slith legends you have heard also are a piece of the puzzle. The demons, the Khalthanad... the truth is there somewhere.",0);
	add_dialog_str(3,"You have hardly spoken to Legare on this expedition. He has been hidden away, praying or something. Perhaps if you could only be alone with him, you could ask him for answers, finally.",0);
	add_dialog_str(4,"Regardless, now it is time to speak to Pithoss and find out what your next task is.",0);
	set_flag(29,1,1 + run_dialog(1));
	
	force_view_center(41,26);
	force_instant_terrain_redraw();
	
break;

beginstate 11;
	set_flag(44,7,2);
	
	toggle_quest(11,0);
	
	march_party(29,7);
	march_party(29,8);
	march_party(29,9);
	march_party(30,9);
	force_view_center(33,11);
	activate_hidden_group(2);
	activate_hidden_group(3);
	set_character_facing(9,6);
	erase_char(77);
	relocate_character(80,32,9);
	erase_char(51);
	force_instant_terrain_redraw();
	
	i = 0;
	while (char_ok(i) == 0)
		{i = i + 1; }
		
	message_dialog("A crowd quickly assembles inside the temple again. They see the Pithoss's ashen face, and whispers begin almost instantly that something has gone wrong. The Goddess remains in control of Ethass's body, which causes some whispers, too.","Finally, when everyone is present, Pithoss begins to speak.");
	
	text_bubble_on_char(80,"Friends,");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(80,"");
	text_bubble_on_char(80,"Legare is dead.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(80,"");
	text_bubble_on_char(37,"What?");
	text_bubble_on_char(59,"No!");
	text_bubble_on_char(49,"It can't be!");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 2);
	
	text_bubble_on_char(72,"That's not possible!");
	text_bubble_on_char(58,"I don't believe it!");
	text_bubble_on_char(69,"No!");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 3);
	
	text_bubble_on_char(37,"");
	text_bubble_on_char(59,"");
	text_bubble_on_char(49,"");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 1);
	
	text_bubble_on_char(72,"");
	text_bubble_on_char(58,"");
	text_bubble_on_char(69,"");
	force_instant_terrain_redraw();
	
	message_dialog("The room erupts into chaos almost instantly. Before long, Silthokh has begun shouting, _Hathnazriakh! The demon queen! It's her fault!_","Pithoss's voice thunders over the crowd.");
	
	text_bubble_on_char(80,"QUIET!");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(80,"");
	text_bubble_on_char(80,"We must... be civilized about this.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(80,"");
	text_bubble_on_char(80,"I believe that she has an answer");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(80,"");
	text_bubble_on_char(80,"to our questions.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(80,"");
	text_bubble_on_char(80,"Althanazaria?");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(80,"");
	text_bubble_on_char(67,"I...");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(67,"I do.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	force_instant_terrain_redraw();
	
	reset_dialog();
	add_dialog_str(0,"_I have been known as Hathnazriakh,_ the Goddess says, _or some variant on that name, for all the ages of this world. I was the consort of the demon king Nathaganth. Together, we made all living things suffer, and we enjoyed it. But then I met Khalthas.",0);
	add_dialog_str(1,"_The Khalthanad is more generous about my part in our conversation than the full truth would have been. I did not instruct Khalthas on virtue; he instructed me. Compassion, shame, regret: these are mortal feelings that were not familiar to me, a goddess.",0);
	add_dialog_str(2,"_Khalthas touched me with his empathy. Instead of revealing myself to him as Hathnazriakh and slaying him, I gave him my blessing to found his own empire. I never spoke to him again; he never knew who I was or how he had changed me.",0);
	add_dialog_str(3,"_I continued on as before for centuries, but I often thought of him. Because of him, I revealed myself to some sliths as Althanazaria and even created a small cult of my goodness among the sliths, meanwhile as Hathnazriakh hurting them, too.",0);
	add_dialog_str(4,"_But then, when Grah-Hoth, one of Nathaganth's chief servants, invaded Avernum and was defeated, Nathaganth drew away. We have hardly spoken since, and I remembered the race of Khalthas, especially the ones we corrupted, the descendants of Thsss.",0);
	add_dialog_str(5,"_Searching over Avernum for another who reminded me of Khalthas, I found Legare, tucked away in the tunnels under Bahssikava, ready for my message. I spoke to him, and he was exactly like Khalthas! The same idealism, the same compassion._ She pauses.",0);
	run_dialog(1);
	reset_dialog();
	add_dialog_str(0,"After a moment's reverie, she resumes. _The rest of the story, you know. That is, save one detail. Ethass loved Legare, and so did I._",0);
	add_dialog_str(1,"She looks down now, embarrassed. _I have been possessing Ethass's body to speak to Legare for some time. I am not sure that he ever really understood that we were not the same person. I know he loved at least one of us. I'm just not sure which one._",0);
	add_dialog_str(2,"She sighs. _And that is our story. That is who I am. Do what you will._",0);
	add_dialog_str(3,"What do you say?",0);
	add_dialog_choice(0,"(Nothing.)");
	add_dialog_choice(1,"What does any of this have to do with the vahnatai and the crystal pillars?");
	if (run_dialog(1) == 2)
		message_dialog("The Goddess turns to you. _That was the dirtiest trick we ever played, Nathaganth and I. The vahnatai and the sliths used to live together in these regions. The sliths served the vahnatai. But then the vahnatai went into their Resting._","She sighs. _Nathaganth and I tampered with the machinery so that they would never wake up. The sliths have passed on the tradition for more than a thousand years that they must protect those pillars, but the pillars cannot activate without intervention._");
	
	set_character_facing(67,0);
	text_bubble_on_char(80,"Who are you now?");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(80,"");
	text_bubble_on_char(80,"Althanazaria or Hathnazriakh?");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(80,"");
	text_bubble_on_char(67,"I am Althanazaria.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(67,"I renounce my old life.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(67,"This I promise to you.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	text_bubble_on_char(67,"");
	text_bubble_on_char(80,"Then you may stay.");
	force_instant_terrain_redraw();
	pause(get_flag(290,0) * 5);
	
	message_dialog("Looking exhausted, Pithoss says, _Please, everyone, get some rest. You have made ready to depart, and in a short time, we will go. Kass and I must discuss, though._","As everyone else is filtering out, he addresses you. _You should get some rest, too. Come speak to me when you have slept. Then I will be able to tell you where we are going next._");
	
	// End cut scene.
	set_character_facing(9,4);
	j = 35;
	while (j <= 81) {
		erase_char(j);
		j = j + 1;
		}
	
	march_party(44,26);
	march_party(43,26);
	march_party(42,26);
	march_party(41,26);
	force_view_center(41,26);
	force_instant_terrain_redraw();
	
	message_dialog("You return to your tent and settle down for a brief respite.","");
	
	set_flag(44,10,1);
	
	force_view_center(4,4);
	force_instant_terrain_redraw();
	
	reset_dialog();
	add_dialog_str(0,"You drift to sleep, and in the middle of your rest, you hear the voice of the Goddess.",0);
	add_dialog_str(1,"_Thank you for coming to my rescue,_ she says. _Since you aided me, I will grant you the ability to ask for my aid in turn._ She whispers the secrets of an incredibly powerful blessing spell into your ears. (You learn two levels of Divine Warrior.)",0);
	add_dialog_str(2,"_I also grant to you one of the most powerful weapons a mortal can wield: a spear that I have personally blessed, one wielded by Khalthas himself in the wars of conquest of Khitaloss. You will find it beside you when you wake._",0);
	add_dialog_str(3,"She continues, _I fear for the soul of Legare, who was so foully cursed by Vakhoss. Awake now, and find Pithoss._ With that you wake up, fully rested.",0);
	inc_flag(44,10,run_dialog(1));
	set_flag(293,0,1);
	set_flag(293,5,2);
	
	revive_party();
	reward_give(94);
	
	i = 0;
	while (char_ok(i) == 0)
		{i = i + 1; }
	force_view_center(char_loc_x(i),char_loc_y(i));
	force_instant_terrain_redraw();
	
break;

beginstate 12;
if (get_flag(29,1) == 0)
	message_dialog("You approach Machrone to talk to him, but he is too busy preparing the orb for one of his reports. _Not now,_ he says regretfully. _Always happy to talk to an adventurer, but right now I'm busy._","");
else {
	if (get_flag(40,1) == 0) {
		reset_dialog();
		add_dialog_str(0,"Machrone is speaking into the Orb of Communication. _The expedition is at an impasse,_ he says, _and we are in danger of losing everything. Our leader, Legare, has abandoned us because of our lack of faith, and we cannot continue.",0);
		add_dialog_str(1,"_Is the Goddess real? Only Legare knows, if even he does, but certainly none of the rest of us do. We have never seen her, and we do not know if the miracles that we have seen are genuine. All we have is faith, and even that is in short supply.",0);
		add_dialog_str(2,"_The mood of the expedition is grim, as if some brooding gloom were hanging over the trip. It has been Legare's drive, Legare's ambition, Legare's need to go where we are going, that has been our guiding force.",0);
		add_dialog_str(3,"_Although many of us doubt the Goddess, none of us doubt Legare, and I suspect that most of us would be willing to accept the Goddess if doing so would bring back our leader.",0);
		add_dialog_str(4,"_After all, Silthokh was wrong about Phaedra. He could be wrong about the Goddess, too.",0);
		add_dialog_str(5,"_Nevertheless, all we can do is hope that Legare comes back soon._",0);
		run_dialog(1);
		}
	else {
		if (get_flag(44,7) == 0){
			reset_dialog();
			add_dialog_str(0,"Machrone still speaks into his orb. _Disaster has struck us again, the worst that the expedition has ever faced. The Goddess whom Legare worshipped was real enough, but she was a dark goddess in disguise. We fear the punishment for devil-worship.",0);
			add_dialog_str(1,"_The Goddess is gone, but our friend Ethass, whose body she was possessing, is gone with her, and we must recover her. We don't know how Ethass and the Goddess were connected or how much Ethass knew, but theories abound.",0);
			add_dialog_str(2,"_Some think that the Goddess has always manifested herself to Legare through Ethass from the beginning, since Pithoss and Ethass were the first to meet Legare when he came to Gnass. However, Legare claimed to have communed with the Goddess in Bahssikava.",0);
			add_dialog_str(3,"_Some think that the Goddess first began speaking into Legare's mind, but he wasn't able to see her until she possessed Ethass, sometime around the time the expedition arrived at Bahssikava.",0);
			add_dialog_str(4,"_Ethass may have learned about the Goddess through their connection, but maybe she didn't. Even if she did, would we blame her for not telling us? We might have been better off not knowing.",0);
			add_dialog_str(5,"_Either way, all are certain that we will receive some punishment for worshipping a dark goddess. We wait now in this camp for whatever that punishment might be._",0);
			run_dialog(1);
			}
		else
			message_dialog("You approach Machrone to talk to him, but he is too busy preparing to leave. _Not now,_ he says regretfully. _Always happy to talk to an adventurer, but right now I'm busy._","");
		}
	}
break;

beginstate 13;
break;

beginstate 14;
break;

beginstate 15;
	reset_dialog();
	add_dialog_str(0,"You have returned to your tent. What would you like to do?",0);
	add_dialog_choice(0,"Nothing.");
	add_dialog_choice(1,"Rest.");
	if (run_dialog(1) == 1)
		end();
	
	force_view_center(7,7);
	force_instant_terrain_redraw();
	
	block_entry(1);
	
	i = 0;
	while (char_ok(i) == 0)
		{i = i + 1; }
	march_party(41,26);
	march_party(42,26);
	march_party(43,26);
	march_party(44,26);
	
	revive_party();
	play_sound(20);
	
	message_dialog("You lay down in your tent and sleep uneventfully for a short time. When you wake, you are fully revived.","");
	
	force_view_center(char_loc_x(i),char_loc_y(i));
	force_instant_terrain_redraw();
break;

beginstate 16;
	message_dialog("This door is locked firmly and will not open.","");
break;