dofile("Scripts/levelManager.lua");

LManager = LevelManager.create();

LManager:SetMaxChemistry(1200)

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

-- skewed square formation
LManager:AddTable(eTYPE_TABLE2, 280, 310);
LManager:AddTable(eTYPE_TABLE3, 460, 310);
LManager:AddTable(eTYPE_TABLE5, 230, 425);

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

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

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

guest = LManager.GenGuest(eTYPE_GUEST6);
guest.needs[1] = eWANT_DRINK;
guest.times[1] = 2500;
guest.needs[2] = eWANT_DRINK;
guest.times[2] = 33000;
guest.needs[3] = eWANT_DRINK;
guest.times[3] = 53000;
guest.needs[2] = eWANT_TALK;
guest.times[2] = 67000;
guest.needs[3] = eWANT_GIFT;
guest.times[3] = 85000;
guest.needs[4] = eWANT_TALK;
guest.times[4] = 110000;
guest.needs[5] = eWANT_DRINK;
guest.times[5] = 123000;
guest.needs[6] = eWANT_TALK;
guest.times[6] = 138000;
guest.needs[6] = eWANT_DRINK;
guest.times[6] = 145000;
guest.needs[7] = eWANT_DRINK;
guest.times[7] = 165000;
LManager:AddGuest(guest);

guest = LManager.GenGuest(eTYPE_GUEST7);
guest.needs[1] = eWANT_TALK;
guest.times[1] = 10000;
guest.needs[2] = eWANT_TALK;
guest.times[2] = 25000;
guest.needs[3] = eWANT_DRINK;
guest.times[3] = 53000;
guest.needs[4] = eWANT_DRINK;
guest.times[4] = 74000;
guest.needs[4] = eWANT_GIFT;
guest.times[4] = 88000;
guest.needs[5] = eWANT_TALK;
guest.times[5] = 103000;
guest.needs[6] = eWANT_DRINK;
guest.times[6] = 130000;
guest.needs[7] = eWANT_TALK;
guest.times[7] = 160000;
guest.needs[8] = eWANT_TALK;
guest.times[8] = 177000;
LManager:AddGuest(guest);

guest = LManager.GenGuest(eTYPE_GUEST5);
guest.needs[1] = eWANT_DRINK;
guest.times[1] = 18000;
guest.needs[2] = eWANT_DRINK;
guest.times[2] = 33000;
guest.needs[3] = eWANT_TALK;
guest.times[3] = 60000;
guest.needs[4] = eWANT_DRINK;
guest.times[4] = 74000;
guest.needs[5] = eWANT_DRINK;
guest.times[5] = 117000;
guest.needs[6] = eWANT_DRINK;
guest.times[6] = 130000;
guest.needs[6] = eWANT_DRINK;
guest.times[6] = 145000;
guest.needs[7] = eWANT_GIFT;
guest.times[7] = 153000;
guest.needs[8] = eWANT_GIFT;
guest.times[8] = 185000;
LManager:AddGuest(guest);

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

LManager:SetLevelNumber(1,7);
LManager:SetLevelScores(2000, 2200);
LManager:SetLevelTime(50000);

gameObject = LManager:GenerateGameObject();

levelSetting = LManager:GenerateLevelSettings();

TutorialSteps =
{

	start =
	{ 
		action = "",
		
		triggers = 
		{
			[1] = { condition = "GAME_TRIGGER", data = "eTRIGGER_UPGRADE_FULL", next = "step01" },
		}
	},
	

	step01 =	
	{
		action = "onTrigger = function() PlaceArrowOn(\"UPGRADE_BAR\"); TextBox(395, 380, \"Your upgrade bar is full.  That means you can use the upgrade you chose last level.  Click on it now.\", 9999000);  end",
	
		triggers = 
		{
			[1] = { condition = "GAME_TRIGGER", data = "eTRIGGER_UPGRADE_SELECT", next = "step02" },
		}
	},

	step02 = 
	{
		action = "onTrigger = function() HideArrows(); TextBox(395, 380, \"Depending on which upgrade you chose, they will help you in different ways.  Each use only lasts for a little while, though, so make the most of it.\", 9999000) end",
		
		triggers = 
		{
			[1] = { condition = "GAME_TRIGGER", data = "eTRIGGER_UPGRADE_EXPIRE", next = "step03" },
		}
	},
	
	step03 = 
	{
		action = "onTrigger = function() TextBox(395, 380, \"That's all there is to it!  As soon as your upgrade bar refills, you can use your upgrade again.\", 10000); end",
		
		triggers = 
		{			
		}
	},
	
}