hxp
1 天以前 49cfc84f644219fefb382215e1765a8fd81fde48
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnSkill.py
@@ -976,7 +976,8 @@
    #    return
    enhanceSkillID = curEffect.GetEffectValue(0)
    checkInStateList = curEffect.GetEffectValue(1)
    GameWorld.DebugLog("额外触发的技能: enhanceSkillID=%s,checkInStateList=%s" % (enhanceSkillID, checkInStateList))
    checkHeroJob = curEffect.GetEffectValue(2)
    GameWorld.DebugLog("额外触发的技能: enhanceSkillID=%s,checkInStateList=%s,checkHeroJob=%s" % (enhanceSkillID, checkInStateList, checkHeroJob))
    tagObjList = useSkill.GetTagObjList()
    
    enhanceSkillData = IpyGameDataPY.GetIpyGameData("Skill", enhanceSkillID)
@@ -1001,6 +1002,9 @@
                if not tagObj.CheckInState(checkInStateList):
                    GameWorld.DebugLog("    不在状态下不触发: tagID=%s not in state:%s" % (tagID, checkInStateList))
                    continue
            if checkHeroJob and checkHeroJob != tagObj.GetJob():
                GameWorld.DebugLog("    非目标职业不触发: tagID=%s,job=%s != %s" % (tagID, tagObj.GetJob(), checkHeroJob))
                continue
            if enhanceRate and enhanceRate != ChConfig.Def_MaxRateValue and not GameWorld.CanHappen(enhanceRate, ChConfig.Def_MaxRateValue):
                GameWorld.DebugLog("    概率不触发: tagID=%s,enhanceRate=%s" % (tagID, enhanceRate))
                continue
@@ -1014,14 +1018,21 @@
    
    # 只执行一次,防止群攻时额外触发多次
    GameWorld.DebugLog("重新锁定目标! enhanceSkillID=%s" % enhanceSkillID)
    if checkInStateList:
        inState = False
    if checkInStateList or checkHeroJob:
        inState, haveJob = False, False
        for tagObj in tagObjList:
            if tagObj.CheckInState(checkInStateList):
            tagID = tagObj.GetID()
            if tagID in effIgnoreObjIDList:
                continue
            if not inState and tagObj.CheckInState(checkInStateList):
                inState = True
                break
        if not inState:
            GameWorld.DebugLog("    没有目标在状态下不触发: tagObj not in state:%s" % str(checkInStateList))
            if not haveJob and checkHeroJob and checkHeroJob == tagObj.GetJob():
                haveJob = True
        if checkInStateList and not inState:
            GameWorld.DebugLog("    没有命中目标在状态下不触发: tagObj not in state:%s" % str(checkInStateList))
            return
        if checkHeroJob and not haveJob:
            GameWorld.DebugLog("    没有命中目标为目标职业不触发: checkHeroJob=%s" % checkHeroJob)
            return
    OnUseSkill(turnFight, curBatObj, enhanceSkillData, batType=ChConfig.TurnBattleType_Enhance, bySkill=useSkill)
    return