コード例 #1
0
ファイル: artefacts.py プロジェクト: mahmoudimus/WOT-0.9.20.0
 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
コード例 #2
0
    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
コード例 #3
0
 def isAffectedSkillLearnt(self, vehicle=None):
     return isSkillLearnt(self.getAffectedSkillName(),
                          vehicle) if vehicle is not None else False