//////////////////////////////////////////////////////////////////////
// FILE NAME   : TET2001.TWS
// AUTHOR      : $Author: Cstewart $
// VERSION     : $Revision: 3 $
// DATE        : $Date: 10/26/01 6:41p $
// DESCRIPTION : Tetris WRATH
//               
//               
// (c) 2000-2001 Blue Planet Software.  All rights reserved.
//////////////////////////////////////////////////////////////////////


//
// Possible solutions
//
// - piece acceleration
// - multicolored pieces
// - garbage on sides
// - prevent overhangs by 'severing' centre
// - 

GeneralInfo
{
	PlayfieldColumns		10
	PlayfieldRows			22
	MaxMovementsPerSecond	10
	MaxRotationsPerSecond	5
	GameType				Levels
	RemoveFromBagAfterUse
	NextPieceQueueSize		8
}

MinoSticky
{
	0:	0
	1:	1
	2:	2
	3:	3
	4:	4
	5:	5
	6:	6
}

Mino
{
	Name	"Blue"
	Tags	0
}

Mino
{
	Name	"Turquoise"
	Tags	1
}

Mino
{
	Name	"Gray"
	Tags	2
}

Mino
{
	Name	"Green"
	Tags	3
}

Mino
{
	Name	"Orange"
	Tags	4
}

Mino
{
	Name	"Purple"
	Tags	5
}

Mino
{
	Name	"Red"
	Tags	6
}

Tetramino
{
	Name "T_BLUE"
	NumberInBag 1
	ID 1
	MinoList
	{
		"Blue"			(-1,0)
		"Blue"			(0,0)
		"Blue"			(1,0)
		"Blue"			(0,-1)
	}
	Rot0CWOffsetList	(0,0),(-1,0),(1,0),(0,-1)
	Rot90CWOffsetList	(0,0),(0,1),(0,-1),(-1,0)
	Rot180CWOffsetList	(0,0),(1,0),(-1,0),(0,1)
	Rot270CWOffsetList	(0,0),(0,-1),(0,1),(1,0)
}

Tetramino
{
	Name "T_Orange"
	NumberInBag 1
	ID 2
	MinoList
	{
		"Orange"			(-1,0)
		"Orange"			(0,0)
		"Orange"			(1,0)
		"Orange"			(0,-1)
	}
	Rot0CWOffsetList	(0,0),(-1,0),(1,0),(0,-1)
	Rot90CWOffsetList	(0,0),(0,1),(0,-1),(-1,0)
	Rot180CWOffsetList	(0,0),(1,0),(-1,0),(0,1)
	Rot270CWOffsetList	(0,0),(0,-1),(0,1),(1,0)
}

Tetramino
{
	Name "T_GRAY"
	NumberInBag 1
	ID 3
	MinoList
	{
		"Gray"			(-1,0)
		"Gray"			(0,0)
		"Gray"			(1,0)
		"Gray"			(0,-1)
	}
	Rot0CWOffsetList	(0,0),(-1,0),(1,0),(0,-1)
	Rot90CWOffsetList	(0,0),(0,1),(0,-1),(-1,0)
	Rot180CWOffsetList	(0,0),(1,0),(-1,0),(0,1)
	Rot270CWOffsetList	(0,0),(0,-1),(0,1),(1,0)
}

Tetramino
{
	Name "T_RED"
	NumberInBag 1
	ID 4
	MinoList
	{
		"Red"			(-1,0)
		"Red"			(0,0)
		"Red"			(1,0)
		"Red"			(0,-1)
	}
	Rot0CWOffsetList	(0,0),(-1,0),(1,0),(0,-1)
	Rot90CWOffsetList	(0,0),(0,1),(0,-1),(-1,0)
	Rot180CWOffsetList	(0,0),(1,0),(-1,0),(0,1)
	Rot270CWOffsetList	(0,0),(0,-1),(0,1),(1,0)
}





