Entity name is a parameter since it can be changed through body snatch potion
This commit is contained in:
@ -63,9 +63,9 @@ class Tiger(Monster):
|
||||
"""
|
||||
A tiger monster
|
||||
"""
|
||||
def __init__(self, strength: int = 2, maxhealth: int = 20,
|
||||
*args, **kwargs) -> None:
|
||||
super().__init__(name="tiger", strength=strength,
|
||||
def __init__(self, name: str = "tiger", strength: int = 2,
|
||||
maxhealth: int = 20, *args, **kwargs) -> None:
|
||||
super().__init__(name=name, strength=strength,
|
||||
maxhealth=maxhealth, *args, **kwargs)
|
||||
|
||||
|
||||
@ -73,9 +73,9 @@ class Hedgehog(Monster):
|
||||
"""
|
||||
A really mean hedgehog monster
|
||||
"""
|
||||
def __init__(self, strength: int = 3, maxhealth: int = 10,
|
||||
*args, **kwargs) -> None:
|
||||
super().__init__(name="hedgehog", strength=strength,
|
||||
def __init__(self, name: str = "hedgehog", strength: int = 3,
|
||||
maxhealth: int = 10, *args, **kwargs) -> None:
|
||||
super().__init__(name=name, strength=strength,
|
||||
maxhealth=maxhealth, *args, **kwargs)
|
||||
|
||||
|
||||
@ -83,9 +83,9 @@ class Rabbit(Monster):
|
||||
"""
|
||||
A rabbit monster
|
||||
"""
|
||||
def __init__(self, strength: int = 1, maxhealth: int = 15,
|
||||
*args, **kwargs) -> None:
|
||||
super().__init__(name="rabbit", strength=strength,
|
||||
def __init__(self, name: str = "rabbit", strength: int = 1,
|
||||
maxhealth: int = 15, *args, **kwargs) -> None:
|
||||
super().__init__(name=name, strength=strength,
|
||||
maxhealth=maxhealth, *args, **kwargs)
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ class TeddyBear(Monster):
|
||||
"""
|
||||
A cute teddybear monster
|
||||
"""
|
||||
def __init__(self, strength: int = 0, maxhealth: int = 50,
|
||||
*args, **kwargs) -> None:
|
||||
super().__init__(name="teddy_bear", strength=strength,
|
||||
def __init__(self, name: str = "teddy_bear", strength: int = 0,
|
||||
maxhealth: int = 50, *args, **kwargs) -> None:
|
||||
super().__init__(name=name, strength=strength,
|
||||
maxhealth=maxhealth, *args, **kwargs)
|
||||
|
Reference in New Issue
Block a user