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/n5w7.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 weatbag/tiles/n5w7.py (limited to 'weatbag/tiles/n5w7.py') 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(+) (limited to 'weatbag/tiles/n5w7.py') 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 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(-) (limited to 'weatbag/tiles/n5w7.py') 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 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(-) (limited to 'weatbag/tiles/n5w7.py') 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(-) (limited to 'weatbag/tiles/n5w7.py') 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(-) (limited to 'weatbag/tiles/n5w7.py') 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 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(-) (limited to 'weatbag/tiles/n5w7.py') 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 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(-) (limited to 'weatbag/tiles/n5w7.py') 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(-) (limited to 'weatbag/tiles/n5w7.py') 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(-) (limited to 'weatbag/tiles/n5w7.py') 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 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(+) (limited to 'weatbag/tiles/n5w7.py') 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(-) (limited to 'weatbag/tiles/n5w7.py') 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 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(-) (limited to 'weatbag/tiles/n5w7.py') 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(-) (limited to 'weatbag/tiles/n5w7.py') 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