From 4bbfd42ac616ca8d530e8e84cd030aa7303816f4 Mon Sep 17 00:00:00 2001 From: Kleopatra Angelidi Date: Wed, 15 May 2013 04:14:18 +0300 Subject: leave restrictions (n5w7) --- weatbag/tiles/n5w7.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'weatbag') diff --git a/weatbag/tiles/n5w7.py b/weatbag/tiles/n5w7.py index 44de460..6e1b687 100644 --- a/weatbag/tiles/n5w7.py +++ b/weatbag/tiles/n5w7.py @@ -42,5 +42,21 @@ class Tile: print("Keep saying bullshit and your end is close!") else: print("I don't understand.") - -#lighthouse + + def leave(self, player, direction): + if self.trapped and direction in ("w", "n"): + print("You are my prisoner, I won't let you leave. But even if you " + "could leave these are the inner walls of the lighthouse you " + "idiot! And then the sea.\n") + return False + elif self.trapped and direction in ("e", "s"): + print("What do you think you are doing? I won't let you leave. " + "You are my prisoner!\n") + return False + elif direction in ("w", "n"): + print("It's the light house walls. What are you gonna do? " + "Hit your head on them?\n") + return False + else: + print("Finaly you are out!") + return True -- cgit v1.3