summaryrefslogtreecommitdiffstats
path: root/weatbag
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-04-24 14:54:14 -0700
committerThomas Kluyver <takowl@gmail.com>2013-04-24 14:54:14 -0700
commitd71114fa6e18b04d29fcf9eb3872428a89187913 (patch)
treea4810f5a1a02def43c4a2aec62fb496d0e3d1078 /weatbag
parent0acc0f375d60387d227712a405afd8708119b845 (diff)
parentadf5d60800be8046b35dbd8432c0ec4b1dc17ce4 (diff)
Merge pull request #19 from ratmonkey/small_fix
fixed leave function to allow going E and W
Diffstat (limited to 'weatbag')
-rw-r--r--weatbag/tiles/n2.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/weatbag/tiles/n2.py b/weatbag/tiles/n2.py
index fe4a3df..9f33a60 100644
--- a/weatbag/tiles/n2.py
+++ b/weatbag/tiles/n2.py
@@ -13,13 +13,15 @@ class Tile:
print("Someone has dropped a box of matches on the ground.")
def leave(self, player, direction):
- if direction=='s':
+ if direction=='n' and player.has('flaming torch'):
return True
- if player.has('flaming torch'):
- return True
- print("You can't explore the cave without being able to see. "
+ elif direction=='n' and not player.has('flaming torch'):
+ print("You can't explore the cave without being able to see. "
"You'll need that stalwart friend of the adventurer, "
"the flaming torch.")
+ return False
+ else:
+ return True
def action(self, player, do):
if (do[0] in words.take) and ('matches' in do):