From adf5d60800be8046b35dbd8432c0ec4b1dc17ce4 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 21 Apr 2013 23:53:53 +0300 Subject: fixed leave function to allow going E and W --- weatbag/tiles/n2.py | 10 ++++++---- 1 file 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): -- cgit v1.3