Posted By

jacobaa1031 on 09/27/12


Tagged


Versions (?)

rpg v0.0.7


 / Published in: Python
 

simple rpg

  1. #RPG
  2. rpg = True
  3. whp = 100
  4. mahp = 100
  5. hhp = 100
  6. MHP = 10
  7.  
  8. def dgrnd () :
  9. wa = raw_input ("What does Warrior do?")
  10. ma = raw_input ("What does Mage do?")
  11. ha = raw_input ("What does Healer do?")
  12. if wa == "flame slash" :
  13. print ("Warrior uses Flame Slash!")
  14. MHP-20
  15. elif wa == "Dragon Slash" and M == "Dragon" :
  16. print ("Warrior used Dragon Slash!")
  17. MHP-80
  18. if wa == "Dragon" and M == "Troll" or M == "Goblin" :
  19. print ("Warrior's attack did no damage!")
  20. if ma == "icicle drop" :
  21. print ("Mage used Icicle Drop")
  22. MHP-15
  23. mahp-10
  24. whp-10
  25. hhp-10
  26. if ma == "flames of heck" :
  27. MHP-75
  28. mahp-50
  29. wph-50
  30. hhp-50
  31. if ha == "heal warrior" :
  32. print ("Healer Heals Warrior!")
  33. whp + 20
  34. if ha == "heal mage" :
  35. print ("Healer Heals Mage!")
  36. mahp + 20
  37. if ha == "heal healer" :
  38. print ("Healer Heals Healer!")
  39. hhp + 20
  40. if ha == "attack" :
  41. print ("Healer Attacks!")
  42. MHP - 5
  43. print (M+"attacks!")
  44. if M == "dragon" :
  45. whp - 40
  46. mahp - 40
  47. hhp - 40
  48. if M == "Troll" :
  49. whp - 30
  50. mahp - 30
  51. hhp - 30
  52. if M == "Goblin" :
  53. whp - 20
  54. mahp - 20
  55. hhp -20
  56. print ("Warrior has "+whp+" HP left, Mage has "+mahp+" HP left, and Healer has "+hhp+" HP left!")
  57. if MHP == 0 :
  58. print ("You defeated the "+M+" !")
  59. print ("That is all I have built so far. Eventually, there will be more!")
  60. print ("Thank You for Playing!!")
  61. dgrnd ()
  62.  
  63. if rpg == True :
  64. print ("This mode is not yet complete. It only contains a dungeon so far. I'm still working on the rest.")
  65. #Dungeon
  66. whp = 100
  67. mahp = 100
  68. hhp = 100
  69. MHP = 10
  70. M = "fail"
  71. print ("You enter the dungeon")
  72. rm = raw_input ("There are three passages. Do you take the first one, the second one, or the third one?")
  73. if rm == 'one' :
  74. M = 'Troll'
  75. MHP = 80
  76. print ("A "+M+" appears!")
  77. if rm == 'two' :
  78. M = 'Goblin'
  79. MHP = 35
  80. print ("A "+M+" appears!")
  81. if rm == 'three' :
  82. M = 'Dragon'
  83. MHP = 120
  84. print ("A "+M+" appears!")
  85.  
  86. while MHP > 0 :
  87. dgrnd ()

Report this snippet  

You need to login to post a comment.