def set_hp(self, hp): if type(hp) in [ types.IntType, types.FloatType]: self._DistributedCapturePoint__hp = hp else: self._DistributedCapturePoint__hp = 0