Repaired the use functionnality of the main item, as well as the load system for Armor items.
This commit is contained in:
@ -276,7 +276,6 @@ class Sword(Weapon):
|
||||
def __init__(self, name: str = "sword", price: int = 20,
|
||||
*args, **kwargs):
|
||||
super().__init__(name=name, price=price, *args, **kwargs)
|
||||
self.name = name
|
||||
|
||||
|
||||
class Armor(Item):
|
||||
@ -307,24 +306,27 @@ class Shield(Armor):
|
||||
Class of shield items, they can be equipped in the other hand.
|
||||
"""
|
||||
|
||||
def __init__(self, constitution: int = 2, *args, **kwargs):
|
||||
super().__init__(name="shield", constitution=constitution, *args, **kwargs)
|
||||
def __init__(self, name: str = "shield", constitution: int = 2,\
|
||||
price: int = 6, *args, **kwargs):
|
||||
super().__init__(name=name, constitution=constitution, *args, **kwargs)
|
||||
|
||||
class Helmet(Armor):
|
||||
"""
|
||||
Class of helmet items, they can be equipped on the head.
|
||||
"""
|
||||
|
||||
def __init__(self, constitution: int = 2, *args, **kwargs):
|
||||
super().__init__(name="helmet", constitution=constitution, *args, **kwargs)
|
||||
def __init__(self, name: str = "helmet", constitution: int = 2, \
|
||||
price: int = 8, *args, **kwargs):
|
||||
super().__init__(name=name, constitution=constitution, *args, **kwargs)
|
||||
|
||||
class Chestplate(Armor):
|
||||
"""
|
||||
Class of chestplate items, they can be equipped on the body.
|
||||
"""
|
||||
|
||||
def __init__(self, constitution: int = 4, *args, **kwargs):
|
||||
super().__init__(name="chestplate", constitution=constitution, *args, **kwargs)
|
||||
def __init__(self, name: str = "chestplate", constitution: int = 4,\
|
||||
price: int = 15, *args, **kwargs):
|
||||
super().__init__(name=name, constitution=constitution, *args, **kwargs)
|
||||
|
||||
|
||||
class BodySnatchPotion(Item):
|
||||
|
Reference in New Issue
Block a user