begintownscript;

variables;
short bmessage,leadchar,spcy,ghosts;
short talk,demi

body;

beginstate 0;

	leadchar = 0;
	while (char_ok(leadchar) == 0) {
		leadchar = leadchar + 1;
	}

	set_total_visibility(1);
	force_view_center(16,16);
	force_instant_terrain_redraw();
	pause(5);

	relocate_character(leadchar,16,25);
	set_character_facing(1000,0);
	force_instant_terrain_redraw();
	pause(5);

	spcy = 24;
	while(spcy >= 18){
		march_party(16,spcy);
		force_instant_terrain_redraw();
		pause(5);

		spcy = (spcy - 1);
	}

	reset_dialog();
	add_dialog_str(0,"You reach the summit of the hill.  On both sides of you are two black statues whose features droop, as well as two giant stone pillars which point towards the sky.",0);
	add_dialog_str(1,"Spiegelbrecher does not turn to face you.  He does not seem concerned with you, nor does he seem threatened.",0);
	if(party_size() > 1)
		add_dialog_str(2,"_Specialists...  Welcome to the manifestation of the power of the Underdog.  This is the last shrine of their order on this side of the world._",0);
	if(party_size() == 1)
		add_dialog_str(2,"_Specialist...  Welcome to the manifestation of the power of the Underdog.  This is the last shrine of their order on this side of the world._",0);
	add_dialog_choice(0,"You speak nonsense.");
	add_dialog_choice(1,"Prepare to die.");
	bmessage = run_dialog(1);

	reset_dialog();
	add_dialog_str(0,"Spiegelbrecher chuckles.  _Irony is such a lovely craft element, isn't it?_",0);
	add_dialog_str(1,"_I asked you to follow me, and physically you did.  And yet it's ironic insomuch as you did not follow me spiritually.  And yet further still..._",0);
	add_dialog_str(2,"_It's ironic because of the fate I have planned for you yet._",0);
	add_dialog_choice(0,"A Trap?");
	bmessage = run_dialog(1);

	reset_dialog();
	if(party_size() > 1)
		add_dialog_str(0,"_Goodbye, Specialists._",50);
	if(party_size() == 1)
		add_dialog_str(0,"_Goodbye, Specialist._",50);
	add_dialog_choice(0,"You fiend!");
	bmessage = run_dialog(0);

	activate_hidden_group(6);
	ghosts = 7;
	while(ghosts <= 10){
		put_effect_on_char(ghosts,1,4,0);

		ghosts = (ghosts + 1);
	}
	force_instant_terrain_redraw();
	run_animation_sound(10);
	pause(5);

	set_character_facing(6,4);
	force_instant_terrain_redraw();
	pause(5);

	ghosts = 7;
	while(ghosts <= 10){
		set_character_pose(ghosts,1);
		force_instant_terrain_redraw();
		play_sound(24);
		pause(5);

		ghosts = (ghosts + 1);
	}

	activate_hidden_group(7);
	put_boom_on_space(16,16,1,0);
	force_instant_terrain_redraw();
	run_animation_sound(152);

	reset_dialog();
	add_dialog_str(0,"Spiegelbrecher and the four spirits stare on with a sense of duty as the world seems to tear apart before you.  The two pillars give way to a world of dark red.",0);
	add_dialog_str(1,"The stench is rife with decomposition, demolition, and deconstruction.  This could only be one place.",0);
	add_dialog_str(2,"Suddenly, the gate begins to suck you in.  You cannot resist.  Or perhaps you don't want to.  You are inundated.",0);
	add_dialog_str(3,"Time to say hello to Leader.",0);
	bmessage = run_dialog(1);

	large_draw_pic_dialog(412,"You have finally arrived in the Land of the Dead.  Welcome home.");

	set_total_visibility(0);
	play_sound(10);
	play_sound(13);

	demi = 0;
	while(demi <= 3){
		if(char_ok(demi) == TRUE){
			while(get_flag(30,(demi + 5)) >= 1){
				change_spell_level(demi,1,15,1);
				inc_flag(30,(demi + 5),-1);
			}
		}
	demi = (demi + 1);
	}

	end_scenario(1);

break;

beginstate 1;
break;

beginstate START_STATE;
break;