Tetramino
{
	Name "S_BLUE"
	NumberInBag 1
	ID 8
	MinoList
	{
		"Blue"		(0,0)
		"Blue"		(1,0)
		"Blue"		(-1,-1)
		"Blue"		(0,-1)
	}
	Rot0CWOffsetList	(0,0),(1,0),(-1,-1),(0,-1)
	Rot90CWOffsetList	(0,0),(0,-1),(-1,1),(-1,0)
	Rot180CWOffsetList	(0,0),(-1,0),(1,1),(0,1)
	Rot270CWOffsetList	(0,0),(0,1),(1,-1),(1,0)
}

Tetramino
{
	Name "S_Orange"
	NumberInBag 1
	ID 9
	MinoList
	{
		"Orange"		(0,0)
		"Orange"		(1,0)
		"Orange"		(-1,-1)
		"Orange"		(0,-1)
	}
	Rot0CWOffsetList	(0,0),(1,0),(-1,-1),(0,-1)
	Rot90CWOffsetList	(0,0),(0,-1),(-1,1),(-1,0)
	Rot180CWOffsetList	(0,0),(-1,0),(1,1),(0,1)
	Rot270CWOffsetList	(0,0),(0,1),(1,-1),(1,0)
}

Tetramino
{
	Name "S_GRAY"
	NumberInBag 1
	ID 10
	MinoList
	{
		"Gray"		(0,0)
		"Gray"		(1,0)
		"Gray"		(-1,-1)
		"Gray"		(0,-1)
	}
	Rot0CWOffsetList	(0,0),(1,0),(-1,-1),(0,-1)
	Rot90CWOffsetList	(0,0),(0,-1),(-1,1),(-1,0)
	Rot180CWOffsetList	(0,0),(-1,0),(1,1),(0,1)
	Rot270CWOffsetList	(0,0),(0,1),(1,-1),(1,0)
}

Tetramino
{
	Name "S_RED"
	NumberInBag 1
	ID 11
	MinoList
	{
		"Red"		(0,0)
		"Red"		(1,0)
		"Red"		(-1,-1)
		"Red"		(0,-1)
	}
	Rot0CWOffsetList	(0,0),(1,0),(-1,-1),(0,-1)
	Rot90CWOffsetList	(0,0),(0,-1),(-1,1),(-1,0)
	Rot180CWOffsetList	(0,0),(-1,0),(1,1),(0,1)
	Rot270CWOffsetList	(0,0),(0,1),(1,-1),(1,0)
}


Tetramino
{
	Name "Z_BLUE"
	NumberInBag 1
	ID 12
	MinoList
	{
		"Blue"		(-1,0)
		"Blue"		(0,0)
		"Blue"		(0,-1)
		"Blue"		(1,-1)
	}
	Rot0CWOffsetList	(0,0),(-1,0),(0,-1),(1,-1)
	Rot90CWOffsetList	(0,0),(0,1),(-1,0),(-1,-1)
	Rot180CWOffsetList	(0,0),(1,0),(0,1),(-1,1)
	Rot270CWOffsetList	(0,0),(0,-1),(1,0),(1,1)
}
Tetramino
{
	Name "Z_Orange"
	NumberInBag 1
	ID 13
	MinoList
	{
		"Orange"		(-1,0)
		"Orange"		(0,0)
		"Orange"		(0,-1)
		"Orange"		(1,-1)
	}
	Rot0CWOffsetList	(0,0),(-1,0),(0,-1),(1,-1)
	Rot90CWOffsetList	(0,0),(0,1),(-1,0),(-1,-1)
	Rot180CWOffsetList	(0,0),(1,0),(0,1),(-1,1)
	Rot270CWOffsetList	(0,0),(0,-1),(1,0),(1,1)
}
Tetramino
{
	Name "Z_GRAY"
	NumberInBag 1
	ID 14
	MinoList
	{
		"Gray"		(-1,0)
		"Gray"		(0,0)
		"Gray"		(0,-1)
		"Gray"		(1,-1)
	}
	Rot0CWOffsetList	(0,0),(-1,0),(0,-1),(1,-1)
	Rot90CWOffsetList	(0,0),(0,1),(-1,0),(-1,-1)
	Rot180CWOffsetList	(0,0),(1,0),(0,1),(-1,1)
	Rot270CWOffsetList	(0,0),(0,-1),(1,0),(1,1)
}

