level
{
	name "Level 13"
	number 13

	bonus time 60 // Initial bonus time, in seconds

	world
	{
		visitable
		{
			// Main room is divided in three segments along the z-axis
			min_max (-1280,-1280,256) (1023,1279,1279)		// Start
			min_max (-1024,-1280,-512) (1023,1279,255)		// Center
			min_max (-768,-1280,-1280) (1023,1279,-513)		// Most far away from start/exit
			min_max (1024,256,512) (1535,1023,1279)				// The exit room
		}
		
		not_visitable
		{
			min_max (256,-1280,768) (767,-513,1279)				// Start plateau
			min_max (0,-1280,256) (255,-769,767)					// 2x1 next to pole closest to start
			min_max (-256,-1280,512) (-1,255,767)					// Pole closest to start
			
			min_max (0,-1280,-256) (511,-1025,-1)					// 2x1 next to pole further away from start
			min_max (0,-1280,-512) (255,-1,-257)					// Pole further away from start
			
			min_max (768,-1280,-1280) (1023,-1025,-1)			// 5x1 path along wall
			
			min_max (0,-1280,-1280) (511,-1025,-1025)			// 2x1 path along wall getting closer to pole 2
			min_max (0,-1280,-1024) (255,-769,-513)				// 2x2 path leading up to pole 2
			
			min_max (-768,-1280,-1024) (-257,-769,-769)		// 2x1 part of S-shape closest to pole 2
			min_max (-768,-1280,-768) (-513,-769,-513)		// 1x1 center part of S-shape
			min_max (-1024,-1280,-512) (-513,-769,-257)		// 2x1 part of S-shape closer to pole 1
			
			min_max (-1024,-1280,0) (-769,-769,511)				// 2x1 path around bubble
			min_max (-1280,-1280,256) (-1025,-769,1023)		// Lower 3x1 path around bubble
			min_max (-1280,-1280,1024) (-513,-513,1279)		// Higher 3x1 path around bubble
			
			
			
			min_max (-512,256,512) (-1,511,1023)					// Plateau on pole closest to start
			
			min_max (-256,0,-768) (255,255,-257)					// Plateau on pole further away from start
			min_max (-256,0,-1280) (-1,255,-769)					// Path from second plateau to wall
			min_max (-256,256,-1280) (767,511,-1025)			// 4x1 path along wall
			min_max (512,256,-1024) (767,511,-769)				// 1x1 to jump from to fly to exit
			
			min_max (768,-1280,256) (1023,255,1279)				// Plateau outside exit
		}
		
		exit // supports unlimited exits in the same level
		{
			min_max (1024,256,512) (1535,1023,1279)
		}
		
		arrows
		{
			pos_dir (128,-896,-256,x+)
			pos_dir (-768,-640,-640,z+)

		}
		
		start
		{
			pos (512,-256,1024)
			angle (0,2048,0)  // Looking angle. 4096 = 360 degrees. Last angle (z) is unused
		}
	}

	lava
	{
		// start pos is now automatic
		delay 20000	// ms per raise of 8 units
	}
	
	bubbles
	{
		ascending
		{
			start (-768,-1408,768)
			end 1152
			delay 8000      // ms
			maxBubbles 3
		}
	}
	
	bird
	{
		loop
		pos (-256,-768,0)
		pos (512,-768,0)
		pos (512,-768,-768)
		pos (256,-576,-1024)
		pos (-512,-576,-1024)
		pos (-512,-576,-256)
	}
	
	bonus_items
	{
		parachutes 2
		{
			pos (-384,640,640)	// On plateau 1
			pos (-128,384,-768)	// On plateau 2
		}
		
		extra life (128,384,-384)	// On plateau 2
	}

	emeralds 13
	{
		required 10
		pos (128,-640,512)
		pos (512,-896,-128)
		pos (896,-896,-768)
		pos (512,-896,-1152)
		pos (128,-640,-640)
		pos (-640,-640,-640)
		pos (-896,-640,-384)
		pos (-896,-640,384)
		pos (-640,-384,1152)
		pos (-128,640,896)
		pos (-128,384,-384)
		pos (384,640,-1152)
		pos (768,384,640)
	}
}