from dataclasses import dataclass @dataclass class Armor: name: str category: str ac: int potency: int = 0 resilient: int = 0 dex_cap: int = 99 # uncapped check_penalty: int = 0 speed_penalty: int = 0 strength_req: int = 0 @dataclass class Weapon: name: str category: str group: str main_die: int potency: int = 0 striking: int = 0 backstabber: bool = False fatal: int = 0 deadly: int = 0 agile: bool = False finesse: bool = False twin: bool = False propulsive: bool = False thrown: int = 0 def dice_count(self): return self.striking+1