diff options
| author | Kleopatra Angelidi <akleop@gmail.com> | 2013-04-22 02:37:10 +0300 |
|---|---|---|
| committer | Kleopatra Angelidi <akleop@gmail.com> | 2013-04-29 03:21:17 +0300 |
| commit | c20f697b8fdebd05c437ac12cab3022416d339ab (patch) | |
| tree | 9fb2b2fe3969e0a4284d21f906b7ce799cd9bde3 /weatbag | |
| parent | ffc953be0e5dbefdd3e70f5136895f9d86aa91c5 (diff) | |
removed obsolet print in n3w3
Diffstat (limited to 'weatbag')
| -rw-r--r-- | weatbag/tiles/n3w3.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/weatbag/tiles/n3w3.py b/weatbag/tiles/n3w3.py new file mode 100644 index 0000000..2989c04 --- /dev/null +++ b/weatbag/tiles/n3w3.py @@ -0,0 +1,26 @@ +from weatbag import words +from weatbag.utils import transfer + +class Tile: + def __init__(self): + self.contents = {'doorknob': 1} + + def describe(self): + if self.contents['doorknob']: + print("As you walk through the path you find something shiny on " + "the ground beside some rocks.\nIt looks like a brass doorknob.") + else: + print("There is nothing to do here, all you see is your path and " + "the trees around!") + def action(self, player, do): + if (do[0] in words.take) and ('doorknob' in do): + self.take_doorknob(player) + + else: + print("Sorry, I don't understand.") + + def take_doorknob(self, player): + if transfer('doorknob', self.contents, player.inventory): + print("You pick up the doorknob.") + else: + print("There is nothing here.") |
