// town script for town 9: In the forest

begintownscript;

variables;

body;

beginstate INIT_STATE;
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
if (get_flag(8,0) == 1) {
		message_dialog("The zombies dug up here, and ended up in a small clearing. They tried attacking the trees, but without much success, it seems. They apparently turned back into their tunnel and started digging again. We'll have to turn back too, probably.","");
		set_flag(8,0,2);
		}

if (get_flag(8,1) == 1) {
		message_dialog("The zombies dug up here, and ended up in a small clearing. They tried attacking the trees, but without much success, it seems. They apparently turned back into their tunnel and started digging again. We'll have to turn back too, probably.","");
		set_flag(8,1,2);
		}

if (get_flag(8,2) == 1) {
		message_dialog("Seems the zombies had some luck at this try. The wood seems to be more alive here. It's not as sickly and pale as the land around the church. The ground still looks a bit sickly and there are some dead trees, but it's an improvement.","That's what the zombies seemed to think too, if they can think at all. They started ripping apart and smashing the foliage to make themselves a path. We'll follow them to the east and see how far they got.");
		set_flag(8,2,2);
		}
break;

beginstate 10;
if (is_combat() == 0)
		move_to_new_town(8,36,35);

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(8,29,15);

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;
message_dialog("We found a way out, and we should follow it. No use going back and meeting mister and missis zombie again.","");
block_entry(1);
break;

beginstate 13;
if (is_combat() == 0) {
		if (get_flag(9,0) == 0)
				set_flag(9,0,1);

		move_to_new_town(10,5,22);
		}

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;

// Due to a small error and laziness, there are no states 14, 15, 16 and 17

beginstate 18;
message_dialog("Falling down there doesn't seem like the best idea.","");
block_entry(1);
break;