def attacked(self, ent, damages, kind): for eq in self.equipments: if kind is DamageKind.PHYSICAL: damages -= eq.defense elif kind == DamageKind.SPIRITUAL: damages -= eq.res return Movable.attacked(self, ent, damages, kind)
def attacked(self, ent, damages, kind): for eq in self.equipments: if kind == PHYSICAL: damages -= eq.get_def() elif kind == SPIRITUAL: damages -= eq.get_res() return Movable.attacked(self, ent, damages, kind)