Mercurial > skaapsteker
view skaapsteker/sprites/items.py @ 335:c6552e9fc2e1
Added aburage.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sat, 09 Apr 2011 12:15:19 +0200 |
parents | 2844edb6c1cc |
children | f870e3122ac7 |
line wrap: on
line source
from base import Item ################################################## # Collectibles class Aburage(Item): image_file = 'tofu.png' def player_action(self, player): player.eat_aburage() self.remove() ################################################## # Monk tea mission 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' def setup(self, brewed, **opts): super(TeaPot, self).setup(**opts) def player_action(self, player): if player.has_item('tealeaf'): self._me.brewed = True player.discard_item() return if player.has_item('teacup'): if self._me.brewed: player.discard_item() player.take_item_by_name('teacupfull') self._me.brewed = False else: print "Sadly, the teapot is empty." ################################################## # Unclassified 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'