summaryrefslogtreecommitdiffstats
path: root/weatbag
diff options
context:
space:
mode:
authorKleopatra Angelidi <akleop@gmail.com>2013-04-21 23:53:53 +0300
committerKleopatra Angelidi <akleop@gmail.com>2013-04-21 23:53:53 +0300
commitadf5d60800be8046b35dbd8432c0ec4b1dc17ce4 (patch)
tree67d3f18c07b56a75722272b03c93b6adbc5e0aac /weatbag
parent32db2f567c844ece509a5001233606465474d18f (diff)
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):