Advertisement
Guest User

Untitled

a guest
Jan 31st, 2019
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.76 KB | None | 0 0
  1. from sys import exit
  2.  
  3. def gold_room():
  4.     print("This room is full of gold. How much do you take?")
  5.    
  6.     choice = input("> ")
  7.     if choice.isnumeric():
  8.         how_much = int(choice)
  9.     else:
  10.         dead("Man, learn to type a number")
  11.        
  12.     if how_much < 50:
  13.         print("Nice, your not greedy, you win!")
  14.         exit(0)
  15.     else:
  16.         dead("You greedy bastard!")
  17.        
  18. def bear_room():
  19.     print("There is a bear here.")
  20.     print("The bear has a bunch of honey.")
  21.     print("The fat bear is in front of another door.")
  22.     print("How are you going to move the bear?")
  23.     bear_moved = False
  24.    
  25.     while True:
  26.         choice = input("> ")
  27.        
  28.         if choice  == "take honey":
  29.             dead("The bear looks at you then slaps your face off.")
  30.         elif choice == "taunt bear" and not bear_moved:
  31.             print("The bear has moved from the door.")
  32.             print("You can go through it now.")
  33.             bear_moved = True
  34.         elif choice == "taunt bear" and bear_moved:
  35.             dead("The bear gets pissed off and chews your leg off.")
  36.         elif choice == "open door" and bear_moved:
  37.             gold_room()
  38.         else:
  39.             print("I got no idea what that means.")
  40.            
  41. def cthulhu_room():
  42.     print("Here you see the great evil Cthulhu.")
  43.     print("He, it, whatever stares at you and you go insane.")
  44.     print("Do you flee for your life or eat your head?")
  45.    
  46.     choice = input("> ")
  47.    
  48.     if "flee" in choice:
  49.         start()
  50.     elif "head" in choice:
  51.         dead("Well that was tasty!")
  52.     else:
  53.         cthulhu_room()
  54.        
  55. def dead(why):
  56.     print(why, "Good job!")
  57.     exit(0)
  58.    
  59. def start():
  60.     print("You are in a dark room.")
  61.     print("There is a door to your right and left.")
  62.     print("Which one do you take?")
  63.    
  64.     choice = input("> ")
  65.    
  66.     if choice == "left":
  67.         bear_room()
  68.     elif choice == "right":
  69.         cthulhu_room()
  70.     else:
  71.         dead("You stumble around the room until your starve.")
  72.        
  73.        
  74. start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement