class 'l_05_Majong' (LevelEventHandler)

local MAX_INDEX = 8

local SKIP = false

local VIOLET = '_vi'
local GREEN = '_gr'
local BLUE = '_bl'

local SHADOW = '!SHADOW_'
local LIGHT = '!LIGHT_ONE'
local SEC_LIGHT = '!LIGHT_TWO'

local BUG = 'bug_'
local CHEST = 'chest_'
local COIN = 'coin_'
local COMPASS = 'compass_'
local FLAG = 'flag_'
local GOAT = 'goat_'
local GUN = 'gun_'
local LAMP = 'lamp_'
local MARK = 'mark_'
local PARROT = 'parrot_'
local ROPE = 'rope_'
local RUBY = 'ruby_'
local SABER = 'saber_'
local SHIP = 'ship_'
local SKULL = 'skull_'
local SPIDER = 'spider_'
local WHEEL = 'wheel_'

function l_05_Majong:__init(name)
	LevelEventHandler.__init(self, name)
	
	self.names = { BUG, CHEST, COIN, COMPASS, FLAG, GOAT, GUN, LAMP, MARK, PARROT, ROPE, RUBY, SABER, SHIP, SKULL, SPIDER, WHEEL }
	self.colors = { BLUE, GREEN, VIOLET }
	
	ObjectOpacity( '!LETTER_LIGHT', 0, 0 )
	Object( 'Area_for_tool_take' ):SetZ( 1 )
	ObjectOpacity( '!LETTER_START', 0, 0 )
	ObjectOpacity( '!LETTER', 0, 0 )
	ObjectOpacity( LIGHT, 0, 0 )
	ObjectOpacity( SEC_LIGHT, 0, 0 )
	
	self.CommonArray = { [ VIOLET ] = {}, [ GREEN ] = {}, [ BLUE ] = {} }
	self:MakeCommonArray()
	
	self.Aviable = { }
	self:MakeAviableArray()
	self:SetAviableCursors()
	
	self.Pair = {}
	
	self:CreateButtonReset()
	
	self:ArrowMove()
	
	self.ArrayOfSave = { self.CommonArray, self.Aviable }
	
	self:ApplyTool()
	--self:TakeTool()
	self:RegisterToolFindMG( '05_deciphered_parchment_01' )
	
	self:LoadGame()
		
end

function l_05_Majong:SkipMiniGame()
	
	SKIP = true
	ObjectOpacity( SEC_LIGHT, 0, 0 )
	ObjectOpacity( LIGHT, 0, 0 )
	self:GetPanelLuaObject():SetMode( EPanelMode.PM_QUEST )
	self:HideChips()
	self:IgnoreChips( true )
	self:DestroyShadows()
	Object( 'Area_for_tool_take' ):SetZ( 200 )
	AddUniqueGameState( 'game', 'completed' )	
	self.custom_cursors[ 'Area_for_tool_take'  ] = 'CursorActive'
	
	self.textEntity = CreateTextEntity( PLAYER_NAME_FONT, 'MG_05_STRING' )
	self.textEntity:AttachTo( Object( '!LETTER' ) )
	self.textEntity:SetXY( -512 / 2 + 100, -384 / 2 + 50 )
	self.textEntity:SetScale( 1.1 )
	self.textEntity:SetZ( 29 )
	self.textEntity:SetTracking( 4 )
	self.textEntity:SetSpacing( 0.8 )
	self.textEntity:SetBorderSize( 400, 100 )
	self.textEntity:SetColor( '0xFF222266' )
	self.textEntity:SetTextAlignment( HGETEXT_TOP + HGETEXT_LEFT )
	self.textEntity:SetOpacity( 0 )
	self.textEntity:ChangeOpacity( 0, 1, 1 )
	
end

