def atCall(self, cd): from bootcamp.Bootcamp import g_bootcamp bootcampPP = g_bootcamp.getPredefinedPiercingPower() if bootcampPP: cd.avoid() piercingPower = bootcampPP['data'][0][1] return piercingPower
def _computePiercingPowerRandomization(cls, shell): if constants.IS_BOOTCAMP_ENABLED: from bootcamp.Bootcamp import g_bootcamp if g_bootcamp.isRunning(): if g_bootcamp.getPredefinedPiercingPower(): return (100.0, 100.0) piercingPowerRandomization = shell.piercingPowerRandomization minPP = 100.0 * ( 1.0 - piercingPowerRandomization * cls._PP_RANDOM_ADJUSTMENT_MIN) maxPP = 100.0 * ( 1.0 + piercingPowerRandomization * cls._PP_RANDOM_ADJUSTMENT_MAX) return (minPP, maxPP)
def _computePiercingPowerAtDist(cls, ppDesc, dist, maxDist): if constants.IS_BOOTCAMP_ENABLED: from bootcamp.Bootcamp import g_bootcamp if g_bootcamp.isRunning(): bootcampPP = g_bootcamp.getPredefinedPiercingPower() if bootcampPP: return bootcampPP p100, p500 = ppDesc if dist <= 100.0: return p100 if dist < maxDist: return max(0.0, p100 + (p500 - p100) * (dist - 100.0) / 400.0) return 0.0
def atCall(self, cd): from bootcamp.Bootcamp import g_bootcamp if g_bootcamp.getPredefinedPiercingPower(): cd.avoid() return (100.0, 100.0)