2020-10-23 14:17:48 +00:00
|
|
|
from ..interfaces import FightingEntity
|
2020-10-16 15:58:00 +00:00
|
|
|
|
|
|
|
class Player(FightingEntity):
|
|
|
|
maxhealth = 20
|
2020-10-23 13:15:37 +00:00
|
|
|
strength = 5
|
2020-11-06 17:12:17 +00:00
|
|
|
|
|
|
|
currentXP: int
|
|
|
|
maxXP: int
|
|
|
|
|
|
|
|
def level_up(self):
|
|
|
|
if currentXP>maxXP :
|
|
|
|
self.level+=1
|
|
|
|
currentXP = 0
|
|
|
|
maxXP = self.level*10
|
|
|
|
def addXP(self, xp) :
|
|
|
|
currentXP+=xp
|
|
|
|
self.level_up()
|