Tetramino
{
	Name "Z_RED"
	NumberInBag 1
	ID 15
	MinoList
	{
		"Red"		(-1,0)
		"Red"		(0,0)
		"Red"		(0,-1)
		"Red"		(1,-1)
	}
	Rot0CWOffsetList	(0,0),(-1,0),(0,-1),(1,-1)
	Rot90CWOffsetList	(0,0),(0,1),(-1,0),(-1,-1)
	Rot180CWOffsetList	(0,0),(1,0),(0,1),(-1,1)
	Rot270CWOffsetList	(0,0),(0,-1),(1,0),(1,1)
}


Tetramino
{
	Name "L_Blue"
	NumberInBag 1
	ID 16
	MinoList
	{
		"Blue"	(0,1)
		"Blue"	(0,0)
		"Blue"	(0,-1)
		"Blue"	(1,-1)
	}
	Rot0CWOffsetList	(0,0),(0,1),(0,-1),(1,-1)
	Rot90CWOffsetList	(0,0),(1,0),(-1,0),(-1,-1)
	Rot180CWOffsetList	(0,0),(0,-1),(0,1),(-1,1)
	Rot270CWOffsetList	(0,0),(-1,0),(1,0),(1,1)
}
Tetramino
{
	Name "L_Orange"
	NumberInBag 1
	ID 17
	MinoList
	{
		"Orange"	(0,1)
		"Orange"	(0,0)
		"Orange"	(0,-1)
		"Orange"	(1,-1)
	}
	Rot0CWOffsetList	(0,0),(0,1),(0,-1),(1,-1)
	Rot90CWOffsetList	(0,0),(1,0),(-1,0),(-1,-1)
	Rot180CWOffsetList	(0,0),(0,-1),(0,1),(-1,1)
	Rot270CWOffsetList	(0,0),(-1,0),(1,0),(1,1)
}
Tetramino
{
	Name "L_Gray"
	NumberInBag 1
	ID 18
	MinoList
	{
		"Gray"	(0,1)
		"Gray"	(0,0)
		"Gray"	(0,-1)
		"Gray"	(1,-1)
	}
	Rot0CWOffsetList	(0,0),(0,1),(0,-1),(1,-1)
	Rot90CWOffsetList	(0,0),(1,0),(-1,0),(-1,-1)
	Rot180CWOffsetList	(0,0),(0,-1),(0,1),(-1,1)
	Rot270CWOffsetList	(0,0),(-1,0),(1,0),(1,1)
}
Tetramino
{
	Name "L_RED"
	NumberInBag 1
	ID 19
	MinoList
	{
		"Red"	(0,1)
		"Red"	(0,0)
		"Red"	(0,-1)
		"Red"	(1,-1)
	}
	Rot0CWOffsetList	(0,0),(0,1),(0,-1),(1,-1)
	Rot90CWOffsetList	(0,0),(1,0),(-1,0),(-1,-1)
	Rot180CWOffsetList	(0,0),(0,-1),(0,1),(-1,1)
	Rot270CWOffsetList	(0,0),(-1,0),(1,0),(1,1)
}


Tetramino
{
	Name "J_BLUE"
	NumberInBag 1
	ID 20
	MinoList
	{
		"Blue"	(0,1)
		"Blue"	(0,0)
		"Blue"	(0,-1)
		"Blue"	(-1,-1)
	}
	Rot0CWOffsetList	(0,0),(0,1),(-1,-1),(0,-1)
	Rot90CWOffsetList	(0,0),(1,0),(-1,1),(-1,0)
	Rot180CWOffsetList	(0,0),(0,-1),(1,1),(0,1)
	Rot270CWOffsetList	(0,0),(-1,0),(1,-1),(1,0)
}
Tetramino
{
	Name "J_Orange"
	NumberInBag 1
	ID 21
	MinoList
	{
		"Orange"	(0,1)
		"Orange"	(0,0)
		"Orange"	(0,-1)
		"Orange"	(-1,-1)
	}
	Rot0CWOffsetList	(0,0),(0,1),(-1,-1),(0,-1)
	Rot90CWOffsetList	(0,0),(1,0),(-1,1),(-1,0)
	Rot180CWOffsetList	(0,0),(0,-1),(1,1),(0,1)
	Rot270CWOffsetList	(0,0),(-1,0),(1,-1),(1,0)
}
Tetramino
{
	Name "J_Gray"
	NumberInBag 1
	ID 22
	MinoList
	{
		"Gray"	(0,1)
		"Gray"	(0,0)
		"Gray"	(0,-1)
		"Gray"	(-1,-1)
	}
	Rot0CWOffsetList	(0,0),(0,1),(-1,-1),(0,-1)
	Rot90CWOffsetList	(0,0),(1,0),(-1,1),(-1,0)
	Rot180CWOffsetList	(0,0),(0,-1),(1,1),(0,1)
	Rot270CWOffsetList	(0,0),(-1,0),(1,-1),(1,0)
}
Tetramino
{
	Name "J_RED"
	NumberInBag 1
	ID 23
	MinoList
	{
		"Red"	(0,1)
		"Red"	(0,0)
		"Red"	(0,-1)
		"Red"	(-1,-1)
	}
	Rot0CWOffsetList	(0,0),(0,1),(-1,-1),(0,-1)
	Rot90CWOffsetList	(0,0),(1,0),(-1,1),(-1,0)
	Rot180CWOffsetList	(0,0),(0,-1),(1,1),(0,1)
	Rot270CWOffsetList	(0,0),(-1,0),(1,-1),(1,0)
}