function l_05_Majong:OnButtonPress(title)
	
	if( title == 'Button_reset' ) then
		
		ObjectOpacity( SEC_LIGHT, 0, 0 )
		ObjectOpacity( LIGHT, 0, 0 )
		
		Object( SEC_LIGHT ):SetXY( 0, 0 )
		Object( LIGHT ):SetXY( 0, 0 )
		
		self:HideChips()
		self:DestroyShadows()
		self.CommonArray = { [ VIOLET ] = {}, [ GREEN ] = {}, [ BLUE ] = {} }
		self:MakeCommonArray()
		
		self:CreateShadows()
		self:ShowChips( 0 )
		
		self.Aviable = { }
		self:MakeAviableArray()
		self:SetAviableCursors()
		
		self:IgnoreChips( false )
		
		self.Pair = {}
		
		self:SaveGame()
		
	end
	
end

function l_05_Majong:SaveGame()

	self.ArrayOfSave = { self.CommonArray, self.Aviable }
	Helpers.SaveObjectToGameState( self.name, self.ArrayOfSave )
	
end

function l_05_Majong:LoadGame()

	if( IsMiniGameCompleted( self.name ) ) then
		self:GetPanelLuaObject():SetMode( EPanelMode.PM_QUEST )
		
		ObjectOpacity( '!LETTER', 0, 0 )
		self:IgnoreChips( true )
		self:DestroyShadows()
		self:HideChips()
		
		CompleteMinigame( 1 )
		
	elseif( HasGameState( 'game', 'completed' ) ) then
		
		self:IgnoreChips( true )
		self:DestroyShadows()
		self:HideChips()
		Object( 'Area_for_tool_take' ):SetZ( 200 )
		ObjectOpacity( '!LETTER', 1, 0 )
		self:GetPanelLuaObject():SetMode( EPanelMode.PM_QUEST )
		self.custom_cursors[ 'Area_for_tool_take'  ] = 'CursorActive'
		
		self.textEntity = CreateTextEntity( PLAYER_NAME_FONT, 'MG_05_STRING' )
		self.textEntity:AttachTo( Object( '!LETTER' ) )
		self.textEntity:SetXY( -512 / 2 + 100, -384 / 2 + 50 )
		self.textEntity:SetScale( 1.1 )
		self.textEntity:SetZ( 29 )
		self.textEntity:SetTracking( 4 )
		self.textEntity:SetSpacing( 0.8 )
		self.textEntity:SetBorderSize( 400, 100 )
		self.textEntity:SetColor( '0xFF222266' )
		self.textEntity:SetTextAlignment( HGETEXT_TOP + HGETEXT_LEFT )
		
	else
		local save = Helpers.RestoreObjectFromGameState( self.name )
		if( save ~= nil ) then
			self:GetPanelLuaObject():SetMode( EPanelMode.PM_MINIGAME )
			self.ArrayOfSave = save
			
			self:HideChips()
				
			self:DestroyShadows()
			self.CommonArray = self.ArrayOfSave[ 1 ]
			
			self:CreateShadows()
			self:ShowChips( 0 )
			
			self.Aviable = self.ArrayOfSave[ 2 ]
			
			self:SetAviableCursors()
			self:IgnoreChips( false )
			
			
		end
	end
	
end

