begintownscript;

variables;
short choice;

body;

beginstate 0; //INIT_STATE
	//intro dialog
	if(get_flag(4,0) == 0) {
	
		//let the party see the wreckage
		force_instant_terrain_redraw();
		pause(15);
	
		reset_dialog();
		add_dialog_str(0,"...wow. This... this is bad. You have a bad feeling about this. The lab is a wreck.",0);
		add_dialog_str(1,"You can see a huge obelisk through the empty doorways.",0);
		run_dialog(1);
		
		set_flag(4,0,1);
		}
	
	//regular setup
	set_crime_tolerance(1);

break;

beginstate 1; //EXIT_STATE
break;

beginstate 2; //START_STATE
	//Checking for the lead pc each turn... not necessary here
	//pc_counter = 0;
	//while(char_ok(pc_counter) == 0) {
	//	pc_counter = pc_counter + 1;
	//	}
	//lead_char = pc_counter;
break;

beginstate 10; //the obelisk
	if(get_flag(4,1) == 1)
		end();
		
	reset_dialog();
	add_dialog_str(0,"You are at a loss for words as you approach the obelisk. It is engraved with the Empire's familiar crown symbol, and below it, there's some text. Small trinkets have been piled around the base.",0);
	add_dialog_str(1,"There's also a highly-detailed bas relief. It depicts a team of mages attempting to subdue a rampaging demon.",0);
	add_dialog_str(2,"You're not sure you're ready to read the text.",0);
	run_dialog(1);
	
	set_flag(4,1,1);
break;


beginstate 15; //the collapsed basement
	if(get_flag(4,2) == 1)
		end();
	
	reset_dialog();
	add_dialog_str(0,"The stairs down to the basement are buried in rubble. Of course, if things unfolded the way you think they did, the stairs might've been blocked intentionally.",0);
	add_dialog_str(1,"You aren't going to be able to go downstairs.",0);
	run_dialog(1);
	
	set_flag(4,2,1);
break;