Tetramino
{
	Name "O_BLUE"
	NumberInBag 1
	ID 24
	MinoList
	{
		"Blue"		(0,0)
		"Blue"		(1,0)
		"Blue"		(0,-1)
		"Blue"		(1,-1)
	}
	Rot0CWOffsetList	(0,0)
	Rot90CWOffsetList	(-1,0)
	Rot180CWOffsetList	(-1,1)
	Rot270CWOffsetList	(0,1)
}
Tetramino
{
	Name "O_Orange"
	NumberInBag 1
	ID 25
	MinoList
	{
		"Orange"		(0,0)
		"Orange"		(1,0)
		"Orange"		(0,-1)
		"Orange"		(1,-1)
	}
	Rot0CWOffsetList	(0,0)
	Rot90CWOffsetList	(-1,0)
	Rot180CWOffsetList	(-1,1)
	Rot270CWOffsetList	(0,1)
}
Tetramino
{
	Name "O_Gray"
	NumberInBag 1
	ID 26
	MinoList
	{
		"Gray"		(0,0)
		"Gray"		(1,0)
		"Gray"		(0,-1)
		"Gray"		(1,-1)
	}
	Rot0CWOffsetList	(0,0)
	Rot90CWOffsetList	(-1,0)
	Rot180CWOffsetList	(-1,1)
	Rot270CWOffsetList	(0,1)
}

Tetramino
{
	Name "O_Red"
	NumberInBag 1
	ID 27
	MinoList
	{
		"Red"		(0,0)
		"Red"		(1,0)
		"Red"		(0,-1)
		"Red"		(1,-1)
	}
	Rot0CWOffsetList	(0,0)
	Rot90CWOffsetList	(-1,0)
	Rot180CWOffsetList	(-1,1)
	Rot270CWOffsetList	(0,1)
}