function l_05_Majong:OnScreenObjectMouseDown(object, key)
	
	if( key == HGEK_LBUTTON ) then
	
		local name = object:GetName()
		
		if( name == 'Area_for_tool_take' ) then
			ObjectOpacity( '!LETTER_LIGHT', 0, 0 )
			ObjectOpacity( '!LETTER', 0, 0 )
			object:SetVisible(false)
			CompleteMinigame( 1 )
		else
		
			local color = string.sub( name, -3 )
			local thing = string.sub( name, 1, string.len( name ) - 2 )
			thing = string.gsub( thing, '[_%d]', '' )
			thing = thing .. '_'
			local validName = false
			for index = 1, #self.names do
				if( thing == self.names[ index ] ) then
					validName = true
					break
				end
			end
			
			--// processing chip
			if( validName ) then
				if( self:Accessible( name, color ) ) then
					local x = Object( name ):GetX()
					local y = Object( name ):GetY()
					Object( SEC_LIGHT ):SetXY( x - 4, y - 4 )
					
					ObjectOpacity( SEC_LIGHT, 1, 0 )
					
					ObjectOpacity( LIGHT, 0, 0 )
					
					MakeSoundEntity( '05_mg_choose_chip' ):StopSound(  )
					MakeSoundEntity( '05_mg_choose_chip' ):PlaySound( false )
					
					if( #self.Pair == 0 ) then
						table.insert( self.Pair, name )
					elseif( #self.Pair == 1 ) then
						
						if( self.Pair[ 1 ] == name ) then
							--// second click at the same chip make move reset
							
							table.remove( self.Pair )
							ObjectOpacity( SEC_LIGHT, 0, 0 )
							Object( SEC_LIGHT ):SetXY( 0, 0 )
							
						elseif( self.Pair[ 1 ] ~= name ) then
							--// if the pair has coincided
							
							if( self:Equivalent( self.Pair[ 1 ], name ) ) then
							
								MakeSoundEntity( '05_mg_chips_dissapearing' ):StopSound( )
								MakeSoundEntity( '05_mg_chips_dissapearing' ):PlaySound( false )
							
								self:IgnoreChips( true )
								self.timer:Add( function()
									if not( self:Win() ) then
										self:IgnoreChips( false )
									end
								end, 0.5 )
							
								ObjectOpacity( self.Pair[ 1 ], 0, 0.5 )
								ObjectOpacity( name, 0, 0.5 )
								
								ObjectOpacity( SEC_LIGHT, 0, 0.5 )
								ObjectOpacity( LIGHT, 0, 0.5 )
								
								self:DestroyShadow( self.Pair[ 1 ] )
								self:DestroyShadow( name )
								
								for color, objects in pairs( self.CommonArray ) do
									for index = 1, #self.CommonArray[ color ] do
										if( self.CommonArray[ color ][ index ] == self.Pair[ 1 ] ) then
											table.remove( self.CommonArray[ color ], index )
										end

									end
								end
								
								for color, objects in pairs( self.CommonArray ) do
									for index = 1, #self.CommonArray[ color ] do
										if( self.CommonArray[ color ][ index ] == name ) then
											table.remove( self.CommonArray[ color ], index )
										end
									end
								end
								
								
								self:MakeAviableArray()
								self:SetAviableCursors()
								
								self:SaveGame()
								
								table.remove( self.Pair )
								
								if( self:Win() ) then
								
									self.textEntity = CreateTextEntity( PLAYER_NAME_FONT, 'MG_05_STRING' )
									self.textEntity:AttachTo( Object( '!LETTER' ) )
									self.textEntity:SetXY( -512 / 2 + 100, -384 / 2 + 50 )
									self.textEntity:SetScale( 1.1 )
									self.textEntity:SetZ( 29 )
									self.textEntity:SetTracking( 4 )
									self.textEntity:SetSpacing( 0.8 )
									self.textEntity:SetBorderSize( 400, 100 )
									self.textEntity:SetColor( '0xFF222266' )
									self.textEntity:SetTextAlignment( HGETEXT_TOP + HGETEXT_LEFT )
									self.textEntity:SetOpacity( 0 )
									self.textEntity:ChangeOpacity( 0, 1, 1 )
									
									self:GetPanelLuaObject():SetMode( EPanelMode.PM_QUEST )
									Object( 'Area_for_tool_take' ):SetZ( 200 )
									self.custom_cursors[ 'Area_for_tool_take'  ] = 'CursorActive'
									AddUniqueGameState( 'game', 'completed' )	
								end
								
							else
							--// if the pair did not match
								table.remove( self.Pair )
								table.insert( self.Pair, name )
							end
						end
					end
					
				end
			end
		end
	end
	
end

function l_05_Majong:Equivalent( first_name, second_name )
	
	local firstType = string.sub( first_name, 1, string.len( first_name ) - 2 )
	firstType = string.gsub( firstType, '[_%d]', '' )
	
	local secondType = string.sub( second_name, 1, string.len( second_name ) - 2 )
	secondType = string.gsub( secondType, '[_%d]', '' )
	
	if( firstType == secondType ) then
		return true
	end
	return false

end

function l_05_Majong:UpperNeighbors( clicked_name, color )
	
	if( color == VIOLET ) then
	
		return false
		
	elseif( color == GREEN ) then
		
		for index = 1, #self.CommonArray[ VIOLET ] do
			local upperObject = self.CommonArray[ VIOLET ][ index ]
			if( IsIntersect( Object( clicked_name ), Object( upperObject ), 0 ) ) then
				return true
			end
		end
		return false
		
	elseif( color == BLUE ) then
		
		for index = 1, #self.CommonArray[ GREEN ] do
			local upperObject = self.CommonArray[ GREEN ][ index ]
			if( IsIntersect( Object( clicked_name ), Object( upperObject ), 0 ) ) then
				return true
			end
		end
		return false
		
	end
	
end

function l_05_Majong:BetweenNeighbors( clicked_name, color )

	local clickedX = Object( clicked_name ):GetX()
	local clickedY = Object( clicked_name ):GetY()
	
	local colorArray = self.CommonArray[ color ]
	
	local leftN = 0
	local rightN = 0
	
	for index = 1, #colorArray do
		local x = Object( colorArray[ index ] ):GetX()
		local y = Object( colorArray[ index ] ):GetY()
		if( y == clickedY ) then
			if( x <= clickedX - 45 and leftN == 0 ) then
				leftN = colorArray[ index ]
			end
			if( x >= clickedX + 45 and rightN == 0 ) then
				rightN = colorArray[ index ]
			end
			if( leftN ~= 0 and rightN ~= 0 ) then
				return true
			end
		end
	end
	return false
	
end

function l_05_Majong:TakeTool()

	local function take( event )
			
		if( not event.save ) then
			CompleteMinigame( 1 )
		end
		ObjectOpacity( '!LETTER_LIGHT', 0, 0 )
		ObjectOpacity( '!LETTER', 0, 0 )

	end
	
	RegisterToolFindInfo( '05_deciphered_parchment_01', 'Area_for_tool_take', take )
	
end

function l_05_Majong:ApplyTool()
	
	self:GetPanelLuaObject():SetMode( EPanelMode.PM_QUEST )
	self:HideChips()
	self:IgnoreChips( true )
	ObjectOpacity( '!ONLAY_TWO', 0, 0 )

	local function apply( event )
	
		if ( not event.save ) then
			
			MakeSoundEntity( '05_put_paper' ):PlaySound( false )
			ObjectOpacity( '!LETTER_START', 1, 0 )
			self.timer:Add( function()
				self:ShowChips( 1 )
				MakeSoundEntity( '05_mg_chips_appearing' ):PlaySound( false )
				self:CreateShadows()
				--[[
				self.textEntity = CreateTextEntity( PLAYER_NAME_FONT, 'MG_05_STRING' )
				self.textEntity:AttachTo( Object( '!LETTER' ) )
				self.textEntity:SetXY( -512 / 2 + 100, -384 / 2 + 50 )
				self.textEntity:SetScale( 1.1 )
				self.textEntity:SetZ( 29 )
				self.textEntity:SetTracking( -4 )
				self.textEntity:SetSpacing( 0.5 )
				self.textEntity:SetBorderSize( 400, 100 )
				self.textEntity:SetColor( '0xFF0000AA' )
				self.textEntity:SetTextAlignment( HGETEXT_TOP + HGETEXT_LEFT )
				]]
				ObjectOpacity( '!LETTER_START', 0, 1 )
				ObjectOpacity( '!LETTER', 1, 1 )
				ObjectOpacity( '!ONLAY_TWO', 1, 1 )
				self.timer:Add( function()
					self:GetPanelLuaObject():SetMode( EPanelMode.PM_MINIGAME )
					self:IgnoreChips( false )
				end, 1 )
			end, 0.7 )
		elseif( event.save ) then
			self:IgnoreChips( false )
			self:CreateShadows()
			--[[
			self.textEntity = CreateTextEntity( PLAYER_NAME_FONT, 'MG_05_STRING' )
			self.textEntity:AttachTo( Object( '!LETTER' ) )
			self.textEntity:SetXY( -512 / 2 + 100, -384 / 2 + 50 )
			self.textEntity:SetScale( 1.1 )
			self.textEntity:SetZ( 29 )
			self.textEntity:SetTracking( -4 )
			self.textEntity:SetSpacing( 0.5 )
			self.textEntity:SetBorderSize( 400, 100 )
			self.textEntity:SetColor( '0xFF0000AA' )
			self.textEntity:SetTextAlignment( HGETEXT_TOP + HGETEXT_LEFT )
			]]
			ObjectOpacity( '!LETTER_START', 0, 0 )
			ObjectOpacity( '!LETTER', 1, 0 )
			ObjectOpacity( '!ONLAY_TWO', 1, 0 )
			self:ShowChips( 0 )
			self:GetPanelLuaObject():SetMode( EPanelMode.PM_MINIGAME )
		end
		
		
		Object( event.target ):Hide()
		
	end
	RegisterToolApplyInfo( '05_parchment_01', 'Area_for_tool' , apply, 'BBT_MG_NEED_PERGAMENT' )

end

function l_05_Majong:HideChips()

	for color, objects in pairs( self.CommonArray ) do
		for index = 1, #objects do
			ObjectOpacity( objects[ index ], 0, 0 )
		end
	end
	
end

function l_05_Majong:ShowChips( time )
	
	for color, objects in pairs( self.CommonArray ) do
		for index = 1, #objects do
			ObjectOpacity( objects[ index ], 1, time )
		end
	end
	
end

function l_05_Majong:ArrowMove()
	
	local min = -45
	local max = 45
	
	local function oneMove()
		local amplitude = math.random( -45, 45 )
		Object( '!ARROW' ):Rotate( math.rad( amplitude ), 1 )
		
		self.timer:Add( 
			function()
				oneMove()
			end, 1 )
	end
	
	oneMove()
	
end

function l_05_Majong:CreateButtonReset()
	
	self.reset = ScriptCreateButton( Object( 'Button_reset' ), 'Button_reset', play_field:GetLevelScreen() )
	
end

function l_05_Majong:Win()
	
	if( #self.CommonArray[ VIOLET ] == 0 and #self.CommonArray[ GREEN ] == 0 and #self.CommonArray[ BLUE ] == 0 ) then
		return true
	end
	return false
	
end

function l_05_Majong:SetAviableCursors()
		
	for color, objects in pairs( self.CommonArray ) do
		for index = 1, #objects do
			self.custom_cursors[ objects[ index ] ] = 'CursorDefault'
		end
	end
	for index = 1, #self.Aviable do
		self.custom_cursors[ self.Aviable[ index ] ] = 'CursorActive'
	end
	
end

function l_05_Majong:MakeAviableArray()
	
	if( #self.Aviable > 0 ) then
		for index = 1, #self.Aviable do
			table.remove( self.Aviable )
		end
	end
	
	for color, objects in pairs( self.CommonArray ) do
		for index = 1, #objects do
			local name = objects[ index ]
 			if( self:Accessible( name, color ) ) then
				table.insert( self.Aviable, name )
			end
		end
	end
	
end

function l_05_Majong:Accessible( clicked_name, color )
	
	local between = self:BetweenNeighbors( clicked_name, color )
	local upper = self:UpperNeighbors( clicked_name, color )
	if not( between or upper ) then
		return true
	end
	return false
	
end

function l_05_Majong:MakeCommonArray()

	for color, objects in pairs( self.CommonArray ) do
		if( #self.CommonArray[ color ] > 0 ) then
			for index = 1, #self.CommonArray[ color ] do
				table.remove( self.CommonArray[ color ] )
			end
		end
	end	

	for object in play_field:GetObjects() do
		local objName = object:GetName()
		if( string.find( objName, VIOLET ) and not( string.find( objName, SHADOW ) ) ) then
			table.insert( self.CommonArray[ VIOLET ], objName )
		elseif( string.find( objName, GREEN ) and not( string.find( objName, SHADOW ) ) ) then
			table.insert( self.CommonArray[ GREEN ], objName )
		elseif( string.find( objName, BLUE ) and not( string.find( objName, SHADOW ) ) ) then
			table.insert( self.CommonArray[ BLUE ], objName )
		end
	end
	
end
	
function l_05_Majong:CreateShadows()

	local anim

	for color, objects in pairs( self.CommonArray ) do
		for index = 1, #objects do
			local objName = objects[ index ]
 			
 			local x = Object( objName ):GetX()
			local y = Object( objName ):GetY()
						
			anim = CreateAnimation( 'data/Texture/Minigames/05_Majong/Fish_ten.png', 0, 0, 120, 130, 1, 0 )
			anim:SetHotSpot(60,65)
			anim:SetBlendMode(2)
			anim:SetColor('0xFFFFFFFF')
			play_field:CreateObject( objName .. SHADOW, anim, 589, 686, 50, 0, 1, 1 )
			
			Object( objName .. SHADOW ):SetXY( x, y )
			play_field:IgnoreOnTestPoint( objName .. SHADOW )
 			
		end
	end
--[[
	local anim

	for index = 1, #self.names do
		for max_index = 1, MAX_INDEX do
			local chip = self.names[ index ]
			for ind, color in ipairs( self.colors ) do
				local objName = chip .. max_index .. color
				if( play_field:HasObject( objName ) ) then
					if not( play_field:HasObject( objName .. SHADOW ) ) then
						local x = Object( objName ):GetX()
						local y = Object( objName ):GetY()
						
						anim = CreateAnimation( 'data/Texture/Minigames/05_Majong/Fish_ten.png', 0, 0, 120, 130, 1, 0 )
						anim:SetHotSpot(60,65)
						anim:SetBlendMode(2)
						anim:SetColor('0xFFFFFFFF')
						play_field:CreateObject( objName .. SHADOW, anim, 589, 686, 50, 0, 1, 1 )
						
						Object( objName .. SHADOW ):SetXY( x, y )
						play_field:IgnoreOnTestPoint( objName .. SHADOW )
					end
				end
			end
		end
	end
	]]
end

function l_05_Majong:DestroyShadow( objName )

	Object( objName .. SHADOW ):Destroy()
	
end

function l_05_Majong:DestroyShadows(  )

	for color, objects in pairs( self.CommonArray ) do
		for index = 1, #objects do
			local objName = objects[ index ]
 			self:DestroyShadow( objName )
 			
		end
	end
	
end

function l_05_Majong:OnObjectMouseEnter(object)
	
	local name = object:GetName()
	
	if( string.find( name, LIGHT ) ) then
		ObjectOpacity( LIGHT, 1, 0 )
	else
		for index = 1, #self.Aviable do
			if( name == self.Aviable[ index ] ) then
				local x = Object( name ):GetX()
				local y = Object( name ):GetY()
				Object( LIGHT ):SetXY( x - 4, y - 4 )
				if( x - 4 == Object( SEC_LIGHT ):GetX() and y - 4 == Object( SEC_LIGHT ):GetY() ) then
					ObjectOpacity( LIGHT, 0, 0 )
				else
					ObjectOpacity( LIGHT, 1, 0 )
				end
			end
		end
	end
	if( HasGameState( 'game', 'completed' ) ) then
		if( string.find( name, 'Area_for_tool_take' ) ) then
			ObjectOpacity( '!LETTER_LIGHT', 1, 0 )
		end
	end
	
end

function l_05_Majong:OnObjectMouseLeave(object)
	
	local name = object:GetName()
	if( string.find( name, LIGHT ) ) then
		ObjectOpacity( LIGHT, 0, 0 )
	else
		
	end
	if( HasGameState( 'game', 'completed' ) ) then
		if( string.find( name, 'Area_for_tool_take' ) ) then
			ObjectOpacity( '!LETTER_LIGHT', 0, 0 )
		end
	end
	
end

function l_05_Majong:IgnoreChips( ignore )

	if( ignore ) then
		for color, objects in pairs( self.CommonArray ) do
			for index = 1, #objects do
				play_field:IgnoreOnTestPoint( objects[ index ] )
			end
		end
		self.reset:Stop()
	else
		for color, objects in pairs( self.CommonArray ) do
			for index = 1, #objects do
				play_field:DoNotIgnoreOnTestPoint( objects[ index ] )
			end
		end
		self.reset:Go()
	end
		
end
--------------------------------------------------------------------------------
-- CLEAR_ON_SAVE_BEGIN
-- Do not edit code listed below (generated by the editor on each save)
function l_05_Majong:LoadData(screen)
	local anim
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_roz_1.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lamp_1_vi',anim,450,247,149,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_roz_2.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bug_1_vi',anim,451,170,147,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_roz_3.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('flag_2_vi',anim,517,247,150,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_roz4.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ruby_1_vi',anim,384,170,146,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_1.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('compass_2_bl',anim,582,476,110,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_2.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lamp_2_bl',anim,320,247,103,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_3.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gun_3_bl',anim,450,476,108,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_4.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chest_3_bl',anim,188,247,101,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_7.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('wheel_1_bl',anim,318,552,109,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_8.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('saber_1_bl',anim,518,399,108,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_9.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ship_2_bl',anim,384,552,110,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_10.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('skull_1_bl',anim,119,552,106,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_11.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bug_4_bl',anim,516,476,109,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_12.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('spider_2_bl',anim,185,552,107,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_13.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mark_3_bl',anim,650,399,110,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_14.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('coin_4_bl',anim,584,399,109,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_15.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('parrot_4_bl',anim,716,171,108,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_16.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('goat_2_bl',anim,519,171,105,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_17.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ruby_2_bl',anim,254,247,102,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_1.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('compass_1_gr',anim,486,208,134,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_3.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chest_1_gr',anim,154,208,129,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_4.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bug_3_gr',anim,353,208,132,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_5.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gun_2_gr',anim,353,521,122,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_6.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('parrot_2_gr',anim,553,208,135,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_8.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('coin_2_gr',anim,419,285,137,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_9.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('spider_1_gr',anim,551,361,140,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_10.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('goat_1_gr',anim,421,133,125,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_11.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ship_1_gr',anim,287,521,121,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_12.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mark_2_gr',anim,486,285,138,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/List.png',0,0,594,594,1,0)
	anim:SetHotSpot(297,297)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('!LETTER',anim,444,330,20,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/List_podsvetka.png',0,0,590,594,1,0)
	anim:SetHotSpot(295,297)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('!LETTER_LIGHT',anim,443,330,30,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/nakladka_rakushka.png',0,0,84,132,1,0)
	anim:SetHotSpot(42,66)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('!ONLAY_ONE',anim,202,358,150,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/nakladka_rakushka_2.png',0,0,82,74,1,0)
	anim:SetHotSpot(41,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('!ONLAY_TWO',anim,476,586,150,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/podsvetka_fishka.png',0,0,90,100,1,0)
	anim:SetHotSpot(45,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('!LIGHT_TWO',anim,677,652,160,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/strelka.png',0,0,84,204,1,0)
	anim:SetHotSpot(38,98)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('!ARROW',anim,872,499,100,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_roz_3.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('flag_1_vi',anim,518,170,148,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/DT4_MG_05_Mahjong_Bg.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('!BACKGROUND',anim,512,384,10,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_8.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('coin_3_gr',anim,553,285,139,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_5.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gun_1_gr',anim,220,208,130,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_3.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chest_2_gr',anim,287,208,131,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_6.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('parrot_3_gr',anim,619,208,136,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_4.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bug_2_gr',anim,355,133,124,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_8.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('coin_1_gr',anim,487,133,126,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_6.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('parrot_1_gr',anim,553,133,127,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_9.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ship_3_bl',anim,384,476,107,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_10.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('skull_2_bl',anim,252,476,105,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_12.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('spider_3_bl',anim,186,476,104,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_7.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('wheel_2_bl',anim,120,476,103,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_13.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mark_4_bl',anim,585,323,108,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_12.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('spider_4_bl',anim,452,323,106,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_13.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('mark_1_bl',anim,385,323,105,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_2.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lamp_4_bl',anim,716,247,109,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_8.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('saber_2_bl',anim,650,247,108,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_2.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lamp_5_bl',anim,584,247,107,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_7.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('wheel_3_bl',anim,518,247,106,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_11.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bug_5_bl',anim,452,247,105,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_8.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('saber_3_bl',anim,386,247,104,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_3.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gun_4_bl',anim,122,247,100,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_4.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('chest_4_bl',anim,584,171,106,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_2.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lamp_7_bl',anim,453,171,104,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_17.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ruby_3_bl',anim,387,171,103,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_16.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('goat_3_bl',anim,256,171,101,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_8.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('saber_4_bl',anim,190,171,100,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_2.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('lamp_8_bl',anim,124,171,99,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_10.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('skull_3_bl',anim,650,95,106,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_17.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ruby_4_bl',anim,584,95,103,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_16.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('goat_4_bl',anim,453,95,101,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_7.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('wheel_4_bl',anim,388,95,100,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_9.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ship_4_bl',anim,322,95,99,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/podsvetka_fishka.png',0,0,90,100,1,0)
	anim:SetHotSpot(45,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('!LIGHT_ONE',anim,576,644,160,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_11.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bug_6_bl',anim,252,552,108,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/List2.png',0,0,594,594,1,0)
	anim:SetHotSpot(297,297)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('!LETTER_START',anim,445,330,30,0,1,1)
	
	anim = CreateAnimation('data/Texture/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('Area_for_tool',anim,444,347,200,0,70,70)
	
	anim = CreateAnimation('data/Texture/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('Area_for_tool_take',anim,444,348,200,0,70,70)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_13.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('skull_4_gr',anim,420,208,133,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_5.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gun_5_gr',anim,220,521,120,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_3.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('gun_6_bl',anim,318,476,106,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_17.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ruby_5_bl',anim,321,171,102,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_17.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ruby_6_bl',anim,519,95,102,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_6.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rope_1_bl',anim,518,323,107,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_6.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rope_3_bl',anim,716,399,111,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_sinl_6.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rope_4_bl',anim,650,171,107,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/fish_zel_2.png',0,0,76,86,1,0)
	anim:SetHotSpot(38,43)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rope_2_gr',anim,619,133,128,0,1,1)
	
	anim = CreateAnimation('data/Texture/Minigames/05_Majong/reset.png',0,0,130,78,3,3)
	anim:SetHotSpot(65,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Button_reset',anim,120,352,200,0,1,1)
	
end
-- CLEAR_ON_SAVE_END
