// Town script for town 8: Underground

begintownscript;

variables;

body;

beginstate INIT_STATE;
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
if(get_flag(7,2)==1){
	message_dialog("We descend into this dusty crypt. A gloomy light penetrates the crypt via the stairs, but it's not strong enough to cast a lot of light in this dark hole. We can barely see the other end, but what we can see is worrying. There is a large hole there.","While this is beneficial for us, it presents us with a big problem: The zombies may be spreading, carrying their disease to yet more towns. We should be quick now, not only for our own lives, but also for those of others.");
	set_flag(7,2,2);
	}
break;

beginstate 10;
if (is_combat() == 0)
		move_to_new_town(7,26,18);

message_dialog("We can only go on when we have regrouped and are not fighting, so let's do that first.","");
block_entry(1);
break;

beginstate 11;
if (is_combat() == 0)
		move_to_new_town(7,26,12);

message_dialog("We can only go on when we have regrouped and are not fighting, so let's do that first.","");
block_entry(1);
break;

beginstate 12;
if (is_combat() == 0)
		move_to_new_town(7,26,7);

message_dialog("We can only go on when we have regrouped and are not fighting, so let's do that first.","");
block_entry(1);
break;

beginstate 13;
if (is_combat() == 0)
		move_to_new_town(7,26,23);

message_dialog("We can only go on when we have regrouped and are not fighting, so let's do that first.","");
block_entry(1);
break;

beginstate 14;
if (is_combat() == 0) {
		if (get_flag(8,0) == 0)
				set_flag(8,0,1);

		move_to_new_town(9,26,36);
		}

message_dialog("We can only go on when we have regrouped and are not fighting, so let's do that first.","");
block_entry(1);
break;

beginstate 15;
if (is_combat() == 0) {
		if (get_flag(8,1) == 0)
				set_flag(8,1,1);

		move_to_new_town(9,14,21);
		}

message_dialog("We can only go on when we have regrouped and are not fighting, so let's do that first.","");
block_entry(1);
break;

beginstate 16;
if (is_combat() == 0) {
		if (get_flag(8,2) == 0)
				set_flag(8,2,1);

		move_to_new_town(9,29,11);
		}

message_dialog("We can only go on when we have regrouped and are not fighting, so let's do that first.","");
block_entry(1);
break;

beginstate 17;
if (get_flag(8,3 )== 0) {
		message_dialog("There is a split in ways here. Probably, the zombies dug up to see where they are, then went back and went on digging when they saw they are not at the right place. Maybe they are more intelligent than we thought they are.","");
		set_flag(8,3,1);
		}
break;