Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. print ("Game -- James")
  2.  
  3. playername = input("What is your name? ")
  4.  
  5. class mage:
  6. damage = 5
  7. health = 10
  8. dodge = 4
  9.  
  10. def __init__(self, damage, health, dodge):
  11. self.damage = damage
  12. self.health = health
  13. self.dodge = dodge
  14.  
  15. class knight:
  16. damage = 3
  17. health = 15
  18. dodge = 2
  19.  
  20. def __init__(self, damage, health, dodge):
  21. self.damage = damage
  22. self.health = health
  23. self.dodge = dodge
  24.  
  25. class archer:
  26. damage = 4
  27. health = 7
  28. dodge = 10
  29.  
  30. def __init__(self, damage, health, dodge):
  31. self.damage = damage
  32. self.health = health
  33. self.dodge = dodge
  34. class goblin:
  35. damage = 2
  36. health = 10
  37.  
  38. def __init__(self, damage, health):
  39. self.damage = damage
  40. self.health = health
  41. self.dodge = dodge
  42. class attackmage:
  43. damage = 5
  44.  
  45. def __init__(self, damage):
  46. self.damage = damage
  47. class attackknight:
  48. damage = 3
  49.  
  50. def __init__(self,damage):
  51. self.damage = damage
  52.  
  53. class attackarcher:
  54. damage = archer.damage
  55.  
  56. def __init__(self, damage):
  57. self.damage = damage
  58.  
  59. def attack():
  60.  
  61. if pickclass == "MAGE":
  62. attackchoice = input("Attack Goblin: 'Water Blast' ").upper()
  63. if attackchoice == "WATER BLAST" or "WATERBLAST" or "WTR BLST":
  64. print("|Goblin HP: ",goblin.health - attackmage.damage, "|")
  65.  
  66. if pickclass == "KNIGHT":
  67. attackchoice = input("Attack Goblin: 'Swing' ").upper()
  68. if attackchoice == "SWING" or "SWNG" or "SIWNG":
  69. print("|Goblin HP: ",goblin.health - attackknight.damage, "|")
  70.  
  71. if pickclass == "ARCHER":
  72. attackchoice = input("Attack Goblin: 'Arrow Shot' ").upper()
  73. if attackchoice == "ARROW SHOT" or "ARRW SHOT" or "ARW SHT":
  74. print("|Goblin HP: ",goblin.health - attackarcher.damage,"|")
  75.  
  76. pickclass = input("Pick a class: (Mage, Knight, Archer): ").upper()
  77.  
  78. print("Awh very nice class choice, " + pickclass + " is very strong class.")
  79.  
  80. print("I am Daniel your quest master, I actually have a quest for you now.")
  81.  
  82. print("QUEST -- Goblin Attack")
  83.  
  84. print("Goblin | LVL: 1 | HP: 10 ")
  85.  
  86. attack()
  87.  
  88. if goblin.health > 0:
  89. attack()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement