def __getattr__(self, name): if name == 'stats': stats = Stats() for effect in self.effects: stats.add_stats(effect.stats) return stats else: raise AttributeError
def __getattr__(self, name): if name == 'stats': stats = Stats() for item in self.equipment: if self.equipment[item]: stats.add_stats(self.equipment[item].stats) return stats else: raise AttributeError
def get_stats(self): stats = Stats() for effect in self.effects: stats.add_stats(effect.stats) return stats