class Item:
	def __init__(self):
		pass

	def draw(self, surface):
		pass

class PowerUp(Item):
	def __init__(self, player):
		self.player = player
		self.player.world.encounter.got_item('Powerup	'+self.__class__.__name__)
		#print self.__class__.__name__

	def doMagic(self):
		pass


class Speeed(PowerUp):
	def doMagic(self):
		self.player.maximumVelocity += 10
		if self.player.maximumVelocity > 30:
			self.player.maximumVelocity = 30

class Turtle(PowerUp):
	def doMagic(self):
		pass
		#self.player.maximumVelocity -= 10
		#if self.player.maximumVelocity < 1:
			#self.player.maximumVelocity = 1

class HeavyMachinery(PowerUp):
	def doMagic(self):
		self.player.world.physics.gravity += 4
		if self.player.world.physics.gravity > 30:
			self.player.world.physics.gravity = 30

class Insect(PowerUp):
	def doMagic(self):
		self.player.world.physics.gravity -= 4
		if self.player.world.physics.gravity < 2:
			self.player.world.physics.gravity = 2

class importAntiGravity(PowerUp):
	def doMagic(self):
		self.player.world.physics.gravity = 0

availablePowerUps = [Speeed, Turtle, HeavyMachinery, Insect, importAntiGravity]
