MF config 2

// the tutor annex
int gLevelDL;
Player gAIPlayer;
Player gHumanPlayer;
void configGame()
{
	addAIPlayer("Evil Fish", "Crypt Doctor", 0);
	dontNeedDecks();

	setMapSize(13, 12);
	setTurnTime(300);
	setPlayerTimeLimit(0);
}
void beforeStart()
{
	gAIPlayer = getAIPlayer(0);
	int ds = gAIPlayer.deckSize();
	for (int n = 0; n < ds; n++)
	{
		gAIPlayer.removeDeckCard(0);
	}
	gHumanPlayer = getHumanPlayer(0);
	ds = gHumanPlayer.deckSize();
	for (int n = 0; n < ds; n++)
	{
		gHumanPlayer.removeDeckCard(0);
	}
	gLevelDL = loadData(gHumanPlayer, 0);


}
void afterStart()
{
	if (gLevelDL == 4)
	{
		DlgBox box = createDialog("Mountain Folk Campaign part 2", "In the second part you will play a standard 12x13 sized map with 5 Flux Wells. Each mission requires 10 Glory to be victorious.");
		box.addOption("Start", "", 3);
		box.show(gHumanPlayer);
	}

	else if (gLevelDL < 4)
	{

		DlgBox box = createDialog("", "You can't play this before you finish the first part of the Mountain Folk Campaign.");
		box.addOption("Try Again", "", 3);
		box.show(gHumanPlayer);
		endGame(gHumanPlayer);
	}

	else if (gLevelDL > 7)
	{
		DlgBox box = createDialog("Welcome Back", "You have already completed the Mountain Folk Campaign. Do you want to play a particular mission again?");
		box.addOption("Restart", "", 3);
		box.addOption("2", "", 9);
		box.addOption("3", "", 10);
		box.addOption("4", "", 11);
		box.show(gHumanPlayer);
	}
	else
	{
		DlgBox box = createDialog("Welcome Back", "Welcome Back to the Mountain Folk Campaign. Do you want to continue from where you left off?");
		box.addOption("Restart", "", 1);
		box.addOption("Continue", "", 2);
		box.show(gHumanPlayer);
	}
}
void onDialogResponse(Player player, int resp)
{
	//statusMsg(gHumanPlayer,"onDialogResponse");
	if (resp == 1)
	{
		DlgBox box = createDialog("Are you Sure?", "Do you really want to restart the intro campaign from the beginning?");
		box.addOption("Restart", "", 3);
		box.addOption("Continue", "", 2);
		box.show(gHumanPlayer);
	}
	else if (resp == 2)
	{
		switch (gLevelDL)
		{
		case 5:
			flipTheScript(424);
			break;
		case 6:
			flipTheScript(425);
			break;
		case 7:
			flipTheScript(426);
			break;
		}
	}
	else if (resp == 3)
	{
		flipTheScript(423);
	}
	else
	{
		gLevelDL = resp - 4;
		onDialogResponse(player, 2);
	}
}