def update(self, dTime):
		MovingSprite.update(self, dTime)
		if self.target and not self.target.alive():
			self.kill()
		for e in pygame.sprite.spritecollide(self, self.dpTop.enemies, False):
			e.hurt(self.harm)
			self.kill()
			break
 def update(self, dTime):
     MovingSprite.update(self, dTime)
     if not self.target:
         if self.waypoints:
             self.target = self.waypoints[0]
             del self.waypoints[0]
         else:
             self.dpTop.health -= self.harm
             self.dpTop.healthField.st = "Health: " + str(self.dpTop.health)
             self.dpTop.healthField.createImage()
             self.kill()
	def update(self, dTime):
		AnimatedSprite.update(self, dTime)
		if not self.ghost:
			MovingSprite.update(self, dTime)
			if not self.target or not self.target.alive():
				print "finding new target"
				#find a suitable target
				ens = self.dpTop.enemiesWithinRange(self.rect.center, self.range)
				ens.sort(key=lambda x: -x.health)
				if ens:
					self.target = ens[0]
				else:
					self.target = None
			
			self.cooldown -= dTime
			#check whether we can drop an anvil
			if pygame.sprite.spritecollideany(self, self.dpTop.enemies) and self.cooldown <= 0:
				a = Anvil(self.dpTop)
				a.place(self.rect.center)
				self.dpTop.sprites.add(a)
				
				self.cooldown = 4000
 def update(self, dTime):
     MovingSprite.update(self, dTime)
     if self.pickedUp and not self.target:
         print "Killed!"
         self.kill()