Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.08 KB | None | 0 0
  1. import cmd
  2. import textwrap
  3. import sys
  4. import os
  5. import time
  6. import random
  7.  
  8. screen_width = 100
  9.  
  10. #### Player Setup ####
  11. class player:
  12. def __init__(self):
  13. self.name = ''
  14. self.hp = 0
  15. self.mp = 0
  16. self.status_effects = []
  17. self.location = 'start'
  18. myPlayer = player()
  19.  
  20. #### Title Screen ####
  21. def title_screen_selections():
  22. option = input(">")
  23. if option.lower() == ("play"):
  24. start_game() # placeholder
  25. elif option.lower() == ("help"):
  26. help_menu()
  27. elif option.lower() == ("quit"):
  28. sys.exit()
  29. while option.lower() not in ['play', 'help' 'quit']:
  30. print("please enter a valid command.")
  31. option = input(">")
  32. if option.lower() == ("play"):
  33. start_game() # placeholder
  34. elif option.lower() == ("help"):
  35. help_menu()
  36. elif option.lower() == ("quit"):
  37. sys.exit()
  38.  
  39. def title_screen():
  40. os.system('cls')
  41. print('##################')
  42. print('# Welcome To RPG #')
  43. print('##################')
  44. print(' -play- ')
  45. print(' -help- ')
  46. print(' -quit- ')
  47. title_screen_selections()
  48.  
  49. def help_menu():
  50. print('##################')
  51. print('# Welcome To RPG #')
  52. print('##################')
  53. print('up down left right')
  54. print('type commands 2 use')
  55. print('GLHF')
  56. title_screen_selections()
  57.  
  58. #### GAME FUNCTIONALITY ####
  59. def start_game():
  60.  
  61.  
  62. ZONENAME = ''
  63. DESCRIPTION = 'description'
  64. EXAMINATION = 'examine'
  65. SOLVED = False
  66. UP = 'up', 'north'
  67. DOWN = 'down', 'south'
  68. LEFT = 'left', 'west'
  69. RIGHT = 'right', 'east'
  70.  
  71. solved_places = {'a1': False, 'a2': False, 'a3': False, 'a4': False,
  72. 'b1': False, 'b2': False, 'b3': False, 'b4': False,
  73. 'c1': False, 'c2': False, 'c3': False, 'c4': False,
  74. 'd1': False, 'd2': False, 'd3': False, 'd4': False,
  75. }
  76.  
  77. zonemap = {
  78. 'a1': {
  79. ZONENAME = "Town Market"
  80. DESCRIPTION = 'description'
  81. EXAMINATION = 'examine'
  82. SOLVED = False
  83. UP = 'a1',
  84. DOWN = 'b1',
  85. LEFT = 'a1',
  86. RIGHT = 'a2',
  87. },
  88. 'a2': {
  89. ZONENAME = "Town Entrance"
  90. DESCRIPTION = 'description'
  91. EXAMINATION = 'examine'
  92. SOLVED = False
  93. UP = 'up', 'north'
  94. DOWN = 'down', 'south'
  95. LEFT = 'left', 'west'
  96. RIGHT = 'right', 'east'
  97. },
  98. 'a3': {
  99. ZONENAME = "Town Square"
  100. DESCRIPTION = 'description'
  101. EXAMINATION = 'examine'
  102. SOLVED = False
  103. UP = 'up', 'north'
  104. DOWN = 'down', 'south'
  105. LEFT = 'left', 'west'
  106. RIGHT = 'right', 'east'
  107. },
  108. 'a4': {
  109. ZONENAME = "Town Hall"
  110. DESCRIPTION = 'description'
  111. EXAMINATION = 'examine'
  112. SOLVED = False
  113. UP = 'up', 'north'
  114. DOWN = 'down', 'south'
  115. LEFT = 'left', 'west'
  116. RIGHT = 'right', 'east'
  117. },
  118. 'b1': {
  119. ZONENAME = ""
  120. DESCRIPTION = 'description'
  121. EXAMINATION = 'examine'
  122. SOLVED = False
  123. UP = 'up', 'north'
  124. DOWN = 'down', 'south'
  125. LEFT = 'left', 'west'
  126. RIGHT = 'right', 'east'
  127. },
  128. 'b2': {
  129. ZONENAME = ""
  130. DESCRIPTION = 'description'
  131. EXAMINATION = 'examine'
  132. SOLVED = False
  133. UP = 'up', 'north'
  134. DOWN = 'down', 'south'
  135. LEFT = 'left', 'west'
  136. RIGHT = 'right', 'east'
  137. },
  138. 'b3': {
  139. ZONENAME = ""
  140. DESCRIPTION = 'description'
  141. EXAMINATION = 'examine'
  142. SOLVED = False
  143. UP = 'up', 'north'
  144. DOWN = 'down', 'south'
  145. LEFT = 'left', 'west'
  146. RIGHT = 'right', 'east'
  147. },
  148. 'b4': {
  149. ZONENAME = ""
  150. DESCRIPTION = 'description'
  151. EXAMINATION = 'examine'
  152. SOLVED = False
  153. UP = 'up', 'north'
  154. DOWN = 'down', 'south'
  155. LEFT = 'left', 'west'
  156. RIGHT = 'right', 'east'
  157. },
  158. 'c1': {
  159. ZONENAME = ""
  160. DESCRIPTION = 'description'
  161. EXAMINATION = 'examine'
  162. SOLVED = False
  163. UP = 'up', 'north'
  164. DOWN = 'down', 'south'
  165. LEFT = 'left', 'west'
  166. RIGHT = 'right', 'east'
  167. },
  168. 'c2': {
  169. ZONENAME = ""
  170. DESCRIPTION = 'description'
  171. EXAMINATION = 'examine'
  172. SOLVED = False
  173. UP = 'up', 'north'
  174. DOWN = 'down', 'south'
  175. LEFT = 'left', 'west'
  176. RIGHT = 'right', 'east'
  177. },
  178. 'c3': {
  179. ZONENAME = ""
  180. DESCRIPTION = 'description'
  181. EXAMINATION = 'examine'
  182. SOLVED = False
  183. UP = 'up', 'north'
  184. DOWN = 'down', 'south'
  185. LEFT = 'left', 'west'
  186. RIGHT = 'right', 'east'
  187. },
  188. 'c4': {
  189. ZONENAME = ""
  190. DESCRIPTION = 'description'
  191. EXAMINATION = 'examine'
  192. SOLVED = False
  193. UP = 'up', 'north'
  194. DOWN = 'down', 'south'
  195. LEFT = 'left', 'west'
  196. RIGHT = 'right', 'east'
  197. },
  198. 'd1': {
  199. ZONENAME = ""
  200. DESCRIPTION = 'description'
  201. EXAMINATION = 'examine'
  202. SOLVED = False
  203. UP = 'up', 'north'
  204. DOWN = 'down', 'south'
  205. LEFT = 'left', 'west'
  206. RIGHT = 'right', 'east'
  207. },
  208. 'd2': {
  209. ZONENAME = ""
  210. DESCRIPTION = 'description'
  211. EXAMINATION = 'examine'
  212. SOLVED = False
  213. UP = 'up', 'north'
  214. DOWN = 'down', 'south'
  215. LEFT = 'left', 'west'
  216. RIGHT = 'right', 'east'
  217. },
  218. 'd3': {
  219. ZONENAME = ""
  220. DESCRIPTION = 'description'
  221. EXAMINATION = 'examine'
  222. SOLVED = False
  223. UP = 'up', 'north'
  224. DOWN = 'down', 'south'
  225. LEFT = 'left', 'west'
  226. RIGHT = 'right', 'east'
  227. },
  228. 'd4': {
  229. ZONENAME = ""
  230. DESCRIPTION = 'description'
  231. EXAMINATION = 'examine'
  232. SOLVED = False
  233. UP = 'up', 'north'
  234. DOWN = 'down', 'south'
  235. LEFT = 'left', 'west'
  236. RIGHT = 'right', 'east'
  237. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement