Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- class Player():
- def __init__(self, entity_type, name, min_attack, max_attack, heal):
- self.type = entity_type
- self.name = name
- self.health = 100
- self.min_attack = min_attack
- self.max_attack = max_attack
- self.heal = heal
- def attack(self):
- return randint(self.min_attack, self.max_attack)
- def apply_damage(self, points):
- self.health -= points
- def apply_healing(self):
- self.health += self.heal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement