From b69c7bfa3d7d40c1c9d91ff424194a14e4e2a62f Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 01:38:26 +0300 Subject: Added leave text if not going after the bug. --- weatbag/tiles/s1e1.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/weatbag/tiles/s1e1.py b/weatbag/tiles/s1e1.py index 74a0aa0..ff09753 100644 --- a/weatbag/tiles/s1e1.py +++ b/weatbag/tiles/s1e1.py @@ -4,26 +4,32 @@ import weatbag class Tile: def __init__(self): self.contents = {'bug': 1} + self.bug_leaves_this_time = True pass def describe(self): - print("There is a stream here.\n" + print("There is a stream here. " "It runs from South to North.") if self.contents['bug'] > 0: print("You see a huge, ugly bug rush past you, " - "following the river south.") + "following the river South.") self.contents['bug'] -= 1 else: - print("You remember this is where you saw that bug going south.") + print("You remember this is where you saw that bug going South.") def action(self, player, do): pass def leave(self, player, direction): if direction == 's': - print("Bugs are the enemy and must be crushed!" + print("Bugs are the enemy and must be crushed!\n" "So you decide to follow the bug upstream.") return True else: + if self.bug_leaves_this_time: + print("Bugs do not interest you very much.\n" + "Lets get out of here.") + self.bug_leaves_this_time = False + input() return True -- cgit v1.3