Advertisement
PythonInProgress

Glory: A Python-Based RPG

Jun 26th, 2013
442
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #-----Glory: A WIP Game by Benjamin Ward-------
  2. # (C) Disc Games
  3. #Reminder ---- If death or open unfinished place, put death()
  4.  
  5. #ToDo:
  6. #Level/XP system
  7. #World 2
  8.  
  9. import pygame
  10. import time
  11.  
  12. gold = 0
  13. itemSlotArmorHead = False
  14. itemSlotArmorChest = True
  15. itemSlotArmorLegs = False
  16. itemSlotArmorBoots = False
  17. itemSlotWeapon1 = False
  18. itemSlotWeapon2 = False
  19.  
  20. headArmorValue = 0
  21. chestArmorValue = 0
  22. legsArmorValue = 0
  23. bootsArmorValue = 0
  24. totalArmorValue = headArmorValue + chestArmorValue + legsArmorValue + bootsArmorValue
  25.  
  26. enterCave = ''
  27. rustySwordItem = False
  28.  
  29. leatherTunicItem = False
  30. if leatherTunicItem == True and itemSlotArmorChest == False:
  31. itemSlotArmorChest = True
  32. chestArmorValue = 2
  33. print("The leather tunic is now equipped")
  34. elif leatherTunicItem == True and itemSlotArmorChest == True:
  35. print("Your armor value is currently: ", totalArmorValue, "Equipping a Leather Tunic will make this value: ", totalArmorValue - chestArmorValue + 2)
  36. print("Would you still like to equip this item? (Yes or No)")
  37. lti = input("")
  38. if lti == "y" or lti == "Y" or lti == "yes" or lti == "Yes":
  39. itemSlotArmorChest = True
  40. chestArmorValue = 2
  41. print("Your armor value is now ", totalArmorValue)
  42. else:
  43. print("This Leather Tunic will be discarded.")
  44. leatherTunicItem = False
  45.  
  46.  
  47.  
  48. leatherLeggingsItem = False
  49. ironHelmItem = False
  50. ironChestplateItem = False
  51. ironBootsItem = False
  52. chainmailTunicItem = False
  53. chainmailLeggingsItem = False
  54. helmOfInvisibilityItem = False
  55. bootsOfSwiftnessItem = False
  56. dragonscaleChestplateItem = False
  57. dragonscaleLeggingsItem = False
  58.  
  59.  
  60. pottedPlantDeath = False
  61. goblinDeath = False
  62. direwolfDeath = False
  63. giantRatDeath = False
  64. vampireBatDeath = False
  65. snakeDeath = False
  66. orcDeath = False
  67. caveOgreDeath = False
  68. hydraDeath = False
  69. dragonDeath = False
  70. wraithDeath = False
  71. pitTrapDeath = False
  72. drowningDeath = False
  73. fallingDeath = False
  74. starveDeath = False
  75. caveInDeath = False
  76.  
  77.  
  78.  
  79. def intro() :
  80. introTrue = input("Press escape to skip the introduction, otherwise press the return key.")
  81. keys = pygame.key.get_pressed()
  82. if keys[pygame.K_ESC]:
  83. print("Skipping Intro..... Complete")
  84. elif keys[pygame.K_ENTER]:
  85. print('In this game, you are in a world full of mystical beings,')
  86. print('and monsters such as dragons, goblins, and giant spiders.')
  87. time.sleep(5)
  88. print('')
  89. print('Today, you decide to explore the caves below your village.')
  90. print('')
  91. time.sleep(4)
  92. print('The caves are a labyrinth of tunnels, and they contain people-s')
  93. print('wildest dreams as well as people-s darkest nightmares.')
  94. print('')
  95. time.sleep(5)
  96. print('You hunt around the village for equipment and money, and find')
  97. print('a few things, as well as what you already had.')
  98. print('')
  99. time.sleep(4)
  100.  
  101. def death():
  102. global gold
  103. global enterCave
  104. global rustySwordItem
  105. global leatherTunicItem
  106. global leatherLeggingsItem
  107. global ironHelmItem
  108. global ironChestplateItem
  109. global ironBootsItem
  110. global chainmailTunicItem
  111. global chainmailLeggingsItem
  112. global helmOfInvisibilityItem
  113. global bootsOfSwiftnessItem
  114. global dragonscaleChestplateItem
  115. global dragonscaleLeggingsItem
  116.  
  117. global armorValue
  118. global weaponValue
  119.  
  120. global itemSlotArmorHead
  121. global itemSlotArmorChest
  122. global itemSlotArmorLegs
  123. global itemSlotArmorBoots
  124. global itemSlotWeapon1
  125. global itemSlotWeapon2
  126.  
  127.  
  128. global pottedPlantDeath
  129. global goblinDeath
  130. global direwolfDeath
  131. global giantRatDeath
  132. global vampireBatDeath
  133. global snakeDeath
  134. global orcDeath
  135. global caveOgreDeath
  136. global hydraDeath
  137. global dragonDeath
  138. global wraithDeath
  139. global pitTrapDeath
  140. global drowningDeath
  141. global fallingDeath
  142. global starveDeath
  143. global caveInDeath
  144.  
  145.  
  146.  
  147. gold = 0
  148. enterCave = ''
  149.  
  150. def gameLevelOne():
  151. intro()
  152. global gold
  153. global enterCave
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement