Mountain Folk Campaign

// the tutor annex
int gLevelDL;
Player gAIPlayer;
Player gHumanPlayer;
void configGame()
{
	addAIPlayer("Evil Fish", "Crypt Doctor", 0);
	dontNeedDecks();
	setMapSize(9, 8);
	setNumFluxWells(4);
	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 == 0)
	{
		DlgBox box = createDialog("Welcome to the Mountain Folk Campaign", "You have to fight the Sylvan and Dark Legion forces. You'll have to learn to utilize your strengths to get an award for this campaign. Each mission of the first part requires 6 Glory for victory.");
		box.addOption("Start", "", 3);
		box.show(gHumanPlayer);
	}
	if (gLevelDL > 3)
	{
		DlgBox box = createDialog("Welcome Back", "You have completed the first part already. Do you want to play a particular mission again?");
		box.addOption("Restart", "", 3);
		box.addOption("2", "", 5);
		box.addOption("3", "", 6);
		box.addOption("4", "", 7);
		box.show(gHumanPlayer);
	}
	else if (gLevelDL > 0)
	{
		DlgBox box = createDialog("Welcome Back", "Welcome Back to 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 campaign from the beginning?");
		box.addOption("Restart", "", 3);
		box.addOption("Continue", "", 2);
		box.show(gHumanPlayer);
	}
	else if (resp == 2)
	{
		switch (gLevelDL)
		{
		case 1:
			flipTheScript(419);
			break;
		case 2:
			flipTheScript(420);
			break;
		case 3:
			flipTheScript(421);
			break;
		}
	}
	else if (resp == 3)
	{
		flipTheScript(418);
	}
	else
	{
		gLevelDL = resp - 4;
		onDialogResponse(player, 2);
	}
}