Entity name is a parameter since it can be changed through body snatch potion

This commit is contained in:
Yohann D'ANELLO
2020-12-05 14:25:22 +01:00
parent ea672272f5
commit f887a1f0aa
3 changed files with 25 additions and 24 deletions

View File

@ -16,11 +16,12 @@ class Player(FightingEntity):
inventory: list
paths: Dict[Tuple[int, int], Tuple[int, int]]
def __init__(self, maxhealth: int = 20, strength: int = 5,
intelligence: int = 1, charisma: int = 1, dexterity: int = 1,
constitution: int = 1, level: int = 1, current_xp: int = 0,
max_xp: int = 10, *args, **kwargs) -> None:
super().__init__(name="player", maxhealth=maxhealth, strength=strength,
def __init__(self, name: str = "player", maxhealth: int = 20,
strength: int = 5, intelligence: int = 1, charisma: int = 1,
dexterity: int = 1, constitution: int = 1, level: int = 1,
current_xp: int = 0, max_xp: int = 10, *args, **kwargs) \
-> None:
super().__init__(name=name, maxhealth=maxhealth, strength=strength,
intelligence=intelligence, charisma=charisma,
dexterity=dexterity, constitution=constitution,
level=level, *args, **kwargs)