From 7a4413f5d8963cb276580526213e69789182e5a3 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 21 Apr 2013 17:57:34 +0300 Subject: new tile n2w2 --- weatbag/tiles/n2w2.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 weatbag/tiles/n2w2.py (limited to 'weatbag/tiles/n2w2.py') diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py new file mode 100644 index 0000000..e16f4b8 --- /dev/null +++ b/weatbag/tiles/n2w2.py @@ -0,0 +1,31 @@ +from weatbag import words +from weatbag.utils import transfer + +class Tile: + def __init__(self): + self.contents = {'key': 1} + + def describe(self): + print("You are now on the island.") + if self.contents['key']: + print("As you walk around you find something shiny on the ground. Looks like a key.") + + def action(self, player, do): + if (do[0] in words.take) and ('key' in do): + self.take_key(player) + else: + print("Sorry, I don't understand.") + + def take_key(self, player): + if transfer('key', self.contents, player.inventory): + print("You pick up the key.") + else: + print("There is nothing here.") + + def leave(self, player, direction): + if direction == "e": + print ("You can't go back by swimming, that part is full of " + "electric eels.") + return False + else: + return True -- cgit v1.3 From f2ccd5bd0de5f158467a60a06edcf637a963a3d8 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 22 Apr 2013 00:48:51 +0300 Subject: added an item for the inventory --- weatbag/tiles/n2w2.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'weatbag/tiles/n2w2.py') diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index e16f4b8..c4f8575 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -3,22 +3,25 @@ from weatbag.utils import transfer class Tile: def __init__(self): - self.contents = {'key': 1} + self.contents = {'doorknob': 1} def describe(self): print("You are now on the island.") - if self.contents['key']: - print("As you walk around you find something shiny on the ground. Looks like a key.") - + if self.contents['doorknob']: + print("As you walk around you find something shiny on the ground. " + "It looks like a brass doorknob.") + else: + print("There is nothing interesting here") def action(self, player, do): - if (do[0] in words.take) and ('key' in do): - self.take_key(player) + if (do[0] in words.take) and ('doorknob' in do): + self.take_doorknob(player) + else: print("Sorry, I don't understand.") - def take_key(self, player): - if transfer('key', self.contents, player.inventory): - print("You pick up the key.") + def take_doorknob(self, player): + if transfer('doorknob', self.contents, player.inventory): + print("You pick up the doorknob.") else: print("There is nothing here.") -- cgit v1.3 From ce8936e360c1d07a3aa72c24ca23b26449781329 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 22 Apr 2013 01:47:18 +0300 Subject: changed possision of previous tile/made new tile --- weatbag/tiles/n2w2.py | 47 ++++++++++++++--------------------------------- 1 file changed, 14 insertions(+), 33 deletions(-) (limited to 'weatbag/tiles/n2w2.py') diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index c4f8575..a7d8848 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -1,34 +1,15 @@ -from weatbag import words -from weatbag.utils import transfer - class Tile: - def __init__(self): - self.contents = {'doorknob': 1} - - def describe(self): - print("You are now on the island.") - if self.contents['doorknob']: - print("As you walk around you find something shiny on the ground. " - "It looks like a brass doorknob.") - else: - print("There is nothing interesting here") - def action(self, player, do): - if (do[0] in words.take) and ('doorknob' in do): - self.take_doorknob(player) - - else: - print("Sorry, I don't understand.") - - def take_doorknob(self, player): - if transfer('doorknob', self.contents, player.inventory): - print("You pick up the doorknob.") - else: - print("There is nothing here.") - - def leave(self, player, direction): - if direction == "e": - print ("You can't go back by swimming, that part is full of " - "electric eels.") - return False - else: - return True + def describe(self): + print("You are now on the island. In front of you there are some trees " + "and a small path. Feeling adventurous?") + + def action(self, player, do): + print("Sorry, I don't understand") + + def leave(self, player, direction): + if direction == "e": + print ("You can't go back by swimming, that part is full of " + "electric eels.") + return False + else: + return True -- cgit v1.3 From a5e3812174ab28ef6be83a17a11f1e1da4e6651a Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 02:37:22 +0300 Subject: added some /n for teh l00ks!!1! --- weatbag/tiles/n1w1.py | 7 ++++--- weatbag/tiles/n2w1.py | 46 +++++++++++++++++++++++----------------------- weatbag/tiles/n2w2.py | 6 +++--- weatbag/tiles/n2w3.py | 4 ++-- weatbag/tiles/n2w4.py | 17 +++++++++-------- weatbag/tiles/n2w5.py | 8 ++++---- weatbag/tiles/n3w1.py | 8 ++++---- weatbag/tiles/n3w2.py | 14 +++++++------- weatbag/tiles/n3w3.py | 10 +++++----- weatbag/tiles/n3w4.py | 8 ++++---- 10 files changed, 65 insertions(+), 63 deletions(-) (limited to 'weatbag/tiles/n2w2.py') diff --git a/weatbag/tiles/n1w1.py b/weatbag/tiles/n1w1.py index aad8104..3a455cf 100644 --- a/weatbag/tiles/n1w1.py +++ b/weatbag/tiles/n1w1.py @@ -1,7 +1,8 @@ class Tile: def describe(self): - print("There is a small island northwest.\n" - "Unfortunatelly, you can't swim so you need a transport to go there.\n" + print("\nThere is a small island northwest.\n" + "Unfortunatelly, you can't swim because the sea is full of " + "electric eels so you need a transport to go there.\n" "Luckilly to the north you see 2 children with a raft sitting " "under a tree." ) @@ -10,7 +11,7 @@ class Tile: def leave(self, player, direction): if direction == "w": - print ("You can't go there by swimming, that part is full of " + print ("\nYou can't go there by swimming, that part is full of " "electric eels.") return False else: diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 86f7323..434f760 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -6,15 +6,15 @@ class Tile: self.minutes = "40" def describe(self): - print("You see two children who you notice now are a boy and a girl.\n" - "They are playing and running around a raft.") + print("\nYou see two children who you notice now are a boy and a girl. " + "\nThey are playing and running around a raft.") if self.challenge_not_completed: self.challenge() else: - print("They take you to the western island!") + print("\nThey take you to the western island!") def challenge(self): - print("You ask them to give it to you." + print("\nYou ask them to give it to you." "The little boy laughs and replies: \n" "So you think you are brave enough to go to that island? " "Very well, but we cannot give you our raft. " @@ -24,44 +24,44 @@ class Tile: "It takes for me to transfer a person on the island exactly one " "hour.\n" "It takes double the time for my sister.\n" - "If we combine our powers " - "in how many minutes will we transfer you on the island?\n" - "To make a guess, type a number followed by 'minutes'") + "If we combine our powers, " + "how many minutes will it take to transfer you on the island?\n" + "To make a guess, type a number followed by 'minutes'.") def action(self, player, do): if self.challenge_not_completed: try: if do[1] == "minutes": if do[0] == self.minutes: - print("Your guess have pleased me and my sister! " - "Let's go!") - print("The brother and sister will take you to the " - "island.") + print("\nYour guess have pleased me and my sister! " + "\nLet's go!") + print("\nThe brother and sister will take you to the " + "island.") self.challenge_not_completed = False else: - print("We're afraid this is not the correct answer. " - "Try another one.") + print("\nWe're afraid this is not the correct answer. " + "\nTry another one.") elif (do[0] in words.take) and (do[1] == "sister" or do[1] == "girl"): - print("You little bastard, leave my sister down!\n" - "What kind of an asshole are you? Taking advantage of " - "little children?\nWe will transfer you for free.") - print("The brother and sister take you to the island!") + print("\nYou little bastard, leave my sister down!\n" + "What kind of an asshole are you? Taking advantage of " + "little children?\nWe will transfer you for free.") + print("\nThe brother and sister take you to the island!") self.challenge_not_completed = False elif (do[0] in words.take) and (do[1] == "brother" or do[1] == "boy"): - print("You bastard, take me down!\n" - "We will transfer you for free!") - print("The brother and sister take you to the island!") + print("\nYou bastard, take me down!" + "\nWe will transfer you for free!") + print("\nThe brother and sister take you to the island!") self.challenge_not_completed = False elif (do[0] in words.take) and self.challenge_not_completed: - print("I told you we won't give you our raft, " + print("\nI told you we won't give you our raft, " "you have to guess the correct amount of time!") except: - print("Please try guessing a number, like '42 minutes'.") + print("\nPlease try guessing a number, like '42 minutes'.") def leave(self, player, direction): if direction == "w" and self.challenge_not_completed: - print ("You can't go there by swimming, that part is full of " + print ("\nYou can't go there by swimming, that part is full of " "electric eels.") return False else: diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index a7d8848..c9e82a9 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -1,14 +1,14 @@ class Tile: def describe(self): - print("You are now on the island. In front of you there are some trees " - "and a small path. Feeling adventurous?") + print("\nYou are now on the island. In front of you there are some trees " + "and a small path.\nFeeling adventurous?") def action(self, player, do): print("Sorry, I don't understand") def leave(self, player, direction): if direction == "e": - print ("You can't go back by swimming, that part is full of " + print ("\nYou can't go back by swimming, that part is full of " "electric eels.") return False else: diff --git a/weatbag/tiles/n2w3.py b/weatbag/tiles/n2w3.py index dadbbf9..3d1d1ad 100644 --- a/weatbag/tiles/n2w3.py +++ b/weatbag/tiles/n2w3.py @@ -1,6 +1,6 @@ class Tile: def describe(self): - print("You are walking through the trees. It looks like the path you " + print("\nYou are walking through the trees. It looks like the path you " "took leads to a small wooden hut.\nYou saw a tree fall and it didn't " "make any sound and WOW... that was weired because you were there and " "observed it!") @@ -9,5 +9,5 @@ class Tile: # raises questions regarding observation and knowledge of reality. def action(self, player, do): - print("Sorry, I don't understand") + print("\nSorry, I don't understand") diff --git a/weatbag/tiles/n2w4.py b/weatbag/tiles/n2w4.py index 00eaa5d..a427d5e 100644 --- a/weatbag/tiles/n2w4.py +++ b/weatbag/tiles/n2w4.py @@ -7,30 +7,31 @@ class Tile: def describe(self): if self.opendoor: - print("The hut's door is open and the kitties are playing with " + print("\nThe hut's door is open and the kitties are playing with " "their momcat!") else: - print("You are standing in front of the hut's door. The hut looks " - "very small and you wonder who could live there... It has a " - "door but you can't open it because the doorknob is missing.") + print("\nYou are standing in front of the hut's door. The hut " + "looks very small and you wonder who could live there...\n" + "It has a door but you can't open it because the doorknob " + "is missing.") def action(self, player, do): if (do[0] in words.use) and do[1]=='doorknob': if player.has('doorknob'): player.take('doorknob') - print("Doorknob fits fine, clicks and voila... Door is open!\n" + print("\nDoorknob fits fine, clicks and voila... Door is open!\n" "\nYou are in a cozy living room with a cat and 5 kittens" " resting on a couch.\nThere is another room at west.") self.opendoor = True else: - print("You'll need a doorknob to open the door.") + print("\nYou'll need a doorknob to open the door.") self.opendoor = False else: - print("Sorry, I don't understand.") + print("\nSorry, I don't understand.") def leave(self, player, direction): if direction=='w' and not self.opendoor: - print("First you need to enter the hut.") + print("\nFirst you need to enter the hut.") return False else: return True diff --git a/weatbag/tiles/n2w5.py b/weatbag/tiles/n2w5.py index 15c5b63..e88f27c 100644 --- a/weatbag/tiles/n2w5.py +++ b/weatbag/tiles/n2w5.py @@ -7,8 +7,8 @@ class Tile: def describe(self): if self.contents['catfood']: - print("You look around and you see a shelf with catfood cans.\n" - "I don't know about you, but a catfood can is always handy! " + print("\nYou look around and you see a shelf with catfood cans.\n" + "I don't know about you, but a catfood can is always handy!\n" "Never know when you'll need to feed a kitty!") def action(self, player, do): @@ -21,7 +21,7 @@ class Tile: def take_catfood(self, player): if transfer('catfood', self.contents, player.inventory, n=2): - print("You did wise. You took the catfood!") + print("\nYou did wise. You took the catfood!") else: - print("There is nothing here.") + print("\nThere is nothing here.") diff --git a/weatbag/tiles/n3w1.py b/weatbag/tiles/n3w1.py index 5eb7d18..8ff6a6c 100644 --- a/weatbag/tiles/n3w1.py +++ b/weatbag/tiles/n3w1.py @@ -1,17 +1,17 @@ class Tile: def describe(self): - print("The beach is quiet. You see on the south children playing.") + print("\nThe beach is quiet. On the south are children playing.") def action(self, player, do): - print("Sorry, I don't understand") + print("\nSorry, I don't understand") def leave(self, player, direction): if direction=='w': - print("I'm afraid you can't go west.\nThe sea on that part is " + print("\nI'm afraid you can't go west.\nThe sea on that part is " "fool of electric eels and you don't have a transport.") return False elif direction=='e': - print("There is the side of a cave in front of you.\nYou can't go " + print("\nThere is the side of a cave in front of you.\nYou can't go " "east.") return False return True diff --git a/weatbag/tiles/n3w2.py b/weatbag/tiles/n3w2.py index d1266f2..5c0add3 100644 --- a/weatbag/tiles/n3w2.py +++ b/weatbag/tiles/n3w2.py @@ -7,7 +7,7 @@ class Tile: def describe(self): if not self.give_catfood: - print("You are at the beach and there is an old man with an " + print("\nYou are at the beach and there is an old man with an " "enormous beard that is getting his little boat ready to go " "across to the mainland.\nNaturally, you are asking him to " "take you in his boat.\nThe old man replies:\nOf course I " @@ -15,7 +15,7 @@ class Tile: "some catfood so I can feed the kitties across in the " "mainland!") else: - print("There's the old fisherman with his boat, he can take you " + print("\nThere's the old fisherman with his boat, he can take you " "across if you like!") # I only added words.use because player might @@ -28,19 +28,19 @@ class Tile: if self.give_catfood == False: player.take('catfood') self.give_catfood = True - print("Great! Now we can sail!") + print("\nGreat! Now we can sail!") else: player.take('catfood') - print("Oh how nice of you. You are the best!") + print("\nOh how nice of you. You are the best!") elif len(do) > 1: - print("I have no use for that.") + print("\nI have no use for that.") else: - print("Sorry, I don't understand.") + print("\nSorry, 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 " + print("\nYou can't swim, remember the electric eels? You need a " "transport to go across.") return False return True diff --git a/weatbag/tiles/n3w3.py b/weatbag/tiles/n3w3.py index 2989c04..42bec81 100644 --- a/weatbag/tiles/n3w3.py +++ b/weatbag/tiles/n3w3.py @@ -7,20 +7,20 @@ class Tile: def describe(self): if self.contents['doorknob']: - print("As you walk through the path you find something shiny on " + print("\nAs you walk through the path you find something shiny on " "the ground beside some rocks.\nIt looks like a brass doorknob.") else: - print("There is nothing to do here, all you see is your path and " + print("\nThere is nothing to do here, all you see is your path and " "the trees around!") def action(self, player, do): if (do[0] in words.take) and ('doorknob' in do): self.take_doorknob(player) else: - print("Sorry, I don't understand.") + print("\nSorry, I don't understand.") def take_doorknob(self, player): if transfer('doorknob', self.contents, player.inventory): - print("You pick up the doorknob.") + print("\nYou pick up the doorknob.") else: - print("There is nothing here.") + print("\nThere is nothing here.") diff --git a/weatbag/tiles/n3w4.py b/weatbag/tiles/n3w4.py index 928f83b..fff19cf 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. You hear birds singing, some small waves on the background, " + print("\nLooks 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... I totaly get you, it's a nice path to have a walk!") + "heavenly...\nI totaly get you, it's a nice path to have a walk!") def action(self, player, do): - print("Sorry, I don't understand") + print("\nSorry, I don't understand") -- cgit v1.3 From 670811201c625f6269dd9bdd1689c03f72e99537 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 02:49:05 +0300 Subject: added leave function for S --- weatbag/tiles/n2w2.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'weatbag/tiles/n2w2.py') diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index c9e82a9..f390994 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -1,15 +1,18 @@ class Tile: def describe(self): - print("\nYou are now on the island. In front of you there are some trees " - "and a small path.\nFeeling adventurous?") + print("You are now on the island. In front of you there are some trees " + "and a small path.\nFeeling adventurous?\n") def action(self, player, do): print("Sorry, I don't understand") def leave(self, player, direction): if direction == "e": - print ("\nYou can't go back by swimming, that part is full of " - "electric eels.") + 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 e701a9388c8939c9ce91731bb32f8404340180ef Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 05:17:06 +0300 Subject: improved new lines! Woah! --- weatbag/tiles/n1w1.py | 10 +++++----- weatbag/tiles/n2w1.py | 36 ++++++++++++++++++------------------ weatbag/tiles/n2w2.py | 2 +- weatbag/tiles/n2w3.py | 6 +++--- weatbag/tiles/n2w4.py | 20 ++++++++++---------- weatbag/tiles/n2w5.py | 12 ++++++------ weatbag/tiles/n3w1.py | 12 ++++++------ weatbag/tiles/n3w2.py | 20 ++++++++++---------- weatbag/tiles/n3w3.py | 14 +++++++------- weatbag/tiles/n3w4.py | 6 +++--- 10 files changed, 69 insertions(+), 69 deletions(-) (limited to 'weatbag/tiles/n2w2.py') diff --git a/weatbag/tiles/n1w1.py b/weatbag/tiles/n1w1.py index 3a455cf..502caa9 100644 --- a/weatbag/tiles/n1w1.py +++ b/weatbag/tiles/n1w1.py @@ -1,18 +1,18 @@ class Tile: def describe(self): - print("\nThere is a small island northwest.\n" + print("There is a small island northwest.\n" "Unfortunatelly, you can't swim because the sea is full of " "electric eels so you need a transport to go there.\n" "Luckilly to the north you see 2 children with a raft sitting " - "under a tree." ) + "under a tree.\n" ) def action(self, player, do): - pass + print("Waitwat?!") def leave(self, player, direction): if direction == "w": - print ("\nYou can't go there by swimming, that part is full of " - "electric eels.") + print ("You can't go there by swimming, that part is full of " + "electric eels.\n") return False else: return True diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 434f760..cf325b1 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -14,7 +14,7 @@ class Tile: print("\nThey take you to the western island!") def challenge(self): - print("\nYou ask them to give it to you." + print("You ask them to give it to you." "The little boy laughs and replies: \n" "So you think you are brave enough to go to that island? " "Very well, but we cannot give you our raft. " @@ -26,43 +26,43 @@ class Tile: "It takes double the time for my sister.\n" "If we combine our powers, " "how many minutes will it take to transfer you on the island?\n" - "To make a guess, type a number followed by 'minutes'.") + "To make a guess, type a number followed by 'minutes'.\n") def action(self, player, do): if self.challenge_not_completed: try: if do[1] == "minutes": if do[0] == self.minutes: - print("\nYour guess have pleased me and my sister! " + print("Your guess have pleased me and my sister! " "\nLet's go!") - print("\nThe brother and sister will take you to the " - "island.") + print("The brother and sister will take you to the " + "island.\n") self.challenge_not_completed = False else: - print("\nWe're afraid this is not the correct answer. " - "\nTry another one.") + print("We're afraid this is not the correct answer. " + "Try another one.\n") elif (do[0] in words.take) and (do[1] == "sister" or do[1] == "girl"): - print("\nYou little bastard, leave my sister down!\n" + print("You bastard! Leave my sister down!\n" "What kind of an asshole are you? Taking advantage of " - "little children?\nWe will transfer you for free.") - print("\nThe brother and sister take you to the island!") + "little children?\nWe will transfer you for free.\n") + print("The brother and sister take you to the island!\n") self.challenge_not_completed = False elif (do[0] in words.take) and (do[1] == "brother" or do[1] == "boy"): - print("\nYou bastard, take me down!" - "\nWe will transfer you for free!") - print("\nThe brother and sister take you to the island!") + print("You bastard, take me down!\n" + "We will transfer you for free!\n") + print("The brother and sister take you to the island!\n") self.challenge_not_completed = False elif (do[0] in words.take) and self.challenge_not_completed: - print("\nI told you we won't give you our raft, " - "you have to guess the correct amount of time!") + print("I told you we won't give you our raft, " + "you have to guess the correct amount of time!\n") except: - print("\nPlease try guessing a number, like '42 minutes'.") + print("Please try guessing a number, like '42 minutes'\n.") def leave(self, player, direction): if direction == "w" and self.challenge_not_completed: - print ("\nYou can't go there by swimming, that part is full of " - "electric eels.") + print ("You can't go there by swimming, that part is full of " + "electric eels.\n") return False else: return True diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index f390994..abd7f75 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -4,7 +4,7 @@ class Tile: "and a small path.\nFeeling adventurous?\n") def action(self, player, do): - print("Sorry, I don't understand") + print("Sorry, wat?!") def leave(self, player, direction): if direction == "e": diff --git a/weatbag/tiles/n2w3.py b/weatbag/tiles/n2w3.py index 6c82f13..e0ce3b3 100644 --- a/weatbag/tiles/n2w3.py +++ b/weatbag/tiles/n2w3.py @@ -1,15 +1,15 @@ class Tile: def describe(self): - print("\nYou are walking through the trees. It looks like the path you " + print("You are walking through the trees. It looks like the path you " "took leads to a small wooden hut.\nYou saw a tree fall and it didn't " "make any sound and WOW... that was weired because you were there and " - "observed it!") + "observed it!\n") # "If a tree falls in a forest and no one is around to hear it, # does it make a sound?" is a philosophical thought experiment that # raises questions regarding observation and knowledge of reality. def action(self, player, do): - print("\nSorry, I don't understand") + print("Wat?!") def leave(self, player, direction): if direction == "s": diff --git a/weatbag/tiles/n2w4.py b/weatbag/tiles/n2w4.py index 2e917ea..f4309b5 100644 --- a/weatbag/tiles/n2w4.py +++ b/weatbag/tiles/n2w4.py @@ -7,35 +7,35 @@ class Tile: def describe(self): if self.opendoor: - print("\nThe hut's door is open and the kitties are playing with " - "their momcat!") + print("The hut's door is open and the kitties are playing with " + "their momcat!\n") else: - print("\nYou are standing in front of the hut's door. The hut " + print("You are standing in front of the hut's door. The hut " "looks very small and you wonder who could live there...\n" "It has a door but you can't open it because the doorknob " - "is missing.") + "is missing.\n") def action(self, player, do): if (do[0] in words.use) and do[1]=='doorknob': if player.has('doorknob'): player.take('doorknob') - print("\nDoorknob fits fine, clicks and voila... Door is open!\n" + print("Doorknob fits fine, clicks and voila... Door is open!\n" "\nYou are in a cozy living room with a cat and 5 kittens" - " resting on a couch.\nThere is another room at west.") + " resting on a couch.\nThere is another room at west.\n") self.opendoor = True else: - print("\nYou'll need a doorknob to open the door.") + print("You'll need a doorknob to open the door.\n") self.opendoor = False else: - print("\nSorry, I don't understand.") + print("Sorry, I don't understand.\n") def leave(self, player, direction): if direction == 'w' and not self.opendoor: - print("\nFirst you need to enter the hut.") + print("First you need to enter the hut.\n") return False elif direction == 's': print("Meeeeh, nothing of importance is going on there, try " - "another direction.") + "another direction.\n") return False else: return True diff --git a/weatbag/tiles/n2w5.py b/weatbag/tiles/n2w5.py index 7277343..85ed1ff 100644 --- a/weatbag/tiles/n2w5.py +++ b/weatbag/tiles/n2w5.py @@ -7,26 +7,26 @@ class Tile: def describe(self): if self.contents['catfood']: - print("\nYou look around and you see a shelf with catfood cans.\n" + print("You look around and you see a shelf with catfood cans.\n" "I don't know about you, but a catfood can is always handy!\n" - "Never know when you'll need to feed a kitty!") + "Never know when you'll need to feed a kitty!\n") def action(self, player, do): if (do[0] in words.take) and ('catfood' in do): self.take_catfood(player) self.contents['catfood'] -= 1 else: - print("Sorry, I don't understand.") + print("Sorry, I don't understand.\n") def take_catfood(self, player): if transfer('catfood', self.contents, player.inventory, n=2): - print("\nYou did wise. You took the catfood!") + print("You did wise. You took the catfood!\n") else: - print("\nThere is nothing here.") + print("There is nothing here.\n") def leave(self, player, direction): if direction == 'w'or direction == 's' or direction == 'n': - print("Area 51. No trespassing beyond this point.") + print("Area 51. No trespassing beyond this point.\n") return False else: return True diff --git a/weatbag/tiles/n3w1.py b/weatbag/tiles/n3w1.py index 43986e3..a5e05b9 100644 --- a/weatbag/tiles/n3w1.py +++ b/weatbag/tiles/n3w1.py @@ -1,18 +1,18 @@ class Tile: def describe(self): - print("\nThe beach is quiet. On the south are children playing.") + print("The beach is quiet. On the south are children playing.\n") def action(self, player, do): - print("\nSorry, I don't understand") + print("wo0t w0ot?! o_O") def leave(self, player, direction): if direction == 'w': - print("\nI'm afraid you can't go west.\nThe sea on that part is " - "fool of electric eels and you don't have a transport.") + print("I'm afraid you can't go west.\nThe sea on that part is " + "fool of electric eels and you don't have a transport.\n") return False elif direction == 'e': - print("\nThere is the side of a cave in front of you.\nYou can't go " - "east.") + print("There is the side of a cave in front of you.\nYou can't go " + "east.\n") return False elif direction == 'n': print(" , , \n" diff --git a/weatbag/tiles/n3w2.py b/weatbag/tiles/n3w2.py index 989cb6c..a5c46cd 100644 --- a/weatbag/tiles/n3w2.py +++ b/weatbag/tiles/n3w2.py @@ -7,16 +7,16 @@ class Tile: def describe(self): if not self.give_catfood: - print("\nYou are at the beach and there is an old man with an " + print("You are at the beach and there is an old man with an " "enormous beard that is getting his little boat ready to go " "across to the mainland.\nNaturally, you are asking him to " "take you in his boat.\nThe old man replies:\nOf course I " "can take you with me, my dear adventurer but first I need " "some catfood so I can feed the kitties across in the " - "mainland!") + "mainland!\n") else: - print("\nThere's the old fisherman with his boat, he can take you " - "across if you like!") + print("There's the old fisherman with his boat, he can take you " + "across if you like!\n") # I only added words.use because player might # use the word "use" insteed of "give". @@ -28,20 +28,20 @@ class Tile: if self.give_catfood == False: player.take('catfood') self.give_catfood = True - print("\nGreat! Now we can sail!") + print("Great! Now we can sail!\n") else: player.take('catfood') - print("\nOh how nice of you. You are the best!") + print("Oh how nice of you. You are the best!\n") elif len(do) > 1: - print("\nI have no use for that.") + print("I have no use for that.\n") else: - print("\nSorry, I don't understand.") + print("Sorry, I don't understand.\n") def leave(self, player, direction): if direction == 'e'and not self.give_catfood: - print("\nYou can't swim, remember the electric eels? You need a " - "transport to go across.") + print("You can't swim, remember the electric eels? You need a " + "transport to go across.\n") return False if direction == 'n': print("Nothing to do there.\n") diff --git a/weatbag/tiles/n3w3.py b/weatbag/tiles/n3w3.py index 8ccf76f..f325428 100644 --- a/weatbag/tiles/n3w3.py +++ b/weatbag/tiles/n3w3.py @@ -7,23 +7,23 @@ class Tile: def describe(self): if self.contents['doorknob']: - print("\nAs you walk through the path you find something shiny on " - "the ground beside some rocks.\nIt looks like a brass doorknob.") + print("As you walk through the path you find something shiny on " + "the ground beside some rocks.\nIt looks like a brass doorknob.\n") else: - print("\nThere is nothing to do here, all you see is your path and " - "the trees around!") + print("There is nothing to do here, all you see is your path and " + "the trees around!\n") def action(self, player, do): if (do[0] in words.take) and ('doorknob' in do): self.take_doorknob(player) else: - print("\nSorry, I don't understand.") + print("Sorry, I don't understand.\n") def take_doorknob(self, player): if transfer('doorknob', self.contents, player.inventory): - print("\nYou pick up the doorknob.") + print("You pick up the doorknob.\n") else: - print("\nThere is nothing here.") + print("There is nothing here.\n") def leave(self, player, direction): if direction == "n": diff --git a/weatbag/tiles/n3w4.py b/weatbag/tiles/n3w4.py index 2388ee3..39b8b35 100644 --- a/weatbag/tiles/n3w4.py +++ b/weatbag/tiles/n3w4.py @@ -1,12 +1,12 @@ class Tile: def describe(self): - print("\nLooks like you are in a walking mood because you still follow " + 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...\nI totaly get you, it's a nice path to have a walk!") + "heavenly...\nI totaly get you, it's a nice path to have a walk!\n") def action(self, player, do): - print("\nSorry, I don't understand") + print("Sorry, I don't understand.\n") def leave(self, player, direction): if direction == "n": -- cgit v1.3 From 4958709926e2eaf37b8311a86d42b32821703354 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 28 Apr 2013 21:31:57 +0300 Subject: changed indentation on strings for visibility --- weatbag/tiles/n1w1.py | 10 +++++----- weatbag/tiles/n2w1.py | 31 ++++++++++++++++++------------- weatbag/tiles/n2w2.py | 4 ++-- weatbag/tiles/n2w3.py | 6 +++--- weatbag/tiles/n2w4.py | 5 +++-- weatbag/tiles/n3w1.py | 6 +++--- weatbag/tiles/n3w3.py | 7 ++++--- weatbag/tiles/n3w4.py | 7 ++++--- 8 files changed, 42 insertions(+), 34 deletions(-) (limited to 'weatbag/tiles/n2w2.py') diff --git a/weatbag/tiles/n1w1.py b/weatbag/tiles/n1w1.py index 502caa9..f809dc4 100644 --- a/weatbag/tiles/n1w1.py +++ b/weatbag/tiles/n1w1.py @@ -1,10 +1,10 @@ class Tile: def describe(self): print("There is a small island northwest.\n" - "Unfortunatelly, you can't swim because the sea is full of " - "electric eels so you need a transport to go there.\n" - "Luckilly to the north you see 2 children with a raft sitting " - "under a tree.\n" ) + "Unfortunatelly, you can't swim because the sea is full of " + "electric eels so you need a transport to go there.\n" + "Luckilly to the north you see 2 children with a raft sitting " + "under a tree.\n" ) def action(self, player, do): print("Waitwat?!") @@ -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.\n") return False else: return True diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 999cdc1..8d78eb4 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -11,7 +11,7 @@ class Tile: if self.challenge_not_completed: self.challenge() else: - print("\nThe children take you to the western island!") + print("\nThe children will take you to the western island!") def challenge(self): print("You ask them to give it to you." @@ -21,7 +21,8 @@ class Tile: "What we can do is transport you there ourselves. But first you " "must answer this:\n\n" "Ignore weight and weather variables and listen carefully.\n" - "It takes me exactly one hour to transport a person to the island.\n" + "It takes me exactly one hour to transport a person to " + "the island.\n" "It takes my sister double that time.\n" "If we combine our power, " "how many minutes will it take to transport you to the island?\n" @@ -42,29 +43,33 @@ class Tile: "Try another one.\n") elif (do[0] in words.take) and (do[1] == "sister" or do[1] == "girl"): - print("You bastard! Leave my sister down!\n" - "What kind of an asshole are you? Taking advantage of " - "little children?\nWe will transfer you for free.\n") - print("The brother and sister take you to the island!\n") + print("You bastard! Let my sister down!\n" + "What kind of an asshole are you? " + "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") self.challenge_not_completed = False elif (do[0] in words.take) and (do[1] == "brother" or do[1] == "boy"): - print("You bastard, take me down!\n" - "We will transfer you for free!\n") - print("The brother and sister take you to the island!\n") + 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") self.challenge_not_completed = False elif (do[0] in words.take) and self.challenge_not_completed: print("I told you we won't give you our raft, " - "you have to guess the correct amount of time!\n") + "you have to guess the correct amount of time!\n") except: print("Please try guessing a number, like '42 minutes'\n.") def leave(self, player, direction): if direction == "w" and self.challenge_not_completed: print ("You can't go there by swimming, that part is full of " - "electric eels.\n") + "electric eels.\n") return False elif direction == 'e': - print("There is a cave this way. You can't go from here though.") - return False + print("The undregrowth in that direction is impassable. " + "You turn back.") + return False else: return True diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index abd7f75..0957571 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -1,7 +1,7 @@ class Tile: def describe(self): print("You are now on the island. In front of you there are some trees " - "and a small path.\nFeeling adventurous?\n") + "and a small path.\nFeeling adventurous?\n") def action(self, player, do): print("Sorry, wat?!") @@ -9,7 +9,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.\n") return False elif direction == "s": print("I'm afraid I can't let you go there Dave.\n") diff --git a/weatbag/tiles/n2w3.py b/weatbag/tiles/n2w3.py index e0ce3b3..72f2181 100644 --- a/weatbag/tiles/n2w3.py +++ b/weatbag/tiles/n2w3.py @@ -1,9 +1,9 @@ class Tile: def describe(self): print("You are walking through the trees. It looks like the path you " - "took leads to a small wooden hut.\nYou saw a tree fall and it didn't " - "make any sound and WOW... that was weired because you were there and " - "observed it!\n") + "took leads to a small wooden hut.\nYou saw a tree fall and it " + "didn't make any sound and WOW... that was weired because you " + "were there and observed it!\n") # "If a tree falls in a forest and no one is around to hear it, # does it make a sound?" is a philosophical thought experiment that # raises questions regarding observation and knowledge of reality. diff --git a/weatbag/tiles/n2w4.py b/weatbag/tiles/n2w4.py index 12b0d93..59904c2 100644 --- a/weatbag/tiles/n2w4.py +++ b/weatbag/tiles/n2w4.py @@ -20,8 +20,9 @@ class Tile: if player.has('doorknob'): player.take('doorknob') print("Doorknob fits fine, clicks and voila... Door is open!\n" - "\nYou are in a cozy living room with a cat and 5 kittens" - " resting on a couch.\nThere is another room to the west.\n") + "\nYou are in a cozy living room with a cat and five " + "kittens resting on a couch.\n" + "There is another room to the west.\n") self.opendoor = True else: print("You'll need a doorknob to open the door.\n") diff --git a/weatbag/tiles/n3w1.py b/weatbag/tiles/n3w1.py index aec7508..98877eb 100644 --- a/weatbag/tiles/n3w1.py +++ b/weatbag/tiles/n3w1.py @@ -34,8 +34,8 @@ class Tile: " \ \-.__) ``--._) (_.--`` (__.-/ / \n" " '.'-.__.-. .-.__.-'.' \n" " '-...-' '-...-' \n") - print("A wall of kitties doesn't allow you to go North.\nBut that " - "doesn't make you mad... You can't be mad at kitties, " - "rite?!\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") return False return True diff --git a/weatbag/tiles/n3w3.py b/weatbag/tiles/n3w3.py index f325428..d2977c4 100644 --- a/weatbag/tiles/n3w3.py +++ b/weatbag/tiles/n3w3.py @@ -8,10 +8,11 @@ class Tile: def describe(self): if self.contents['doorknob']: print("As you walk through the path you find something shiny on " - "the ground beside some rocks.\nIt looks like a brass doorknob.\n") + "the ground beside some rocks.\n" + "It looks like a brass doorknob.\n") else: print("There is nothing to do here, all you see is your path and " - "the trees around!\n") + "the trees around!\n") def action(self, player, do): if (do[0] in words.take) and ('doorknob' in do): self.take_doorknob(player) @@ -27,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.\n") return False else: return True diff --git a/weatbag/tiles/n3w4.py b/weatbag/tiles/n3w4.py index 39b8b35..d4f238b 100644 --- a/weatbag/tiles/n3w4.py +++ b/weatbag/tiles/n3w4.py @@ -1,9 +1,10 @@ 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...\nI totaly get you, it's a nice path to have a walk!\n") + "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" + "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") -- cgit v1.3 From ae6c874d790825891aefbcfd366749eaeb2fcf05 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 29 Apr 2013 01:48:18 +0300 Subject: small indentation fix on n2w2 --- weatbag/tiles/n2w2.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'weatbag/tiles/n2w2.py') diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index 0957571..6ad3b1f 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -1,18 +1,18 @@ class Tile: - def describe(self): - print("You are now on the island. In front of you there are some trees " - "and a small path.\nFeeling adventurous?\n") - - def action(self, player, do): - print("Sorry, wat?!") - - 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 + def describe(self): + print("You are now on the island. In front of you there are some trees " + "and a small path.\nFeeling adventurous?\n") + + def action(self, player, do): + print("Sorry, wat?!") + + 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 ea7bfdcf7a3a9c0c928e042fcf239256b878b5d8 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 29 Apr 2013 01:53:56 +0300 Subject: custom message for first visit on n2w2 --- weatbag/tiles/n2w2.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'weatbag/tiles/n2w2.py') diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index 6ad3b1f..6cfc252 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -1,7 +1,14 @@ class Tile: + def __init__(self): + self.first_visit = True + def describe(self): - print("You are now on the island. In front of you there are some trees " - "and a small path.\nFeeling adventurous?\n") + if self.first_visit: + print("You are now on the island. In front of you there are " + "some trees and a small path.\nFeeling adventurous?\n") + self.first_visit = False + else: + print("The beach is quiet. Nothing seems to be going on.") def action(self, player, do): print("Sorry, wat?!") -- cgit v1.3 From acec64fe4677305566cd2d0fa780056b07f7e6e6 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 30 Apr 2013 18:05:18 +0300 Subject: edited describe/added a simple silly action --- weatbag/tiles/n2w2.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'weatbag/tiles/n2w2.py') diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index 6cfc252..35643c9 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -4,14 +4,19 @@ class Tile: def describe(self): if self.first_visit: - print("You are now on the island. In front of you there are " - "some trees and a small path.\nFeeling adventurous?\n") + print("You are now on the island. The children are returning back " + "to the mainland with their raft.\n" + "In front of you there are some trees and a small path.\n" + "Feeling adventurous?\n") self.first_visit = False else: print("The beach is quiet. Nothing seems to be going on.") def action(self, player, do): - print("Sorry, wat?!") + if do[0] in ('Yes', 'yes', 'y', 'Y'): + print("Awesome! Follow the path!") + else: + print("Sorry, wat?!") def leave(self, player, direction): if direction == "e": -- cgit v1.3 From 9de3cef14637b687f34505d6281e3ed7bb3df9c4 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 30 Apr 2013 18:33:07 +0300 Subject: added a 'No' option on action / tile n2w2 --- weatbag/tiles/n2w2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'weatbag/tiles/n2w2.py') diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index 35643c9..e83f9e2 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -13,8 +13,11 @@ class Tile: print("The beach is quiet. Nothing seems to be going on.") def action(self, player, do): - if do[0] in ('Yes', 'yes', 'y', 'Y'): + if do[0] in ('Yes', 'yes', 'y', 'Y', 'Yup', 'yup'): print("Awesome! Follow the path!") + elif do[0] in ('No', 'no', 'n', 'N', 'Nope', 'nope'): + print("You might be in the wrong place then. Pack your stuff and " + "quit the game.") else: print("Sorry, wat?!") -- cgit v1.3 From 3d626b5229add94f08acc3ae3731566507fc2f7e Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 30 Apr 2013 18:44:39 +0300 Subject: added another yes option for action (n2w2) --- weatbag/tiles/n2w2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'weatbag/tiles/n2w2.py') diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py index e83f9e2..31e3cff 100644 --- a/weatbag/tiles/n2w2.py +++ b/weatbag/tiles/n2w2.py @@ -13,7 +13,7 @@ class Tile: print("The beach is quiet. Nothing seems to be going on.") def action(self, player, do): - if do[0] in ('Yes', 'yes', 'y', 'Y', 'Yup', 'yup'): + if do[0] in ('Yes', 'yes', 'y', 'Y', 'Yup', 'yup', 'ye', 'Ye'): print("Awesome! Follow the path!") elif do[0] in ('No', 'no', 'n', 'N', 'Nope', 'nope'): print("You might be in the wrong place then. Pack your stuff and " -- cgit v1.3