xdh
2018-08-27 2cbc8df215c9ed4a40ba3c4a1a017f6d585115ef
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -1562,8 +1562,21 @@
    if tick - defObj.GetDictByKey(ChConfig.Def_PlayerKey_SomersaultTime) < 500:
        return 0, ChConfig.Def_HurtType_Miss
    
    summonAtkPer = 1    # 召唤继承提高基础攻击力,取表
    if atkObj.GetGameObjType() == IPY_GameWorld.gotNPC and atkObj.GetGameNPCObjType() == IPY_GameWorld.gnotSummon:
        summonAtkPer = atkObj.GetDictByKey(ChConfig.Def_GameObjKey_InheritOwner)
        if summonAtkPer > 0:
            # 暴风雪类召唤兽转化为主人计算伤害
            atkObj = NPCCommon.GetSummonOwnerDetel(atkObj)
            if not atkObj:
                return 0, ChConfig.Def_HurtType_Miss
            summonAtkPer = summonAtkPer*1.0/ChConfig.Def_MaxRateValue
            #GameWorld.DebugLog("召唤兽取主人---------%s-%s-%s-%s"%(atkObj.GetID(), atkSkillPer, atkSkillValue, summonAtkPer))
    atkObjType = atkObj.GetGameObjType()
    defObjType = defObj.GetGameObjType()
    atkType = GetBattleType(atkObj, curSkill)
    happenState = happenState if happenState else SkillShell.GetHappenState(curSkill)
@@ -1666,8 +1679,9 @@
    rand = random.random()                #种子数 0~1
    
    #------- 攻击方
    aMinAtk = atkObj.GetMinAtk()        # 攻击方最小攻击
    aMaxAtk = atkObj.GetMaxAtk()        # 攻击方最大攻击
    aMinAtk = atkObj.GetMinAtk() * summonAtkPer        # 攻击方最小攻击
    aMaxAtk = atkObj.GetMaxAtk() * summonAtkPer       # 攻击方最大攻击
    aIceAtk = atkObj.GetIceAtk()        # 冰攻, 元素真伤, 玩家及NPC通用
    aIceAtk += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_AddIceAtk)
    #------- 防守方
@@ -1688,6 +1702,7 @@
        aDamagePer += PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_AddDamagePer)
        
        aDamagePerPVP = PlayerControl.GetDamagePerPVP(atkObj)     # 外层PVP伤害加成
        aFinalHurtPer = PlayerControl.GetFinalHurtPer(atkObj) # 最外层伤害加成
        aFinalHurt = PlayerControl.GetFinalHurt(atkObj)     # 最终固定伤害
        # 被动增加最终伤害
        aFinalHurt += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_AttackAddFinalValue)
@@ -1703,9 +1718,9 @@
            aSkillAtkRate += atkObj.GetSkillAtkRate()
        aDamagePer = 0      # 外层伤害加成
        aDamagePerPVP = 0   # 外层PVP伤害加成
        aFinalHurtPer = 0 # 最外层伤害加成
        aFinalHurt = NPCCommon.GetFinalHurt(atkObj) # 最终固定伤害
        aFightPower = NPCCommon.GetSuppressFightPower(atkObj)
        
    #防守方的类型
    if defObjType == IPY_GameWorld.gotPlayer:
@@ -1742,7 +1757,7 @@
            suppressFPFormula = hurtDist[suppressFormulaKeyFP]
            suppressValueFP = eval(FormulaControl.GetCompileFormula(suppressFormulaKeyFP, suppressFPFormula))
    
    # 境界压制百分比, 仅限PVP
    # 境界压制百分比
    SuppressValueRealmRate = 10000 # 默认值
    suppressRealm = 0
    if atkObjType == IPY_GameWorld.gotPlayer and defObjType == IPY_GameWorld.gotPlayer:
@@ -1797,6 +1812,10 @@
    hurtFormula = hurtDist[hurtFormulaKey]
    hurtValue = int(eval(FormulaControl.GetCompileFormula(hurtFormulaKey, hurtFormula)))
    
    if hurtType == ChConfig.Def_HurtType_Normal and SuppressValueRealmRate > 10000:
        # 存在压制
        return hurtValue, ChConfig.Def_HurtType_RealmSupress
    return hurtValue, hurtType