summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--weatbag/tiles/n3w2.py24
1 files 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']