Tetramino
{
	Name "I_Blue"
	NumberInBag 1
	ID 28
	MinoList
	{
		"Blue"	(0,1)
		"Blue"	(0,0)
		"Blue"	(0,-1)
		"Blue"	(0,-2)
	}
	Rot0CWOffsetList	(0,0),(0,1),(0,-1),(0,-2)
	Rot90CWOffsetList	(0,0),(1,0),(-1,0),(-2,0)
	Rot180CWOffsetList	(0,0),(0,-1),(0,1),(0,2)
	Rot270CWOffsetList	(0,0),(-1,0),(1,0),(2,0)
}
Tetramino
{
	Name "I_Orange"
	NumberInBag 1
	ID 29
	MinoList
	{
		"Orange"	(0,1)
		"Orange"	(0,0)
		"Orange"	(0,-1)
		"Orange"	(0,-2)
	}
	Rot0CWOffsetList	(0,0),(0,1),(0,-1),(0,-2)
	Rot90CWOffsetList	(0,0),(1,0),(-1,0),(-2,0)
	Rot180CWOffsetList	(0,0),(0,-1),(0,1),(0,2)
	Rot270CWOffsetList	(0,0),(-1,0),(1,0),(2,0)
}
Tetramino
{
	Name "I_Gray"
	NumberInBag 1
	ID 30
	MinoList
	{
		"Gray"	(0,1)
		"Gray"	(0,0)
		"Gray"	(0,-1)
		"Gray"	(0,-2)
	}
	Rot0CWOffsetList	(0,0),(0,1),(0,-1),(0,-2)
	Rot90CWOffsetList	(0,0),(1,0),(-1,0),(-2,0)
	Rot180CWOffsetList	(0,0),(0,-1),(0,1),(0,2)
	Rot270CWOffsetList	(0,0),(-1,0),(1,0),(2,0)
}
Tetramino
{
	Name "I_RED"
	NumberInBag 1
	ID 31
	MinoList
	{
		"Red"	(0,1)
		"Red"	(0,0)
		"Red"	(0,-1)
		"Red"	(0,-2)
	}
	Rot0CWOffsetList	(0,0),(0,1),(0,-1),(0,-2)
	Rot90CWOffsetList	(0,0),(1,0),(-1,0),(-2,0)
	Rot180CWOffsetList	(0,0),(0,-1),(0,1),(0,2)
	Rot270CWOffsetList	(0,0),(-1,0),(1,0),(2,0)
}



Pattern
{
	Name			"BlueClear"
	Tags			0
	Method			Search
	SearchType		Ribbon
	SearchCount		3
	PatternMinoScript
	{
		* Patterns: line clear: Mino
		kill mino
	}
}

Pattern
{
	Name			"OrangeClear"
	Tags			4
	Method			Search
	SearchType		Ribbon
	SearchCount		3
	PatternMinoScript
	{
		* Patterns: line clear: Mino
		kill mino
	}
}

Pattern
{
	Name			"GrayClear"
	Tags			2
	Method			Search
	SearchType		Ribbon
	SearchCount		3
	PatternMinoScript
	{
		* Patterns: line clear: Mino
		kill mino
	}
}

Pattern
{
	Name			"RedClear"
	Tags			6
	Method			Search
	SearchType		Ribbon
	SearchCount		3
	PatternMinoScript
	{
		* Patterns: line clear: Mino
		kill mino
	}
}

Pattern
{
	Name			"GoalClear"
	Tags			1
	Method			Search
	SearchType		FloodFill4D
	SearchCount		12
	PatternMinoScript
	{
		* Patterns: line clear: Mino
		kill mino
		set pl.d9 to 1
	}
}




Trash
{
	Name	"OneTrash"	
	Height	5
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Red" (0,1)
		"Red" (0,2)
		"Red" (0,3)

		"Turquoise" (0,4)
		"Turquoise" (9,1)

	}
}


Trash
{
	Name	"TwoTrash"	
	Height	5
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Blue" (9,1)
		"Blue" (9,2)
		"Blue" (9,3)

		"Turquoise" (0,1)
		"Turquoise" (9,4)

	}
}



Trash
{
	Name	"ThreeTrash"	
	Height	4		
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Orange" (0,1)
		"Orange" (0,2)
		"Orange" (9,1)
		"Orange" (9,2)

		"Turquoise" (0,3)
		"Turquoise" (9,3)

	}
}


	
Trash
{
	Name	"FourTrash"	
	Height	4
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Gray" (0,1)
		"Gray" (0,2)
		"Blue" (9,1)
		"Blue" (9,2)

		"Turquoise" (0,3)
		"Turquoise" (9,3)

	}
}


Trash
{
	Name	"FiveTrash"	
	Height	5
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Red" (0,1)
		"Red" (0,2)
		"Orange" (0,3)
		"Orange" (0,4)

		"Red" (9,1)
		"Red" (9,2)
		"Orange" (9,3)
		"Orange" (9,4)

		"Turquoise" (0,4)
		"Turquoise" (9,4)

	}
}


Trash
{
	Name	"SixTrash"	
	Height	3		
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Blue" (0,1)
		"Gray" (0,2)

		"Gray" (9,1)
		"Blue" (9,2)

		"Turquoise" (0,3)
		"Turquoise" (9,3)

	}
}


