Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Hero
- class Enemy:
- def __init__(self, health, damage):
- self.health = health
- self.damage = damage
- def fight(self):
- WIN = 0
- self.health -= Hero.hero.damage
- Hero.hero.health -= self.damage
- if self.health <= 0:
- WIN = True
- if Hero.hero.health <= 0:
- WIN = False
- if self.health <= 0 and Hero.hero.health <= 0:
- WIN = None
- return WIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement