Example #1
0
    def afterPerform(self, att, vicCast):
        CustomPerform.afterPerform(self, att, vicCast)

        # 给hp最低的加血
        targetObj = None
        for w in att.getFriendList():
            if targetObj and targetObj.hp < w.hp:
                continue
            targetObj = w

        if not targetObj:
            return

        targetCount = 1
        damRatio = self.calDamageRatio(att, targetObj, targetObj, targetCount)
        dp = self.calCure(att, targetObj, targetObj, damRatio)
        targetObj.addHP(dp, att)

        # 随机给另一个加血
        info = att.hasApply("PF5618Info")
        if not info:
            return
        if rand(100) >= info["概率"]:
            return
        for w in att.getFriendList():
            if w is att:
                continue
            if w is targetObj:
                continue
            hp = dp * info["生命"] / 100
            w.addHP(hp, att)
            return
Example #2
0
 def afterPerform(self, att, vicCast):
     att.war.kickWarrior(att)
     CustomPerform.afterPerform(self, att, vicCast)
Example #3
0
 def afterPerform(self, att, vicCast):
     CustomPerform.afterPerform(self, att, vicCast)
     if att.isDead():
         return
     bout = self.calBout(att, att, self.buffId)
     buff.addOrReplace(att, self.buffId, bout, att)