Trash
{
	Name	"SevenTrash"	
	Height	4		
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Orange" (0,1)
		"Red"   (0,2)

		"Red"  (9,1)
		"Gray"  (9,2)

		"Turquoise" (0,3)
		"Turquoise" (9,3)

	}
}


Trash
{
	Name	"EightTrash"	
	Height	5
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Gray" (0,1)
		"Orange" (0,2)
		"Gray" (0,3)

		"Orange" (9,1)
		"Gray" (9,2)
		"Orange" (9,3)

		"Turquoise" (0,4)
		"Turquoise" (9,4)

	}
}

Trash
{
	Name	"NineTrash"	
	Height	5
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Red" (0,1)
		"Orange" (0,2)
		"Orange" (0,3)

		"Gray" (9,1)
		"Blue" (9,2)
		"Red" (9,3)

		"Turquoise" (0,4)
		"Turquoise" (9,4)

	}
}


Trash
{
	Name	"TenTrash"	
	Height	5
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Red"  (0,1)
		"Gray"  (0,2)
		"Orange" (0,3)

		"Orange" (9,1)
		"Blue"  (9,2)
		"Red"   (9,3)

		"Turquoise" (0,4)
		"Turquoise" (9,4)

	}
}


Trash
{
	Name	"ElevenTrash"	
	Height	6
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Gray"  (0,1)
		"Orange"  (0,2)
		"Orange" (0,3)
		"Red" (0,4)

		"Orange" (9,1)
		"Blue"  (9,2)
		"Red"   (9,3)
		"Gray"   (9,4)

		"Turquoise" (0,5)
		"Turquoise" (9,5)

	}
}


Trash
{
	Name	"TwelveTrash"	
	Height	6
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Red"  (0,1)
		"Gray"  (0,2)
		"Orange" (0,3)
		"Red" (0,4)

		"Gray" (9,1)
		"Blue"  (9,2)
		"Orange"   (9,3)
		"Red"   (9,4)

		"Turquoise" (0,5)
		"Turquoise" (9,5)

	}
}


Trash
{
	Name	"ThirteenTrash"	
	Height	6
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Blue"  (0,1)
		"Orange"  (0,2)
		"Gray" (0,3)
		"Red" (0,4)

		"Gray" (9,1)
		"Blue"  (9,2)
		"Orange"   (9,3)
		"Red"   (9,4)

		"Turquoise" (0,5)
		"Turquoise" (9,5)

	}
}



Trash
{
	Name	"FourteenTrash"	
	Height	7
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Blue"  (0,1)
		"Red"  (0,2)
		"Blue" (0,3)
		"Orange" (0,4)
		"Gray" (0,5)

		"Orange" (9,1)
		"Red"  (9,2)
		"Gray"   (9,3)
		"Gray"   (9,4)
		"Blue"   (9,5)

		"Turquoise" (0,6)
		"Turquoise" (9,6)

	}
}


Trash
{
	Name	"FifteenTrash"	
	Height	7
	MinoList		
	{
		"Turquoise" (0,0)
		"Turquoise" (1,0)
		"Turquoise" (2,0)
		"Turquoise" (3,0)
		"Turquoise" (4,0)
		"Turquoise" (5,0)
		"Turquoise" (6,0)
		"Turquoise" (7,0)
		"Turquoise" (8,0)
		"Turquoise" (9,0)

		"Gray"  (0,1)
		"Orange"  (0,2)
		"Red" (0,3)
		"Blue" (0,4)
		"Gray" (0,5)

		"Blue" (9,1)
		"Orange"  (9,2)
		"Red"   (9,3)
		"Gray"   (9,4)
		"Blue"   (9,5)

		"Turquoise" (0,6)
		"Turquoise" (9,6)

	}
}


