diff options
| author | Kleopatra Angelidi <akleop@gmail.com> | 2013-04-22 00:48:51 +0300 |
|---|---|---|
| committer | Kleopatra Angelidi <akleop@gmail.com> | 2013-04-29 03:21:17 +0300 |
| commit | f2ccd5bd0de5f158467a60a06edcf637a963a3d8 (patch) | |
| tree | fc08db03c12bb03c7f865ff172e424ab24c57fbb | |
| parent | 7a4413f5d8963cb276580526213e69789182e5a3 (diff) | |
added an item for the inventory
| -rw-r--r-- | weatbag/tiles/n2w2.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index e16f4b8..c4f8575 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -3,22 +3,25 @@ from weatbag.utils import transfer class Tile: def __init__(self): - self.contents = {'key': 1} + self.contents = {'doorknob': 1} def describe(self): print("You are now on the island.") - if self.contents['key']: - print("As you walk around you find something shiny on the ground. Looks like a key.") - + if self.contents['doorknob']: + print("As you walk around you find something shiny on the ground. " + "It looks like a brass doorknob.") + else: + print("There is nothing interesting here") def action(self, player, do): - if (do[0] in words.take) and ('key' in do): - self.take_key(player) + if (do[0] in words.take) and ('doorknob' in do): + self.take_doorknob(player) + else: print("Sorry, I don't understand.") - def take_key(self, player): - if transfer('key', self.contents, player.inventory): - print("You pick up the key.") + def take_doorknob(self, player): + if transfer('doorknob', self.contents, player.inventory): + print("You pick up the doorknob.") else: print("There is nothing here.") |
