Advertisement
Taximaniac

Monster Class for MonsterKiller

Jan 28th, 2020
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. from random import randint
  2.  
  3. class Monster():
  4.  
  5.     def __init__(self, entity_type, name, min_attack, max_attack):
  6.         self.type = entity_type
  7.         self.name = name
  8.         self.health = 100
  9.         self.min_attack = min_attack
  10.         self.max_attack = max_attack
  11.        
  12.     def attack(self):
  13.         return randint(self.min_attack, self.max_attack)
  14.  
  15.     def apply_damage(self, points):
  16.         self.health -= points
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement