diff options
| author | Kleopatra Angelidi <akleop@gmail.com> | 2013-05-07 20:18:06 +0300 |
|---|---|---|
| committer | Kleopatra Angelidi <akleop@gmail.com> | 2013-05-07 20:18:06 +0300 |
| commit | 20bae4715686b91b97dcf7fdb21d50ddd38312ed (patch) | |
| tree | a9fd2d80b7ae927300a274d4ac071124a0322d12 | |
| parent | 40fc044a2d530b90c0c3133718ec725f3b87e4db (diff) | |
added action and an kitten item :3 (n1w4)
| -rw-r--r-- | weatbag/tiles/n1w4.py | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/weatbag/tiles/n1w4.py b/weatbag/tiles/n1w4.py index dbe35eb..d3a9c2b 100644 --- a/weatbag/tiles/n1w4.py +++ b/weatbag/tiles/n1w4.py @@ -1,11 +1,15 @@ +from weatbag.utils import transfer + class Tile: def __init__(self): + self.contents = {'neko': 1} self.challenge_completed = False - - def describe(self): - print("The rocks led you to a path uphill.\n*Poof* A purrr-sian cat " - "appears in front of you!\n") + self.sequence = "1113213211" + + def describe(self): if not self.challenge_completed: + print("The rocks led you to a path uphill.\n*Poof* A purrr-sian " + "cat appears in front of you!\n") self.challenge() else: print("The rocks led you to a path uphill.\nIt's a little bit " @@ -23,17 +27,25 @@ class Tile: "1211\n" "111221\n" "312211\n" - "13112221\n") - #The next number in the sequence is 1113213211, because the rule for - #creating the next number is to simply describe the previous number. - #The first number is 1, or 1 (one) 1, so you get 11. - #To describe 11, you have two 1's, or 21. Now you have one 2 and one 1, - #so the next number is 1211. The solution is to simply continue describing - #the previous number using only numbers.\n") + "13112221\n") + #The next number in the sequence is 1113213211, because the rule for + #creating the next number is to simply describe the previous number. + #The first number is 1, or 1 (one) 1, so you get 11. + #To describe 11, you have two 1's, or 21. Now you have one 2 and one 1, + #so the next number is 1211. The solution is to simply continue + #describing the previous number using only numbers.\n") def action(self, player, do): if not self.challenge_completed: - pass + if do[0] == self.sequence: + print("You are a clever human, aren't you?!\n\n" + "Here is my offering. I give you this maneki-neko.\n" + "If you ever come across a wall of kittens and you want " + "them to let you pass you will use this lucky charm!") + #https://en.wikipedia.org/wiki/Maneki-neko + self.contents['neko'] -= 1 + player.give('neko') + self.challenge_completed = True else: print("I don't understand...") @@ -44,7 +56,8 @@ class Tile: return False elif direction == "n": print("It looks like the side of a wooden hut.\n" - "Since you don't walk though walls (yet) you can't go there.") + "Since you don't walk though walls (yet) " + "you can't go there.\n") return False else: return True |
