Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.49 KB | None | 0 0
  1. #Grue Slayer 0.1. It contains a beta of level 1, and that's about it. Level 1 is subject to HUGE change and simplification. I will probably need some functions in here to make actions like GET simpler, and the manual needs to be less complex. Feed back is requested
  2.  
  3.  
  4.  
  5. #Level 1, dark hallway with fire grue
  6. print ('''You are in a hallway
  7. It is dark.
  8. You are most likely to be eaten by a grue.''')
  9. print('')
  10. print('What will you do young Grue Slayer?(For instruction manual, type "manual")')
  11. dark='yes'
  12. mop='no'
  13. grue='alive'
  14. alive=True
  15. inventory=[]
  16. #Continually check what your action is and then execute the action until you finish the level.
  17. while True:
  18.     action=input().lower()
  19.     if action=='manual':
  20.         print('''Hello young Grue Slayer! You must learn the basics of grue slaying!In this manual I will teach you the basic commands.
  21. The first one is the first thing you should always do. EXAMINE. type examine and the name of an object(objects are often
  22. written in all caps) or the word "surroundings". It will then tell you all you can know about the object, or if you type surroundings
  23. it will tell you what you see around you. GET plus an object adds the object to your inventory if possible.
  24. DROP plus an object removes it from your inventory. USE object uses the object's default function.
  25. USE object function uses the the objects secondary function that you specified. USE object on object is self explanatory.
  26. GO will move yourself to a different location(will also be in all caps). Lastly, INVENTORY will display everything you have in your inventory.''')
  27.     elif action=='examine surroundings':
  28.         if dark=='yes':
  29.             print('It is dark, you don\'t see much. Close to you is a MOP and a TORCH')
  30.         elif dark=='no' and grue=='alive':
  31.             print('You look at the now bright room. The room is pretty empty. In the middle of the room wee see a fire GRUE. In the far corner we see a closed off ARCH.')
  32.         else:
  33.             print('You are in an empty room with the corpse of a now dead grue by your side. In the far corner is an ARCH.')
  34.     elif action=='examine mop':
  35.         print('It is a self wetting mop')
  36.     elif action=='examine torch':
  37.         print('It is a self lighting torch')
  38.     elif action=='get torch':
  39.         if 'torch' not in inventory:
  40.             print('You grab the torch')
  41.             inventory.append('torch')
  42.         else:
  43.             print('Ye hath already grabbed thy torch.')
  44.     elif action=='drop torch':
  45.         if 'torch' in inventory:
  46.             print('you drop the torch')
  47.             inventory.remove('torch')
  48.         else:
  49.             print('you are not even holding a torch')
  50.     elif action=='get mop':
  51.         if 'mop' not in inventory:
  52.             inventory.append('mop')
  53.             print('you grab the mop')
  54.         else:
  55.             print('Ye hath already grabbed thy mop.')
  56.     elif action=='drop mop':
  57.         if mop in inventory:
  58.             print('You drop your mop')
  59.             inventory.remove('mop')
  60.         else:
  61.             print('you are not even holding a mop')
  62.     elif action=='use torch':
  63.         if 'torch' in inventory:
  64.             dark='no'
  65.             print('The room brightens up and you can now see everything.')
  66.         else:
  67.             print('You don\'t have a torch, thus you cannot use it.')
  68.     elif action=='use mop':
  69.         if 'mop' in inventory:
  70.             mop='wet'
  71.             print('The mop is now wet, for whatever purpose you may need that.')
  72.         else:
  73.             print('You don\'t have a mop, thus you cannot use it.')
  74.     elif action=='use mop on grue':
  75.         if dark=='yes':
  76.             print('You swing wildly in the darkness. You hit nothing. A grue grabs you and eats you. GAME OVER.')
  77.             alive=False
  78.             break
  79.         elif mop=='wet':
  80.             print('You attack the grue with the mop. You look quite rediculous doing so. The mop is wet, and, being a fire grue, this severley bothers the grue. The grue falls over and dies, causing a large thump. You shout in victory.')
  81.             grue='dead'
  82.         else:
  83.             print('You batter the grue with your mop. You look quite rediculous. Your long brown cleaning stick shows no match for the grue. The grue grabs the mop and snaps it in half. He does the same process with your body. Game over.')
  84.             alive=False
  85.             break
  86.     elif action=='use torch on grue':
  87.         print('That was an ignorant move. I guess fighting fire with fire isn\'t always the answer. The grue is impervioius to your torch and steps on you. You die. GAME OVER.')
  88.         alive=False
  89.         break
  90.     elif action=='go arch':
  91.         if grue=='alive':
  92.             print('You failed to consider that there is a grue between you and the arch. The grue eats you. GAME OVER.')
  93.             alive=False
  94.             break
  95.         else:
  96.             print('You go to the arch to see that it has a door that is sealed shut. Suddenly an old man opens the door from the other end and walks up to you. "Hello..." he says.')
  97.             break
  98.     elif action=='inventory':
  99.         for i in inventory:
  100.             print (i)
  101.     else:
  102.         print('I have no clue what you are talking about. Maybe you should read the instruction MANUAL.')
  103.  
  104. #checks whether you died in the process of the level
  105. if alive==True:
  106.     print('Young Grue Slayer, sadly your journey must come to an end. The game is unfinished and you have reached the end of the beta.')
  107.     input()
  108. else:
  109.     print('You have died and lost the game.')
  110.     input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement