Ejemplo n.º 1
0
 def use(self, user, direction=None):
     if direction is None:
         direction = ui.pick_direction()
         # if player exitted out if pick_direction or something:
         # just quit
         if direction is None:
             return False
     user.mana -= self.mana_use
     (dx, dy) = direction
     pos = (user.x, user.y)
     bullet = mob.Bullet(pos, self.damage, self.color, dx, dy)
     terrain.map.objects.append(bullet)
     return True