def isAffectedSkillLearnt(self, vehicle=None): """ Check whether descriptor.skillName is learnt if vehicle is provided. :param vehicle: instance of gui_item.Vehicle :return: boolean result """ if vehicle is not None: return isSkillLearnt(self.getAffectedSkillName(), vehicle) else: return False return
def vehicleEnemySpottingTime(self): kpiFactor = self.__kpi.getFactor('vehicleEnemySpottingTime') skillName = 'gunner_rancorous' skillDuration = 0.0 skillBattleBoosters = None for battleBoosters in self.__vehicle.battleBoosters.installed: if battleBoosters is not None and battleBoosters.getAffectedSkillName() == skillName: skillBattleBoosters = battleBoosters skillLearnt = isSkillLearnt(skillName, self.__vehicle) if skillLearnt and skillBattleBoosters is not None: skillDuration = skillBattleBoosters.descriptor.duration elif skillLearnt or skillBattleBoosters is not None: skillDuration = tankmen.getSkillsConfig().getSkill(skillName).duration return kpiFactor + skillDuration
def isAffectedSkillLearnt(self, vehicle=None): return isSkillLearnt(self.getAffectedSkillName(), vehicle) if vehicle is not None else False