Advertisement
DamonShekari

Old Adventure Game - Practice

May 23rd, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.18 KB | None | 0 0
  1. #Name: Damon Shekari
  2. #4/23/2017
  3. #This is old, and pretty scuffed code. I learned about defining things
  4. #as well as importing time to put a delay on code
  5. import time
  6. import random
  7.  
  8. def intro():
  9.         print('Welcome to Night Song, created by Damon Shekari.')
  10.         print('------------------------------------------------')
  11. intro()
  12. time.sleep(2)
  13. print('It is January 29, 2093. You are unconscious.')
  14. time.sleep(1)
  15. print('*Nudge*')
  16. time.sleep(1)
  17. print('You begin to slowly open your eyes. The ground is damp and the clouds above are dark grey.')
  18. time.sleep(1)
  19. print('Ivan: What is your name?')
  20. myName = input()
  21. print('Ivan: Good to meet you ' + myName + '! Now get up and run!')
  22. print('There is a Kalashnikov near you. Do you pick it up? [Type yes or no]')
  23. user_response = input()
  24. if user_response == 'yes':
  25.     print('You pick up the rifle and rush into the woods with Ivan.')
  26. else: # user responded with something that was not 'yes'
  27.  
  28.     print('You rush into the woods with Ivan, unarmed.')
  29. time.sleep(2)
  30. print('The sky remains cloudy.')
  31. print('Ivan hands you a bag with some bandages in it. [Type inv to bring up loot]')
  32. user_response = input()
  33. if user_response == 'inv':
  34.         print('Bandages [3]')
  35.         print('Kalashnikov [1]')
  36. time.sleep(2)
  37. print('Ivan digs in his pocket and hands you some bullets.')
  38. print('Ivan: Brother, take this, you need it more than I do.')
  39. print('Do you accept the bullets? [Type yes or no]')
  40. user_response = input()
  41. if user_response == 'yes':
  42.         print('You have picked up (5) bullets. [Type inv to bring up loot]')
  43. user_response = input()
  44. if user_response == 'inv':
  45.         print('Bandages [3]')
  46.         print('Bullets [5]')
  47.         print('Kalashnikov [1]')
  48. print('Ivan: I need you to go search for the others. Will you? [Type yes or no]')
  49. user_response = input()
  50. if user_response == 'yes':
  51.         print('You begin to walk on a trail and a bear kills you.')
  52.  
  53. if user_response == 'no':
  54.         print('Ivan is not pleased. He stabs you and leaves you to die.')
  55. time.sleep(2)
  56. print('------------------------------------------------------------------------')
  57. print('Thank you for playing.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement