dofile("Scripts/levelManager.lua");

LManager = LevelManager.create();

LManager:AddGame(eGAME_METER);
LManager:AddGame(eGAME_SPIN);
LManager:AddGame(eGAME_RECALL);
--LManager:AddGame(eGAME_SHELL);
--LManager:AddGame(eGAME_COMBO);

gameQueue = {

      eGAME_RECALL,
      eGAME_RECALL,
};
LManager:SetGameQueue(gameQueue);

LManager:AddTable(eTYPE_TABLE1, 160, 260);
--LManager:AddTable(eTYPE_TABLE2, 360, 260);
LManager:AddTable(eTYPE_TABLE3, 560, 260);
--LManager:AddTable(eTYPE_TABLE4, 140, 375);
LManager:AddTable(eTYPE_TABLE5, 340, 375);
--LManager:AddTable(eTYPE_TABLE6, 540, 375);
LManager:AddTable(eTYPE_TABLE7, 120, 490);
--LManager:AddTable(eTYPE_TABLE8, 320, 490);
LManager:AddTable(eTYPE_TABLE9, 520, 490);

seated = LManager.GenSeated(eTYPE_SEATED15);
seated.tableIdx = 1;
LManager:AddSeated(seated);

seated = LManager.GenSeated(eTYPE_SEATED4);
seated.tableIdx = 2;
LManager:AddSeated(seated);

seated = LManager.GenSeated(eTYPE_SEATED1);
seated.tableIdx = 3;
LManager:AddSeated(seated);

seated = LManager.GenSeated(eTYPE_SEATED3);
seated.tableIdx = 4;
LManager:AddSeated(seated);

seated = LManager.GenSeated(eTYPE_SEATED7);
seated.tableIdx = 5;
LManager:AddSeated(seated);

guest = LManager.GenGuest(eTYPE_GUEST3);
guest.needs[1] = eWANT_TALK;
guest.times[1] = 3000;
guest.needs[2] = eWANT_DRINK;
guest.times[2] = 27000;
guest.needs[3] = eWANT_DRINK;
guest.times[3] = 99000;
guest.needs[4] = eWANT_TALK;
guest.times[4] = 111000;
guest.needs[5] = eWANT_TALK;
guest.times[5] = 138000;
guest.needs[6] = eWANT_GIFT;
guest.times[6] = 150000;
guest.needs[7] = eWANT_DRINK;
guest.times[7] = 166000;
guest.needs[8] = eWANT_GIFT;
guest.times[8] = 199000;
LManager:AddGuest(guest);

guest = LManager.GenGuest(eTYPE_GUEST4);
guest.needs[1] = eWANT_TALK;
guest.times[1] = 9000;
guest.needs[1] = eWANT_TALK;
guest.times[1] = 39000;
guest.needs[2] = eWANT_DRINK;
guest.times[2] = 60000;
guest.needs[3] = eWANT_TALK;
guest.times[3] = 105000;
guest.needs[4] = eWANT_DRINK;
guest.times[4] = 123000;
guest.needs[5] = eWANT_TALK;
guest.times[5] = 144000;
guest.needs[6] = eWANT_GIFT;
guest.times[6] = 168000;
guest.needs[7] = eWANT_GIFT;
guest.times[7] = 212000;
LManager:AddGuest(guest);

guest = LManager.GenGuest(eTYPE_GUEST7);
guest.needs[1] = eWANT_TALK;
guest.times[1] = 15000;
guest.needs[2] = eWANT_DRINK;
guest.times[2] = 33000;
guest.needs[3] = eWANT_TALK;
guest.times[3] = 54000;
guest.needs[4] = eWANT_DRINK;
guest.times[4] = 68000;
guest.needs[5] = eWANT_TALK;
guest.times[5] = 93000;
guest.needs[6] = eWANT_GIFT;
guest.times[6] = 156000;
guest.needs[7] = eWANT_TALK;
guest.times[7] = 183000;
LManager:AddGuest(guest);

guest = LManager.GenGuest(eTYPE_GUEST1);
guest.needs[1] = eWANT_TALK;
guest.times[1] = 21000;
guest.needs[2] = eWANT_DRINK;
guest.times[2] = 48000;
guest.needs[3] = eWANT_TALK;
guest.times[3] = 75000;
guest.needs[4] = eWANT_GIFT;
guest.times[4] = 93000;
guest.needs[5] = eWANT_GIFT;
guest.times[5] = 117000;
guest.needs[6] = eWANT_TALK;
guest.times[6] = 122000;
guest.needs[7] = eWANT_TALK;
guest.times[7] = 190000;
LManager:AddGuest(guest);

guest = LManager.GenGuest(eTYPE_GUEST2);
guest.needs[1] = eWANT_TALK;
guest.times[1] = 3000;
guest.needs[2] = eWANT_DRINK;
guest.times[2] = 17000;
guest.needs[3] = eWANT_DRINK;
guest.times[3] = 31000;
guest.needs[4] = eWANT_TALK;
guest.times[4] = 60000;
guest.needs[5] = eWANT_GIFT;
guest.times[5] = 102000;
guest.needs[6] = eWANT_TALK;
guest.times[6] = 153000;
guest.needs[7] = eWANT_TALK;
guest.times[7] = 201000;
LManager:AddGuest(guest);

LManager:AdjustGuestHappiness(150);
LManager:SetSnackTime(40000);

LManager:SetLevelNumber(1,10);
LManager:SetLevelScores(5600, 6800);
LManager:SetLevelTime(45000);

gameObject = LManager:GenerateGameObject();

levelSetting = LManager:GenerateLevelSettings();

TutorialSteps =
{
	start =
	{ 
		action = "onTrigger = function() end",
		
		triggers = 
		{
			[1] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_RECALL", next = "step01" },
		}
	},
	
	step01 =
	{
		action = "onTrigger = function() FreezeTime(); TextBox(25, 330, \"Another conversation has started.  Give the guy a hand and help him focus on his date's interest.\", 5000); end",
		
		triggers = 
		{
			[1] = { condition = "TEXTBOX_DONE", data = "", next = "step02" },
			[2] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_WRONG", next = "step03" },
			[3] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_WIN", next = "step04" },
		}
	},
	
	step02 = 
	{
		action = "onTrigger = function() UnfreezeTime(); PlaceArrow(465, 246); TextBox(25, 330, \"Remember which topic was where!\", 9999000); end",
		
		triggers = 
		{
			[1] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_WRONG", next = "step03" },
			[2] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_WIN", next = "step04" },
		}
	},

	step03 = 
	{
		action = "onTrigger = function() UnfreezeTime(); TextBox(25, 330, \"Keep trying. Match the topic on the left.\", 9999000); end",
		
		triggers = 
		{
			[1] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_WIN", next = "step04" },
			[2] = { condition = "GAME_TRIGGER", data = "eTRIGGER_GAME_DONE", next = "step05" },
		}
	},
	
	step04= 
	{
		action = "onTrigger = function() UnfreezeTime(); HideArrows(); TextBox(25, 330, \"Another conversation completed successfully. \", 8000); end",
		
		triggers = 
		{		
		}
	},

	step05= 
	{
		action = "onTrigger = function() UnfreezeTime(); HideArrows(); TextBox(25, 330, \"Try again next time. \", 5000); end",
		
		triggers = 
		{		
		}
	},
}
