diff gamelib/animal.py @ 109:48019afde338

Equipment purchasing and some toolbar tweaks.
author Jeremy Thurgood <firxen@gmail.com>
date Wed, 02 Sep 2009 18:46:10 +0000
parents 437cbd856a03
children 4c2fbab20abe
line wrap: on
line diff
--- a/gamelib/animal.py	Wed Sep 02 18:42:00 2009 +0000
+++ b/gamelib/animal.py	Wed Sep 02 18:46:10 2009 +0000
@@ -9,6 +9,7 @@
 import tiles
 from misc import Position
 import sound
+import equipment
 
 class Animal(Sprite):
     """Base class for animals"""
@@ -49,7 +50,7 @@
         self.equipment.append(item)
 
     def weapons(self):
-        return [e for e in self.equipment if e.is_weapon]
+        return [e for e in self.equipment if equipment.is_weapon(e)]
 
     def covers(self, tile_pos):
         return tile_pos[0] == self.pos.x and tile_pos[1] == self.pos.y