diff options
| author | Thomas Kluyver <takowl@gmail.com> | 2013-01-05 22:43:07 +0000 |
|---|---|---|
| committer | Thomas Kluyver <takowl@gmail.com> | 2013-01-05 22:43:07 +0000 |
| commit | 383211be939a37f813a266e3c6309548749de763 (patch) | |
| tree | 4ecb5d1d8e371a24919c4c2e02a3dc13b84a7780 | |
| parent | 9c2deffb71ed271e06d694b32bce6d4216afd59b (diff) | |
Add tile n2. Need to put in a flaming torch somewhere.
| -rw-r--r-- | weatbag/tiles/n2.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/weatbag/tiles/n2.py b/weatbag/tiles/n2.py new file mode 100644 index 0000000..53257f6 --- /dev/null +++ b/weatbag/tiles/n2.py @@ -0,0 +1,25 @@ +from weatbag import words + +class Tile: + def describe(self): + print("You are standing in the mouth of a cave. The air feels cool.") + + def leave(self, player, direction): + if direction=='s': + return True + if player.has('flaming torch'): + return True + print("You can't explore the cave without being able to see. You'll need " + "that stalwart friend of the adventurer, the flaming torch.") + + def action(self, player, do): + if (do[0] in words.use or do[0]=='light') and do[1]=='torch': + if player.has('unlit torch'): + player.take('unlit torch') + player.give('flaming torch') + print("The torch catches, casting a flickering light on the " + "cave walls.") + else: + print("Good plan, but you don't have a torch.") + + print("Sorry, I don't understand") |
