summaryrefslogtreecommitdiffstats
path: root/weatbag/tiles/s1e1.py
blob: ff09753e18fc615c56c4347040ac2e9777f01ae1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from weatbag import words
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. "
            "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.")
            self.contents['bug'] -= 1
        else:
            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!\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