From fbdc3b4b0419547eb8a1534e278d97e1c2e2544f Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sat, 20 Apr 2013 19:18:03 +0300 Subject: Added tile n1w1. --- weatbag/tiles/n1w1.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 weatbag/tiles/n1w1.py diff --git a/weatbag/tiles/n1w1.py b/weatbag/tiles/n1w1.py new file mode 100644 index 0000000..eda65a8 --- /dev/null +++ b/weatbag/tiles/n1w1.py @@ -0,0 +1,9 @@ +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" + "Luckilly to the north you see 2 children with a raft sitting " + "under a tree." ) + + def action(self, player, do): + pass -- cgit v1.3 From 2cc3d7ac306ad7ae935acad7d4d338b6e00914c3 Mon Sep 17 00:00:00 2001 From: George Angelopoulos Date: Sat, 20 Apr 2013 22:26:03 +0300 Subject: small obnoxious change --- weatbag/tiles/n1w1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n1w1.py b/weatbag/tiles/n1w1.py index eda65a8..3203d99 100644 --- a/weatbag/tiles/n1w1.py +++ b/weatbag/tiles/n1w1.py @@ -1,7 +1,7 @@ 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" + "Unfortunatelly, you can't swim so you need a transport to go there.\n" "Luckilly to the north you see 2 children with a raft sitting " "under a tree." ) -- cgit v1.3 From c4f5bfe7d00652632e38db23251aa33ede84f009 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sat, 20 Apr 2013 23:46:14 +0300 Subject: Added tile n2w1. --- weatbag/tiles/n2w1.py | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 weatbag/tiles/n2w1.py diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py new file mode 100644 index 0000000..a4347f8 --- /dev/null +++ b/weatbag/tiles/n2w1.py @@ -0,0 +1,75 @@ +from weatbag import words + +class Tile: + def __init__(self): + self.contents = {'island ticket': 1} + self.minutes = "40" + + def describe(self): + if self.contents['island ticket']: + self.challenge() + else: + print("The brother and sister have vanished. You see a line of " + "trees across the sand.") + + def challenge(self): + print("You aproach the children who you see now are a boy and a girl.\n" + "They are playing and running around a raft.\n" + "You ask them to give it to you.") + print("The little boy laughs and replies: \nSo you think you " + "are brave enough to go to that island? Very well, but we cannot" + " give you our raft. " + "What we can do is transfer you there ourselves. But first you " + "must answer this:\n\n") + print("Ignore weight and weather variables and listen carefully.\nIt " + "takes for me to transfer a person on the island exactly one hour.\n" + "It takes double the time for my sister.\nIf we combine our powers " + "in how many minutes will we transfer you on the island?\n") + print("To make a guess, type a number followed by 'minutes'") + + def action(self, player, do): + if ( self.contents["island ticket"] > 0 ): + 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.") + self.contents['island ticket'] -= 1 + player.give('island ticket') + else: + print("We're afraid this is not the correct answer. " + "Try 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!") + self.contents['island ticket'] -= 1 + player.give('island ticket') + + 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!") + self.contents['island ticket'] -= 1 + player.give('island ticket') + + elif (do[0] in words.take) and (self.contents['island ticket'] == 1): + print("I 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'.") + def leave(self, player, direction): + if direction == "w": + print ("You can't go there by swimming, that part is full of " + "electric eels.") + return False + else: + return True + + + -- cgit v1.3 From 4fbb3c8cab68e7750b545f04ae11e74340ecb511 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 21 Apr 2013 17:28:00 +0300 Subject: changed leave message for n1w1 --- weatbag/tiles/n1w1.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/weatbag/tiles/n1w1.py b/weatbag/tiles/n1w1.py index 3203d99..aad8104 100644 --- a/weatbag/tiles/n1w1.py +++ b/weatbag/tiles/n1w1.py @@ -7,3 +7,11 @@ class Tile: def action(self, player, do): pass + + def leave(self, player, direction): + if direction == "w": + print ("You can't go there by swimming, that part is full of " + "electric eels.") + return False + else: + return True -- cgit v1.3 From 86a0e420f8966d3372239980a6c8de1ce2c4271d Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 21 Apr 2013 17:32:02 +0300 Subject: Various changes for n2w1. --- weatbag/tiles/n2w1.py | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index a4347f8..3b185a4 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -2,20 +2,19 @@ from weatbag import words class Tile: def __init__(self): - self.contents = {'island ticket': 1} + self.challenge_not_completed = True self.minutes = "40" def describe(self): - if self.contents['island ticket']: + print("You see two children who you notice now are a boy and a girl.\n" + "They are playing and running around a raft.") + if self.challenge_not_completed: self.challenge() else: - print("The brother and sister have vanished. You see a line of " - "trees across the sand.") + print("They take you to the western island!") def challenge(self): - print("You aproach the children who you see now are a boy and a girl.\n" - "They are playing and running around a raft.\n" - "You ask them to give it to you.") + print("You ask them to give it to you.") print("The little boy laughs and replies: \nSo you think you " "are brave enough to go to that island? Very well, but we cannot" " give you our raft. " @@ -28,7 +27,7 @@ class Tile: print("To make a guess, type a number followed by 'minutes'") def action(self, player, do): - if ( self.contents["island ticket"] > 0 ): + if self.challenge_not_completed: try: if do[1] == "minutes": if do[0] == self.minutes: @@ -36,8 +35,6 @@ class Tile: "Let's go!") print("The brother and sister will take you to the " "island.") - self.contents['island ticket'] -= 1 - player.give('island ticket') else: print("We're afraid this is not the correct answer. " "Try another one.") @@ -47,18 +44,12 @@ class Tile: "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!") - self.contents['island ticket'] -= 1 - player.give('island ticket') - 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!") - self.contents['island ticket'] -= 1 - player.give('island ticket') - - elif (do[0] in words.take) and (self.contents['island ticket'] == 1): + 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!") except: @@ -72,4 +63,3 @@ class Tile: return True - -- cgit v1.3 From 4fb5aba4c45300d325526d48cca92c15bd5e9c6f Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 21 Apr 2013 17:48:24 +0300 Subject: Removed obsolete print methods. --- weatbag/tiles/n2w1.py | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 3b185a4..0bd4238 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -14,17 +14,19 @@ class Tile: print("They take you to the western island!") def challenge(self): - print("You ask them to give it to you.") - print("The little boy laughs and replies: \nSo you think you " - "are brave enough to go to that island? Very well, but we cannot" - " give you our raft. " + 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. " "What we can do is transfer you there ourselves. But first you " - "must answer this:\n\n") - print("Ignore weight and weather variables and listen carefully.\nIt " - "takes for me to transfer a person on the island exactly one hour.\n" - "It takes double the time for my sister.\nIf we combine our powers " - "in how many minutes will we transfer you on the island?\n") - print("To make a guess, type a number followed by 'minutes'") + "must answer this:\n\n" + "Ignore weight and weather variables and listen carefully.\n" + "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'") def action(self, player, do): if self.challenge_not_completed: @@ -35,6 +37,7 @@ class Tile: "Let's go!") print("The brother and sister will take you to the " "island.") + challenge_not_completed = False else: print("We're afraid this is not the correct answer. " "Try another one.") @@ -44,18 +47,20 @@ class Tile: "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!") + 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!") + 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!") except: print("Please try guessing a number, like '42 minutes'.") def leave(self, player, direction): - if direction == "w": + if direction == "w" and self.challenge_not_completed: print ("You can't go there by swimming, that part is full of " "electric eels.") return False -- cgit v1.3 From 5449d4c2bc6631c3951327b9c57f01b643e4101e Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 21 Apr 2013 17:52:50 +0300 Subject: fixed challenge completion checks --- weatbag/tiles/n2w1.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 0bd4238..03630b5 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -37,7 +37,7 @@ class Tile: "Let's go!") print("The brother and sister will take you to the " "island.") - challenge_not_completed = False + self.challenge_not_completed = False else: print("We're afraid this is not the correct answer. " "Try another one.") @@ -47,13 +47,13 @@ class Tile: "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!") - challenge_not_completed = False + 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!") - challenge_not_completed = False + 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!") -- cgit v1.3 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 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(-) 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(-) 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 ffc953be0e5dbefdd3e70f5136895f9d86aa91c5 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 22 Apr 2013 02:12:27 +0300 Subject: added comments --- weatbag/tiles/n2w3.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 weatbag/tiles/n2w3.py diff --git a/weatbag/tiles/n2w3.py b/weatbag/tiles/n2w3.py new file mode 100644 index 0000000..dadbbf9 --- /dev/null +++ b/weatbag/tiles/n2w3.py @@ -0,0 +1,13 @@ +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!") + # "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("Sorry, I don't understand") + -- cgit v1.3 From c20f697b8fdebd05c437ac12cab3022416d339ab Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 22 Apr 2013 02:37:10 +0300 Subject: removed obsolet print in n3w3 --- weatbag/tiles/n3w3.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 weatbag/tiles/n3w3.py diff --git a/weatbag/tiles/n3w3.py b/weatbag/tiles/n3w3.py new file mode 100644 index 0000000..2989c04 --- /dev/null +++ b/weatbag/tiles/n3w3.py @@ -0,0 +1,26 @@ +from weatbag import words +from weatbag.utils import transfer + +class Tile: + def __init__(self): + self.contents = {'doorknob': 1} + + 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.") + else: + print("There 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.") + + 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 53510b2113afe79d1e6f07a1e46e414a9b64a2fe Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 22 Apr 2013 02:49:15 +0300 Subject: added text on describe --- weatbag/tiles/n3w4.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 weatbag/tiles/n3w4.py diff --git a/weatbag/tiles/n3w4.py b/weatbag/tiles/n3w4.py new file mode 100644 index 0000000..928f83b --- /dev/null +++ b/weatbag/tiles/n3w4.py @@ -0,0 +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, " + "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!") + + def action(self, player, do): + print("Sorry, I don't understand") -- cgit v1.3 From d9a5554c4bc5d9fef1bd3bed0061b1e3d84ef259 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 22 Apr 2013 23:34:13 +0300 Subject: fixed description --- weatbag/tiles/n2w4.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 weatbag/tiles/n2w4.py diff --git a/weatbag/tiles/n2w4.py b/weatbag/tiles/n2w4.py new file mode 100644 index 0000000..961409a --- /dev/null +++ b/weatbag/tiles/n2w4.py @@ -0,0 +1,20 @@ +from weatbag import words +from weatbag.utils import transfer + + +class Tile: + def describe(self): + print("You are standing in front of the hut.\nIt 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.give('doorknob') + print("Doorknob fits fine, clicks and voila! Door is open!") + else: + print("You'll need a doorknob to open the door.") + else: + print("Sorry, I don't understand.") + +test_items = ['doorknob'] -- cgit v1.3 From 305bde6cd0ef0b1ee7697866e1c3e06a0ca575be Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 22 Apr 2013 23:55:26 +0300 Subject: added leave function on n2w4 --- weatbag/tiles/n2w1.py | 2 -- weatbag/tiles/n2w4.py | 23 +++++++++++++++++------ weatbag/tiles/n2w5.py | 27 +++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 weatbag/tiles/n2w5.py diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 03630b5..86f7323 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -66,5 +66,3 @@ class Tile: return False else: return True - - diff --git a/weatbag/tiles/n2w4.py b/weatbag/tiles/n2w4.py index 961409a..e44aa3f 100644 --- a/weatbag/tiles/n2w4.py +++ b/weatbag/tiles/n2w4.py @@ -4,17 +4,28 @@ from weatbag.utils import transfer class Tile: def describe(self): - print("You are standing in front of the hut.\nIt has a door but you " - "can't open it because the doorknob is missing.") + 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.") def action(self, player, do): - if (do[0] in words.use) and do[1]=='doorknob': + if (do[0] in words.use) and do[1]=='doorknob': if player.has('doorknob'): - player.give('doorknob') - print("Doorknob fits fine, clicks and voila! Door is open!") + player.take('doorknob') + print("Doorknob fits fine, clicks and voila... Door is open!\n" + "You are in a cozy living room with a cat and 5 kittens " + "resting on a couch.\nThere is another room at west.") + else: print("You'll need a doorknob to open the door.") else: - print("Sorry, I don't understand.") + print("Sorry, I don't understand.") + + def leave(self, player, direction): + if direction=='w' and player.has('doorknob'): + print("First you need to enter the hut.") + return False + else: + return True test_items = ['doorknob'] diff --git a/weatbag/tiles/n2w5.py b/weatbag/tiles/n2w5.py new file mode 100644 index 0000000..d1c94ab --- /dev/null +++ b/weatbag/tiles/n2w5.py @@ -0,0 +1,27 @@ +from weatbag import words +from weatbag.utils import transfer + +class Tile: + def __init__(self): + self.contents = {'catfood': 1} + + 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! " + "Never know when you'll need to feed a kitty!") + + 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.") + + def take_catfood(self, player): + if transfer('catfood', self.contents, player.inventory): + print("You did wise. You took the catfood!") + else: + print("There is nothing here.") + -- cgit v1.3 From b6c6d0a0327f8067b68ebc723a5664c58e92c582 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 23 Apr 2013 01:19:23 +0300 Subject: added leave + boolean for describe + small fixes --- weatbag/tiles/n2w4.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/weatbag/tiles/n2w4.py b/weatbag/tiles/n2w4.py index e44aa3f..dcc3ea4 100644 --- a/weatbag/tiles/n2w4.py +++ b/weatbag/tiles/n2w4.py @@ -1,23 +1,30 @@ from weatbag import words from weatbag.utils import transfer - class Tile: + def __init__(self): + self.opendoor = False + def describe(self): - 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.") + if self.opendoor: + print("The 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.") 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" - "You are in a cozy living room with a cat and 5 kittens " - "resting on a couch.\nThere is another room at west.") - + "\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.") + self.opendoor = False else: print("Sorry, I don't understand.") @@ -27,5 +34,5 @@ class Tile: return False else: return True - + test_items = ['doorknob'] -- cgit v1.3 From 893c674a54f36e49390d78f7f685029e94f00898 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 23 Apr 2013 01:40:11 +0300 Subject: minor changes in describe/print --- weatbag/tiles/n2w4.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weatbag/tiles/n2w4.py b/weatbag/tiles/n2w4.py index dcc3ea4..8f821af 100644 --- a/weatbag/tiles/n2w4.py +++ b/weatbag/tiles/n2w4.py @@ -7,8 +7,8 @@ class Tile: def describe(self): if self.opendoor: - print("The 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!") 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 " @@ -29,7 +29,7 @@ class Tile: print("Sorry, I don't understand.") def leave(self, player, direction): - if direction=='w' and player.has('doorknob'): + if direction=='w' and not self.opendoor: print("First you need to enter the hut.") return False else: -- cgit v1.3 From 6a3e8459abf4e87488c5187ce704186ab2c04ae6 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 23 Apr 2013 20:44:00 +0300 Subject: added a " , line 10 --- weatbag/tiles/n2w4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n2w4.py b/weatbag/tiles/n2w4.py index 8f821af..00eaa5d 100644 --- a/weatbag/tiles/n2w4.py +++ b/weatbag/tiles/n2w4.py @@ -7,7 +7,7 @@ class Tile: def describe(self): if self.opendoor: - print("The hut's door is open and the kitties are playing with + print("The 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 " -- cgit v1.3 From b4d052c783b870989832af782e8086304651b157 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 23 Apr 2013 21:34:29 +0300 Subject: added description/leave/boolean/ --- weatbag/tiles/n3w2.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 weatbag/tiles/n3w2.py diff --git a/weatbag/tiles/n3w2.py b/weatbag/tiles/n3w2.py new file mode 100644 index 0000000..3627713 --- /dev/null +++ b/weatbag/tiles/n3w2.py @@ -0,0 +1,39 @@ +from weatbag import words +from weatbag.utils import transfer + +class Tile: + def __init__(self): + self.give_catfood = False + + def describe(self): + if not self.give_catfood: + print("You are at the beach and there is an old man with an enormous " + "beard that is geting 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!") + else: + print("There's the old fisherman with his boat, he can take you " + "across if you like!") + + def action(self, player, do): + if (do[0] in words.use or do[0] in words.give) and do[1]=='catfood': + if player.has('catfood'): + player.take('catfood') + print("Great! Now we can sail!") + self.give_catfood = True + else: + print("No boat for you if you don't give me tha catfood!") + self.give_catfood = False + else: + print("Sorry, I don't understand.") + + def leave(self, player, direction): + if direction=='e': + print("You can't swim, remember the electric eels? You need a " + "transport to go across.") + return False + return True + +test_items = ['catfood'] -- cgit v1.3 From ef1f44ea2d3818d325bb56e93c70beca27746b92 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 23 Apr 2013 21:49:08 +0300 Subject: small changes / added a comment --- weatbag/tiles/n3w2.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/weatbag/tiles/n3w2.py b/weatbag/tiles/n3w2.py index 3627713..3ff014d 100644 --- a/weatbag/tiles/n3w2.py +++ b/weatbag/tiles/n3w2.py @@ -7,18 +7,23 @@ class Tile: def describe(self): if not self.give_catfood: - print("You are at the beach and there is an old man with an enormous " - "beard that is geting 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!") + 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!") else: print("There's the old fisherman with his boat, he can take you " "across if you like!") def action(self, player, do): if (do[0] in words.use or do[0] in words.give) and do[1]=='catfood': + +# I only added words.use because player might +# use the word "use" insteed of "give". + if player.has('catfood'): player.take('catfood') print("Great! Now we can sail!") @@ -30,7 +35,7 @@ class Tile: print("Sorry, I don't understand.") def leave(self, player, direction): - if direction=='e': + if direction=='e'and not self.give_catfood: print("You can't swim, remember the electric eels? You need a " "transport to go across.") return False -- cgit v1.3 From 784352f722def37bde26dee40b501abf7a85ae2a Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 23 Apr 2013 22:06:05 +0300 Subject: removed a useless else --- weatbag/tiles/n3w2.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/weatbag/tiles/n3w2.py b/weatbag/tiles/n3w2.py index 3ff014d..9b0ff9e 100644 --- a/weatbag/tiles/n3w2.py +++ b/weatbag/tiles/n3w2.py @@ -28,9 +28,6 @@ class Tile: player.take('catfood') print("Great! Now we can sail!") self.give_catfood = True - else: - print("No boat for you if you don't give me tha catfood!") - self.give_catfood = False else: print("Sorry, I don't understand.") -- cgit v1.3 From e39daf19cc243ad5a64ef93d914a5142161fcaee Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 23 Apr 2013 22:19:31 +0300 Subject: removed trailing whitespace --- weatbag/tiles/n3w2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n3w2.py b/weatbag/tiles/n3w2.py index 9b0ff9e..61775f6 100644 --- a/weatbag/tiles/n3w2.py +++ b/weatbag/tiles/n3w2.py @@ -19,7 +19,7 @@ class Tile: "across if you like!") def action(self, player, do): - if (do[0] in words.use or do[0] in words.give) and do[1]=='catfood': + if (do[0] in words.use or do[0] in words.give) and do[1]=='catfood': # I only added words.use because player might # use the word "use" insteed of "give". -- cgit v1.3 From a0b3849ab9e7ac2c36c7dc27b30cf486f619db30 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 23 Apr 2013 23:57:44 +0300 Subject: corrected if cases / added catfood --- weatbag/tiles/n3w2.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/weatbag/tiles/n3w2.py b/weatbag/tiles/n3w2.py index 61775f6..d1266f2 100644 --- a/weatbag/tiles/n3w2.py +++ b/weatbag/tiles/n3w2.py @@ -18,19 +18,26 @@ class Tile: print("There's the old fisherman with his boat, he can take you " "across if you like!") - def action(self, player, do): - if (do[0] in words.use or do[0] in words.give) and do[1]=='catfood': - # I only added words.use because player might # use the word "use" insteed of "give". + def action(self, player, do): - if player.has('catfood'): - player.take('catfood') - print("Great! Now we can sail!") - self.give_catfood = True + if do[0] in words.use or do[0] in words.give: + if 'catfood' in do: + if player.has('catfood'): + if self.give_catfood == False: + player.take('catfood') + self.give_catfood = True + print("Great! Now we can sail!") + else: + player.take('catfood') + print("Oh how nice of you. You are the best!") + elif len(do) > 1: + print("I have no use for that.") else: 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 " @@ -38,4 +45,5 @@ class Tile: return False return True -test_items = ['catfood'] +#two catfoods! +test_items = ['catfood','catfood'] -- cgit v1.3 From 916702cc66feb9fc8ba78e52a5f26eb9f404b7a7 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 00:11:38 +0300 Subject: added m0ar catfood ^__^ --- weatbag/tiles/n2w5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n2w5.py b/weatbag/tiles/n2w5.py index d1c94ab..15c5b63 100644 --- a/weatbag/tiles/n2w5.py +++ b/weatbag/tiles/n2w5.py @@ -3,7 +3,7 @@ from weatbag.utils import transfer class Tile: def __init__(self): - self.contents = {'catfood': 1} + self.contents = {'catfood': 2} def describe(self): if self.contents['catfood']: @@ -20,7 +20,7 @@ class Tile: print("Sorry, I don't understand.") def take_catfood(self, player): - if transfer('catfood', self.contents, player.inventory): + if transfer('catfood', self.contents, player.inventory, n=2): print("You did wise. You took the catfood!") else: print("There is nothing here.") -- cgit v1.3 From dda68706253ebfeb6113ab764670309e2b347411 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 01:59:58 +0300 Subject: added leave function for w(sea) and w(cave) --- weatbag/tiles/n3w1.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 weatbag/tiles/n3w1.py diff --git a/weatbag/tiles/n3w1.py b/weatbag/tiles/n3w1.py new file mode 100644 index 0000000..5eb7d18 --- /dev/null +++ b/weatbag/tiles/n3w1.py @@ -0,0 +1,17 @@ +class Tile: + def describe(self): + print("The beach is quiet. You see on the south children playing.") + + def action(self, player, do): + print("Sorry, 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 " + "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 " + "east.") + return False + 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(-) 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(-) 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 6678da4fc07b3773aaac977d450b949b359a6d08 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 02:54:45 +0300 Subject: added leave function for S --- weatbag/tiles/n2w3.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/weatbag/tiles/n2w3.py b/weatbag/tiles/n2w3.py index 3d1d1ad..6c82f13 100644 --- a/weatbag/tiles/n2w3.py +++ b/weatbag/tiles/n2w3.py @@ -10,4 +10,11 @@ class Tile: def action(self, player, do): print("\nSorry, I don't understand") - + + def leave(self, player, direction): + if direction == "s": + print("STAHP! Hammer Time!\n(Meaning you just can't go to that " + "direction yet. Sorry! :))\n") + return False + else: + return True -- cgit v1.3 From 6d838e3e4a4152c371bc06505907b8c1574dc01a Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 03:12:33 +0300 Subject: added leave function for S --- weatbag/tiles/n2w4.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/weatbag/tiles/n2w4.py b/weatbag/tiles/n2w4.py index a427d5e..2e917ea 100644 --- a/weatbag/tiles/n2w4.py +++ b/weatbag/tiles/n2w4.py @@ -30,9 +30,13 @@ class Tile: print("\nSorry, I don't understand.") def leave(self, player, direction): - if direction=='w' and not self.opendoor: + if direction == 'w' and not self.opendoor: print("\nFirst you need to enter the hut.") return False + elif direction == 's': + print("Meeeeh, nothing of importance is going on there, try " + "another direction.") + return False else: return True -- cgit v1.3 From 829b5894b5b35e08e531fcd871bd8ac8648cfb45 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 03:20:23 +0300 Subject: added leave function for w/s/n --- weatbag/tiles/n2w5.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/weatbag/tiles/n2w5.py b/weatbag/tiles/n2w5.py index e88f27c..7277343 100644 --- a/weatbag/tiles/n2w5.py +++ b/weatbag/tiles/n2w5.py @@ -15,7 +15,6 @@ class Tile: 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.") @@ -25,3 +24,9 @@ class Tile: else: print("\nThere is nothing here.") + def leave(self, player, direction): + if direction == 'w'or direction == 's' or direction == 'n': + print("Area 51. No trespassing beyond this point.") + return False + else: + return True -- cgit v1.3 From 17cbea2f24bcb5ab084ba0b70776490de29cb888 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 04:16:04 +0300 Subject: added leave function for n and a wall of kitties! (OMG! kitty ascii!!1!11) --- weatbag/tiles/n3w1.py | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n3w1.py b/weatbag/tiles/n3w1.py index 8ff6a6c..43986e3 100644 --- a/weatbag/tiles/n3w1.py +++ b/weatbag/tiles/n3w1.py @@ -6,12 +6,37 @@ class Tile: print("\nSorry, I don't understand") def leave(self, player, direction): - if direction=='w': + 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.") return False - elif direction=='e': + elif direction == 'e': print("\nThere is the side of a cave in front of you.\nYou can't go " "east.") return False + elif direction == 'n': + print(" , , \n" + " _/(( \)\ \n" + " _.---. .' `\ / '. .---._ \n" + " .' ` ^ T= =P ^ ` '. \n" + " / \ .--' `--. / \ \n" + "| / )'-. .-'( \ | \n" + "; , <__..-( '-.) (.-' )-..__> , ; \n" + " \ \-.__) ``--._) (_.--`` (__.-/ / \n" + " '.'-.__.-. .-.__.-'.' \n" + " '-...-' '-...-' \n" + " , , \n" + " _/(( \)\ \n" + " _.---. .' `\ / '. .---._ \n" + " .' ` ^ T= =P ^ ` '. \n" + " / \ .--' `--. / \ \n" + "| / )'-. .-'( \ | \n" + "; , <__..-( '-.) (.-' )-..__> , ; \n" + " \ \-.__) ``--._) (_.--`` (__.-/ / \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") + return False return True -- cgit v1.3 From 3b7d60ec9a036301d48b7c9bd247905fcf06c9d4 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 04:50:33 +0300 Subject: added leave function for n and w --- weatbag/tiles/n3w4.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/weatbag/tiles/n3w4.py b/weatbag/tiles/n3w4.py index fff19cf..2388ee3 100644 --- a/weatbag/tiles/n3w4.py +++ b/weatbag/tiles/n3w4.py @@ -7,3 +7,13 @@ class Tile: def action(self, player, do): print("\nSorry, I don't understand") + + def leave(self, player, direction): + if direction == "n": + print("No trespasing. Violators will vanish without a trace.\n") + return False + elif direction == "w": + print("No trespasing. Violators will vanish without a trace.\n") + return False + else: + return True -- cgit v1.3 From 7a555d01a6a0fbe517afdfcd523826749faab014 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 04:55:03 +0300 Subject: added leave function for n --- weatbag/tiles/n3w3.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/weatbag/tiles/n3w3.py b/weatbag/tiles/n3w3.py index 42bec81..8ccf76f 100644 --- a/weatbag/tiles/n3w3.py +++ b/weatbag/tiles/n3w3.py @@ -24,3 +24,10 @@ class Tile: print("\nYou pick up the doorknob.") else: print("\nThere is nothing here.") + + def leave(self, player, direction): + if direction == "n": + print("Oops. You can't go there. There is a rocky wall.\n") + return False + else: + return True -- cgit v1.3 From 7dca2041d3ee309dc86bd9b0d84d5e470d83eedb Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 04:59:20 +0300 Subject: added leave function for n --- weatbag/tiles/n3w2.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n3w2.py b/weatbag/tiles/n3w2.py index 5c0add3..989cb6c 100644 --- a/weatbag/tiles/n3w2.py +++ b/weatbag/tiles/n3w2.py @@ -39,11 +39,15 @@ class Tile: def leave(self, player, direction): - if direction=='e'and not self.give_catfood: + if direction == 'e'and not self.give_catfood: print("\nYou can't swim, remember the electric eels? You need a " "transport to go across.") return False - return True + if direction == 'n': + print("Nothing to do there.\n") + return False + else: + return True #two catfoods! test_items = ['catfood','catfood'] -- 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(-) 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 82a1e2ca40b1b3bba15e5e526bae66aeb7fcfe82 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 24 Apr 2013 05:23:44 +0300 Subject: minor change in describe --- weatbag/tiles/n2w1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index cf325b1..6ce8301 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("\nThey take you to the western island!") + print("\nThe children take you to the western island!") def challenge(self): print("You ask them to give it to you." -- cgit v1.3 From 508ec254dd08cdf3e428df408c9d6f0fe756166f Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 28 Apr 2013 19:58:46 +0300 Subject: added leave for e --- weatbag/tiles/n2w1.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 6ce8301..ecc4eb7 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -64,5 +64,8 @@ class Tile: print ("You can't go there by swimming, that part is full of " "electric eels.\n") return False + elif direction == 'e' + print("There is a cave this way. You can't go from here though.") + return False else: return True -- cgit v1.3 From 7b0f5213239618f341c5700fec7b7aa4f13a690e Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 28 Apr 2013 20:04:24 +0300 Subject: corrected syntax --- weatbag/tiles/n2w1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index ecc4eb7..aa54ca2 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -64,8 +64,8 @@ class Tile: print ("You can't go there by swimming, that part is full of " "electric eels.\n") return False - elif direction == 'e' + elif direction == 'e': print("There is a cave this way. You can't go from here though.") - return False + return False else: return True -- cgit v1.3 From 6fa5120b4046a73867d793b9b8ba2fc0dba2adc2 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 28 Apr 2013 20:27:24 +0300 Subject: added leave for w --- weatbag/tiles/n3.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n3.py b/weatbag/tiles/n3.py index 7d78b84..f85dd42 100644 --- a/weatbag/tiles/n3.py +++ b/weatbag/tiles/n3.py @@ -42,7 +42,10 @@ class Tile: print("You are %s" % (player.state_string())) def leave(self, player, direction): - if not self.enemy_dead: + if direction =='w': + print("Cave wall this way.") + return False + elif not self.enemy_dead: if not random.choice((True,False)): print("The orc blocks your way!") self.enemy_swing(player) @@ -50,7 +53,6 @@ class Tile: else: print("You manage to flee!") return True - return True no_path_msg = "There is no path leading in that direction." -- cgit v1.3 From 1b0c626c3659573edab6a5f97d9fc251332b7bd5 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 28 Apr 2013 20:28:43 +0300 Subject: rephrased various output strings --- weatbag/tiles/n2w1.py | 11 +++++------ weatbag/tiles/n2w4.py | 4 ++-- weatbag/tiles/n3w1.py | 7 +++---- weatbag/tiles/n3w2.py | 4 ++-- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index aa54ca2..999cdc1 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -18,14 +18,13 @@ class Tile: "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. " - "What we can do is transfer you there ourselves. But first you " + "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 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, " - "how many minutes will it take to transfer you on 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" "To make a guess, type a number followed by 'minutes'.\n") def action(self, player, do): diff --git a/weatbag/tiles/n2w4.py b/weatbag/tiles/n2w4.py index f4309b5..12b0d93 100644 --- a/weatbag/tiles/n2w4.py +++ b/weatbag/tiles/n2w4.py @@ -11,7 +11,7 @@ class Tile: "their momcat!\n") else: print("You are standing in front of the hut's door. The hut " - "looks very small and you wonder who could live there...\n" + "looks very small and you wonder who could live here...\n" "It has a door but you can't open it because the doorknob " "is missing.\n") @@ -21,7 +21,7 @@ class Tile: 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 at west.\n") + " resting on a couch.\nThere 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 a5e05b9..aec7508 100644 --- a/weatbag/tiles/n3w1.py +++ b/weatbag/tiles/n3w1.py @@ -1,6 +1,6 @@ class Tile: def describe(self): - print("The beach is quiet. On the south are children playing.\n") + print("The beach is quiet. To the south children are playing.\n") def action(self, player, do): print("wo0t w0ot?! o_O") @@ -8,11 +8,10 @@ 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 " - "fool of electric eels and you don't have a transport.\n") + "full of electric eels and you don't have a transport.\n") return False elif direction == 'e': - print("There is the side of a cave in front of you.\nYou can't go " - "east.\n") + print("There's a steep mountainside here which you can't climb.") return False elif direction == 'n': print(" , , \n" diff --git a/weatbag/tiles/n3w2.py b/weatbag/tiles/n3w2.py index a5c46cd..9ff35a5 100644 --- a/weatbag/tiles/n3w2.py +++ b/weatbag/tiles/n3w2.py @@ -9,10 +9,10 @@ class Tile: if not self.give_catfood: 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 " + "across to the mainland.\nNaturally, you ask 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 " + "some catfood so I can feed the kitties across on the " "mainland!\n") else: print("There's the old fisherman with his boat, he can take you " -- cgit v1.3 From b47436bbeb671c409bbe7d795fcf7294b8779581 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 28 Apr 2013 21:16:31 +0300 Subject: added leave restriction in n2 --- weatbag/tiles/n2.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n2.py b/weatbag/tiles/n2.py index 99ed0af..0617c02 100644 --- a/weatbag/tiles/n2.py +++ b/weatbag/tiles/n2.py @@ -15,8 +15,12 @@ class Tile: def leave(self, player, direction): if direction=='n' and not player.has('flaming torch'): print("You can't explore the cave without being able to see. " - "You'll need that stalwart friend of the adventurer, " - "the flaming torch.") + "You'll need that stalwart friend of the adventurer, " + "the flaming torch.") + return False + elif direction == 'w': + print("The undergrowth in that direction is impassable. " + "You turn back.") return False else: return True -- 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(-) 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 59a26a62a0471015de68e3cadf43df52f781f7cb Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Sun, 28 Apr 2013 21:37:34 +0300 Subject: move new line from begining to end on 2 strings/n2 --- weatbag/tiles/n2w1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 8d78eb4..d7b6c27 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -6,8 +6,8 @@ class Tile: self.minutes = "40" def describe(self): - print("\nYou see two children who you notice now are a boy and a girl. " - "\nThey are playing and running around a raft.") + print("You see two children who you notice now are a boy and a girl.\n" + "They are playing and running around a raft.\n") if self.challenge_not_completed: self.challenge() else: -- cgit v1.3 From 70cfe08bb857e4b4e6c37541217ef51fae48af74 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 29 Apr 2013 00:53:58 +0300 Subject: removed leave restrictions from n2 --- weatbag/tiles/n2.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/weatbag/tiles/n2.py b/weatbag/tiles/n2.py index 0617c02..7ae7b81 100644 --- a/weatbag/tiles/n2.py +++ b/weatbag/tiles/n2.py @@ -18,10 +18,6 @@ class Tile: "You'll need that stalwart friend of the adventurer, " "the flaming torch.") return False - elif direction == 'w': - print("The undergrowth in that direction is impassable. " - "You turn back.") - return False else: return True -- cgit v1.3 From 72266ec00d17c0998e2ae66748131e4e29790527 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 29 Apr 2013 01:01:33 +0300 Subject: removed leave restriction for e on n2w1 --- weatbag/tiles/n2w1.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index d7b6c27..9b484d9 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -67,9 +67,5 @@ class Tile: print ("You can't go there by swimming, that part is full of " "electric eels.\n") return False - elif direction == 'e': - print("The undregrowth in that direction is impassable. " - "You turn back.") - return False else: return True -- cgit v1.3 From a74e3d70491fb320448a8a5b85bd6dce8f9f8b36 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 29 Apr 2013 01:09:08 +0300 Subject: syntax correction on some strings --- weatbag/tiles/n2w1.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 9b484d9..5c520ca 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -26,14 +26,14 @@ class Tile: "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" - "To make a guess, type a number followed by 'minutes'.\n") + "For your answer, 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("Your guess have pleased me and my sister! " + print("Your answer has pleased me and my sister! " "\nLet's go!") print("The brother and sister will take you to the " "island.\n") @@ -59,9 +59,9 @@ class Tile: 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 find the correct amount of time!\n") except: - print("Please try guessing a number, like '42 minutes'\n.") + print("Please try typing 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 " -- cgit v1.3 From 42c316ccd1275eeecf9a66317b43acf6cc0b3cc8 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 29 Apr 2013 01:23:33 +0300 Subject: fixed describe and item transfer on n2w5 --- weatbag/tiles/n2w5.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n2w5.py b/weatbag/tiles/n2w5.py index 85ed1ff..12ae7d2 100644 --- a/weatbag/tiles/n2w5.py +++ b/weatbag/tiles/n2w5.py @@ -6,15 +6,16 @@ class Tile: self.contents = {'catfood': 2} def describe(self): - if self.contents['catfood']: + if self.contents['catfood']>0: 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!\n") + else: + print("You see an empty self.") 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.\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(-) 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(-) 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 ae6b24f12f88262e00eacb36935ffb0ee0c2f103 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 29 Apr 2013 02:00:22 +0300 Subject: small indentation fix for n2w3 --- weatbag/tiles/n2w3.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/weatbag/tiles/n2w3.py b/weatbag/tiles/n2w3.py index 72f2181..9660dc4 100644 --- a/weatbag/tiles/n2w3.py +++ b/weatbag/tiles/n2w3.py @@ -1,20 +1,20 @@ 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") - # "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("Wat?!") - - def leave(self, player, direction): - if direction == "s": - print("STAHP! Hammer Time!\n(Meaning you just can't go to that " - "direction yet. Sorry! :))\n") - return False - else: - return True + 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") + # "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("Wat?!") + + def leave(self, player, direction): + if direction == "s": + print("STAHP! Hammer Time!\n(Meaning you just can't go to that " + "direction yet. Sorry! :))\n") + return False + else: + return True -- cgit v1.3 From 6625fb75dcb2c1cfc5bb8d4e81225dfc59fc026f Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Mon, 29 Apr 2013 03:00:31 +0300 Subject: customized describe function on n2w3 --- weatbag/tiles/n2w3.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/weatbag/tiles/n2w3.py b/weatbag/tiles/n2w3.py index 9660dc4..85ca7f1 100644 --- a/weatbag/tiles/n2w3.py +++ b/weatbag/tiles/n2w3.py @@ -1,13 +1,20 @@ class Tile: + def __init__(self): + self.first_visit = True + self.tree_fallen = False + 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.\n") + if not self.first_visit and not self.tree_fallen: + print("You saw a tree fall and it didn't make any sound and " + "WOW... that was weired because you were there and " + "observed it!\n") + self.tree_fallen = True + self.first_visit = False # "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("Wat?!") -- cgit v1.3 From 3acd7eb28ff120648a6ea583b89dc0a865e76541 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 30 Apr 2013 17:39:59 +0300 Subject: changed boolean name from challenge_not_completed to challenge_completed --- weatbag/tiles/n2w1.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 5c520ca..5d58f67 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -2,13 +2,13 @@ from weatbag import words class Tile: def __init__(self): - self.challenge_not_completed = True + self.challenge_completed = False 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.\n") - if self.challenge_not_completed: + if not self.challenge_completed: self.challenge() else: print("\nThe children will take you to the western island!") @@ -29,7 +29,7 @@ class Tile: "For your answer, type a number followed by 'minutes'.\n") def action(self, player, do): - if self.challenge_not_completed: + if not self.challenge_completed: try: if do[1] == "minutes": if do[0] == self.minutes: @@ -37,7 +37,7 @@ class Tile: "\nLet's go!") print("The brother and sister will take you to the " "island.\n") - self.challenge_not_completed = False + self.challenge_completed = True else: print("We're afraid this is not the correct answer. " "Try another one.\n") @@ -49,21 +49,21 @@ class Tile: "We will transport you for free.\n") print("The brother and sister will take you " "to the island!\n") - self.challenge_not_completed = False + 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") - self.challenge_not_completed = False - elif (do[0] in words.take) and self.challenge_not_completed: + 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, " "you have to find the correct amount of time!\n") except: print("Please try typing a number, like '42 minutes'\n.") def leave(self, player, direction): - if direction == "w" and self.challenge_not_completed: + if direction == "w" and not self.challenge_completed: print ("You can't go there by swimming, that part is full of " "electric eels.\n") return False -- cgit v1.3 From 72ebf6c95e6281231754a4640e35de9def2d521c Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 30 Apr 2013 17:50:11 +0300 Subject: added else option in action for when the challenge is completed --- weatbag/tiles/n2w1.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weatbag/tiles/n2w1.py b/weatbag/tiles/n2w1.py index 5d58f67..00198a8 100644 --- a/weatbag/tiles/n2w1.py +++ b/weatbag/tiles/n2w1.py @@ -62,6 +62,9 @@ class Tile: "you have to find the correct amount of time!\n") except: print("Please try typing a number, like '42 minutes'\n.") + else: + print("Sorry, I don't understand.") + 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 " -- 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(-) 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 53361ec28cb05f1c83d33cc86060c1ef2c18c2b4 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 30 Apr 2013 18:08:41 +0300 Subject: corrected weired to weird (orthography) --- weatbag/tiles/n2w3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weatbag/tiles/n2w3.py b/weatbag/tiles/n2w3.py index 85ca7f1..9113861 100644 --- a/weatbag/tiles/n2w3.py +++ b/weatbag/tiles/n2w3.py @@ -8,7 +8,7 @@ class Tile: "took leads to a small wooden hut.\n") if not self.first_visit and not self.tree_fallen: print("You saw a tree fall and it didn't make any sound and " - "WOW... that was weired because you were there and " + "WOW... that was weird because you were there and " "observed it!\n") self.tree_fallen = True self.first_visit = False -- cgit v1.3 From 2fab6d8b879aa21819c9dccf14f8b15b4a9c808f Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 30 Apr 2013 18:19:11 +0300 Subject: edited the string on the first print on describe --- weatbag/tiles/n2w3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weatbag/tiles/n2w3.py b/weatbag/tiles/n2w3.py index 9113861..2030fea 100644 --- a/weatbag/tiles/n2w3.py +++ b/weatbag/tiles/n2w3.py @@ -4,8 +4,8 @@ class Tile: self.tree_fallen = False def describe(self): - print("You are walking through the trees. It looks like the path you " - "took leads to a small wooden hut.\n") + print("You are walking through the trees. It looks like the path on " + "your west leads to a small wooden hut.\n") if not self.first_visit and not self.tree_fallen: print("You saw a tree fall and it didn't make any sound and " "WOW... that was weird because you were there and " -- cgit v1.3 From 4887fa9463fac79db716dac16724bf8008d306c4 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Tue, 30 Apr 2013 18:22:59 +0300 Subject: merged two ifs on leave function in one --- weatbag/tiles/n3w4.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/weatbag/tiles/n3w4.py b/weatbag/tiles/n3w4.py index d4f238b..aeb58f9 100644 --- a/weatbag/tiles/n3w4.py +++ b/weatbag/tiles/n3w4.py @@ -10,10 +10,7 @@ class Tile: print("Sorry, I don't understand.\n") def leave(self, player, direction): - if direction == "n": - print("No trespasing. Violators will vanish without a trace.\n") - return False - elif direction == "w": + if direction in ('n', 'w'): print("No trespasing. Violators will vanish without a trace.\n") return False else: -- 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(-) 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(-) 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