Guest User

Untitled

a guest
Jan 9th, 2022
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. from random import randint as ri
  2. # CHARACTER #
  3. class Character:
  4. def __init__(self,name,health,strenght,defense,stamina,agility,magic):
  5. self.name = name
  6. self.health = health
  7. self.strength = strenght
  8. self.defense = defense
  9. self.stamina = stamina
  10. self.agility = agility
  11. self.magic = magic
  12.  
  13. def printstats(self):
  14. print(self.name)
  15. print("Health: ", self.health)
  16. print("Strength: ", self.strength)
  17. print("Defense: ", self.defense)
  18. print("Stamina: ", self.stamina)
  19. print("Agility: ", self.agility)
  20. print("Magic: ", self.magic)
  21. print()
  22.  
  23. # MONSTER #
  24. class Monster:
  25. def __init__(self, name, health, strenght, defense, stamina, agility, magic,xp_value,gold):
  26. self.name = name
  27. self.health = health
  28. self.strength = strenght
  29. self.defense = defense
  30. self.stamina = stamina
  31. self.agility = agility
  32. self.magic = magic
  33. self.xp_value = xp_value
  34. self.gold = gold[0,0]
  35.  
  36. @staticmethod
  37. def looting(gold):
  38. return ri(gold[0], gold[1])
  39.  
  40. def printstats(self):
  41. print(self.name)
  42. print("Health: ", self.health)
  43. print("Strength: ", self.strength)
  44. print("Defense: ", self.defense)
  45. print("Stamina: ", self.stamina)
  46. print("Agility: ", self.agility)
  47. print("Magic: ", self.magic)
  48. print()
  49.  
  50. def printbounty(self):
  51. print("Gold: ", self.looting(self.gold))
  52. print("Exp earned: ", self.xp_value)
  53.  
  54. warrior = Character("Warrior πŸͺ“", 1, 7, 5, 4, 2, 1)
  55. tanker = Character("Tanker πŸ›‘οΈ", 100, 2, 8, 4, 1, 1)
  56. thief = Character("Thief πŸ—‘οΈ", 100, 3, 2, 5, 7, 1)
  57. archer = Character("Archer 🏹", 100, 2, 2, 4, 8, 1)
  58. mage = Character("Mage ✨", 100, 1, 3, 3, 1, 7)
  59. healer = Character("Healer ❀️", 100, 1, 4, 5, 2, 6)
  60. assassin = Character("Assassin πŸ”ͺ", 100, 8, 3, 4, 8, 1)
  61. goblin = Monster("Goblin πŸ‘Ί", 50, 3, 3, 2, 5, 1,25,(0,10))
  62. blackgoblin = Monster("Black Goblin πŸ‘Ί", 75, 2, 8, 4, 1, 1,40,(5,20))
  63. magegoblin = Monster("Mage Goblin πŸ‘Ίβœ¨", 80, 1, 7, 2, 2, 6,60,(10,30))
  64. summonergoblin = Monster("Summoner Goblin πŸ‘ΊπŸ‘Ύ", 75, 1, 9, 2, 2, 8,150,(10,30))
  65. wolfyoung = Monster("Small Wolf 🐺", 50, 3, 3, 2, 5, 1,30,(1,10))
  66. wolfold = Monster("Wolf 🐺", 75, 4, 5, 3, 6, 1,60,(20,30))
  67. molerat = Monster("Mole Rat πŸ€", 30, 2, 3, 2, 4, 1,25,(0,10))
  68. flasheater = Monster("Flash Eater πŸ₯©", 65, 7, 4, 2, 3, 1,50,(5,20))
  69. kelpie = Monster("Kelpie 🌊", 60, 5, 3, 4, 2, 1,75,(5,20))
  70. skylight = Monster("Skylight πŸ•―οΈ", 10, 1, 1, 1, 1, 1,5,(0,5))
  71. boxbox = Monster("πŸ† BoxBox The Cruncher πŸ†", 100, 1, 5, 1, 1, 1,10,(50,100))
  72. treebeard = Monster("πŸ’€ The Treebeard πŸ’€", 200, 8, 8, 5, 1, 1,300,(100,200))
  73. bruxet = Monster("πŸ’€ The Bruxet πŸ’€", 300, 5, 8, 8, 6, 1,500,(125,250))
  74. necromancier = Monster("πŸ’€ The Necromancier πŸ’€", 400, 1, 8, 7, 1, 9,750,(250,500))
  75.  
  76.  
  77. warrior.printstats()
  78.  
  79. goblin.printbounty()
Advertisement
Add Comment
Please, Sign In to add comment