From bdddf30638b3878c94c8ed877ba67ca828f0aa65 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 18:30:10 +0300 Subject: added new tile n1w2 --- weatbag/tiles/n1w2.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 weatbag/tiles/n1w2.py diff --git a/weatbag/tiles/n1w2.py b/weatbag/tiles/n1w2.py new file mode 100644 index 0000000..2bfb1ee --- /dev/null +++ b/weatbag/tiles/n1w2.py @@ -0,0 +1,19 @@ +class Tile: + + def describe(self): + print("The beach is really quiet and you can hear and see the " + "seagulls on the sea.") + + def action(self, player, do): + print("What is this giberish?") + + def leave(self, player, direction): + if direction == "e": + print("You can't go back by swimming, that part is full of " + "electric eels.\n") + return False + elif direction == "s": + print("I'm afraid I can't let you go there Dave.\n") + return False + else: + return True -- cgit v1.3 From 099cdeeb74281812480651b934cdf98f093f202d Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 18:32:04 +0300 Subject: removed leave south restriction --- weatbag/tiles/n2w2.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index 010ff0e..390ef19 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -28,8 +28,5 @@ class Tile: print("You can't go back by swimming, that part is full of " "electric eels.\n") return False - elif direction == "s": - print("I'm afraid I can't let you go there Dave.\n") - return False else: return True -- cgit v1.3 From 5dd1ef569437297fdecadc79567938a9b43cd252 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 18:36:32 +0300 Subject: identation on print for the looks --- weatbag/tiles/n1w2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n1w2.py b/weatbag/tiles/n1w2.py index 2bfb1ee..0961545 100644 --- a/weatbag/tiles/n1w2.py +++ b/weatbag/tiles/n1w2.py @@ -1,8 +1,8 @@ class Tile: def describe(self): - print("The beach is really quiet and you can hear and see the " - "seagulls on the sea.") + print("The beach is really quiet and you can hear and see the seagulls " + "on the sea.") def action(self, player, do): print("What is this giberish?") -- cgit v1.3 From 01b40d95d96cb708a14ced0aa472641ea5578750 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 18:49:00 +0300 Subject: added new tile n1w3 --- weatbag/tiles/n1w3.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 weatbag/tiles/n1w3.py diff --git a/weatbag/tiles/n1w3.py b/weatbag/tiles/n1w3.py new file mode 100644 index 0000000..e94e24c --- /dev/null +++ b/weatbag/tiles/n1w3.py @@ -0,0 +1,17 @@ +class Tile: + + def describe(self): + print("The sandy beach is transforming into big rocks but it looks " + "like you are able to climb them.\n" + "Just be carefull because they are a bit slipery.") + + def action(self, player, do): + print("Sorry, I don't speak giberish.\n") + + def leave(self, player, direction): + if direction == "s": + print("Are you planing to throw your self to the rocks? You can't " + "go there!\n") + return False + else: + return True -- cgit v1.3 From f4d2fcfc98e6e0a1591a2b70947a84a9d966e956 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 18:54:15 +0300 Subject: added leave restriction for north --- weatbag/tiles/n1w3.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weatbag/tiles/n1w3.py b/weatbag/tiles/n1w3.py index e94e24c..7aee7b4 100644 --- a/weatbag/tiles/n1w3.py +++ b/weatbag/tiles/n1w3.py @@ -13,5 +13,8 @@ class Tile: print("Are you planing to throw your self to the rocks? You can't " "go there!\n") return False + elif direction == "n": + print("The rocks are way to high for you. " + "Unfortunatelly you cannot climb them.") else: return True -- cgit v1.3 From 855703b189cb54829d7ca1bc651c0edb42017e1c Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 18:59:16 +0300 Subject: changed leave south description --- weatbag/tiles/n2w3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n2w3.py b/weatbag/tiles/n2w3.py index 2030fea..eba9089 100644 --- a/weatbag/tiles/n2w3.py +++ b/weatbag/tiles/n2w3.py @@ -20,8 +20,8 @@ class Tile: def leave(self, player, direction): if direction == "s": - print("STAHP! Hammer Time!\n(Meaning you just can't go to that " - "direction yet. Sorry! :))\n") + print("Careful now! Nasty rocks all over to the south.\n" + "(Meaning you just can't go to that direction. Sorry!)\n") return False else: return True -- cgit v1.3 From 45e81ccdd430bd5e40e72c5a6d9661cac2820b48 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 19:11:17 +0300 Subject: added new tile n1w4 --- weatbag/tiles/n1w4.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 weatbag/tiles/n1w4.py diff --git a/weatbag/tiles/n1w4.py b/weatbag/tiles/n1w4.py new file mode 100644 index 0000000..13b288e --- /dev/null +++ b/weatbag/tiles/n1w4.py @@ -0,0 +1,28 @@ +class Tile: + def __init__(self): + self.challenge_completed = False + + def describe(self): + print("\n") + if not self.challenge_completed: + self.challenge() + else: + print("") + + def challenge(self): + print("\n") + pass + + def action(self, player, do): + if not self.challenge_completed: + pass + else: + print("I don't understand...") + + def leave(self, player, direction): + if direction == "s": + print ("Oh dear Basdet! You can't go north, you will fall of the " + "cliff!\n") + return False + else: + return True -- cgit v1.3 From c4b8a55485366711a97d23332b4b4e36f85d7198 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 19:17:38 +0300 Subject: added one more leave restriction --- weatbag/tiles/n1w4.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n1w4.py b/weatbag/tiles/n1w4.py index 13b288e..1fc522d 100644 --- a/weatbag/tiles/n1w4.py +++ b/weatbag/tiles/n1w4.py @@ -11,7 +11,7 @@ class Tile: def challenge(self): print("\n") - pass + pass def action(self, player, do): if not self.challenge_completed: @@ -21,8 +21,12 @@ class Tile: def leave(self, player, direction): if direction == "s": - print ("Oh dear Basdet! You can't go north, you will fall of the " + print("Oh dear Basdet! You can't go north, you will fall of the " "cliff!\n") 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.") + return False else: return True -- cgit v1.3 From 12d7f328327084039efb117906c8b66091b31c46 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 19:28:03 +0300 Subject: added describe --- weatbag/tiles/n1w4.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n1w4.py b/weatbag/tiles/n1w4.py index 1fc522d..5504a57 100644 --- a/weatbag/tiles/n1w4.py +++ b/weatbag/tiles/n1w4.py @@ -3,11 +3,13 @@ class Tile: self.challenge_completed = False def describe(self): - print("\n") + print("The rocks led you to a path uphill.\n*Poof* A purrr-sian cat " + "appears in front of you!\n") if not self.challenge_completed: self.challenge() else: - print("") + print("The rocks led you to a path uphill.\nIt's a little bit " + "windy and a flock of seagulls is flying above you.") def challenge(self): print("\n") -- cgit v1.3 From 40fc044a2d530b90c0c3133718ec725f3b87e4db Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 19:43:49 +0300 Subject: added challenge description (n1w4) --- weatbag/tiles/n1w4.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/weatbag/tiles/n1w4.py b/weatbag/tiles/n1w4.py index 5504a57..dbe35eb 100644 --- a/weatbag/tiles/n1w4.py +++ b/weatbag/tiles/n1w4.py @@ -12,9 +12,25 @@ class Tile: "windy and a flock of seagulls is flying above you.") def challenge(self): - print("\n") - pass - + print("Meow good traveler! I have a question for you.\n" + "You might as well go away and ignore me and my awesome fur but " + "if you pass my little test I will reward you!\n\n" + "Here is a series of numbers.\n" + "What is the next number in the sequence?\n" + "1\n" + "11\n" + "21\n" + "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") + def action(self, player, do): if not self.challenge_completed: pass -- cgit v1.3 From 20bae4715686b91b97dcf7fdb21d50ddd38312ed Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 20:18:06 +0300 Subject: added action and an kitten item :3 (n1w4) --- weatbag/tiles/n1w4.py | 39 ++++++++++++++++++++++++++------------- 1 file 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 -- cgit v1.3 From 3c5b891a716f942708109339944701cc03f957b5 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 20:27:24 +0300 Subject: added else inside action for when the player says something else except the solution of the riddle --- weatbag/tiles/n1w4.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weatbag/tiles/n1w4.py b/weatbag/tiles/n1w4.py index d3a9c2b..984063e 100644 --- a/weatbag/tiles/n1w4.py +++ b/weatbag/tiles/n1w4.py @@ -34,7 +34,7 @@ class Tile: #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: if do[0] == self.sequence: @@ -46,6 +46,8 @@ class Tile: self.contents['neko'] -= 1 player.give('neko') self.challenge_completed = True + else: + print("Wut? Try h4rd3r st00p3d hum4n!") else: print("I don't understand...") -- cgit v1.3 From 8e7a553724195d5fe5d57f36ecbd3f5b96bfdd4a Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 20:36:01 +0300 Subject: added a description for leave w (n1w2) --- weatbag/tiles/n1w2.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weatbag/tiles/n1w2.py b/weatbag/tiles/n1w2.py index 0961545..4dfa3cb 100644 --- a/weatbag/tiles/n1w2.py +++ b/weatbag/tiles/n1w2.py @@ -15,5 +15,10 @@ class Tile: elif direction == "s": print("I'm afraid I can't let you go there Dave.\n") return False + elif direction == "w": + print("The sandy beach is transforming into big rocks but it looks " + "like you are able to climb them.\n" + "Just be carefull because they are a bit slipery.") + return True else: return True -- cgit v1.3 From b63dacba14d8a976e52771143d85f80c523ed416 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 20:44:38 +0300 Subject: grammar and orthography --- weatbag/tiles/n1w2.py | 2 +- weatbag/tiles/n1w3.py | 5 ++--- weatbag/tiles/n1w4.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/weatbag/tiles/n1w2.py b/weatbag/tiles/n1w2.py index 4dfa3cb..4d18ff4 100644 --- a/weatbag/tiles/n1w2.py +++ b/weatbag/tiles/n1w2.py @@ -18,7 +18,7 @@ class Tile: elif direction == "w": print("The sandy beach is transforming into big rocks but it looks " "like you are able to climb them.\n" - "Just be carefull because they are a bit slipery.") + "Just be careful because they are a bit slipery.") return True else: return True diff --git a/weatbag/tiles/n1w3.py b/weatbag/tiles/n1w3.py index 7aee7b4..081d41e 100644 --- a/weatbag/tiles/n1w3.py +++ b/weatbag/tiles/n1w3.py @@ -1,9 +1,7 @@ class Tile: def describe(self): - print("The sandy beach is transforming into big rocks but it looks " - "like you are able to climb them.\n" - "Just be carefull because they are a bit slipery.") + print("Woooah! Those rocks are full of lichens!\n") def action(self, player, do): print("Sorry, I don't speak giberish.\n") @@ -16,5 +14,6 @@ class Tile: elif direction == "n": print("The rocks are way to high for you. " "Unfortunatelly you cannot climb them.") + return False else: return True diff --git a/weatbag/tiles/n1w4.py b/weatbag/tiles/n1w4.py index 984063e..d9e9b74 100644 --- a/weatbag/tiles/n1w4.py +++ b/weatbag/tiles/n1w4.py @@ -53,7 +53,7 @@ class Tile: def leave(self, player, direction): if direction == "s": - print("Oh dear Basdet! You can't go north, you will fall of the " + print("Oh dear Basdet! You can't go south, you will fall of the " "cliff!\n") return False elif direction == "n": -- cgit v1.3 From f838ee7fa1a4107f5d23a26cafa011e9168cc173 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 21:28:18 +0300 Subject: added new tile n1w5 --- weatbag/tiles/n1w5.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 weatbag/tiles/n1w5.py diff --git a/weatbag/tiles/n1w5.py b/weatbag/tiles/n1w5.py new file mode 100644 index 0000000..078de7f --- /dev/null +++ b/weatbag/tiles/n1w5.py @@ -0,0 +1,20 @@ +class Tile: + + def describe(self): + print("blah blah describe\n") + + def action(self, player, do): + print("Sorry, I don't understand.\n") + + def leave(self, player, direction): + if direction == "s": + print("My dear traveler, you can't go south, you will fall of the " + "cliff!\n") + 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.\n") + return False + else: + return True -- cgit v1.3 From 8b8b42308fdca3ec3e40695539bde6df3a59c7de Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 21:31:03 +0300 Subject: added new tile n1w6 --- weatbag/tiles/n1w6.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 weatbag/tiles/n1w6.py diff --git a/weatbag/tiles/n1w6.py b/weatbag/tiles/n1w6.py new file mode 100644 index 0000000..7c3d799 --- /dev/null +++ b/weatbag/tiles/n1w6.py @@ -0,0 +1,15 @@ +class Tile: + + def describe(self): + print("blah blah describe\n") + + def action(self, player, do): + print("Sorry, I don't understand.\n") + + def leave(self, player, direction): + if direction in ('s', 'w'): + print("My dear traveler, you can't go there, you will fall of the " + "cliff!\n") + return False + else: + return True -- cgit v1.3 From 4a73bd4bff8544a3b9c73c25e6b22fe2ddf20788 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 21:34:32 +0300 Subject: added new tile n2w6 --- weatbag/tiles/n2w6.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 weatbag/tiles/n2w6.py diff --git a/weatbag/tiles/n2w6.py b/weatbag/tiles/n2w6.py new file mode 100644 index 0000000..e76e3c2 --- /dev/null +++ b/weatbag/tiles/n2w6.py @@ -0,0 +1,20 @@ +class Tile: + + def describe(self): + print("blah blah describe\n") + + def action(self, player, do): + print("Sorry, I don't understand.\n") + + def leave(self, player, direction): + if direction == "w": + print("My dear traveler, you can't go there, you will fall of the " + "cliff!\n") + return False + elif direction == "n": + print("It looks like the back of a wooden hut.\n" + "Since you don't walk though walls (yet) " + "you can't go there.\n") + return False + else: + return True -- cgit v1.3 From 1431ba0785d17d87bbed158c6fd3b2806d696e45 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 21:59:31 +0300 Subject: added describe/action/leave (n1w5) --- weatbag/tiles/n1w5.py | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/weatbag/tiles/n1w5.py b/weatbag/tiles/n1w5.py index 078de7f..c6ef8dd 100644 --- a/weatbag/tiles/n1w5.py +++ b/weatbag/tiles/n1w5.py @@ -1,10 +1,33 @@ -class Tile: +from weatbag import words +from weatbag.utils import transfer +class Tile: + def __init__(self): + self.contents = {'rats': 2} + def describe(self): - print("blah blah describe\n") + if self.contents['rats']: + print("As you walk the path at the edge of the cliff you hear a " + "squeaking sound and you notice two rat traps on the ground. " + "Each are having one rat inside them trapped.\n" + "You could take the nasty rodents but really... what the " + "hell are you gonna do with them?\n") + else: + print("You walk the path at the edge of the cliff. Nothing " + "to do here.\n") def action(self, player, do): - print("Sorry, I don't understand.\n") + if (do[0] in words.take) and ('rats' in do): + self.take_rats(player) + else: + print("Sorry, I don't understand.\n") + + def take_rats(self, player): + if transfer('rats', self.contents, player.inventory, n=2): + print("You take the rats.\n") + else: + print("No more rats for now. Got to leave the traps do their " + "job.\n") def leave(self, player, direction): if direction == "s": -- cgit v1.3 From 5857a4e2b49905b0f599b2edf3fe9619a2e7b5f2 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 22:05:33 +0300 Subject: small changes to describe --- weatbag/tiles/n1w5.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/weatbag/tiles/n1w5.py b/weatbag/tiles/n1w5.py index c6ef8dd..558c0dc 100644 --- a/weatbag/tiles/n1w5.py +++ b/weatbag/tiles/n1w5.py @@ -7,11 +7,12 @@ class Tile: def describe(self): if self.contents['rats']: - print("As you walk the path at the edge of the cliff you hear a " - "squeaking sound and you notice two rat traps on the ground. " - "Each are having one rat inside them trapped.\n" + print("As you walk the rocky path at the edge of the cliff you " + "hear a squeaking sound and you notice two rat traps on the " + "ground. Each are having one rat inside them trapped.\n" "You could take the nasty rodents but really... what the " - "hell are you gonna do with them?\n") + "hell are you gonna do with them?\n" + "Don't forget black death dear traveler!\n") else: print("You walk the path at the edge of the cliff. Nothing " "to do here.\n") @@ -24,7 +25,7 @@ class Tile: def take_rats(self, player): if transfer('rats', self.contents, player.inventory, n=2): - print("You take the rats.\n") + print("Ok then. You took the rats.\n") else: print("No more rats for now. Got to leave the traps do their " "job.\n") -- cgit v1.3 From 8c4f45399e399da31f7830a228c21cfcbea4d0fd Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 22:17:49 +0300 Subject: added description (n1w6) --- weatbag/tiles/n1w6.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n1w6.py b/weatbag/tiles/n1w6.py index 7c3d799..1435cd9 100644 --- a/weatbag/tiles/n1w6.py +++ b/weatbag/tiles/n1w6.py @@ -1,7 +1,10 @@ class Tile: - def describe(self): - print("blah blah describe\n") + print("You have reached the top of the cliff! You feel the fresh " + "breeze in your face and you smell the salty sea! The view and " + "the weather here are wonderful! You'd like to stay but the " + "adventure spirit shakes you and you're on the move again.\n" + "So which way?\n") def action(self, player, do): print("Sorry, I don't understand.\n") -- cgit v1.3 From ec9c3ac05aec0021f0dd5728e775c0e52f5d34db Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 22:20:31 +0300 Subject: added leave description for E & N --- weatbag/tiles/n1w6.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weatbag/tiles/n1w6.py b/weatbag/tiles/n1w6.py index 1435cd9..ab2da24 100644 --- a/weatbag/tiles/n1w6.py +++ b/weatbag/tiles/n1w6.py @@ -14,5 +14,6 @@ class Tile: print("My dear traveler, you can't go there, you will fall of the " "cliff!\n") return False - else: + elif direction in('e', 'n'): + print("You follow tha path downhill.") return True -- cgit v1.3 From d64782af2b35d29c783b5687482209f6b42651ff Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 22:27:33 +0300 Subject: added description (n2w6) --- weatbag/tiles/n2w6.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/weatbag/tiles/n2w6.py b/weatbag/tiles/n2w6.py index e76e3c2..919f230 100644 --- a/weatbag/tiles/n2w6.py +++ b/weatbag/tiles/n2w6.py @@ -1,15 +1,16 @@ class Tile: def describe(self): - print("blah blah describe\n") + print("Big rocks around the place, and the sound of small waves at the " + "weastern sea makes you calm! \n") def action(self, player, do): print("Sorry, I don't understand.\n") def leave(self, player, direction): if direction == "w": - print("My dear traveler, you can't go there, you will fall of the " - "cliff!\n") + print("My dear traveler, you can't fall of the cliff! " + "I won't let you do it.\n") return False elif direction == "n": print("It looks like the back of a wooden hut.\n" -- cgit v1.3 From 761f3f701baee46120f68a285ea148b241170f1e Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 22:32:04 +0300 Subject: added leave description for South (n2w6) --- weatbag/tiles/n2w6.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/weatbag/tiles/n2w6.py b/weatbag/tiles/n2w6.py index 919f230..01ab28b 100644 --- a/weatbag/tiles/n2w6.py +++ b/weatbag/tiles/n2w6.py @@ -12,10 +12,13 @@ class Tile: print("My dear traveler, you can't fall of the cliff! " "I won't let you do it.\n") return False - elif direction == "n": + elif direction == "e": print("It looks like the back of a wooden hut.\n" "Since you don't walk though walls (yet) " "you can't go there.\n") return False + elif direction == "s": + print("You follow the path uphill.") + return True else: return True -- cgit v1.3 From 1c7f0b4ac925b3bab80819bfac0bfd8c934450a7 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 22:35:47 +0300 Subject: added leave W description (n1w5) --- weatbag/tiles/n1w5.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weatbag/tiles/n1w5.py b/weatbag/tiles/n1w5.py index 558c0dc..3b84a22 100644 --- a/weatbag/tiles/n1w5.py +++ b/weatbag/tiles/n1w5.py @@ -40,5 +40,8 @@ class Tile: "Since you don't walk though walls (yet) " "you can't go there.\n") return False + elif direction == "w": + print("You follow the path uphill.") + return True else: return True -- cgit v1.3 From 1a4cec0e9cfab3a896a73a6291363d0f23121a98 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 7 May 2013 22:43:06 +0300 Subject: changed rats to mice (n1w5) --- weatbag/tiles/n1w5.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/weatbag/tiles/n1w5.py b/weatbag/tiles/n1w5.py index 3b84a22..3ae5b43 100644 --- a/weatbag/tiles/n1w5.py +++ b/weatbag/tiles/n1w5.py @@ -3,31 +3,30 @@ from weatbag.utils import transfer class Tile: def __init__(self): - self.contents = {'rats': 2} + self.contents = {'mice': 2} def describe(self): - if self.contents['rats']: + if self.contents['mice']: print("As you walk the rocky path at the edge of the cliff you " - "hear a squeaking sound and you notice two rat traps on the " - "ground. Each are having one rat inside them trapped.\n" - "You could take the nasty rodents but really... what the " - "hell are you gonna do with them?\n" - "Don't forget black death dear traveler!\n") + "hear a squeaking sound and you notice two mice traps on the " + "ground. Each are having one mouse inside them trapped.\n" + "You could take the silly rodents but really... what the " + "hell are you gonna do with them?\n") else: print("You walk the path at the edge of the cliff. Nothing " "to do here.\n") def action(self, player, do): - if (do[0] in words.take) and ('rats' in do): - self.take_rats(player) + if (do[0] in words.take) and ('mice' in do): + self.take_mice(player) else: print("Sorry, I don't understand.\n") - def take_rats(self, player): - if transfer('rats', self.contents, player.inventory, n=2): - print("Ok then. You took the rats.\n") + def take_mice(self, player): + if transfer('mice', self.contents, player.inventory, n=2): + print("Ok then. You took the mice.\n") else: - print("No more rats for now. Got to leave the traps do their " + print("No more mice for now. Got to leave the traps do their " "job.\n") def leave(self, player, direction): -- cgit v1.3 From 68dfb3efd7fbb6bca5e1f437c9e5ce85b1826474 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 8 May 2013 19:43:05 +0300 Subject: added new tile n3w6 --- weatbag/tiles/n3w6.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 weatbag/tiles/n3w6.py diff --git a/weatbag/tiles/n3w6.py b/weatbag/tiles/n3w6.py new file mode 100644 index 0000000..8ed4da3 --- /dev/null +++ b/weatbag/tiles/n3w6.py @@ -0,0 +1,18 @@ +class Tile: + + def describe(self): + print("\n") + + def action(self, player, do): + print("Sorry, I don't understand.\n") + + def leave(self, player, direction): + if direction == "w": + print("No-no! You'll break your head to the rocks down there!\n") + return False + elif direction == "s": + print("You follow the path uphill. Just be careful of the slipery " + "rocks.") + return True + else: + return True -- cgit v1.3 From 3ec7516e090112a5c55e7c7622722a5b702feaa1 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 8 May 2013 19:59:22 +0300 Subject: added description (n3w6) --- weatbag/tiles/n3w6.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n3w6.py b/weatbag/tiles/n3w6.py index 8ed4da3..a40e490 100644 --- a/weatbag/tiles/n3w6.py +++ b/weatbag/tiles/n3w6.py @@ -1,7 +1,7 @@ class Tile: def describe(self): - print("\n") + print("Rocks. Big rocks. Slipery rocks all over!\n") def action(self, player, do): print("Sorry, I don't understand.\n") -- cgit v1.3 From 0ed2068dab2338167781ab0574b2e0b6d3be5220 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 8 May 2013 20:26:55 +0300 Subject: added new tile n4w6 --- weatbag/tiles/n4w6.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 weatbag/tiles/n4w6.py diff --git a/weatbag/tiles/n4w6.py b/weatbag/tiles/n4w6.py new file mode 100644 index 0000000..379e5f8 --- /dev/null +++ b/weatbag/tiles/n4w6.py @@ -0,0 +1,6 @@ +class Tile: + def describe(self): + print("\n") + + def action(self, player, do): + print("Sorry, I don't understand.\n") -- cgit v1.3 From ccb1c2a46bd6ea9a6a4a37230884336eda5fe030 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 8 May 2013 20:35:07 +0300 Subject: added leave description for North (n3w6) --- weatbag/tiles/n3w6.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weatbag/tiles/n3w6.py b/weatbag/tiles/n3w6.py index a40e490..b50be06 100644 --- a/weatbag/tiles/n3w6.py +++ b/weatbag/tiles/n3w6.py @@ -14,5 +14,8 @@ class Tile: print("You follow the path uphill. Just be careful of the slipery " "rocks.") return True + elif direction == "n": + print("You are almost down at the beach.") + return True else: return True -- cgit v1.3 From 322416a21b70a38f4a1bd774109e10e95abe3793 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 12 May 2013 21:36:28 +0300 Subject: added new tiles n4w6 and n4w7 --- weatbag/tiles/n4w6.py | 3 ++- weatbag/tiles/n4w7.py | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 weatbag/tiles/n4w7.py diff --git a/weatbag/tiles/n4w6.py b/weatbag/tiles/n4w6.py index 379e5f8..2c7fa18 100644 --- a/weatbag/tiles/n4w6.py +++ b/weatbag/tiles/n4w6.py @@ -1,6 +1,7 @@ class Tile: def describe(self): - print("\n") + print("The beach makes a nice little curve on that spot. There are " + "some pine trees around too. A really quiet sceenery!\n") def action(self, player, do): print("Sorry, I don't understand.\n") diff --git a/weatbag/tiles/n4w7.py b/weatbag/tiles/n4w7.py new file mode 100644 index 0000000..379e5f8 --- /dev/null +++ b/weatbag/tiles/n4w7.py @@ -0,0 +1,6 @@ +class Tile: + def describe(self): + print("\n") + + def action(self, player, do): + print("Sorry, I don't understand.\n") -- cgit v1.3 From 50c8bad672c035ecd980cb38045873e166d4d7ce Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 12 May 2013 21:44:40 +0300 Subject: added leave function for n4w6 --- weatbag/tiles/n4w6.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/weatbag/tiles/n4w6.py b/weatbag/tiles/n4w6.py index 2c7fa18..c0f5129 100644 --- a/weatbag/tiles/n4w6.py +++ b/weatbag/tiles/n4w6.py @@ -5,3 +5,14 @@ class Tile: def action(self, player, do): print("Sorry, I don't understand.\n") + + def leave(self, player, direction): + if direction == "s": + print("You follow the path uphill. There are some rocks. Just be " + "careful, they all have this gooey green stuff on them!\n") + return True + elif direction == "e": + print("You are going through the pine trees.\n") + return True + else: + return True -- cgit v1.3 From 73ecb39b3e5c27c9f91315735334da249fae48a9 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 12 May 2013 22:25:37 +0300 Subject: added describe on n4w7 --- weatbag/tiles/n4w7.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/weatbag/tiles/n4w7.py b/weatbag/tiles/n4w7.py index 379e5f8..d2e4e76 100644 --- a/weatbag/tiles/n4w7.py +++ b/weatbag/tiles/n4w7.py @@ -1,6 +1,30 @@ +from weatbag import words +from weatbag.utils import transfer + class Tile: + + def __init__(self): + self.challenge_completed = False + def describe(self): - print("\n") + if challenge_completed: + print("The only thing around this place is sand, small rocks, the " + "beach waters and about a dozen of kitties playing around.\n" + "You aproach the kitties and to your surprise they all start " + "rubbing at your legs and mewing! What is even more " + "surprising is that your brain understands and translates " + "meaws into words!\n" + "You can clearly hear them say:\n" + "'PLZ SIR, IT VRY HAWT HEER, CAN U TREAT US SUM MICE " + "CREAM?! ALL U NED IZ 2 COMBINE SUM MICE AN SUM CREAM AN " + "READY IT IZ! PLEEEEASE!' *mieaw* *rub* *rub*\n") + else: + print("The only thing around this place is sand, small rocks, the " + "beach waters and about a dozen of kitties playing around.\n") def action(self, player, do): print("Sorry, I don't understand.\n") + + +test_items = ['mice', 'cream'] + -- cgit v1.3 From 5acb9a792eec57714ed18f7d41051916be5c7f30 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 12 May 2013 22:31:06 +0300 Subject: corrected syntax on self.challenge_completed(n4w7) --- weatbag/tiles/n4w7.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n4w7.py b/weatbag/tiles/n4w7.py index d2e4e76..75927dd 100644 --- a/weatbag/tiles/n4w7.py +++ b/weatbag/tiles/n4w7.py @@ -2,12 +2,11 @@ from weatbag import words from weatbag.utils import transfer class Tile: - def __init__(self): self.challenge_completed = False def describe(self): - if challenge_completed: + if not self.challenge_completed: print("The only thing around this place is sand, small rocks, the " "beach waters and about a dozen of kitties playing around.\n" "You aproach the kitties and to your surprise they all start " @@ -18,6 +17,7 @@ class Tile: "'PLZ SIR, IT VRY HAWT HEER, CAN U TREAT US SUM MICE " "CREAM?! ALL U NED IZ 2 COMBINE SUM MICE AN SUM CREAM AN " "READY IT IZ! PLEEEEASE!' *mieaw* *rub* *rub*\n") + self.challenge_completed = True else: print("The only thing around this place is sand, small rocks, the " "beach waters and about a dozen of kitties playing around.\n") -- cgit v1.3 From c6e475c6dbf568ab56f0f86a20f8f2e6138c0e9c Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 13 May 2013 00:07:31 +0300 Subject: added action for n4w7 --- weatbag/tiles/n4w7.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/weatbag/tiles/n4w7.py b/weatbag/tiles/n4w7.py index 75927dd..4735623 100644 --- a/weatbag/tiles/n4w7.py +++ b/weatbag/tiles/n4w7.py @@ -23,8 +23,14 @@ class Tile: "beach waters and about a dozen of kitties playing around.\n") def action(self, player, do): - print("Sorry, I don't understand.\n") - + if do[0] in words.use and do[1] == "mice" and do[2]=="cream": + if player.has("cream") and player.has("mice"): + player.take("cream") + player.take("mice") + player.give("mice cream") + print("Balls of tasty omnom mice cream fall from your " + "hands! The kittens look sooooo pleased!") + else: + print("You'll need some mice and some cream.") test_items = ['mice', 'cream'] - -- cgit v1.3 From fdd1bdb4257b1fb63ba8b6a8d59d5497ce4f5752 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 00:16:41 +0300 Subject: added leave function fot n4w7 --- weatbag/tiles/n4w7.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/weatbag/tiles/n4w7.py b/weatbag/tiles/n4w7.py index 4735623..81afafb 100644 --- a/weatbag/tiles/n4w7.py +++ b/weatbag/tiles/n4w7.py @@ -32,5 +32,17 @@ class Tile: "hands! The kittens look sooooo pleased!") else: print("You'll need some mice and some cream.") - + + def leave(self, player, direction): + if direction == "s": + print("It's the open sea. You can't go anywhere near by " + "swimming.\n") + return False + elif direction == "w": + print("It's the open sea. You can't go anywhere near by " + "swimming.\n") + return False + else: + return True + test_items = ['mice', 'cream'] -- cgit v1.3 From 1e6a35c86949df1ff4794e27a6cdf9fee9567fc7 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 00:33:56 +0300 Subject: changed describe added kitties() (n4w7) --- weatbag/tiles/n4w7.py | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/weatbag/tiles/n4w7.py b/weatbag/tiles/n4w7.py index 81afafb..a893879 100644 --- a/weatbag/tiles/n4w7.py +++ b/weatbag/tiles/n4w7.py @@ -6,21 +6,22 @@ class Tile: self.challenge_completed = False def describe(self): + print("The only thing around this place is sand, small rocks, the " + "beach waters, about a dozen of kitties playing around and " + "a lighthouse on the north.\n") if not self.challenge_completed: - print("The only thing around this place is sand, small rocks, the " - "beach waters and about a dozen of kitties playing around.\n" - "You aproach the kitties and to your surprise they all start " - "rubbing at your legs and mewing! What is even more " - "surprising is that your brain understands and translates " - "meaws into words!\n" - "You can clearly hear them say:\n" - "'PLZ SIR, IT VRY HAWT HEER, CAN U TREAT US SUM MICE " - "CREAM?! ALL U NED IZ 2 COMBINE SUM MICE AN SUM CREAM AN " - "READY IT IZ! PLEEEEASE!' *mieaw* *rub* *rub*\n") + self.kitties() self.challenge_completed = True - else: - print("The only thing around this place is sand, small rocks, the " - "beach waters and about a dozen of kitties playing around.\n") + + def kitties(self): + print("You aproach the kitties and to your surprise they all start " + "rubbing at your legs and mewing! What is even more " + "surprising is that your brain understands and translates " + "meaws into words!\n" + "You can clearly hear them say:\n" + "'PLZ SIR, IT VRY HAWT HEER, CAN U TREAT US SUM MICE " + "CREAM?! ALL U NED IZ 2 USE SUM MICE AN SUM CREAM AN " + "READY IT IZ! PLEEEEASE!' *mieaw* *rub* *rub*\n") def action(self, player, do): if do[0] in words.use and do[1] == "mice" and do[2]=="cream": @@ -31,7 +32,7 @@ class Tile: print("Balls of tasty omnom mice cream fall from your " "hands! The kittens look sooooo pleased!") else: - print("You'll need some mice and some cream.") + print("You'll need some mice and cream.") def leave(self, player, direction): if direction == "s": @@ -42,6 +43,9 @@ class Tile: print("It's the open sea. You can't go anywhere near by " "swimming.\n") return False + elif direction == "n": + print("You are heading to the lighthouse.") + return True else: return True -- cgit v1.3 From 25e1d254dd680fe611a9260343730decafdf1f36 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 00:46:27 +0300 Subject: boolean on action / added cat advice --- weatbag/tiles/n4w7.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/weatbag/tiles/n4w7.py b/weatbag/tiles/n4w7.py index a893879..770f40e 100644 --- a/weatbag/tiles/n4w7.py +++ b/weatbag/tiles/n4w7.py @@ -11,26 +11,29 @@ class Tile: "a lighthouse on the north.\n") if not self.challenge_completed: self.kitties() - self.challenge_completed = True + def kitties(self): print("You aproach the kitties and to your surprise they all start " - "rubbing at your legs and mewing! What is even more " - "surprising is that your brain understands and translates " - "meaws into words!\n" + "rubbing at your legs and mewing! What is even more surprising " + "is that your brain understands and translates meaws into " + "words!\n" "You can clearly hear them say:\n" - "'PLZ SIR, IT VRY HAWT HEER, CAN U TREAT US SUM MICE " - "CREAM?! ALL U NED IZ 2 USE SUM MICE AN SUM CREAM AN " - "READY IT IZ! PLEEEEASE!' *mieaw* *rub* *rub*\n") + "'PLZ SIR, IT VRY HAWT HEER, CAN U TREAT US SUM MICE CREAM?! " + "ALL U NED IZ 2 USE SUM MICE AN SUM CREAM AN READY IT IZ! " + "PLEEEEASE!' *mieaw* *rub* *rub*\n") def action(self, player, do): if do[0] in words.use and do[1] == "mice" and do[2]=="cream": if player.has("cream") and player.has("mice"): player.take("cream") player.take("mice") - player.give("mice cream") print("Balls of tasty omnom mice cream fall from your " - "hands! The kittens look sooooo pleased!") + "hands!\nThe kittens look very pleased!\n" + "Because they are happy they give you an advice: " + "'U SHUD AVOID BY ANY MEANZ TEH LIGHTHAUS! " + "BAD KAT LIVEZ THAR!'\n") + self.challenge_completed = True else: print("You'll need some mice and cream.") -- cgit v1.3 From 8133da54eea1dc82e2b9421b2b06bb6cdbcae3ae Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 00:50:06 +0300 Subject: indented else and print on lines 37, 38 --- weatbag/tiles/n4w7.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weatbag/tiles/n4w7.py b/weatbag/tiles/n4w7.py index 770f40e..cd9b405 100644 --- a/weatbag/tiles/n4w7.py +++ b/weatbag/tiles/n4w7.py @@ -30,12 +30,12 @@ class Tile: player.take("mice") print("Balls of tasty omnom mice cream fall from your " "hands!\nThe kittens look very pleased!\n" - "Because they are happy they give you an advice: " + "Because they are happy they give you an advice:\n" "'U SHUD AVOID BY ANY MEANZ TEH LIGHTHAUS! " "BAD KAT LIVEZ THAR!'\n") self.challenge_completed = True - else: - print("You'll need some mice and cream.") + else: + print("You'll need some mice and cream.") def leave(self, player, direction): if direction == "s": -- cgit v1.3 From af8d37fddf448f96a465051e517fd79c197ecafc Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 01:41:36 +0300 Subject: added new tile n3w5 --- weatbag/tiles/n3w5.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 weatbag/tiles/n3w5.py diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py new file mode 100644 index 0000000..a99fd88 --- /dev/null +++ b/weatbag/tiles/n3w5.py @@ -0,0 +1,17 @@ +from weatbag import words +from weatbag.utils import transfer + +class Tile: + def __init__(self): + self.challenge_completed = False + + def describe(self): + print("\n") + + + def action(self, player, do): + print("\n") + self.challenge_completed = True + else: + print("I don't understand.") + -- cgit v1.3 From 73a68e2db33d4f81eefeee636f1b43f475bc0383 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 01:43:10 +0300 Subject: added new tile n4w5 --- weatbag/tiles/n4w5.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 weatbag/tiles/n4w5.py diff --git a/weatbag/tiles/n4w5.py b/weatbag/tiles/n4w5.py new file mode 100644 index 0000000..6e94ce6 --- /dev/null +++ b/weatbag/tiles/n4w5.py @@ -0,0 +1,7 @@ +class Tile: + def describe(self): + print("\n") + + def action(self, player, do): + print("I don't understand.") + -- cgit v1.3 From b9065cb31a2a1e39e0263b3c5d8d4b22f20c1d36 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 01:55:21 +0300 Subject: added description and leave for east (n4w5) --- weatbag/tiles/n4w5.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n4w5.py b/weatbag/tiles/n4w5.py index 6e94ce6..59208f3 100644 --- a/weatbag/tiles/n4w5.py +++ b/weatbag/tiles/n4w5.py @@ -1,7 +1,14 @@ class Tile: def describe(self): - print("\n") + print("There are not so many trees around but the ground is full of " + "pine needles and pine cones.\n") def action(self, player, do): print("I don't understand.") - + + def leave(self, player, direction): + if direction == "e": + print("Area 51. No trespassing beyond this point.") + return False + else: + return True -- cgit v1.3 From 76ef495a683c6dd2fa625c1f8e7966215f129bc5 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 01:56:58 +0300 Subject: changed description for leave W/S/N function --- weatbag/tiles/n2w5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n2w5.py b/weatbag/tiles/n2w5.py index 12ae7d2..1c2d707 100644 --- a/weatbag/tiles/n2w5.py +++ b/weatbag/tiles/n2w5.py @@ -27,7 +27,7 @@ class Tile: def leave(self, player, direction): if direction == 'w'or direction == 's' or direction == 'n': - print("Area 51. No trespassing beyond this point.\n") + print("I don't think you can pass through walls.\n") return False else: return True -- cgit v1.3 From 55beedbc868e89d6c124098c43f081ff0988369f Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 02:35:08 +0300 Subject: added challenge (n3w5) --- weatbag/tiles/n3w5.py | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index a99fd88..e7d2c7e 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -6,12 +6,25 @@ class Tile: self.challenge_completed = False def describe(self): - print("\n") - + print("Your feet do a crackling sound as your feet snapp some twigs on " + "the ground.\n") + if not self.challenge_completed: + self.challenge() + self.challenge_completed = True + + 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 " + "of it and what you see carved in the box lid is:\n\n" + "Stands\n" + "-------\n" + "0_2345\n\n" + "You try to open the box but it won't open.\n" + "Now obviously as you might have guessed already it is a magic " + "box! If you *understand* what these carvings represend the box " + "will open!") + # What the riddle says is "No one understands" def action(self, player, do): - print("\n") - self.challenge_completed = True - else: - print("I don't understand.") + print("I don't understand.") -- cgit v1.3 From 21599326b293063f9477e325623e50d8df8af494 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 02:57:31 +0300 Subject: added reply in the riddle in action (n3w5) --- weatbag/tiles/n3w5.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index e7d2c7e..2f1b97a 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -3,6 +3,7 @@ from weatbag.utils import transfer class Tile: def __init__(self): + self.contents = {'knife': 1} self.challenge_completed = False def describe(self): @@ -16,7 +17,7 @@ class Tile: 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 " "of it and what you see carved in the box lid is:\n\n" - "Stands\n" + "stands\n" "-------\n" "0_2345\n\n" "You try to open the box but it won't open.\n" @@ -26,5 +27,8 @@ class Tile: # What the riddle says is "No one understands" def action(self, player, do): - print("I don't understand.") + 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!") + -- cgit v1.3 From 8a3c4a270a36d8709948d27eec0bf7b74ef37a71 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 02:59:44 +0300 Subject: added else on action --- weatbag/tiles/n3w5.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index 2f1b97a..7bfebe2 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -30,5 +30,7 @@ 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!") - + else: + print("Sorry, I don't understand.\n") + -- cgit v1.3 From 69ef57ced38a1eb487e88fe0162f312d22369d1e Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 04:00:08 +0300 Subject: added take_knife function (n3w5) --- weatbag/tiles/n3w5.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index 7bfebe2..819fd77 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -11,7 +11,7 @@ class Tile: "the ground.\n") if not self.challenge_completed: self.challenge() - self.challenge_completed = True + def challenge(self): print("You just steped into something different. It is a metal box and " @@ -21,16 +21,24 @@ class Tile: "-------\n" "0_2345\n\n" "You try to open the box but it won't open.\n" - "Now obviously as you might have guessed already it is a magic " - "box! If you *understand* what these carvings represend the box " - "will open!") + "Now... as you might have guessed already, it is a magic box! " + "If you *understand* what these carvings represend the box will " + "open!") # What the riddle says is "No one understands" def action(self, player, do): 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!") + + elif (do[0] in words.take) and ('knife' in do): + self.take_knife(player, do) + self.challenge_completed = True else: print("Sorry, I don't understand.\n") - + def take_knife(self, player, do): + if transfer('knife', self.contents, player.inventory): + print("You take the knife.\n") + else: + print("There is nothing here.\n") -- cgit v1.3 From a85623efc76535b6260a7abb2283b5399a697c23 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 04:09:21 +0300 Subject: added leave function (n3w5) --- weatbag/tiles/n3w5.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index 819fd77..7045620 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -42,3 +42,11 @@ class Tile: print("You take the knife.\n") else: print("There is nothing here.\n") + + def leave(self, player, direction): + if direction == "s": + print("In front of you there is a wall. It's the side of a wooden " + "hut.") + return False + else: + return True -- cgit v1.3 From 0044da648e39c5bdd1e2df872d8b96681c8dd135 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 04:10:31 +0300 Subject: removed leave restriction for west (n3w4) --- weatbag/tiles/n3w4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n3w4.py b/weatbag/tiles/n3w4.py index aeb58f9..ba38ce6 100644 --- a/weatbag/tiles/n3w4.py +++ b/weatbag/tiles/n3w4.py @@ -10,7 +10,7 @@ class Tile: print("Sorry, I don't understand.\n") def leave(self, player, direction): - if direction in ('n', 'w'): + if direction == "n": print("No trespasing. Violators will vanish without a trace.\n") return False else: -- cgit v1.3 From a258846e826ddd029b440f56b0d690bdf4188d08 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 14 May 2013 04:20:11 +0300 Subject: changed a little bit the description (n3w4) --- weatbag/tiles/n3w4.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/weatbag/tiles/n3w4.py b/weatbag/tiles/n3w4.py index ba38ce6..e49b496 100644 --- a/weatbag/tiles/n3w4.py +++ b/weatbag/tiles/n3w4.py @@ -1,9 +1,9 @@ class Tile: def describe(self): - print("Looks like you are in a walking mood because you still follow " - "the path.\nYou hear birds singing, some small waves on the " - "background, there is a nice flowery smell, rays of sun make the " - "tree sceenery heavenly...\n" + print("Looks like you are in a walking mood!\n" + "You hear birds singing, some small waves on the background, " + "there is a nice flowery smell, rays of sun make the tree " + "sceenery heavenly...\n" "I totaly get you, it's a nice path to have a walk!\n") def action(self, player, do): -- cgit v1.3 From 06e14a58cda1ae149db2631076150121aaa9644c Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 00:31:47 +0300 Subject: new tiles n5w5 n5w6 n5w7 --- weatbag/tiles/n5w5.py | 6 ++++++ weatbag/tiles/n5w6.py | 6 ++++++ weatbag/tiles/n5w7.py | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100644 weatbag/tiles/n5w5.py create mode 100644 weatbag/tiles/n5w6.py create mode 100644 weatbag/tiles/n5w7.py diff --git a/weatbag/tiles/n5w5.py b/weatbag/tiles/n5w5.py new file mode 100644 index 0000000..f5334d8 --- /dev/null +++ b/weatbag/tiles/n5w5.py @@ -0,0 +1,6 @@ +class Tile: + def describe(self): + print("\n") + + def action(self, player, do): + print("I don't understand.") diff --git a/weatbag/tiles/n5w6.py b/weatbag/tiles/n5w6.py new file mode 100644 index 0000000..f5334d8 --- /dev/null +++ b/weatbag/tiles/n5w6.py @@ -0,0 +1,6 @@ +class Tile: + def describe(self): + print("\n") + + def action(self, player, do): + print("I don't understand.") diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py new file mode 100644 index 0000000..f5334d8 --- /dev/null +++ b/weatbag/tiles/n5w7.py @@ -0,0 +1,6 @@ +class Tile: + def describe(self): + print("\n") + + def action(self, player, do): + print("I don't understand.") -- cgit v1.3 From c46fa1f0e0d3a85802bbef0561be3a39ff4bdbcd Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 01:04:00 +0300 Subject: imported words and transfer --- weatbag/tiles/n5w5.py | 6 ++++++ weatbag/tiles/n5w7.py | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/weatbag/tiles/n5w5.py b/weatbag/tiles/n5w5.py index f5334d8..d65886e 100644 --- a/weatbag/tiles/n5w5.py +++ b/weatbag/tiles/n5w5.py @@ -1,6 +1,12 @@ +from weatbag import words +from weatbag.utils import transfer + class Tile: def describe(self): print("\n") def action(self, player, do): print("I don't understand.") + + +#sandy claws diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index f5334d8..43e8f2d 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -1,6 +1,11 @@ +from weatbag import words +from weatbag.utils import transfer + class Tile: def describe(self): print("\n") def action(self, player, do): print("I don't understand.") + +#lighthouse -- cgit v1.3 From 59e085f5398d0c07cfbe2820ff0ce373287cc477 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 01:05:34 +0300 Subject: added leave direction N (n4w5) --- weatbag/tiles/n4w5.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weatbag/tiles/n4w5.py b/weatbag/tiles/n4w5.py index 59208f3..0344000 100644 --- a/weatbag/tiles/n4w5.py +++ b/weatbag/tiles/n4w5.py @@ -10,5 +10,9 @@ class Tile: if direction == "e": print("Area 51. No trespassing beyond this point.") return False + elif direction == "n": + print("There is an opening that leads you to the beach on the " + "northen side of the island.\n") + return True else: return True -- cgit v1.3 From dfbfa4c731af5dbd86ea9857d969c97bffaea831 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 01:45:30 +0300 Subject: added challenge and __init__ with boolean --- weatbag/tiles/n5w5.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n5w5.py b/weatbag/tiles/n5w5.py index d65886e..dac6249 100644 --- a/weatbag/tiles/n5w5.py +++ b/weatbag/tiles/n5w5.py @@ -2,11 +2,27 @@ from weatbag import words from weatbag.utils import transfer class Tile: + def __init__(self): + self.challenge_completed = False + def describe(self): - print("\n") + print("You are on the beach. You see a small kiosk selling " + "ice creams!\n") + if not self.challenge_completed: + self.challenge() + + def challenge(self): + print("You go there and see that there's an old lady inside who stir a " + "pot. A fat ginger cat outside the kiosk is digging holes in the " + "sand.\nYou say hi, and the old lady replies:\n" + "Hello to you traveler, I'm Grace Hopper and this is my cat " + "Sandy Claws. I could offer you a cream but first you must " + "answer me this:\n" + "Tom's mother has three children. One is named April, one is " + "named May. What is the third one named?\n") def action(self, player, do): - print("I don't understand.") + print("I don't understand.\n") #sandy claws -- cgit v1.3 From d15f1f16d4c5ae50c5e0743777b14f0d6da973cc Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 02:37:38 +0300 Subject: set action (n5w5) --- weatbag/tiles/n5w5.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/weatbag/tiles/n5w5.py b/weatbag/tiles/n5w5.py index dac6249..98f720c 100644 --- a/weatbag/tiles/n5w5.py +++ b/weatbag/tiles/n5w5.py @@ -3,6 +3,7 @@ from weatbag.utils import transfer class Tile: def __init__(self): + self.contents = {"cream": 1} self.challenge_completed = False def describe(self): @@ -12,9 +13,9 @@ class Tile: self.challenge() def challenge(self): - print("You go there and see that there's an old lady inside who stir a " - "pot. A fat ginger cat outside the kiosk is digging holes in the " - "sand.\nYou say hi, and the old lady replies:\n" + print("You go and see an old lady inside stir a pot. A fat ginger cat " + "outside the kiosk is digging holes in the sand.\n" + "You say hi, and the old lady replies:\n" "Hello to you traveler, I'm Grace Hopper and this is my cat " "Sandy Claws. I could offer you a cream but first you must " "answer me this:\n" @@ -22,7 +23,14 @@ class Tile: "named May. What is the third one named?\n") def action(self, player, do): - print("I don't understand.\n") + if do[0]=="tom" and self.contents["cream"]: + print("That's correct. Now you can have some cream!\n") + self.contents["cream"] -= 1 + player.give("cream") + self.challenge = True + else: + print("I don't understand.\n") + #sandy claws -- cgit v1.3 From 9e4183cc1cdc9f5468410609aeab62fb5b8e21c4 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 02:43:36 +0300 Subject: added elif in action in case the player tries to take more cream (n5w5) --- weatbag/tiles/n5w5.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/weatbag/tiles/n5w5.py b/weatbag/tiles/n5w5.py index 98f720c..5d6bc5a 100644 --- a/weatbag/tiles/n5w5.py +++ b/weatbag/tiles/n5w5.py @@ -24,10 +24,13 @@ class Tile: def action(self, player, do): if do[0]=="tom" and self.contents["cream"]: - print("That's correct. Now you can have some cream!\n") + print("That's correct. Now you can have some cream! " + "There... already in your bag!\n") self.contents["cream"] -= 1 player.give("cream") self.challenge = True + elif do[0] in words.take and do[1]=="cream": + print("Don't be greedy, you have all the cream you're gonna need.") else: print("I don't understand.\n") -- cgit v1.3 From ffcfa7a693ced1a1d1b7387d31970559ed1842a7 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 02:52:47 +0300 Subject: leave function for n5w5 --- weatbag/tiles/n5w5.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/weatbag/tiles/n5w5.py b/weatbag/tiles/n5w5.py index 5d6bc5a..8d7b4b5 100644 --- a/weatbag/tiles/n5w5.py +++ b/weatbag/tiles/n5w5.py @@ -30,10 +30,18 @@ class Tile: player.give("cream") self.challenge = True elif do[0] in words.take and do[1]=="cream": - print("Don't be greedy, you have all the cream you're gonna need.") + print("Don't be greedy, you have all the cream you're gonna " + "need.\n") else: print("I don't understand.\n") - - -#sandy claws + def leave(self, player, direction): + if direction in ("n", "e"): + print("It's the open sea. You can't go anywhere near by " + "swimming.\n") + return False + elif direction == "s": + print("A bunch of pine trees...") + return True + else: + return True -- cgit v1.3 From a2397732cfbdf41762aaa910f2e58a4cb2660c01 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 02:56:42 +0300 Subject: added "have a mice day" for goodbye :) (n5w5) --- weatbag/tiles/n5w5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n5w5.py b/weatbag/tiles/n5w5.py index 8d7b4b5..5767e9e 100644 --- a/weatbag/tiles/n5w5.py +++ b/weatbag/tiles/n5w5.py @@ -25,7 +25,7 @@ class Tile: def action(self, player, do): if do[0]=="tom" and self.contents["cream"]: print("That's correct. Now you can have some cream! " - "There... already in your bag!\n") + "There... already in your bag!\nHave a mice day!\n") self.contents["cream"] -= 1 player.give("cream") self.challenge = True -- cgit v1.3 From 5de4d9cd6da9923e960172719b7b42c6b3c2ba77 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 03:04:25 +0300 Subject: describe and leave functions for n5w6 --- weatbag/tiles/n5w6.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/weatbag/tiles/n5w6.py b/weatbag/tiles/n5w6.py index f5334d8..f1121d6 100644 --- a/weatbag/tiles/n5w6.py +++ b/weatbag/tiles/n5w6.py @@ -1,6 +1,14 @@ class Tile: def describe(self): - print("\n") + print("You walk in the beach. There is a light house on the west.\n") def action(self, player, do): print("I don't understand.") + + def leave(self, player, direction): + if direction == "n": + print("It's the open sea. You can't go anywhere near by " + "swimming.\n") + return False + else: + return True -- cgit v1.3 From e8a63f4a16e00afaf4130e4bc0d4b8e4f94a75bc Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 03:30:16 +0300 Subject: description for n5w7 --- weatbag/tiles/n5w7.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index 43e8f2d..5e08273 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -1,9 +1,21 @@ from weatbag import words -from weatbag.utils import transfer class Tile: def describe(self): - print("\n") + print("You are inside the light house. You hear a clicking sound and " + "the door closes behind you.\nIt is dark, and an enormous cat " + "sits on a computer compiling felinux kernels.\n" + "You try to open the door and leave but you realize it is " + "locked.\n" + "The cat turns at you and hisses loudly.\n" + "She grawls and because you now speak cat, you understand what " + "she says.\n\n" + "Puny human, how dare you disturb my peace!\n" + "If you tell a lie I will hang you; if you tell the truth I will " + "shoot you.\n\n" + "It looks like you are condemned... Though if you think a bit " + "more there is an apropriate answer that gets your ass out of " + "this hell!") def action(self, player, do): print("I don't understand.") -- cgit v1.3 From fc08b790a2f9f905e4e98122645d035e67684d26 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 03:30:53 +0300 Subject: joined two leave restrictions in one (n4w7) --- weatbag/tiles/n4w7.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/weatbag/tiles/n4w7.py b/weatbag/tiles/n4w7.py index cd9b405..a7a0ea8 100644 --- a/weatbag/tiles/n4w7.py +++ b/weatbag/tiles/n4w7.py @@ -38,11 +38,7 @@ class Tile: print("You'll need some mice and cream.") def leave(self, player, direction): - if direction == "s": - print("It's the open sea. You can't go anywhere near by " - "swimming.\n") - return False - elif direction == "w": + if direction in ("s", "w"): print("It's the open sea. You can't go anywhere near by " "swimming.\n") return False -- cgit v1.3 From 2abfbeca967738c9381268f3519f47fe53dc7dc4 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 03:51:36 +0300 Subject: riddle explanation __init__ and action (n5w7) --- weatbag/tiles/n5w7.py | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index 5e08273..44de460 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -1,8 +1,12 @@ from weatbag import words class Tile: + def __init__(self): + self.trapped = True + def describe(self): - print("You are inside the light house. You hear a clicking sound and " + if self.trapped: + print("You are inside the light house. You hear a clicking sound and " "the door closes behind you.\nIt is dark, and an enormous cat " "sits on a computer compiling felinux kernels.\n" "You try to open the door and leave but you realize it is " @@ -15,9 +19,28 @@ class Tile: "shoot you.\n\n" "It looks like you are condemned... Though if you think a bit " "more there is an apropriate answer that gets your ass out of " - "this hell!") + "this hell!\n") + + + # The exact answer is 'You will hang me'. If she hang him, then the + # statement was true and she could only hang him for telling a lie. + # If she shoot him, then it makes the statement a lie and she was only + # to shoot him for telling the truth. + # An alternate solution is to say, "You will not shoot me," leading to the + # same quandary for the killercat. + def action(self, player, do): - print("I don't understand.") + if self.trapped: + if do[0]=="you" and do[1]=="will" and do[2]=="hang" and do[3]=="me": + print("You dirty little human, I can only let you go now!\n") + self.trapped = False + elif do[0]=="you" and do[1]=="will" and do[2]=="not" and do[3]=="shoot" and do[4]=="me": + print("You dirty little human, I can only let you go now!\n") + self.trapped = False + else: + print("Keep saying bullshit and your end is close!") + else: + print("I don't understand.") #lighthouse -- cgit v1.3 From 4bbfd42ac616ca8d530e8e84cd030aa7303816f4 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 04:14:18 +0300 Subject: leave restrictions (n5w7) --- weatbag/tiles/n5w7.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index 44de460..6e1b687 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -42,5 +42,21 @@ class Tile: print("Keep saying bullshit and your end is close!") else: print("I don't understand.") - -#lighthouse + + def leave(self, player, direction): + if self.trapped and direction in ("w", "n"): + print("You are my prisoner, I won't let you leave. But even if you " + "could leave these are the inner walls of the lighthouse you " + "idiot! And then the sea.\n") + return False + elif self.trapped and direction in ("e", "s"): + print("What do you think you are doing? I won't let you leave. " + "You are my prisoner!\n") + return False + elif direction in ("w", "n"): + print("It's the light house walls. What are you gonna do? " + "Hit your head on them?\n") + return False + else: + print("Finaly you are out!") + return True -- cgit v1.3 From c2a0d01ed46cb4bfea86f682d5637b7cd172376d Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 04:38:55 +0300 Subject: added different description if challenge completed (n5w7) --- weatbag/tiles/n5w7.py | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index 6e1b687..ce88c94 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -6,7 +6,7 @@ class Tile: def describe(self): if self.trapped: - print("You are inside the light house. You hear a clicking sound and " + print("You are inside the lighthouse. You hear a clicking sound and " "the door closes behind you.\nIt is dark, and an enormous cat " "sits on a computer compiling felinux kernels.\n" "You try to open the door and leave but you realize it is " @@ -21,14 +21,34 @@ class Tile: "more there is an apropriate answer that gets your ass out of " "this hell!\n") - - # The exact answer is 'You will hang me'. If she hang him, then the + # The exact answer is 'You will hang me'. If she hang him, then the # statement was true and she could only hang him for telling a lie. - # If she shoot him, then it makes the statement a lie and she was only - # to shoot him for telling the truth. - # An alternate solution is to say, "You will not shoot me," leading to the + # If she shoot him, then it makes the statement a lie and she was only + # to shoot him for telling the truth. + # An alternate solution is to say, "You will not shoot me," leading to the # same quandary for the killercat. + + else: + print("You are inside the lighthouse. There's a computer in a " + "corner and some printed papers on the ground with " + "scriblings like:\n\n" + "SO IM LIKE FIBBING WIT N OK?\n" + " LOL ITERATE FIBONACCI TERMS LESS THAN N /LOL\n" + " SO GOOD N BIG LIKE EASTERBUNNY\n" + " BTW, FIBONACCI LIKE BUNNIES! LOL\n" + " U BORROW CHEEZBURGER\n" + " U BORROW CHEEZBURGER\n" + " I CAN HAZ CHEEZBURGER\n" + " HE CAN HAZ CHEEZBURGER\n" + " WHILE I CUTE?\n" + " I AND HE CAN HAZ HE AND I ALONG WITH HE\n" + " IZ HE BIG LIKE N?\n" + " KTHXBYE\n" + " U BORROW HE\n\n" + "Ah huh you think... lolpython fibonacci. Crazy catworks. " + "Nothing to do here!\n") +# http://www.dalkescientific.com/writings/diary/archive/2007/06/01/lolpython.html def action(self, player, do): if self.trapped: @@ -54,7 +74,7 @@ class Tile: "You are my prisoner!\n") return False elif direction in ("w", "n"): - print("It's the light house walls. What are you gonna do? " + print("It's the lighthouse walls. What are you gonna do? " "Hit your head on them?\n") return False else: -- cgit v1.3 From b66b944ddec676081721a4903db2cbb646b8d27d Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 04:52:42 +0300 Subject: minor changes in description when you get the item --- weatbag/tiles/n3w5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index 7045620..1b9a969 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -39,7 +39,7 @@ class Tile: def take_knife(self, player, do): if transfer('knife', self.contents, player.inventory): - print("You take the knife.\n") + print("You put the knife in your bag.\n") else: print("There is nothing here.\n") -- cgit v1.3 From aa84e7b52b4fc32c58f622f687f9d1c71bc855ee Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 19 May 2013 15:14:18 +0300 Subject: grammar fixed --- weatbag/tiles/n1w2.py | 2 +- weatbag/tiles/n1w3.py | 4 ++-- weatbag/tiles/n1w5.py | 6 +++--- weatbag/tiles/n1w6.py | 2 +- weatbag/tiles/n2w6.py | 6 +++--- weatbag/tiles/n3w4.py | 2 +- weatbag/tiles/n3w5.py | 4 ++-- weatbag/tiles/n3w6.py | 6 +++--- weatbag/tiles/n4w7.py | 5 +++-- weatbag/tiles/n5w5.py | 2 +- weatbag/tiles/n5w7.py | 6 +++--- 11 files changed, 23 insertions(+), 22 deletions(-) diff --git a/weatbag/tiles/n1w2.py b/weatbag/tiles/n1w2.py index 4d18ff4..63fec34 100644 --- a/weatbag/tiles/n1w2.py +++ b/weatbag/tiles/n1w2.py @@ -5,7 +5,7 @@ class Tile: "on the sea.") def action(self, player, do): - print("What is this giberish?") + print("What is this gibberish?") def leave(self, player, direction): if direction == "e": diff --git a/weatbag/tiles/n1w3.py b/weatbag/tiles/n1w3.py index 081d41e..c086d9b 100644 --- a/weatbag/tiles/n1w3.py +++ b/weatbag/tiles/n1w3.py @@ -4,7 +4,7 @@ class Tile: print("Woooah! Those rocks are full of lichens!\n") def action(self, player, do): - print("Sorry, I don't speak giberish.\n") + print("Sorry, I don't speak gibberish.\n") def leave(self, player, direction): if direction == "s": @@ -13,7 +13,7 @@ class Tile: return False elif direction == "n": print("The rocks are way to high for you. " - "Unfortunatelly you cannot climb them.") + "Unfortunately you cannot climb them.") return False else: return True diff --git a/weatbag/tiles/n1w5.py b/weatbag/tiles/n1w5.py index 3ae5b43..7767bf9 100644 --- a/weatbag/tiles/n1w5.py +++ b/weatbag/tiles/n1w5.py @@ -8,8 +8,8 @@ class Tile: def describe(self): if self.contents['mice']: print("As you walk the rocky path at the edge of the cliff you " - "hear a squeaking sound and you notice two mice traps on the " - "ground. Each are having one mouse inside them trapped.\n" + "hear a squeaking sound and you notice two mouse traps on the " + "ground. Each has one mouse trapped inside.\n" "You could take the silly rodents but really... what the " "hell are you gonna do with them?\n") else: @@ -31,7 +31,7 @@ class Tile: def leave(self, player, direction): if direction == "s": - print("My dear traveler, you can't go south, you will fall of the " + print("My dear traveler, you can't go south, you will fall off the " "cliff!\n") return False elif direction == "n": diff --git a/weatbag/tiles/n1w6.py b/weatbag/tiles/n1w6.py index ab2da24..7c8438f 100644 --- a/weatbag/tiles/n1w6.py +++ b/weatbag/tiles/n1w6.py @@ -15,5 +15,5 @@ class Tile: "cliff!\n") return False elif direction in('e', 'n'): - print("You follow tha path downhill.") + print("You follow the path downhill.") return True diff --git a/weatbag/tiles/n2w6.py b/weatbag/tiles/n2w6.py index 01ab28b..15e1610 100644 --- a/weatbag/tiles/n2w6.py +++ b/weatbag/tiles/n2w6.py @@ -2,19 +2,19 @@ class Tile: def describe(self): print("Big rocks around the place, and the sound of small waves at the " - "weastern sea makes you calm! \n") + "western sea makes you calm! \n") def action(self, player, do): print("Sorry, I don't understand.\n") def leave(self, player, direction): if direction == "w": - print("My dear traveler, you can't fall of the cliff! " + print("My dear traveler, you can't fall off the cliff! " "I won't let you do it.\n") return False elif direction == "e": print("It looks like the back of a wooden hut.\n" - "Since you don't walk though walls (yet) " + "Since you don't walk through walls (yet) " "you can't go there.\n") return False elif direction == "s": diff --git a/weatbag/tiles/n3w4.py b/weatbag/tiles/n3w4.py index e49b496..c643ac7 100644 --- a/weatbag/tiles/n3w4.py +++ b/weatbag/tiles/n3w4.py @@ -3,7 +3,7 @@ class Tile: print("Looks like you are in a walking mood!\n" "You hear birds singing, some small waves on the background, " "there is a nice flowery smell, rays of sun make the tree " - "sceenery heavenly...\n" + "scenery heavenly...\n" "I totaly get you, it's a nice path to have a walk!\n") def action(self, player, do): diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index 1b9a969..5e0068d 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -7,7 +7,7 @@ class Tile: self.challenge_completed = False def describe(self): - print("Your feet do a crackling sound as your feet snapp some twigs on " + print("Your feet make a crackling sound as your feet snap some twigs on " "the ground.\n") if not self.challenge_completed: self.challenge() @@ -22,7 +22,7 @@ class Tile: "0_2345\n\n" "You try to open the box but it won't open.\n" "Now... as you might have guessed already, it is a magic box! " - "If you *understand* what these carvings represend the box will " + "If you *understand* what these carvings represent the box will " "open!") # What the riddle says is "No one understands" diff --git a/weatbag/tiles/n3w6.py b/weatbag/tiles/n3w6.py index b50be06..c4c5b6c 100644 --- a/weatbag/tiles/n3w6.py +++ b/weatbag/tiles/n3w6.py @@ -1,17 +1,17 @@ class Tile: def describe(self): - print("Rocks. Big rocks. Slipery rocks all over!\n") + print("Rocks. Big rocks. Slippery rocks all over!\n") def action(self, player, do): print("Sorry, I don't understand.\n") def leave(self, player, direction): if direction == "w": - print("No-no! You'll break your head to the rocks down there!\n") + print("No-no! You'll break your head on the rocks down there!\n") return False elif direction == "s": - print("You follow the path uphill. Just be careful of the slipery " + print("You follow the path uphill. Just be careful of the slippery " "rocks.") return True elif direction == "n": diff --git a/weatbag/tiles/n4w7.py b/weatbag/tiles/n4w7.py index a7a0ea8..f1e40e9 100644 --- a/weatbag/tiles/n4w7.py +++ b/weatbag/tiles/n4w7.py @@ -14,7 +14,7 @@ class Tile: def kitties(self): - print("You aproach the kitties and to your surprise they all start " + print("You approach the kitties and to your surprise they all start " "rubbing at your legs and mewing! What is even more surprising " "is that your brain understands and translates meaws into " "words!\n" @@ -30,7 +30,8 @@ class Tile: player.take("mice") print("Balls of tasty omnom mice cream fall from your " "hands!\nThe kittens look very pleased!\n" - "Because they are happy they give you an advice:\n" + "Because they are happy they give you a piece of " + "advice:\n" "'U SHUD AVOID BY ANY MEANZ TEH LIGHTHAUS! " "BAD KAT LIVEZ THAR!'\n") self.challenge_completed = True diff --git a/weatbag/tiles/n5w5.py b/weatbag/tiles/n5w5.py index 5767e9e..ad41b7e 100644 --- a/weatbag/tiles/n5w5.py +++ b/weatbag/tiles/n5w5.py @@ -17,7 +17,7 @@ class Tile: "outside the kiosk is digging holes in the sand.\n" "You say hi, and the old lady replies:\n" "Hello to you traveler, I'm Grace Hopper and this is my cat " - "Sandy Claws. I could offer you a cream but first you must " + "Sandy Claws. I could offer you some cream but first you must " "answer me this:\n" "Tom's mother has three children. One is named April, one is " "named May. What is the third one named?\n") diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index ce88c94..ca39186 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -18,7 +18,7 @@ class Tile: "If you tell a lie I will hang you; if you tell the truth I will " "shoot you.\n\n" "It looks like you are condemned... Though if you think a bit " - "more there is an apropriate answer that gets your ass out of " + "more there is an appropriate answer that gets your ass out of " "this hell!\n") # The exact answer is 'You will hang me'. If she hang him, then the @@ -31,7 +31,7 @@ class Tile: else: print("You are inside the lighthouse. There's a computer in a " "corner and some printed papers on the ground with " - "scriblings like:\n\n" + "scribblings like:\n\n" "SO IM LIKE FIBBING WIT N OK?\n" " LOL ITERATE FIBONACCI TERMS LESS THAN N /LOL\n" " SO GOOD N BIG LIKE EASTERBUNNY\n" @@ -78,5 +78,5 @@ class Tile: "Hit your head on them?\n") return False else: - print("Finaly you are out!") + print("Finally you are out!") return True -- cgit v1.3 From 2f84c99a87a69e205c6daaa746dde9e2788cf0ec Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 20 May 2013 14:03:58 +0300 Subject: grammar error fixed --- weatbag/tiles/n3w5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index 5e0068d..b339261 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -16,7 +16,7 @@ class Tile: 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 " - "of it and what you see carved in the box lid is:\n\n" + "off it and what you see carved in the box lid is:\n\n" "stands\n" "-------\n" "0_2345\n\n" -- cgit v1.3 From 1a44cdd9429511f31f61fb5dddbe8f66a59bc2be Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 20 May 2013 14:18:55 +0300 Subject: fixed IndexError line 32 (n5w5) --- weatbag/tiles/n5w5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n5w5.py b/weatbag/tiles/n5w5.py index ad41b7e..c6bc31a 100644 --- a/weatbag/tiles/n5w5.py +++ b/weatbag/tiles/n5w5.py @@ -29,7 +29,7 @@ class Tile: self.contents["cream"] -= 1 player.give("cream") self.challenge = True - elif do[0] in words.take and do[1]=="cream": + elif do[0] in words.take and "cream" in do: print("Don't be greedy, you have all the cream you're gonna " "need.\n") else: -- cgit v1.3 From f9c0237d94d3ec43861c44c97427734785bf13c0 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 20 May 2013 14:28:28 +0300 Subject: elif added in case player tries to take cream before solving the riddle (n5w5) --- weatbag/tiles/n5w5.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weatbag/tiles/n5w5.py b/weatbag/tiles/n5w5.py index c6bc31a..eed7c1c 100644 --- a/weatbag/tiles/n5w5.py +++ b/weatbag/tiles/n5w5.py @@ -29,6 +29,9 @@ class Tile: self.contents["cream"] -= 1 player.give("cream") self.challenge = True + elif do[0] in words.take and "cream" in do and self.contents["cream"]: + print("No, it doesn't work this way. First you gotta answer my " + "question!") elif do[0] in words.take and "cream" in do: print("Don't be greedy, you have all the cream you're gonna " "need.\n") -- cgit v1.3 From 0245ad8d8937bf17d22db6197a8fa904a52fd831 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 20 May 2013 14:43:46 +0300 Subject: changed challenge description about cat (n1w4) --- weatbag/tiles/n1w4.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/weatbag/tiles/n1w4.py b/weatbag/tiles/n1w4.py index d9e9b74..dde04fc 100644 --- a/weatbag/tiles/n1w4.py +++ b/weatbag/tiles/n1w4.py @@ -8,12 +8,13 @@ class Tile: 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") + print("*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 " - "windy and a flock of seagulls is flying above you.") + print("Some pawprints on the ground probably from the persian cat " + "you encountered earlier.\n" + "It's a little bit windy and a flock of seagulls is flying " + "above you.\n") def challenge(self): print("Meow good traveler! I have a question for you.\n" @@ -41,7 +42,9 @@ class Tile: 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!") + "them to let you pass you will use this lucky charm!\n\n" + "And as the cat says these words, " + "*poof* she disappears!\n") #https://en.wikipedia.org/wiki/Maneki-neko self.contents['neko'] -= 1 player.give('neko') -- cgit v1.3 From 19b020356a50126cc15f998fda90c6993c30b8bf Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 20 May 2013 14:49:26 +0300 Subject: leave description for W (n1w3) --- weatbag/tiles/n1w3.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weatbag/tiles/n1w3.py b/weatbag/tiles/n1w3.py index c086d9b..3c8905c 100644 --- a/weatbag/tiles/n1w3.py +++ b/weatbag/tiles/n1w3.py @@ -15,5 +15,8 @@ class Tile: print("The rocks are way to high for you. " "Unfortunately you cannot climb them.") return False + elif direction == "w": + print("The rocks led you to a path uphill.") + return True else: return True -- cgit v1.3 From b64c888f6e7874ecf22023474bb0bf987ca39b4c Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 20 May 2013 14:52:00 +0300 Subject: leave description for E (n1w4) --- weatbag/tiles/n1w4.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weatbag/tiles/n1w4.py b/weatbag/tiles/n1w4.py index dde04fc..22e2fb0 100644 --- a/weatbag/tiles/n1w4.py +++ b/weatbag/tiles/n1w4.py @@ -64,5 +64,8 @@ class Tile: "Since you don't walk though walls (yet) " "you can't go there.\n") return False + elif direction == "e": + print("You follow the path downhill.") + return True else: return True -- cgit v1.3 From 673f378ebbb47734add83e061c0ebf46f117c9bd Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 20 May 2013 14:58:40 +0300 Subject: leave description for E (not sure really and I don't know how to use diff yet >.>) --- weatbag/tiles/n1w5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n1w5.py b/weatbag/tiles/n1w5.py index 7767bf9..2f308cb 100644 --- a/weatbag/tiles/n1w5.py +++ b/weatbag/tiles/n1w5.py @@ -39,8 +39,8 @@ class Tile: "Since you don't walk though walls (yet) " "you can't go there.\n") return False - elif direction == "w": - print("You follow the path uphill.") + elif direction == "e": + print("You follow the path downhill.") return True else: return True -- cgit v1.3 From c6f1148678477b5b8db33b7935b10522aa82fa2d Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 20 May 2013 15:32:10 +0300 Subject: moar \n and changed leave restriction description (n3w5) --- weatbag/tiles/n3w5.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index b339261..8fa9be3 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -21,15 +21,15 @@ class Tile: "-------\n" "0_2345\n\n" "You try to open the box but it won't open.\n" - "Now... as you might have guessed already, it is a magic box! " + "Now... as you might have guessed already, it is a magic box!\n" "If you *understand* what these carvings represent the box will " - "open!") + "open!\n") # What the riddle says is "No one understands" def action(self, player, do): 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!") + "The lid opens and you see a brand new army knife!\n") elif (do[0] in words.take) and ('knife' in do): self.take_knife(player, do) @@ -45,8 +45,8 @@ class Tile: def leave(self, player, direction): if direction == "s": - print("In front of you there is a wall. It's the side of a wooden " - "hut.") + print("You can't go there, it's a wall. It looks like the side of " + "a wooden hut.\n") return False else: return True -- cgit v1.3 From 370d19e493d9cd74fa15cd1580b7b7a5246a602f Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 20 May 2013 15:52:33 +0300 Subject: added map_world --- weatbag/tiles/n1w2.py | 3 ++- weatbag/tiles/n1w3.py | 3 ++- weatbag/tiles/n1w4.py | 2 ++ weatbag/tiles/n1w5.py | 2 ++ weatbag/tiles/n1w6.py | 2 ++ weatbag/tiles/n2w6.py | 1 + weatbag/tiles/n3w5.py | 2 ++ weatbag/tiles/n3w6.py | 1 + weatbag/tiles/n4w5.py | 2 ++ weatbag/tiles/n4w6.py | 2 ++ weatbag/tiles/n4w7.py | 2 ++ weatbag/tiles/n5w5.py | 4 +++- weatbag/tiles/n5w6.py | 2 ++ weatbag/tiles/n5w7.py | 2 ++ 14 files changed, 27 insertions(+), 3 deletions(-) diff --git a/weatbag/tiles/n1w2.py b/weatbag/tiles/n1w2.py index 63fec34..db976fe 100644 --- a/weatbag/tiles/n1w2.py +++ b/weatbag/tiles/n1w2.py @@ -1,5 +1,6 @@ class Tile: - + map_word = "Island beach" + def describe(self): print("The beach is really quiet and you can hear and see the seagulls " "on the sea.") diff --git a/weatbag/tiles/n1w3.py b/weatbag/tiles/n1w3.py index 3c8905c..52d1cb9 100644 --- a/weatbag/tiles/n1w3.py +++ b/weatbag/tiles/n1w3.py @@ -1,5 +1,6 @@ class Tile: - + map_word = "Beach rocks" + def describe(self): print("Woooah! Those rocks are full of lichens!\n") diff --git a/weatbag/tiles/n1w4.py b/weatbag/tiles/n1w4.py index 22e2fb0..c427e9f 100644 --- a/weatbag/tiles/n1w4.py +++ b/weatbag/tiles/n1w4.py @@ -1,6 +1,8 @@ from weatbag.utils import transfer class Tile: + map_word = "Persian cat" + def __init__(self): self.contents = {'neko': 1} self.challenge_completed = False diff --git a/weatbag/tiles/n1w5.py b/weatbag/tiles/n1w5.py index 2f308cb..a6738b9 100644 --- a/weatbag/tiles/n1w5.py +++ b/weatbag/tiles/n1w5.py @@ -2,6 +2,8 @@ from weatbag import words from weatbag.utils import transfer class Tile: + map_word = "Mouse traps" + def __init__(self): self.contents = {'mice': 2} diff --git a/weatbag/tiles/n1w6.py b/weatbag/tiles/n1w6.py index 7c8438f..67f2d47 100644 --- a/weatbag/tiles/n1w6.py +++ b/weatbag/tiles/n1w6.py @@ -1,4 +1,6 @@ class Tile: + map_word = "Top cliff" + def describe(self): print("You have reached the top of the cliff! You feel the fresh " "breeze in your face and you smell the salty sea! The view and " diff --git a/weatbag/tiles/n2w6.py b/weatbag/tiles/n2w6.py index 15e1610..2ce54a6 100644 --- a/weatbag/tiles/n2w6.py +++ b/weatbag/tiles/n2w6.py @@ -1,4 +1,5 @@ class Tile: + map_word = "Cliff" def describe(self): print("Big rocks around the place, and the sound of small waves at the " diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index 8fa9be3..e1587bb 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -2,6 +2,8 @@ from weatbag import words from weatbag.utils import transfer class Tile: + map_word = "Box riddle" + def __init__(self): self.contents = {'knife': 1} self.challenge_completed = False diff --git a/weatbag/tiles/n3w6.py b/weatbag/tiles/n3w6.py index c4c5b6c..c5a03be 100644 --- a/weatbag/tiles/n3w6.py +++ b/weatbag/tiles/n3w6.py @@ -1,4 +1,5 @@ class Tile: + map_word = "Beach rocks" def describe(self): print("Rocks. Big rocks. Slippery rocks all over!\n") diff --git a/weatbag/tiles/n4w5.py b/weatbag/tiles/n4w5.py index 0344000..95971e3 100644 --- a/weatbag/tiles/n4w5.py +++ b/weatbag/tiles/n4w5.py @@ -1,4 +1,6 @@ class Tile: + map_word = "Pine forest" + def describe(self): print("There are not so many trees around but the ground is full of " "pine needles and pine cones.\n") diff --git a/weatbag/tiles/n4w6.py b/weatbag/tiles/n4w6.py index c0f5129..755a78a 100644 --- a/weatbag/tiles/n4w6.py +++ b/weatbag/tiles/n4w6.py @@ -1,4 +1,6 @@ class Tile: + map_word = "Beach curve" + def describe(self): print("The beach makes a nice little curve on that spot. There are " "some pine trees around too. A really quiet sceenery!\n") diff --git a/weatbag/tiles/n4w7.py b/weatbag/tiles/n4w7.py index f1e40e9..6850196 100644 --- a/weatbag/tiles/n4w7.py +++ b/weatbag/tiles/n4w7.py @@ -2,6 +2,8 @@ from weatbag import words from weatbag.utils import transfer class Tile: + map_word = "Kitties" + def __init__(self): self.challenge_completed = False diff --git a/weatbag/tiles/n5w5.py b/weatbag/tiles/n5w5.py index eed7c1c..c5e214b 100644 --- a/weatbag/tiles/n5w5.py +++ b/weatbag/tiles/n5w5.py @@ -2,13 +2,15 @@ from weatbag import words from weatbag.utils import transfer class Tile: + map_word = "Kiosk" + def __init__(self): self.contents = {"cream": 1} self.challenge_completed = False def describe(self): print("You are on the beach. You see a small kiosk selling " - "ice creams!\n") + "ice cream!\n") if not self.challenge_completed: self.challenge() diff --git a/weatbag/tiles/n5w6.py b/weatbag/tiles/n5w6.py index f1121d6..b739479 100644 --- a/weatbag/tiles/n5w6.py +++ b/weatbag/tiles/n5w6.py @@ -1,4 +1,6 @@ class Tile: + map_word = "Beach" + def describe(self): print("You walk in the beach. There is a light house on the west.\n") diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index ca39186..f38501c 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -1,6 +1,8 @@ from weatbag import words class Tile: + map_word = "Lighthouse" + def __init__(self): self.trapped = True -- cgit v1.3 From d9d5b16dc1c6c0ba39cff8641858bdd0d2642f83 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Thu, 23 May 2013 15:20:06 +0300 Subject: wrote more efficient the words that do[] checks (n5w7) --- weatbag/tiles/n5w7.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index f38501c..face836 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -54,10 +54,10 @@ class Tile: def action(self, player, do): if self.trapped: - if do[0]=="you" and do[1]=="will" and do[2]=="hang" and do[3]=="me": + if do == ["you","will","hang","me"]: print("You dirty little human, I can only let you go now!\n") self.trapped = False - elif do[0]=="you" and do[1]=="will" and do[2]=="not" and do[3]=="shoot" and do[4]=="me": + elif do == ["you","will","not","shoot","me"]: print("You dirty little human, I can only let you go now!\n") self.trapped = False else: -- cgit v1.3 From 635e161a3bf7866105cb78c9ada29d4d4ddb6aa6 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Thu, 23 May 2013 15:36:40 +0300 Subject: removed last /n from action and leave functions --- weatbag/tiles/n1w1.py | 2 +- weatbag/tiles/n1w2.py | 4 ++-- weatbag/tiles/n1w3.py | 4 ++-- weatbag/tiles/n1w4.py | 6 +++--- weatbag/tiles/n1w5.py | 6 +++--- weatbag/tiles/n1w6.py | 4 ++-- weatbag/tiles/n2w1.py | 10 +++++----- weatbag/tiles/n2w2.py | 2 +- weatbag/tiles/n2w3.py | 2 +- weatbag/tiles/n2w4.py | 6 +++--- weatbag/tiles/n2w5.py | 4 ++-- weatbag/tiles/n2w6.py | 6 +++--- weatbag/tiles/n3w1.py | 4 ++-- weatbag/tiles/n3w2.py | 6 +++--- weatbag/tiles/n3w3.py | 4 ++-- weatbag/tiles/n3w4.py | 4 ++-- weatbag/tiles/n3w5.py | 4 ++-- weatbag/tiles/n3w6.py | 4 ++-- weatbag/tiles/n4w5.py | 2 +- weatbag/tiles/n4w6.py | 6 +++--- weatbag/tiles/n4w7.py | 2 +- weatbag/tiles/n5w5.py | 4 ++-- weatbag/tiles/n5w6.py | 2 +- weatbag/tiles/n5w7.py | 6 +++--- 24 files changed, 52 insertions(+), 52 deletions(-) diff --git a/weatbag/tiles/n1w1.py b/weatbag/tiles/n1w1.py index f809dc4..b4f1252 100644 --- a/weatbag/tiles/n1w1.py +++ b/weatbag/tiles/n1w1.py @@ -12,7 +12,7 @@ class Tile: def leave(self, player, direction): if direction == "w": print ("You can't go there by swimming, that part is full of " - "electric eels.\n") + "electric eels.") return False else: return True diff --git a/weatbag/tiles/n1w2.py b/weatbag/tiles/n1w2.py index db976fe..e517ca3 100644 --- a/weatbag/tiles/n1w2.py +++ b/weatbag/tiles/n1w2.py @@ -3,7 +3,7 @@ class Tile: def describe(self): print("The beach is really quiet and you can hear and see the seagulls " - "on the sea.") + "on the sea.\n") def action(self, player, do): print("What is this gibberish?") @@ -14,7 +14,7 @@ class Tile: "electric eels.\n") return False elif direction == "s": - print("I'm afraid I can't let you go there Dave.\n") + print("I'm afraid I can't let you go there Dave.") return False elif direction == "w": print("The sandy beach is transforming into big rocks but it looks " diff --git a/weatbag/tiles/n1w3.py b/weatbag/tiles/n1w3.py index 52d1cb9..5d63235 100644 --- a/weatbag/tiles/n1w3.py +++ b/weatbag/tiles/n1w3.py @@ -5,12 +5,12 @@ class Tile: print("Woooah! Those rocks are full of lichens!\n") def action(self, player, do): - print("Sorry, I don't speak gibberish.\n") + print("Sorry, I don't speak gibberish.") def leave(self, player, direction): if direction == "s": print("Are you planing to throw your self to the rocks? You can't " - "go there!\n") + "go there!") return False elif direction == "n": print("The rocks are way to high for you. " diff --git a/weatbag/tiles/n1w4.py b/weatbag/tiles/n1w4.py index c427e9f..6dfdde7 100644 --- a/weatbag/tiles/n1w4.py +++ b/weatbag/tiles/n1w4.py @@ -46,7 +46,7 @@ class Tile: "If you ever come across a wall of kittens and you want " "them to let you pass you will use this lucky charm!\n\n" "And as the cat says these words, " - "*poof* she disappears!\n") + "*poof* she disappears!") #https://en.wikipedia.org/wiki/Maneki-neko self.contents['neko'] -= 1 player.give('neko') @@ -59,12 +59,12 @@ class Tile: def leave(self, player, direction): if direction == "s": print("Oh dear Basdet! You can't go south, you will fall of the " - "cliff!\n") + "cliff!") 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.\n") + "you can't go there.") return False elif direction == "e": print("You follow the path downhill.") diff --git a/weatbag/tiles/n1w5.py b/weatbag/tiles/n1w5.py index a6738b9..4b2c1d4 100644 --- a/weatbag/tiles/n1w5.py +++ b/weatbag/tiles/n1w5.py @@ -22,7 +22,7 @@ class Tile: if (do[0] in words.take) and ('mice' in do): self.take_mice(player) else: - print("Sorry, I don't understand.\n") + print("Sorry, I don't understand.") def take_mice(self, player): if transfer('mice', self.contents, player.inventory, n=2): @@ -34,12 +34,12 @@ class Tile: def leave(self, player, direction): if direction == "s": print("My dear traveler, you can't go south, you will fall off the " - "cliff!\n") + "cliff!") 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.\n") + "you can't go there.") return False elif direction == "e": print("You follow the path downhill.") diff --git a/weatbag/tiles/n1w6.py b/weatbag/tiles/n1w6.py index 67f2d47..78528ff 100644 --- a/weatbag/tiles/n1w6.py +++ b/weatbag/tiles/n1w6.py @@ -9,12 +9,12 @@ class Tile: "So which way?\n") def action(self, player, do): - print("Sorry, I don't understand.\n") + print("Sorry, I don't understand.") def leave(self, player, direction): if direction in ('s', 'w'): print("My dear traveler, you can't go there, you will fall of the " - "cliff!\n") + "cliff!") return False elif direction in('e', 'n'): print("You follow the path downhill.") diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 00198a8..9be8cdc 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -36,11 +36,11 @@ class Tile: print("Your answer has pleased me and my sister! " "\nLet's go!") print("The brother and sister will take you to the " - "island.\n") + "island.") self.challenge_completed = True else: print("We're afraid this is not the correct answer. " - "Try another one.\n") + "Try another one.") elif (do[0] in words.take) and (do[1] == "sister" or do[1] == "girl"): print("You bastard! Let my sister down!\n" @@ -48,14 +48,14 @@ class Tile: "Taking advantage of little children?\n" "We will transport you for free.\n") print("The brother and sister will take you " - "to the island!\n") + "to the island!") self.challenge_completed = True elif (do[0] in words.take) and (do[1] == "brother" or do[1] == "boy"): print("You bastard, put me down!\n" "We will trasnport you for free!\n") print("The brother and sister will take you " - "to the island!\n") + "to the island!") self.challenge_completed = True elif (do[0] in words.take) and not self.challenge_completed: print("I told you we won't give you our raft, " @@ -68,7 +68,7 @@ class Tile: def leave(self, player, direction): if direction == "w" and not self.challenge_completed: print ("You can't go there by swimming, that part is full of " - "electric eels.\n") + "electric eels.") return False else: return True diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index 390ef19..35897c3 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -26,7 +26,7 @@ class Tile: def leave(self, player, direction): if direction == "e": print("You can't go back by swimming, that part is full of " - "electric eels.\n") + "electric eels.") return False else: return True diff --git a/weatbag/tiles/n2w3.py b/weatbag/tiles/n2w3.py index eba9089..4e6707b 100644 --- a/weatbag/tiles/n2w3.py +++ b/weatbag/tiles/n2w3.py @@ -21,7 +21,7 @@ class Tile: def leave(self, player, direction): if direction == "s": print("Careful now! Nasty rocks all over to the south.\n" - "(Meaning you just can't go to that direction. Sorry!)\n") + "(Meaning you just can't go to that direction. Sorry!)") return False else: return True diff --git a/weatbag/tiles/n2w4.py b/weatbag/tiles/n2w4.py index 59904c2..c14bffb 100644 --- a/weatbag/tiles/n2w4.py +++ b/weatbag/tiles/n2w4.py @@ -28,15 +28,15 @@ class Tile: print("You'll need a doorknob to open the door.\n") self.opendoor = False else: - print("Sorry, I don't understand.\n") + print("Sorry, I don't understand.") def leave(self, player, direction): if direction == 'w' and not self.opendoor: - print("First you need to enter the hut.\n") + print("First you need to enter the hut.") return False elif direction == 's': print("Meeeeh, nothing of importance is going on there, try " - "another direction.\n") + "another direction.") return False else: return True diff --git a/weatbag/tiles/n2w5.py b/weatbag/tiles/n2w5.py index 1c2d707..d6d3efa 100644 --- a/weatbag/tiles/n2w5.py +++ b/weatbag/tiles/n2w5.py @@ -17,7 +17,7 @@ class Tile: if (do[0] in words.take) and ('catfood' in do): self.take_catfood(player) else: - print("Sorry, I don't understand.\n") + print("Sorry, I don't understand.") def take_catfood(self, player): if transfer('catfood', self.contents, player.inventory, n=2): @@ -27,7 +27,7 @@ class Tile: def leave(self, player, direction): if direction == 'w'or direction == 's' or direction == 'n': - print("I don't think you can pass through walls.\n") + print("I don't think you can pass through walls.") return False else: return True diff --git a/weatbag/tiles/n2w6.py b/weatbag/tiles/n2w6.py index 2ce54a6..15a3cf6 100644 --- a/weatbag/tiles/n2w6.py +++ b/weatbag/tiles/n2w6.py @@ -6,17 +6,17 @@ class Tile: "western sea makes you calm! \n") def action(self, player, do): - print("Sorry, I don't understand.\n") + print("Sorry, I don't understand.") def leave(self, player, direction): if direction == "w": print("My dear traveler, you can't fall off the cliff! " - "I won't let you do it.\n") + "I won't let you do it.") return False elif direction == "e": print("It looks like the back of a wooden hut.\n" "Since you don't walk through walls (yet) " - "you can't go there.\n") + "you can't go there.") return False elif direction == "s": print("You follow the path uphill.") diff --git a/weatbag/tiles/n3w1.py b/weatbag/tiles/n3w1.py index 98877eb..922ec4a 100644 --- a/weatbag/tiles/n3w1.py +++ b/weatbag/tiles/n3w1.py @@ -8,7 +8,7 @@ class Tile: def leave(self, player, direction): if direction == 'w': print("I'm afraid you can't go west.\nThe sea on that part is " - "full of electric eels and you don't have a transport.\n") + "full of electric eels and you don't have a transport.") return False elif direction == 'e': print("There's a steep mountainside here which you can't climb.") @@ -36,6 +36,6 @@ class Tile: " '-...-' '-...-' \n") print("A wall of kitties doesn't allow you to go North.\n" "But that doesn't make you mad... " - "You can't be mad at kitties, rite?!\n") + "You can't be mad at kitties, rite?!") return False return True diff --git a/weatbag/tiles/n3w2.py b/weatbag/tiles/n3w2.py index 9ff35a5..d4300b5 100644 --- a/weatbag/tiles/n3w2.py +++ b/weatbag/tiles/n3w2.py @@ -35,16 +35,16 @@ class Tile: elif len(do) > 1: print("I have no use for that.\n") else: - print("Sorry, I don't understand.\n") + print("Sorry, I don't understand.") def leave(self, player, direction): if direction == 'e'and not self.give_catfood: print("You can't swim, remember the electric eels? You need a " - "transport to go across.\n") + "transport to go across.") return False if direction == 'n': - print("Nothing to do there.\n") + print("Nothing to do there.") return False else: return True diff --git a/weatbag/tiles/n3w3.py b/weatbag/tiles/n3w3.py index d2977c4..f0bcce5 100644 --- a/weatbag/tiles/n3w3.py +++ b/weatbag/tiles/n3w3.py @@ -18,7 +18,7 @@ class Tile: self.take_doorknob(player) else: - print("Sorry, I don't understand.\n") + print("Sorry, I don't understand.") def take_doorknob(self, player): if transfer('doorknob', self.contents, player.inventory): @@ -28,7 +28,7 @@ class Tile: def leave(self, player, direction): if direction == "n": - print("Oops! You can't go there. There is a rocky wall.\n") + print("Oops! You can't go there. There is a rocky wall.") return False else: return True diff --git a/weatbag/tiles/n3w4.py b/weatbag/tiles/n3w4.py index c643ac7..cc286bd 100644 --- a/weatbag/tiles/n3w4.py +++ b/weatbag/tiles/n3w4.py @@ -7,11 +7,11 @@ class Tile: "I totaly get you, it's a nice path to have a walk!\n") def action(self, player, do): - print("Sorry, I don't understand.\n") + print("Sorry, I don't understand.") def leave(self, player, direction): if direction == "n": - print("No trespasing. Violators will vanish without a trace.\n") + print("No trespasing. Violators will vanish without a trace.") return False else: return True diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index e1587bb..b7dd456 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -37,7 +37,7 @@ class Tile: self.take_knife(player, do) self.challenge_completed = True else: - print("Sorry, I don't understand.\n") + print("Sorry, I don't understand.") def take_knife(self, player, do): if transfer('knife', self.contents, player.inventory): @@ -48,7 +48,7 @@ class Tile: def leave(self, player, direction): if direction == "s": print("You can't go there, it's a wall. It looks like the side of " - "a wooden hut.\n") + "a wooden hut.") return False else: return True diff --git a/weatbag/tiles/n3w6.py b/weatbag/tiles/n3w6.py index c5a03be..7877139 100644 --- a/weatbag/tiles/n3w6.py +++ b/weatbag/tiles/n3w6.py @@ -5,11 +5,11 @@ class Tile: print("Rocks. Big rocks. Slippery rocks all over!\n") def action(self, player, do): - print("Sorry, I don't understand.\n") + print("Sorry, I don't understand.") def leave(self, player, direction): if direction == "w": - print("No-no! You'll break your head on the rocks down there!\n") + print("No-no! You'll break your head on the rocks down there!") return False elif direction == "s": print("You follow the path uphill. Just be careful of the slippery " diff --git a/weatbag/tiles/n4w5.py b/weatbag/tiles/n4w5.py index 95971e3..8308503 100644 --- a/weatbag/tiles/n4w5.py +++ b/weatbag/tiles/n4w5.py @@ -14,7 +14,7 @@ class Tile: return False elif direction == "n": print("There is an opening that leads you to the beach on the " - "northen side of the island.\n") + "northen side of the island.") return True else: return True diff --git a/weatbag/tiles/n4w6.py b/weatbag/tiles/n4w6.py index 755a78a..0f2c508 100644 --- a/weatbag/tiles/n4w6.py +++ b/weatbag/tiles/n4w6.py @@ -6,15 +6,15 @@ class Tile: "some pine trees around too. A really quiet sceenery!\n") def action(self, player, do): - print("Sorry, I don't understand.\n") + print("Sorry, I don't understand.") def leave(self, player, direction): if direction == "s": print("You follow the path uphill. There are some rocks. Just be " - "careful, they all have this gooey green stuff on them!\n") + "careful, they all have this gooey green stuff on them!") return True elif direction == "e": - print("You are going through the pine trees.\n") + print("You are going through the pine trees.") return True else: return True diff --git a/weatbag/tiles/n4w7.py b/weatbag/tiles/n4w7.py index 6850196..bc582bb 100644 --- a/weatbag/tiles/n4w7.py +++ b/weatbag/tiles/n4w7.py @@ -43,7 +43,7 @@ class Tile: def leave(self, player, direction): if direction in ("s", "w"): print("It's the open sea. You can't go anywhere near by " - "swimming.\n") + "swimming.") return False elif direction == "n": print("You are heading to the lighthouse.") diff --git a/weatbag/tiles/n5w5.py b/weatbag/tiles/n5w5.py index c5e214b..75aff81 100644 --- a/weatbag/tiles/n5w5.py +++ b/weatbag/tiles/n5w5.py @@ -38,12 +38,12 @@ class Tile: print("Don't be greedy, you have all the cream you're gonna " "need.\n") else: - print("I don't understand.\n") + print("I don't understand.") def leave(self, player, direction): if direction in ("n", "e"): print("It's the open sea. You can't go anywhere near by " - "swimming.\n") + "swimming.") return False elif direction == "s": print("A bunch of pine trees...") diff --git a/weatbag/tiles/n5w6.py b/weatbag/tiles/n5w6.py index b739479..81438fe 100644 --- a/weatbag/tiles/n5w6.py +++ b/weatbag/tiles/n5w6.py @@ -10,7 +10,7 @@ class Tile: def leave(self, player, direction): if direction == "n": print("It's the open sea. You can't go anywhere near by " - "swimming.\n") + "swimming.") return False else: return True diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index face836..1986782 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -69,15 +69,15 @@ class Tile: if self.trapped and direction in ("w", "n"): print("You are my prisoner, I won't let you leave. But even if you " "could leave these are the inner walls of the lighthouse you " - "idiot! And then the sea.\n") + "idiot! And then the sea.") return False elif self.trapped and direction in ("e", "s"): print("What do you think you are doing? I won't let you leave. " - "You are my prisoner!\n") + "You are my prisoner!") return False elif direction in ("w", "n"): print("It's the lighthouse walls. What are you gonna do? " - "Hit your head on them?\n") + "Hit your head on them?") return False else: print("Finally you are out!") -- cgit v1.3 From c98504601a89b572225bccdace46b8bcb0575a6f Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Thu, 23 May 2013 15:56:19 +0300 Subject: fixed the challenge with the knife (n3w5) --- weatbag/tiles/n3w5.py | 16 +++++++++------- 1 file 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.") -- cgit v1.3 From edc65428cd72107f8ce2661a0717d7cb5b305586 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Thu, 23 May 2013 16:16:03 +0300 Subject: added 'bribe the cat with catfood' option --- weatbag/tiles/n5w7.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index 1986782..2fea283 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -60,6 +60,13 @@ class Tile: elif do == ["you","will","not","shoot","me"]: print("You dirty little human, I can only let you go now!\n") self.trapped = False + elif player.has("catfood") and (do[0] in words.use or do[0] in words.give) and "catfood" in do: + print("Do you think that if you bribe me with catfood I'll let " + "you leave?\nCatfood will not save you this time.\n" + "The fat cat steals one catfood and eats it. You should " + "be more carefull next time.") + player.take("catfood") + self.trapped = False else: print("Keep saying bullshit and your end is close!") else: @@ -82,3 +89,5 @@ class Tile: else: print("Finally you are out!") return True + +test_items = ["catfood"] -- cgit v1.3 From c85a278562e093038b7b990371e9376b7a213ca7 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Fri, 24 May 2013 00:46:03 +0300 Subject: orthography --- weatbag/tiles/n5w7.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index 2fea283..7476c99 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -23,7 +23,7 @@ class Tile: "more there is an appropriate answer that gets your ass out of " "this hell!\n") - # The exact answer is 'You will hang me'. If she hang him, then the + # The exact answer is 'You will hang me'. If she hangs him, then the # statement was true and she could only hang him for telling a lie. # If she shoot him, then it makes the statement a lie and she was only # to shoot him for telling the truth. -- cgit v1.3 From a31152c09fae64bee5a21913145b0a3f2511e94b Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Fri, 24 May 2013 01:05:33 +0300 Subject: wrote more efficient the words that do[] checks (n3w5) --- weatbag/tiles/n3w5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index 26aec4d..e117bcf 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -31,7 +31,7 @@ class Tile: # What the riddle says is "No one understands" def action(self, player, do): - if do[0] == "no" and do[1] == "one" and do[2] == "understands": + if do == ["no", "one", "understands"]: print("And that is absolutely right!\n" "The lid opens and you see a brand new army knife!\n") self.challenge_completed = True -- cgit v1.3 From 069a838975c7c1ce58f8b98678ee2005e4410d8c Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Fri, 24 May 2013 01:19:00 +0300 Subject: changed description on leave after the challenge is completed (n5w7) --- weatbag/tiles/n5w7.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index 7476c99..e12f28c 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -87,7 +87,7 @@ class Tile: "Hit your head on them?") return False else: - print("Finally you are out!") + print("You are out!") return True test_items = ["catfood"] -- cgit v1.3 From 74288b83d9e99f790ef4a96fe7bfc96814bcb3d6 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 26 May 2013 23:47:41 +0300 Subject: PEP 8 --- weatbag/tiles/n1w5.py | 4 ++-- weatbag/tiles/n3w5.py | 3 ++- weatbag/tiles/n5w7.py | 35 +++++++++++++++++++---------------- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/weatbag/tiles/n1w5.py b/weatbag/tiles/n1w5.py index 4b2c1d4..634b4f7 100644 --- a/weatbag/tiles/n1w5.py +++ b/weatbag/tiles/n1w5.py @@ -10,8 +10,8 @@ class Tile: def describe(self): if self.contents['mice']: print("As you walk the rocky path at the edge of the cliff you " - "hear a squeaking sound and you notice two mouse traps on the " - "ground. Each has one mouse trapped inside.\n" + "hear a squeaking sound and you notice two mouse traps on " + "the ground. Each has one mouse trapped inside.\n" "You could take the silly rodents but really... what the " "hell are you gonna do with them?\n") else: diff --git a/weatbag/tiles/n3w5.py b/weatbag/tiles/n3w5.py index e117bcf..eec9779 100644 --- a/weatbag/tiles/n3w5.py +++ b/weatbag/tiles/n3w5.py @@ -36,7 +36,8 @@ class Tile: "The lid opens and you see a brand new army knife!\n") self.challenge_completed = True - elif (do[0] in words.take) and ('knife' in do) and self.challenge_completed: + elif ((do[0] in words.take) and ('knife' in do) + and self.challenge_completed): self.take_knife(player, do) else: print("Sorry, I don't understand.") diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index e12f28c..b371ea9 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -8,20 +8,21 @@ class Tile: def describe(self): if self.trapped: - print("You are inside the lighthouse. You hear a clicking sound and " - "the door closes behind you.\nIt is dark, and an enormous cat " - "sits on a computer compiling felinux kernels.\n" - "You try to open the door and leave but you realize it is " - "locked.\n" - "The cat turns at you and hisses loudly.\n" - "She grawls and because you now speak cat, you understand what " - "she says.\n\n" - "Puny human, how dare you disturb my peace!\n" - "If you tell a lie I will hang you; if you tell the truth I will " - "shoot you.\n\n" - "It looks like you are condemned... Though if you think a bit " - "more there is an appropriate answer that gets your ass out of " - "this hell!\n") + print("You are inside the lighthouse. You hear a clicking sound " + "and the door closes behind you.\n" + "It is dark, and an enormous cat sits on a computer " + "compiling felinux kernels.\n" + "You try to open the door and leave but you realize it is " + "locked.\n" + "The cat turns at you and hisses loudly.\n" + "She grawls and because you now speak cat, you understand " + "what she says.\n\n" + "Puny human, how dare you disturb my peace!\n" + "If you tell a lie I will hang you; " + "if you tell the truth I will shoot you.\n\n" + "It looks like you are condemned... Though if you think a " + "bit more there is an appropriate answer that gets your ass " + "out of this hell!\n") # The exact answer is 'You will hang me'. If she hangs him, then the # statement was true and she could only hang him for telling a lie. @@ -50,7 +51,7 @@ class Tile: "Ah huh you think... lolpython fibonacci. Crazy catworks. " "Nothing to do here!\n") -# http://www.dalkescientific.com/writings/diary/archive/2007/06/01/lolpython.html +#http://www.dalkescientific.com/writings/diary/archive/2007/06/01/lolpython.html def action(self, player, do): if self.trapped: @@ -60,7 +61,9 @@ class Tile: elif do == ["you","will","not","shoot","me"]: print("You dirty little human, I can only let you go now!\n") self.trapped = False - elif player.has("catfood") and (do[0] in words.use or do[0] in words.give) and "catfood" in do: + elif (player.has("catfood") + and (do[0] in words.use or do[0] in words.give) + and "catfood" in do): print("Do you think that if you bribe me with catfood I'll let " "you leave?\nCatfood will not save you this time.\n" "The fat cat steals one catfood and eats it. You should " -- cgit v1.3