function main(self)
	local claw = GetClaw()
	self:AnimationStep()
	if self.State == 0 then
		self.State = 1
		self.PhysicsType = 8
		self.AttackTypeFlags = ObjectType.Player
		--self.AttackRect = {-16,12,-30,42}
		Ychek = self.Y
		Xchek = self.X
	end
	if self.State == 1 then
		if (claw.X > self.X - 35) and (claw.X < self.X + 35) and (claw.Y > self.Y - 60) and (claw.Y < self.Y + 65) then
			claw.Health = claw.Health - 10
			claw:SetAnimation("CLAW_DAMAGE2")
			PlaySound("CLAW_1110049")
			--PlaySound("CLAW_HIT2")
			self:SetAnimation("GAME_CYCLE100")
			self.hit = CreateObject {x=claw.X, y=claw.Y-30, z=8000, logic="AniCycle", image="GAME_CLAWHIT"}
			if claw.Health <= 0 then
				KillClaw()
			end
			self.State = 3
		end 
		if claw.X <= self.XMax and claw.X >= self.XMin and claw.Y <= self.YMax and claw.Y >= self.YMin then
			self.State = 2	
		end
	end	
	if self.State == 2 then
		self.Y = self.Y + 7
		if (claw.X > self.X - 35) and (claw.X < self.X + 35) and (claw.Y > self.Y - 60) and (claw.Y < self.Y + 65) then
			self:Destroy()
			claw.Health = claw.Health - 10
			claw:SetAnimation("CLAW_DAMAGE1")
			PlaySound("CLAW_1110048")
			--PlaySound("CLAW_HIT1")
			--self.hit = CreateObject {x=claw.X, y=claw.Y-30, z=8000, logic="AniCycle", image="GAME_CLAWHIT"}
			if not self.startTime then
				self.startTime = GetTicks()
			end
			if claw.Health <= 0 then
				KillClaw()
				--self = CreateObject {x=Xchek, y=Ychek, z=1000, logic="CustomLogic", name="Stalactite2", image="LEVEL_STALAGCOVER"}
			end
		end
		if self.startTime and self.hit then
			if GetTicks() - self.startTime > 1000 then
					self.hit:Destroy()
					return
			end
		end
	end
	if self.State == 3 then
		if (claw.X <= self.X - 35) or (claw.X >= self.X + 35) or (claw.Y <= self.Y - 60) or (claw.Y >= self.Y + 65) then
			self.State = 1
			self.hit:Destroy()
		end	 
	end
end
