Beispiel #1
0
    def validPerform(self, att, needTips):
        '''检查施法
		'''
        if att.hasApply("已复活"):
            if needTips:
                message.tips(att.getPID(), "被复活当前回合无法使用")
            return False
        return CustomPerform.validPerform(self, att, needTips)
Beispiel #2
0
    def validPerform(self, att, needTips):
        '''检查施法
		'''
        if att.hp <= int(att.hpMax * 0.5):
            if needTips:
                message.tips(att.getPID(), "只能在#C04当前生命值>50%#n时使用")
            return False
        return CustomPerform.validPerform(self, att, needTips)
Beispiel #3
0
    def afterAttack(self, att, vic, vicCast, dp, targetCount):
        CustomPerform.afterAttack(self, att, vic, vicCast, dp, targetCount)

        if hasattr(self, "moveDone"):
            return
        if dp <= 0:
            return
        if not att.inWar() or not vic.inWar():
            return
        if rand(100) >= self.configInfo["概率"]:
            return

        if not self.tryGetBuff(att, vic):
            self.tryRemoveBuff(att, vic)
        elif not self.tryRemoveBuff(att, vic):
            self.tryGetBuff(att, vic)

        if hasattr(self, "moveDone"):
            for func in att.getFuncList("onMoveDone"):
                func(att, vic, vicCast, dp, self.getAttackType())
Beispiel #4
0
 def afterAttack(self, att, vic, vicCast, dp, targetCount):
     CustomPerform.afterAttack(self, att, vic, vicCast, dp, targetCount)
     if dp > 0 and vic.inWar():
         bout = self.calBout(att, vic, self.buffId)
         buff.addOrReplace(vic, self.buffId, bout, att)
Beispiel #5
0
 def afterPerform(self, att, vicCast):
     CustomPerform.afterPerform(self, att, vicCast)
     if hasattr(self, "moveDone"):
         del self.moveDone
Beispiel #6
0
 def afterAttack(self, att, vic, vicCast, dp, targetCount):
     CustomPerform.afterAttack(self, att, vic, vicCast, dp, targetCount)
     if dp > 0 and not att.isDead() and not hasattr(self, "isContinue"):
         self.isContinue = True
         self.continuePerform(att, vic)
         del self.isContinue
Beispiel #7
0
    def afterAttack(self, att, vic, vicCast, dp, targetCount):
        CustomPerform.afterAttack(self, att, vic, vicCast, dp, targetCount)

        if dp > 0:
            mp = self.transCode(self.configInfo["真气"], att, vic)
            vic.addMP(-mp, att)
Beispiel #8
0
    def calDamage(self, att, vic, damRatio):
        '''计算伤害
		'''
        dam = CustomPerform.calDamage(self, att, vic, damRatio)
        return int(dam * self.configInfo["伤害系数"])