diff options
| author | Kleopatra Angelidi <akleop@gmail.com> | 2013-05-23 15:56:19 +0300 |
|---|---|---|
| committer | Kleopatra Angelidi <akleop@gmail.com> | 2013-05-23 15:56:19 +0300 |
| commit | c98504601a89b572225bccdace46b8bcb0575a6f (patch) | |
| tree | 5c90e0dfca4370323bde139005c6ee7a6ba987c1 /weatbag/tiles | |
| parent | 635e161a3bf7866105cb78c9ada29d4d4ddb6aa6 (diff) | |
fixed the challenge with the knife (n3w5)
Diffstat (limited to 'weatbag/tiles')
| -rw-r--r-- | weatbag/tiles/n3w5.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index b7dd456..26aec4d 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -9,12 +9,14 @@ class Tile: self.challenge_completed = False def describe(self): - print("Your feet make a crackling sound as your feet snap some twigs on " - "the ground.\n") + print("Your feet make a crackling sound as your feet snap some twigs " + "on the ground.") if not self.challenge_completed: self.challenge() - - + elif self.challenge_completed and self.contents["knife"]>0: + print("You look around and you see an open box with a knife " + "inside. You should probably take it. A knife can be usefull.") + def challenge(self): print("You just steped into something different. It is a metal box and " "it looks like something is written on it. You clear the dirt " @@ -32,10 +34,10 @@ class Tile: if do[0] == "no" and do[1] == "one" and do[2] == "understands": print("And that is absolutely right!\n" "The lid opens and you see a brand new army knife!\n") - - elif (do[0] in words.take) and ('knife' in do): + self.challenge_completed = True + + elif (do[0] in words.take) and ('knife' in do) and self.challenge_completed: self.take_knife(player, do) - self.challenge_completed = True else: print("Sorry, I don't understand.") |
