Guest User

Untitled

a guest
Dec 11th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. from time import sleep
  2. import os, sys, time
  3. import random
  4.  
  5. name = ''
  6. role = ''
  7. hp = 0
  8. ap = 0
  9. inventory = ''
  10. boosts = 0
  11. gameOver = False
  12.  
  13. # Title Screen
  14. def title_screen():
  15. print('#########################')
  16. print('# Welcome to the EOS RPG#')
  17. print('#########################')
  18. print(' -Play- ')
  19. print(' -Help- ')
  20. print('####By Gautam Singh #### ')
  21.  
  22. title_screen()
  23.  
  24. def print_slow(str):
  25. for letter in str:
  26. sys.stdout.write(letter)
  27. sys.stdout.flush()
  28. time.sleep(0.09)
  29.  
  30. def main_game_intro():
  31. print_slow('Hello, What is your name\n')
  32. player_name = input('> ')
  33. print_slow('What role do you want to play as in the game?\n')
  34. print_slow('You can play as a warrior, mage, priest or assassin.\n')
  35. player_role = input('> ')
  36. # Player stats
  37. if player_role.lower() == 'warrior':
  38. hp = 200
  39. ap = 50
  40. if player_role.lower() == 'mage':
  41. hp = 100
  42. ap = 100
  43. if player_role.lower() == 'priest':
  44. hp = 250
  45. ap = 40
  46. if player_role.lower() == 'assassin':
  47. hp = 150
  48. ap = 125
  49. # If player enters invalid player_role
  50. if player_role.lower() not in ['warrior', 'mage', 'priest', 'assassin']:
  51. print('Choose a valid role')
  52.  
  53. # making it look nice
  54. print_slow('Healt = ', hp)
  55. print_slow('Attack = ', hp)
  56.  
  57. print_slow('Welcome ' + player_name + ' the ' + player_role + "\n")
  58. print_slow('Welcome to this fantasy world!')
  59. print_slow('I hope you enjoy it')
  60. print_slow('Remember, you can collect items throuhout the game.')
  61.  
  62.  
  63.  
  64. def title_screen_selection():
  65. option = input('> ')
  66. if option.lower() == 'play':
  67. main_game_intro()
  68. if option.lower() == "help":
  69. print(' -use you inventory wisely- ')
  70. print(' -type an sction to do it- ')
  71. print(' -Always type in lowercase- ')
  72. print(' -Good luck and have fun-/n/n')
  73. title_screen()
  74. title_screen_selection()
  75.  
  76.  
  77. # Finnaly we start
  78.  
  79. #Lets start the intro of main game#
  80.  
  81.  
  82. main_game_intro()
  83.  
  84. # Lets start the story #
  85.  
  86.  
  87. def main_game():
  88. print_slow('The story starts now\n\n')
  89. print_slow('Your eyes open. You find yourself in a tavern.\n')
  90. print_slow('Bartender: Want something to drink?')
  91. print('Ask where you are or I will have a drink. ask/drink')
  92. choice = input('> ')
  93. # If
  94. if choice1.lower() == 'ask':
  95. print_slow("Bartender: You are in Timmy's Tavern")
  96. print_slow('You get up and leave')
  97. elif choice1.lower() == 'drink':
  98. print_slow('The bartender brings you a drink')
  99. print_slow('You: Where am I?')
  100. print_slow("Bartender: You are in Timmy's Tavern")
  101. print('You get up and leave')
  102. print_slow('You are now in a street full of people')
  103. print_slow('You ask someone what city you are in. He says Alphiem')
  104. print_slow('You continue walking down the street')
  105. print_slow('You see some guards. Want to ask them the way out of the city. yes/no')
  106. choice2 = input('> ')
  107. if choice2 == "yes":
  108. print_slow('You ask them the way out of town')
  109. print_slow('\nGuard: Who are you?')
  110. print_slow('You: I am ' , player_name)
  111. print_slow('\nGuard: Where are you from?')
  112. print_slow('\nGuard: You look like someone on the wanted board.')
  113. print_slow('\nGuard: We will be taking you into custody')
  114.  
  115.  
  116. main_game()
Add Comment
Please, Sign In to add comment