Mercurial > skaapsteker
view skaapsteker/sprites/items.py @ 297:2844edb6c1cc
Hook up maneki, kaneda2 and the fishmonger who were hiding in limbo (i.e. not in game.json).
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Fri, 08 Apr 2011 22:36:03 +0200 |
parents | 15b2be883a40 |
children | c6552e9fc2e1 |
line wrap: on
line source
from base import Item class TeaCup(Item): image_file = 'teacup_empty.png' class TeaLeaf(Item): image_file = 'tealeaf.png' class TeaCupFull(Item): image_file = 'teacup_full.png' class TeaPot(Item): image_file = 'teapot.png' portable = False def setup(self, brewed, **opts): super(TeaPot, self).setup(**opts) def player_action(self, player): if player.has_item('tealeaf'): self.item_state.brewed = True player.discard_item() return if player.has_item('teacup'): if self.item_state.brewed: player.discard_item() player.take_item_by_name('teacupfull') self.item_state.brewed = False else: print "Sadly, the teapot is empty." class Vase(Item): image_file = 'dummy.png' def setup(self, broken, **opts): super(Vase, self).setup(**opts) self.broken = broken class Salmon(Item): image_file = 'dummy.png'