level
{
	name "Level 14"
	number 14

	bonus time 75 // Bonus time in seconds

	world
	{
		visitable
		{
			min_max (256,-1280,384) (1535,511,2687)				// Start room
			min_max (512,-256,-128) (767,511,383)					// Pass-through to next room, part 1
			min_max (256,-256,-128) (511,511,127)					// Pass-through to next room, part 2
			min_max (0,-256,-128) (255,767,383)						// Pass-through to next room, part 3
			min_max (-1536,-1280,-1152) (-1,1279,383)			// Second room
			min_max (-1536,512,-1920) (-1025,1279,-1153)	// Exit of second room
			min_max (-1024,512,-1920) (255,1279,-1665)		// Small passage to exit
			min_max (-256,-768,-3456) (255,1279,-1921)		// Hole where exit is
		}
		
		not_visitable
		{
			// Start room
			min_max (256,-1280,1920) (767,-1025,2687)			// Start plateau
			min_max (768,-1280,2432) (1535,-1025,2687)		// Path from start plateau along wall
			// Bubble
			min_max (1280,-1280,1152) (1535,-769,1919)		// Lower part on other side of bubble
			min_max (1280,-1280,384) (1535,-513,1151)			// Higher part leading into corner
			
			min_max (768,-1280,896) (1023,-513,1151)			// Pole in the middle of the room
			
			min_max (256,-1280,384) (511,-513,1151)				// Back on start-side, corner where exit room
			min_max (512,-1280,384) (767,-257,639)				// Plateau where exit room
			
			// Second room
			min_max (-1280,-1280,128) (-257,-257,383)			// Path along wall where entering room
			min_max (-1536,-1280,-640) (-1281,-1,383)			// Path opposite to where entering
			min_max (-1280,-256,-384) (-1025,-1,-129)			// Small rock sticking out
			min_max (-1536,-1280,-1152) (-1281,511,-641)	// Path outside exit of room
			min_max (-256,-1280,-1152) (-1,255,-385)			// 3x1 of L-shape right when entering room
			min_max (-768,-1280,-1152) (-257,255,-897)		// 2x1 of L-shape
		}
		
		exit // supports unlimited exits in the same level
		{
			min_max (-256,-768,-3456) (255,1255,-1921)
		}
		
		arrows
		{
			pos_dir (1536,-640,1792,z-)
			pos_dir (1408,-384,384,x-)
			pos_dir (256,-384,1024,z-)
			pos_dir (-896,-128,384,x-)
			pos_dir (-256,-128,-512,y+)
			pos_dir (0,384,-512,z-)
			pos_dir (-1280,128,-768,y+)
			pos_dir (-1536,640,-1024,z-)
		}
		
		start
		{
			pos (512,-768,2432)
			angle (0,2048,0)  // Looking angle. 4096 = 360 degrees. Last angle (z) is unused
		}
	}
	
	lava
	{
		// start pos is now automatic
		delay 8000	// ms per raise of 8 units
	}
	
	bubbles
	{
		// First room
		stopping
		{
			start (1024,-1408,1664)
			end 384
			delay 8000      // ms
			firstdelay 4000
			maxBubbles 3
		}
		ascending
		{
			start (1024,-1408,640)
			end 384
			delay 8000      // ms
			maxBubbles 3
		}
		
		// Second room
		descending
		{
			start (-256,-1408,-128)
			end 1152
			delay 9000      // ms
			firstdelay 3000
			maxBubbles 3
		}
		stopping
		{
			start (-640,-1408,-384)
			end 1152
			delay 9000      // ms
			maxBubbles 3
		}
		ascending
		{
			start (-1024,-1408,-896)
			end 1152
			delay 9000      // ms
			firstdelay 6000
			maxBubbles 3
		}
	}
	
	bonus_items
	{
		lavastopper (1152,-896,2560)
	//	lavastopper (1024,-768,1664)
		lavastopper (896,-384,1024)
		lavastopper (-256,-256,-128)
	//	lavastopper (-1152,128,-256)
	//	lavastopper (-1408,640,-1792)
	}
	
	emeralds 14
	{
		required 12
		// First room
		pos (1408,-896,2560)
		pos (384,-896,2048)
		pos (1408,-640,1792)
		pos (1408,-384,512)
		pos (384,-384,1024)
		
		// Passage to next room
		pos (640,-128,0)
		
		// Second room
		pos (-1152,-128,256)
		pos (-1408,128,-512)
		pos (-640,256,-384)
		pos (-128,384,-640)
		pos (-512,384,-1024)
		
		// Passage to exit
		pos (-1152,640,-1280)
		pos (-1408,640,-1792)
		pos (-128,640,-1792)
	}
}