This repository has been archived on 2022-12-03. You can view files and clone it, but cannot push or open issues or pull requests.
texty/lib/item.py

9 lines
295 B
Python
Raw Normal View History

2022-05-04 10:16:30 +02:00
class Item:
def __init__(self,name:str,attack:int = 0,defense:int = 0) -> None:
self.name = name
if attack == 0 and defense > 0:
self.type = "armor"
else:
self.type = "weapon"
self.attack = attack
self.defense = defense