Level
{
	Name "Level #1"
	LevelTrash "OneTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

Level
{
	Name "Level #2"
	LevelTrash "TwoTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

Level
{
	Name "Level #3"
	LevelTrash "ThreeTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

Level
{
	Name "Level #4"
	LevelTrash "FourTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

Level
{
	Name "Level #5"
	LevelTrash "FiveTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

Level
{
	Name "Level #6"
	LevelTrash "SixTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

Level
{
	Name "Level #7"
	LevelTrash "SevenTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

Level
{
	Name "Level #8"
	LevelTrash "EightTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

Level
{
	Name "Level #9"
	LevelTrash "NineTrash"
	LevelEndScript
	{
		sound "EVOLMT09"
	}
}

Level
{
	Name "Level #10"
	LevelTrash "TenTrash"
	LevelEndScript
	{
		sound "EVOLMT10"
	}
}

Level
{
	Name "Level #11"
	LevelTrash "ElevenTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

Level
{
	Name "Level #12"
	LevelTrash "TwelveTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

Level
{
	Name "Level #13"
	LevelTrash "ThirteenTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

Level
{
	Name "Level #14"
	LevelTrash "FourteenTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

Level
{
	Name "Level #15"
	LevelTrash "FifteenTrash"
	LevelEndScript
	{
		sound "EVOLMT01"
	}
}

GenerationPhase
{
	GenerationTime			0.0
	PieceStartingLocation	(4,0)
	GenerationBeginScript
	{
		* Phase: Generation Begin

		set pf.d3 to 0

		set pf.d6 to pf.d9 * 120 / level time

		if pf.d6 > pf.d5
		  set pf.d5 to pf.d6
		end

		if pf.d5 > pf.d4
		  set pf.d4 to pf.d5
		  set pf.d3 to 1
		end


	}
}

FallingPhase
{
	FallSpeed		1/(pf.d9/10 + 1) - 1/15
	SoftDropSpeed	0.05
	HardDropSpeed	0.0001
	MoveTolerance	0.2
}

LockPhase
{
	MovementRestartsClock
	Duration		0.5
}

PatternPhase
{
}

IteratePhase
{
}

EliminatePhase
{
	FallSpeed		0.05
	EliminateBeginScript
	{
		* Phase: Eliminate Begin

		* Reset the line clear counter for this phase

		set phase.d0 to 0

		* Reset level win script

		* set pl.d9 to 0
	}
	LineCollapsedScript
	{
		* Phase: Eliminate Line Collapsed

		* "Clear line" counter for this phase
		set phase.d0 to phase.d0 + 1
	}
	EliminateEndScript
	{
		* Phase: Eliminate End

		* if you find a single, add it to the score and flag single

		if phase.d0 = 1
    	  set pf.d9 to pf.d9 + 1
		  set pf.d0 to pf.d8 - pf.d9
		  set pl.d5 to 1
		  sound "FX_LNE01"
		  mino mood 2
		end

		* if you find a double, add it to the score and flag double

		if phase.d0 = 2
		  set pf.d9 to pf.d9 + 1
		  set pf.d0 to pf.d8 - pf.d9
		  set pl.d5 to 1
		  sound "FX_LNE02"
		  mino mood 3
		end

		* if you find a triple, add it to the score and flag triple

		if phase.d0 = 3
		  set pf.d9 to pf.d9 + 1
		  set pf.d0 to pf.d8 - pf.d9
		  set pl.d5 to 1
		  sound "FX_LNE03"
		  mino mood 5
		end

		* if you find a tetris, add it to the score and flag tetris

		if phase.d0 = 4
		  set pf.d9 to pf.d9 + 8
		  set pf.d9 to pf.d9 + pl.d5 - 1
		  set pf.d0 to pf.d8 - pf.d9
		  sound "FX_MTRIS"
		  sound "FX_LNE04"
		  set pl.d5 to pl.d5 * 2
		  mino mood 5
		end

		* check if reached goal conditions

		if pl.d9 = 1
		  set pl.d9 to 0
		  mino mood 5
		  next level
		end

	}
}

SolidifyPhase
{
}

GravityPhase
{
	// Gravity is enabled
	GravityEnabled				
	FallSpeed		0.1
}

CompletionPhase
{
}

EventScripts
{
	GameStartScript
	{
		* Game Events: Game Start

		set pf.d4 to 30
	}

	LevelStartScript
	{
		* Level Scripts: Level Start

		sound "TWM_BGIN"

		* set ghost to 1
		score 0
		set pf.d9 to 0
		set pf.d8 to level * 5
		set pf.d0 to pf.d8
		set pf.d6 to 0
		set pf.d5 to 0

		* if level is less than three say "go for a tetris"
		* else just play the one minute music
		
		if level < 3
		  set pl.d0 to 115
		else
		  set pl.d0 to 60
		end

		set pl.d5 to 1

		mino intensity high
	}

	LevelEndScript
	{
		* Level Scripts: Level End

		sound "TWM_END"
	}

	PieceGenerationScript
	{
		* Generation: Generated

		set pf.d2 to 0

		set pl.d6 to 0.1
	}

	MoveSuccessfulScript
	{
		* Move: Success

		* This clears the rotate flag.

		set pf.d1 to 0

		sound "FX_SLDEL"

	}

	MoveFailedScript
	{
		* Move: Fail

		sound "FX_UNMVE"
	}

	RotateSuccessfulScript
	{
		* Rotate: Success

		* This sets the rotate flag.

		set pf.d1 to 1

		sound "FX_RTATL"
	}

	RotateFailedScript
	{
		* Rotate: Fail

		sound "FX_UNMVE"
	}

	HardDropStartScript
	{
		* Hard Drop: Start

		set pf.d2 to 9
	}

	HardDropStepScript
	{
		* Hard Drop: Step

		* This clears the rotate flag.

		set pf.d1 to 0
	}

	SoftDropStepScript
	{
		* Soft Drop: Step

		* This clears the rotate flag.

		set pf.d1 to 0

		sound "FX_SFTDP"
	}

	FallStepScript
	{
		* Fall: Step

		* This clears the rotate flag.

		set pf.d1 to 0

		sound "FX_FALL"
	}

	TouchdownScript
	{
		* Touch: Touchdown

		* Clear the rotate flag (pf.d1)

		set pf.d1 to 0

	}

	LockdownScript
	{
		* Touch: Lock

		* Checks for a spin.

		if pf.d2 = 1 & pf.d1 = 1
		  set pf.d7 to 1
		  * add a 1 bonus for a t-spin
		  set pf.d9 to pf.d9 + 1
		  set pf.d0 to pf.d8 - pf.d9
		  sound "VO_TSPIN"
		end

		if pf.d2 = 9
		  sound "FX_HRDDP"
		else
		  sound "FX_LOCK"
		end
	}

	LevelSecondScript
	{
		* Time Events: Level Second

		if level time >= 3 & phase.d0 = 115
		  sound "VO_INT01"
		  set player.d0 to 60
		end

		if level time >= 60 & player.d0 = 60
		  sound "TWM_MIDL"
		  set player.d0 to 30
		  mino intensity high
		end

		if level time >= 90 & player.d0 = 30
		  sound "VO_30TIC"
		  set player.d0 to 20
		end

		if level time >= 100 & player.d0 = 20
		  sound "VO_20TIC"
		  set player.d0 to 10
		  mino intensity high
		end

		if level time >= 290 & player.d0 = 10
		  sound "VO_10TIC"
		  set player.d0 to 9
		end

		if level time >= 291 & player.d0 = 9
		  sound "VO_09TIC"
		  set player.d0 to 8
		end

		if level time >= 292 & player.d0 = 8
		  sound "VO_08TIC"
		  set player.d0 to 7
		end

		if level time >= 293 & player.d0 = 7
		  sound "VO_07TIC"
		  set player.d0 to 6
		end

		if level time >= 294 & player.d0 = 6
		  sound "VO_06TIC"
		  set player.d0 to 5
		end

		if level time >= 295 & player.d0 = 5
		  sound "VO_05TIC"
		  set player.d0 to 4
		end

		if level time >= 296 & player.d0 = 4
		  sound "VO_04TIC"
		  set player.d0 to 3
		end

		if level time >= 297 & player.d0 = 3
		  sound "VO_03TIC"
		  set player.d0 to 2
		end

		if level time >= 298 & player.d0 = 2
		  sound "VO_02TIC"
		  set player.d0 to 1
		end

		if level time >= 299 & player.d0 = 1
		  sound "VO_01TIC"
		  set player.d0 to 0
		end

		if level time >= 300 & player.d0 = 0
		  sound "VO_TIME"
		  * CJG change: game does not stop running upon loss, gotta do this to kill the VO.
		  set player.d0 to -1
		  lose
		end
	}
}