---------------------------------------------------------------------------------------------------
--  Copyright © 2009 PoBros, Incorporated. All Rights Reserved.
--
--  This source code is the proprietary confidential property of PoBros Incorporated.
--  Modification, reproduction, publication, or distribution in any form to any party 
--  other than the licensee is strictly prohibited.
--
--  FOR USE BY AUTHORIZED PERSONS ONLY
---------------------------------------------------------------------------------------------------

require( "scripts/style.lua" );

local yoffset = 0;
local vialxoffset = 46;
local vialyoffset = 66;

dialogs =
{
	alchemy_dialog_intro =
	{
		name = "alchemy_dialog_intro";
		image = "autumn_thoughtful";
		sound = "autumn_gramps_working_properly_gems";
		text = "autumn_gramps_working_properly_gems";
	};
	
	alchemy_dialog_oncomplete =
	{
		name = "alchemy_dialog_oncomplete";
		image = "autumn_amused";
		sound = "autumn_ahha_right_another_journal_page";
		text = "autumn_ahha_right_another_journal_page";
	};
};

---------------------------------------------------------------------------------------------------

MakeDialog
{
	SetStyle( MinigameStyle );
	
	MinigameAlchemy
	{
		name = "alchemy";
		
		windowsprite =
		{
			sprite = "minigames/alchemy/background";
			xcenter = 400;
			ycenter = 300 - yoffset;
		};
		
		fireglow =
		{
			image = "minigames/alchemy/glow";
			x = 149;
			y = 321 + yoffset;
			glowtime = 500;
		};
		
		stand =
		{
			image = "minigames/alchemy/stand";
			x = 45;
			y = 363 + yoffset;
		};
		
		standfront =
		{
			image = "minigames/alchemy/standfront";
			x = 234;
			y = 433 + yoffset;
		};
		
		cliprect =
		{
			x = 0;
			y = 0;
			w = 800;
			h = 460;
		};
		
		sounds =
		{
			soundbottle =
			{
				name = "bottle";
				loop = false;
				initialdelay = 0;
				delay = 0;
				sounds = gs_soundBottleWood;
			};
			
			soundfire =
			{
				name = "fire";
				loop = true;
				initialdelay = 0;
				delay = 0;
				sounds = gs_soundCoalsFireCrackling;
			};
			
			sounddrop =
			{
				name = "drop";
				loop = false;
				initialdelay = 0;
				delay = 0;
				sounds = gs_soundCoalsWaterDrop;
			};
		};
		
		vials =
		{
			vial1 =
			{
				image = "minigames/alchemy/vialblue";
				x = 232 + vialxoffset;
				y = 306 + vialyoffset + yoffset;
				turndirection = -1;
				index = "B";
				
				particle =
				{
					script = "scripts/particles/6_potionsmoke.lua";
					functions = { "fSin"; };
					data = 
					{ 
						dPosition = { 325, 400 }; 
						dRed = { 0 };
						dGreen = { 0 };
						dBlue = { 1 };
					};
				};
			};
			
			vial2 =
			{
				image = "minigames/alchemy/vialred";
				x = 354 + vialxoffset;
				y = 306 + vialyoffset + yoffset;
				turndirection = -1;
				index = "R";
				
				particle =
				{
					script = "scripts/particles/6_potionsmoke.lua";
					functions = { "fSin"; };
					data = 
					{ 
						dPosition = { 447, 400 }; 
						dRed = { 1 };
						dGreen = { 0 };
						dBlue = { 0 };
					};
				};
			};
			
			vial3 =
			{
				image = "minigames/alchemy/vialyellow";
				x = 479 + vialxoffset;
				y = 306 + vialyoffset + yoffset;
				turndirection = 1;
				index = "Y";
				
				particle =
				{
					script = "scripts/particles/6_potionsmoke.lua";
					functions = { "fSin"; };
					data = 
					{ 
						dPosition = { 482, 400 };
						dRed = { 1 };
						dGreen = { 1 };
						dBlue = { 0 };
					};
				};
			};
			
			info =
			{
				timeviallift = 500;
				timevialrotate = 750;
				timedroprotate = 750;
				timedropmove = 550;
				timerolloveralpha = 400;
				timerollovermove = 350;
				distanceviallift = -150;
				distancestopperlift = -250;
				distancedrop = 210;
				distancerollover = -35;
				distancedropoffset = -50;
				alpharollover = 0.5;
				rotatevial = 0.25;
				rotatedrop = -0.25;
				
				soundpulse =
				{
					name = "pulse";
					loop = false;
					initialdelay = 0;
					delay = 0;
					sounds = gs_soundJewelPulsing;
				};
			};
		};
		
		gems =
		{
			gem1 =
			{
				image = "minigames/alchemy/gemorange";
				x = 316;
				y = 39 + yoffset;
				needed = "RY";
			};
			
			gem2 =
			{
				image = "minigames/alchemy/gemgreen";
				x = 370;
				y = 26 + yoffset;
				needed = "BY";
			};
			
			gem3 =
			{
				image = "minigames/alchemy/gempurple";
				x = 413;
				y = 39 + yoffset;
				needed = "RB";
			};
			
			info =
			{
				timeactivate = 500;
				timepulse = 500;
			};
		};
		
		MinigameButtons();
		AddMinigameTutorial( 400, 300, "alchemytutorial", "tutorial", -1 );
	};
};

---------------------------------------------------------------------------------------------------
