+ 2
you should use classes here. have a Monster class and give it a function that will subtract some amount of HP from the monster. class Monster: def __init__(self): self.hp = 100 # monster's health def take_damage(self, amount): self.hp -= amount bat = Monster() bat.take_damage(20) print(bat.hp)
20th Nov 2016, 2:24 PM
asdadasdsaczxc