Example #1
0
 def action(self):
     from FirstFloor import FirstFloor, clear_screen
     first_floor = FirstFloor()
     choice = input("What now:\n>>> ")
     user_choice = parser_furniture(choice, self.furniture)
     if user_choice == "stove":
         print("Did you think there would be a food or something?")
         self.action()
     elif user_choice == "table":
         print(
             "There is a green {} on the table, it looks very suspicious.".
             format(*self.items))
         choice = input("What would you like to do with it?:\n>>> ")
         user_choice = parser_items(choice, self.items)
         if user_choice == "potion" or choice == "yes":
             john.take(*self.items)
             print("You took the potion.")
             self.items.remove("potion")
             self.action()
         else:
             self.action()
     elif user_choice == "cupboard":
         print("There are some kitchen accessories here, nothing special")
         self.action()
     elif user_choice == "fridge":
         print(
             "It's an empty fridge with some garbage in it, what did you expect?"
         )
         self.action()
     elif choice == "leave":
         clear_screen()
         print("You return back to the First Floor")
         first_floor.introduction()
     else:
         self.action()
Example #2
0
 def action(self):
     from SecondFloor import SecondFloor, clear_screen
     second_floor = SecondFloor()
     choice = input("What now:\n>>> ")
     user_choice = parser_furniture(choice, self.furniture)
     if user_choice == "bed":
         print("Nothing our of the ordinary, just the creepy looking doll. But nothing that would be of use to you.")
         time.sleep(1)
         self.action()
     elif user_choice == "toys":
         print("Just some creepy old toys, they are of no use to you.")
         time.sleep(1)
         self.action()
     elif user_choice == "horse":
         print("You remember that you've watched a horror movie yesterday where the rocking horse started moving "
               "on its own so you get worried.")
         time.sleep(1)
         self.action()
     elif user_choice == "doll":
         print("The doll is legit creepy so you just put her under the bed.")
         time.sleep(1)
         self.action()
     elif choice == "leave":
         clear_screen()
         print("You return back to the Second Floor")
         second_floor.introduction()
     else:
         self.action()
Example #3
0
 def action(self):
     from SecondFloor import SecondFloor, clear_screen
     second_floor = SecondFloor()
     choice = input("What now:\n>>> ")
     user_choice = parser_furniture(choice, self.furniture)
     if user_choice == "sink":
         print("It is an dirty sink, nothing more and nothing for looting.")
         time.sleep(1)
         self.action()
     elif user_choice == "toilet":
         print(
             "Clearly there wouldn't be anything of use from the toiler...")
         time.sleep(1)
         self.action()
     elif user_choice == "shower":
         print(
             "You try to turn it on for your surprise there is a running water, but nothing for looting"
         )
         time.sleep(1)
         self.action()
     elif user_choice == "bathtub":
         print("Just an dirty bathtub")
         time.sleep(1)
         self.action()
     elif choice == "leave":
         clear_screen()
         print("You return back to the Second Floor")
         second_floor.introduction()
     else:
         self.action()
Example #4
0
 def introduction(self):
     print(john.inventory)
     choice = input("What now:\n>>> ")
     user_choice = parser_furniture(choice, self.furniture)
     if user_choice == "shelf":
         print("There is a lot of jars that are rotten.")
         time.sleep(1)
         self.introduction()
     elif user_choice == "table":
         print("There is a paper and ashtray but nothing you could use.")
         time.sleep(1)
         self.introduction()
     elif user_choice == "door":
         print("The door seems to be jammed.")
         time.sleep(1)
         self.introduction()
     elif user_choice == "bike":
         print("It an very old looking rusty bike.")
         time.sleep(1)
         self.introduction()
     elif parser_items(choice, john.inventory) == "potion":
         if "potion" in john.inventory:
             self.smash()
         else:
             print(
                 "Seems like you didn't take the potions. Hint: It is located in the Kitchen."
             )
             self.introduction()
     elif choice == "quit" or "exit":
         exit()
     else:
         self.introduction()
Example #5
0
 def action(self):
     from SecondFloor import SecondFloor, clear_screen
     second_floor = SecondFloor()
     choice = input("What now:\n>>> ")
     user_choice = parser_furniture(choice, self.furniture)
     if user_choice == "bed":
         print(
             "You are at the bed but there seems to be nothing useful here."
         )
         time.sleep(1)
         self.action()
     elif user_choice == "closet":
         print(
             "There are some old clothes here, nothing that could be of use."
         )
         time.sleep(1)
         self.action()
     elif user_choice == "mirror":
         print(
             "You look at the broken mirror, you noticed that there is someone behind you, you startle turn around"
             "just to see that there is nothing there.")
         time.sleep(1)
         self.action()
     elif user_choice == "mattress":
         print(
             "By the looks of it it is the mattress from the bed, just moved to the ground. Strange, seems like someone has been sleeping here"
         )
         time.sleep(1)
         self.action()
     elif choice == "leave":
         clear_screen()
         print("You return back to the Second Floor")
         second_floor.introduction()
