Started on the level editor
[butaba-adventures.git] / gameobjects.py
index e64dc91..b4992a3 100644 (file)
@@ -25,6 +25,21 @@ class GameObject:
        def use (self, otherobject):
                pass
 
+class GoldCoins (GameObject):
+       # initialize
+       def __init__ (self, row, col, image, value):
+               text = "gold coins"
+               self.value = value
+               GameObject.__init__ (self, row, col, text, image, False)
+
+       # no interaction with this object
+       def interact (self):
+               return True
+
+       # use the object on Butaba - add to his gold
+       def use (self, butaba):
+               butaba.gold += self.value
+
 
 class HealthPotion (GameObject):
        # initialize