level
{
	name "Level 06"
	number 06

	bonus time 60 // Initial bonus time, in seconds

	world
	{
		visitable
		{
			// Start room
			min_max (1536,-1280,1408) (2815,255,2687)			// Start part of room
			min_max (1024,-1280,896) (2815,255,1407)			// Center part
			min_max (1024,-1280,-640) (2303,767,895)			// Part leading out of room
			
			min_max (768,-256,-640) (1023,767,-129)				// First part of passage
			min_max (256,0,-640) (767,767,-129)						// 2nd part of passage
			
			// Second room
			min_max (-1024,-1280,-1920) (255,1023,-129)		// Part with lower ceiling
			min_max (-2304,-1280,-2432) (-1025,1535,-129)	// Part with higher ceiling
			
			min_max (-2560,512,-2432) (-2305,1535,-1665)	// Extra space at exit
			min_max (-2816,512,-2688) (-2049,1023,-1921)	// "Exit room"
		}
		
		not_visitable
		{
			// Start room
			min_max (2048,-1280,2176) (2815,-769,2687)		// Start plateau
			min_max (1536,-1280,2432) (2047,-769,2687)		// 2x1 leading to corner
			min_max (2304,-1024,1920) (2559,-769,2175)		// 1x1 sticking out from start
			
			min_max (2048,-1024,1152) (2559,-769,1663)		// 2x2 plateau after start
			min_max (2304,-1280,1152) (2559,-1025,1407)		// Pole under plateau above
			
			min_max (1280,-1280,384) (1791,-1025,895)			// Lowest step in "stairs"
			min_max (1280,-1280,-128) (1791,-769,383)			// Middle step in "stairs"
			min_max (1280,-1280,-640) (1791,-513,-129)		// Highest step
			min_max (1792,-256,-640) (2303,-1,-129)				// Plateau up in corner
			min_max (1024,-1280,-640) (1279,-257,-129)		// Step to passage to next room
			
			// Second room
			min_max (-256,-1280,-1408) (255,-1,-129)			// Big plateau at entrance in 2nd room
			min_max (0,-1280,-1920) (255,-1,-1409)				// 2x1 to the right
			min_max (-512,-256,-1408) (-257,-1,-897)			// 2x1 to jump from
			
			min_max (-1536,-512,-1408) (-769,-257,-897)		// Plateau in center of room
			min_max (-1280,-1280,-1152) (-1025,-513,-897)	// Pole under plateau
			
			min_max (-2304,-1280,-2432) (-1793,511,-1665)	// Plateau outside exit
			min_max (-1792,-1280,-2432) (-1025,511,-2177)	// 3x1 path leading away from exit plateau
		}
		
		exit // supports unlimited exits in the same level
		{
			min_max (-2816,512,-2688) (-2049,1023,-2433)
			min_max (-2816,512,-2432) (-2561,1023,-1921)
		}
		
		arrows
		{
			pos_dir (2432,-640,896,x-)
			pos_dir (1664,-640,-128,x+)
			pos_dir (2304,-128,256,z-)
			pos_dir (1920,128,-640,x-)
			pos_dir (128,128,-1920,x-)
			pos_dir (-2304,-640,-768,y+)
			pos_dir (-2304,384,-1280,z-)
		}
		
		start
		{
			pos (2432,-640,2432)
			angle (0,2048,0)  // Looking angle. 4096 = 360 degrees. Last angle (z) is unused
		}
	}

	lava
	{
		delay 20000
	}

	bubbles
	{
    ascending   // Spawn point for ascending bubbles
		{
			start (2048,-1664,128)
      end 640					// Bubbles will disappear when reaching this y-position
			firstdelay 0			// ms until spawning first bubble
      delay 5000				// ms between spawning new bubble
      maxBubbles 4			// maximum bubbles existing at the same time from this spawn
		}
    ascending   // Spawn point for ascending bubbles
		{
			start (-1536,-1664,-384)
      end 1408					// Bubbles will disappear when reaching this y-position
			firstdelay 2000		// ms until spawning first bubble
      delay 5000				// ms between spawning new bubble
      maxBubbles 5			// maximum bubbles existing at the same time from this spawn
			windaffected			// To be affected by the wind(s).
		}
	}
	
	wind
	{
		pos (-2048,-1280,-1536)	// Lower position/corner of wind cube
		pos (-1025,1535,-129)		// Upper position/corner of wind cube
		strength (-64,0,-112) // How many units per second the wind will move bubbles in x and z direction.
	}
	wind
	{
		pos (-2304,-1280,-1536)	// Lower position/corner of wind cube
		pos (-2048,1535,-129)		// Upper position/corner of wind cube
		strength (0,0,-112) // How many units per second the wind will move bubbles in x and z direction.
	}
	
	emeralds 14
	{
		required 11
		// First room
		pos (1792,-640,2432)
		pos (2304,-640,1408)
		pos (1920,-384,1024)
		pos (1536,-640,128)
		pos (2048,-768,128)
		pos (2048,-256,128)
		pos (2048,128,-384)
		pos (1024,-128,-384)	// moved from pos (1536,-384,-384)
		
		// Passage
		pos (512,128,-384)
		
		// Second room
		pos (0,128,-1664)
		pos (-1024,-128,-1152)
		pos (-1664,-128,-640)
		pos (-2048,640,-1920)
		pos (-1280,640,-2176)
	}
}