summaryrefslogtreecommitdiffstats
path: root/weatbag/tiles/n2w2.py
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-04-30 10:15:21 -0700
committerThomas Kluyver <takowl@gmail.com>2013-04-30 10:15:21 -0700
commite8676fe2073467b093af0abc8ccb19443ed4ecb7 (patch)
treec25d9794e1b8c77d70c2862f07f197fc0c69f067 /weatbag/tiles/n2w2.py
parente3612c7544341abf9e84234d4bda5f65ce8ee47a (diff)
parent3d626b5229add94f08acc3ae3731566507fc2f7e (diff)
Merge pull request #22 from ratmonkey/island_rebased
Island area
Diffstat (limited to 'weatbag/tiles/n2w2.py')
-rw-r--r--weatbag/tiles/n2w2.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/weatbag/tiles/n2w2.py b/weatbag/tiles/n2w2.py
new file mode 100644
index 0000000..31e3cff
--- /dev/null
+++ b/weatbag/tiles/n2w2.py
@@ -0,0 +1,33 @@
+class Tile:
+ def __init__(self):
+ self.first_visit = True
+
+ def describe(self):
+ if self.first_visit:
+ 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):
+ 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 "
+ "quit the game.")
+ else:
+ 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