xdh
2018-11-22 69af48cc1a7c0a6b71b3464b15bd8ffba4958b5c
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -58,6 +58,7 @@
import NetPackCommon
import FamilyRobBoss
import FBCommon
import ChNPC
import datetime
import math
@@ -1470,7 +1471,10 @@
    if npcType == IPY_GameWorld.ntElf:
        # ntElf 定义为人物使用对地持续性技能,并且人物可以移动,则需要ntElf做依托物的情况
        # 那么ntElf执行人物的伤害计算和被动触发效果
        owner = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer, attacker)
        # 2018-11-16 Elf 支持主人为NPC
        # owner = NPCCommon.GetSummonNPCOwner(IPY_GameWorld.gotPlayer, attacker)
        owner = NPCCommon.GetSummonOwnerDetel(attacker)
        return attacker if not owner else owner
    
    return attacker
@@ -1507,7 +1511,7 @@
            # 理论伤害一致, 多加点预算伤害避免计算误差
            #hurtValue = min(ShareDefine.Def_UpperLimit_DWord, hurtValue+10)
            #atkObj.SetDict(ChConfig.Def_PlayerKey_ClientMaxHurtValue, int(hurtValue*1.2))
            hurtValue = atkObj.GetMaxAtk()*atkSkillPer*10 + atkObj.GetSuperHit()   # 加入被动计算不准确改成估算
            hurtValue = atkObj.GetMaxAtk()*atkSkillPer*20   # 加入被动计算不准确改成估算
            
        clientValue, hurtType = SkillShell.GetClientHurtByObj(defObj.GetID(), defObjType)
        if clientValue <= hurtValue:
@@ -1531,15 +1535,16 @@
        if absorbHurt <= defObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShieldMax):
            maxValue = min(absorbHurt + absortValue, defObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShieldMax))
            defObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShield, maxValue)    # 记录护盾吸收的伤害用于爆炸
    # buff减少伤害百分比
    reducePer = PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(defObj, atkObj, None, ChConfig.TriggerType_ReduceHurtHPPer)
    # 被攻击被动技能特殊减免 受到单次伤害超过生命上限10%时候,减免50%伤害,CD10秒
    defObj.SetDict(ChConfig.Def_PlayerKey_curHurtValue, hurtValue)
    reducePer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(defObj, atkObj, None, ChConfig.TriggerType_ReduceHurtHPPer)
    hurtValue = int(hurtValue*(max(ChConfig.Def_MaxRateValue - reducePer, 0))*1.0/ChConfig.Def_MaxRateValue)
    
    # 斩杀,濒死等情况的处理
    if PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_AttackKill):
        # նɱ
@@ -1562,7 +1567,6 @@
        remainHP = min(dMaxHP, max(0, dHP - hurtValue)) # 剩余血量
    
    remainHP = int(remainHP)    #防范
    if defObjType == IPY_GameWorld.gotPlayer:
        GameObj.SetHP(defObj, remainHP, False)
            
@@ -1895,7 +1899,7 @@
        return 0, ChConfig.Def_HurtType_Miss
    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
@@ -2454,7 +2458,7 @@
# @param curObjDetel 对象实例
# @return 返回值无意义
# @remarks 理对象死亡逻辑
def DoLogic_ObjDead(curObjDetel):
def DoLogic_ObjDead(atkObj, curObjDetel, curSkill, tick):
    if GameObj.GetHP(curObjDetel) > 0:
        return
    
@@ -2465,6 +2469,10 @@
        return
    
    #---NPC处理---
    if not ChNPC.OnCheckCanDie(atkObj, curObjDetel, curSkill, tick):
        GameObj.SetHP(curObjDetel, 1)
        return
    npcControl = NPCCommon.NPCControl(curObjDetel)
    npcControl.SetKilled()
    return