level
{
	name "Level 12"
	number 12

	bonus time 130 // Initial bonus time, in seconds

	world
	{
		visitable
		{
			min_max (-1024,-1792,-1280) (1535,2047,1279)	// Main room
			min_max (-1536,256,512) (-1025,767,1279)			// Exit
		}
		
		not_visitable
		{
			// Start floor
			min_max (0,-768,256) (511,-513,1279)			// Start plateau
			min_max (512,-768,-256) (767,-513,255)		// 2x1 to the right
			min_max (-256,-768,-256) (-1,-513,255)		// 2x1 to the left
			min_max (0,-768,-768) (255,-513,-257)		// short path opposite of start
			min_max (256,-768,-1280) (511,-513,-257)		// long path opposite of start
			
			// The poles in the corners
			min_max (512,-1792,256) (767,1023,511)		// Short, closer to start
			min_max (-256,-1792,256) (-1,1279,511)		// Long, closer to start
			min_max (512,-1792,-512) (767,1023,-257)	// Short, away from start
			min_max (-256,-1792,-512) (-1,1279,-257)	// Long, away from start
			
			// Bottom floor
			min_max (0,-1792,256) (511,-1281,511)			// 2x1 under start path
			min_max (512,-1792,-256) (767,-1281,255)	// 2x1 to the right
			min_max (-256,-1792,-256) (-1,-1281,255)	// 2x1 to the left
			min_max (0,-1792,-512) (511,-1281,-257)		// 2x1 opposite to start
			
			min_max (768,-1536,256) (1279,-1281,511)	// 2x1 leading to wall
			min_max (1280,-1792,256) (1535,-1281,1279)// 4x1 leading to corner
			min_max (-256,-1792,1024) (1279,-1281,1279)// 6x1 path along wall under start
			min_max (-768,-1280,1024) (-257,-1025,1279)// 2x1 on start wall
			min_max (-1024,-1280,512) (-769,-1025,1023)// 2x1 on wall left from start
			min_max (-1024,-1024,-512) (-769,-769,511)// Step up, 4x1 on left wall
			min_max (-1024,-1024,-768) (-513,-769,-513)// 2x1 sticking out from left wall
			min_max (-512,-1792,-1024) (-257,-513,-769)// Pole standing alone
			
			// Floor above start
			min_max (-256,0,-512) (767,255,511)				// The floor
			min_max (768,0,0) (1535,255,255)					// Path on right out to wall
			min_max (1280,0,-768) (1535,255,-257)			// 2x1 on wall
			min_max (0,512,-1280) (1023,767,-1025)		// 4x1 on wall opposite to start
			min_max (-512,768,-1280) (-1,1023,-1025)	// 2x1 on wall opposite to start
			
			// Top floor
			min_max (0,768,-512) (511,1023,-257)			// 2x1 opposite of start
			min_max (-256,768,-256) (-1,1023,255)			// 2x1 left of start
			min_max (0,768,256) (1279,1023,511)				// 5x1 sticking out
			min_max (1024,768,512) (1279,1023,767)		// 1x1
			min_max (768,768,768) (1279,1023,1023)		// 2x1 where parachute is
		}
		
		exit // supports unlimited exits in the same level
		{
			min_max (-1536,256,256) (-1025,767,1279)
		}
		
		arrows
		{
			pos_dir (384,-640,256,y-)
			pos_dir (-640,-640,-1280,y+)
			pos_dir (-1024,-640,-896,y+)
			pos_dir (-1024,640,-896,z-)
			pos_dir (-896,896,-1280,x+)
		}
		
		start
		{
			pos (256,-384,1024)
			angle (0,2048,0)  // Looking angle. 4096 = 360 degrees. Last angle (z) is unused
		}
	}

	lava
	{
		delay 30000	// ms per raise
	}
	
	bubbles
	{
		descending
		{
			start (256,-1920,0)
			end -128
			delay 8000      // ms
			maxBubbles 3
		}
		ascending
		{
			start (-768,-1920,-1024)
			end 1664
			delay 10000      // ms
			firstdelay 3000
			maxBubbles 4
		}
		ascending
		{
			start (1024,-1920,-512)
			end 1664
			delay 10000      // ms
			firstdelay 7000
			maxBubbles 4
		}
		descending
		{
			start (1280,-1920,-1024)
			end 1664
			delay 10000      // ms
			maxBubbles 4
		}
	}
	
	bonus_items
	{
		parachutes 1
		{
			pos (896,1152,896)
		}
	}
	
	emeralds 16
	{
		required 14
		// Start floor (=0)
		pos (256,-384,512)
		pos (384,-384,-896)
		pos (256,-768,0)
		
		// -1 floor
		pos (256,-1152,-384)
		pos (1280,-1152,384)
		pos (256,-1152,1152)
		pos (-768,-896,1024)
		pos (-384,-384,-896)
		
		// Along path to +1 floor
		pos (-256,1152,-1152)
		pos (1280,384,-1024)
		pos (384,384,128)
		pos (128,384,-128)
		
		// Floor +2
		pos (128,1152,-384)
		pos (-128,1408,384)
		pos (1152,1152,384)
		pos (-128,896,1152)
	}
}