Example #6
0
 def action(self):
     from FirstFloor import FirstFloor, clear_screen
     first_floor = FirstFloor()
     choice = input("What now:\n>>> ")
     user_choice = parser_furniture(choice, self.furniture)
     if user_choice == "table":
         print("There is nothing, on or around the broken table")
         time.sleep(1)
         self.action()
     elif user_choice == "chair" or user_choice == "chairs":
         print(
             "It is just bunch of broken chairs, what did you expect to find here?"
         )
         time.sleep(1)
         self.action()
     elif choice == "leave":
         clear_screen()
         print("You return back to the First Floor")
         first_floor.introduction()
     else:
         self.action()
Example #7
0
 def introduction(self):
     from SecondFloor import SecondFloor, clear_screen
     second_floor = SecondFloor()
     choice = input("What now:\n>>> ")
     user_choice = parser_furniture(choice, self.furniture)
     if user_choice == "bookshelf":
         print("There are a lot of old books here but nothing of use.")
         time.sleep(1)
         self.introduction()
     elif user_choice == "table":
         print("There is a paper and ashtray but nothing you could use.")
         time.sleep(1)
         self.introduction()
     elif user_choice == "window":
         print("The window is jammed it doesn't move.")
         time.sleep(1)
         self.introduction()
     elif user_choice == "shelf":
         print(
             "There is a {} on the shelf, it is probably for the basement.".
             format(*self.items))
         choice = input("What would you like to do with it?:\n>>> ")
         user_choice = parser_items(choice, self.items)
         if user_choice == "key" or choice == "yes":
             print("You took the key.")
             john.take(*self.items)
             time.sleep(2)
             choice = input(
                 "Would you like to go downstairs to the Second Floor?(y/n)"
             )
             choice = choice.lower().strip()
             if choice == "y" or "yes":
                 clear_screen()
                 print("You return back to the Second Floor.")
                 second_floor.introduction()
         else:
             self.introduction()
     else:
         self.introduction()
Example #8
0
 def action(self):
     from FirstFloor import FirstFloor, clear_screen
     first_floor = FirstFloor()
     choice = input("What now: \n>>> ")
     user_choice = parser_furniture(choice, self.furniture)
     if user_choice == "desk":
         print(
             "You went to the desk, there seems to be nothing useful here.")
         time.sleep(1)
         self.action()
     elif user_choice == "chair":
         print("That is just some wooden chair, what did you expect?")
         time.sleep(1)
         self.action()
     elif user_choice == "bookshelf":
         choice = input("There is an {} here, would you like to take it?".
                        format(*self.items) + "(y/n).\n>>> ")
         choice = choice.lower().strip()
         rebel = parser_items(choice, self.items)
         if (choice == "y" or choice == "yes") or rebel == "letter":
             john.take(self.items)
             self.items.remove("letter")
             self.action()
         elif choice == "n" or choice == "no":
             self.action()
     elif user_choice == "cabinet":
         print(
             "You open the cabinet and there is an bottle of some kind of alcohol but since you are {}"
             .format(john.get_age()) + " you cannot do anything with it!!!")
         time.sleep(1)
         self.action()
     elif choice == "leave":
         clear_screen()
         print("You return back to the First Floor")
         first_floor.introduction()
     else:
         self.action()
Example #9
0
	def action(self):
		from SecondFloor import SecondFloor, clear_screen
		second_floor = SecondFloor()
		choice = input("What now:\n>>> ")
		user_choice = parser_furniture(choice, self.furniture)
		if user_choice == "couch":
			print("You sit on the couch to catch your breath.")
			time.sleep(2)
			print("5 minutes later.")
			time.sleep(1)
			print("There is nothing really useful on the couch for you to take.")
			self.action()
		elif user_choice == "tv":
			print("Same as the the one in the Living Room, nothing to loot either.")
			time.sleep(1)
			self.action()
		elif user_choice == "table":
			print("There is a rusty {} on the table.".format(*self.items))
			choice = input("Would you like to take it just in case?:\n>>> ")
			user_choice = parser_items(choice, self.items)
			if user_choice == "knife" or choice == "yes":
				print("You took the knife.")
				john.take(self.items)
				self.items.remove("knife")
				self.action()
			else:
				self.action()
		elif user_choice == "toys":
			print("A lot of scattered toys around the ground, but none look useful.")
			time.sleep(1)
			self.action()
		elif choice == "leave":
			clear_screen()
			print("You return back to the Second Floor")
			second_floor.introduction()
		else:
			self.action()