10019 【砍树】回合战斗(增加神通部分技能支持;增加部分属性;优化伤血公式;)
1. 增加强化灵兽(属性ID 217)、弱化灵兽属性(属性ID 218);
2. 去除反击必命中设定;优化反击灵兽协同释放方式46支持配置是否重新进入技能CD;
3. 细化回合战斗伤血公式分类;技能表HurtType字段增加十位数表示原攻击类型(1-物理攻击;2-魔法攻击;新增3-额外攻击),个位数保留目前设定;
4. 增加xp道法攻击被动增伤,道法技能释放被动触发;
5. NPC支持反弹伤害;
6. 灵宠释放技能、灵宠攻击触发被动支持区分(每次、每只独立首次,所有灵宠共享首次)
7. 治疗支持强化治疗、弱化治疗属性;区分主角主动治疗、灵宠治疗;强化灵兽及弱化灵兽属性对灵宠治疗有效;
8. 技能释放方式增加 恢复妖气-47;扣除妖气-48;
14个文件已修改
6个文件已添加
484 ■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_46.py 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_47.py 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_48.py 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_5005.py 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_5006.py 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_5007.py 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_5008.py 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_5009.py 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -701,6 +701,8 @@
Def_Effect_SuckHPDefPer = 214 # 抗吸血比率
Def_Effect_CurePer = 215 # 强化治疗
Def_Effect_CureDefPer = 216 # 弱化治疗
Def_Effect_PetStrengthenPer = 217 # 强化灵兽
Def_Effect_PetWeakenPer = 218 # 弱化灵兽
#增加%d物理伤害值,其中a值为伤害值
Def_Effect_AddAtk = 1005
@@ -1077,7 +1079,9 @@
CDBPlayerRefresh_Xiantao, # 仙桃  254
CDBPlayerRefresh_CurePer, # 强化治疗 255
CDBPlayerRefresh_CureDefPer, # 弱化治疗 256
) = range(146, 257)
CDBPlayerRefresh_PetStrengthenPer, # 弱化灵兽 257
CDBPlayerRefresh_PetWeakenPer, # 弱化灵兽 258
) = range(146, 259)
TYPE_Price_Gold_Paper_Money = 5    # 金钱类型,(先用礼券,再用金子)
TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
@@ -1195,7 +1199,7 @@
GameFuncID_FaQi = 199           # 法器
GameFuncID_LianTi = 207         # 炼体
GameFuncID_Championship = 210   # 排位
GameFuncID_MineArea = 223       # 福地
GameFuncID_MineArea = 223       # 福地
# 以下为暂时无用的
GameFuncID_Truck = 33           # 运镖
GameFuncID_RunDaily = 34        # 日常跑环
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -487,7 +487,8 @@
#  @remarks 获取攻击类型
def GetBattleType(attack, attackUseSkill):
    # GetHurtType用法改成 pvp pve标识
    return IPY_GameWorld.ghtPhy
    return SkillCommon.GetBattleType(attackUseSkill)
    #return IPY_GameWorld.ghtPhy
#    #---技能攻击, 读表获取攻击类型---
#    if attackUseSkill != None:
#        return attackUseSkill.GetHurtType()
@@ -2121,10 +2122,11 @@
        mustHit = True
        GameWorld.DebugLog("        灵宠必命中")
        petNPCOwner = PetControl.GetPetNPCOwner(atkObj)
    if turnFightTimeline:
        if atkObj.GetDictByKey(ChConfig.Def_Obj_Dict_TurnBattleType) == ChConfig.TurnBattleType_AtkBack:
            mustHit = True
            GameWorld.DebugLog("        反击必命中: atkID=%s,defID=%s" % (atkObj.GetID(), defObj.GetID()))
    #去除反击必命中设定
    #if turnFightTimeline:
    #    if atkObj.GetDictByKey(ChConfig.Def_Obj_Dict_TurnBattleType) == ChConfig.TurnBattleType_AtkBack:
    #        mustHit = True
    #        GameWorld.DebugLog("        反击必命中: atkID=%s,defID=%s" % (atkObj.GetID(), defObj.GetID()))
    if IsHappenStateByType(happenState, ChConfig.Def_Skill_HappenState_HitOn):
        mustHit = True
        GameWorld.DebugLog("        技能必命中: skillID=%s" % skillID)
@@ -2204,7 +2206,9 @@
    # 印记增加的技能伤害,用于飘字
    atkSkillPerYinji = PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_AttackAddSkillPerYinji)
    atkSkillPer += atkSkillPerYinji
    if curSkill and curSkill.GetXP():
        atkSkillPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_XPAttackAddSkillPer)
    if hurtType == ChConfig.Def_HurtType_SuperHit:
        # 暴击增加技能伤害
        atkSkillPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_SuperHitSkillPer)
@@ -2232,7 +2236,16 @@
        aMinAtk = petNPCOwner.GetMinAtk() * summonAtkPer        # 攻击方最小攻击
        aMaxAtk = petNPCOwner.GetMaxAtk() * summonAtkPer       # 攻击方最大攻击
        #GameWorld.DebugLog("灵宠攻击,直接取主人攻击力: %s ~ %s,  自己: %s ~ %s" % (aMinAtk, aMaxAtk, atkObj.GetMinAtk(), atkObj.GetMaxAtk()))
    enemyObj = None
    aPetStrengthenPer, dPetWeakenPer = 0, 0 # 强化灵兽, 弱化灵兽
    if turnFightTimeline:
        if petNPCOwner:
            aPetStrengthenPer = GameObj.GetPetStrengthenPer(petNPCOwner)
            enemyObj = TurnAttack.GetEnemyObj(petNPCOwner)
            if enemyObj:
                dPetWeakenPer = GameObj.GetPetWeakenPer(enemyObj)
    aIceAtk = atkObj.GetIceAtk()        # 冰攻, 元素真伤, 玩家及NPC通用
    aIceAtk += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_AddIceAtk)
    #------- 防守方
@@ -2367,10 +2380,10 @@
        
    # 回合战斗
    if turnFightTimeline:
        hurtFormulaKey = "TurnFight"
        hurtFormulaKey = "TurnFight_%sV%s_%s" % (atkStateMark, defStateMark, atkType)
        
    if hurtFormulaKey not in hurtDist:
        GameWorld.ErrLog("CalcAttackValue.txt 伤害公式未配置, key=%s" % (hurtFormulaKey))
        GameWorld.ErrLog("CalcAttackValue.txt 伤害公式未配置, key=%s, skillID=%s" % (hurtFormulaKey, skillID))
        return 0, ChConfig.Def_HurtType_Miss
    
    if atkwargs.get('hurtFormulaKey', None):
@@ -2456,8 +2469,9 @@
    CalcBounceHP(atkObj, defObj, resultHurtType.LostHP, resultHurtType.HurtType, curSkill)
    #吸血
    CalcSuckBlood(atkObj, defObj, curSkill, resultHurtType, tick)
    if atkObj.GetGameObjType() == IPY_GameWorld.gotPlayer:
    turnFightTimeline = atkObj.GetDictByKey(ChConfig.Def_Obj_Dict_TurnFightTimeline)
    if atkObj.GetGameObjType() == IPY_GameWorld.gotPlayer or turnFightTimeline:
        # 记录最后一次伤害值
        GameObj.SetLastHurtValue(atkObj, resultHurtType.RealHurtHP)
        if defObj.GetGameObjType() == IPY_GameWorld.gotNPC:
@@ -2531,37 +2545,35 @@
    if not atkObj.GetCanAttack():
        return
    
    if GameObj.GetHP(atkObj) <= 1:
        return
    #只有玩家会反弹
    defObjType = defObj.GetGameObjType()
    if defObjType != IPY_GameWorld.gotPlayer:
        return
    #boss境界压制不反弹
    atkObjType = atkObj.GetGameObjType()
    aRealmLV, dRealmLV = GetPVERealmLVs(atkObj, defObj, atkObjType, defObjType) # 获取境界
    if atkObjType == IPY_GameWorld.gotNPC and ChConfig.IsGameBoss(atkObj) and aRealmLV > dRealmLV:
        aRealmIpyData = IpyGameDataPY.GetIpyGameDataNotLog("Realm", aRealmLV)
        dRealmIpyData = IpyGameDataPY.GetIpyGameDataNotLog("Realm", dRealmLV)
        aRealmLVLarge = aRealmIpyData.GetLvLarge() if aRealmIpyData else 0
        dRealmLVLarge = dRealmIpyData.GetLvLarge() if dRealmIpyData else 0
        if aRealmLVLarge > dRealmLVLarge:
            #GameWorld.DebugLog("boss大境界压制玩家,不反弹: aRealmLV=%s,dRealmLV=%s,aRealmLVLarge=%s,dRealmLVLarge=%s" % (aRealmLV, dRealmLV, aRealmLVLarge, dRealmLVLarge))
            return
    if defObjType == IPY_GameWorld.gotPlayer:
        #boss境界压制不反弹
        atkObjType = atkObj.GetGameObjType()
        aRealmLV, dRealmLV = GetPVERealmLVs(atkObj, defObj, atkObjType, defObjType) # 获取境界
        if atkObjType == IPY_GameWorld.gotNPC and ChConfig.IsGameBoss(atkObj) and aRealmLV > dRealmLV:
            aRealmIpyData = IpyGameDataPY.GetIpyGameDataNotLog("Realm", aRealmLV)
            dRealmIpyData = IpyGameDataPY.GetIpyGameDataNotLog("Realm", dRealmLV)
            aRealmLVLarge = aRealmIpyData.GetLvLarge() if aRealmIpyData else 0
            dRealmLVLarge = dRealmIpyData.GetLvLarge() if dRealmIpyData else 0
            if aRealmLVLarge > dRealmLVLarge:
                #GameWorld.DebugLog("boss大境界压制玩家,不反弹: aRealmLV=%s,dRealmLV=%s,aRealmLVLarge=%s,dRealmLVLarge=%s" % (aRealmLV, dRealmLV, aRealmLVLarge, dRealmLVLarge))
                return
        
    if GameObj.GetHP(atkObj) == 1:
        return
    ##摸怪次数判断
    #if not CheckAttackNPCByCnt(defObj, atkObj, False):
    #    GameWorld.DebugLog("不能攻击,不反弹")
    #    return
    #杀怪次数判断
    if not CheckKillNPCByCnt(defObj, atkObj, False) and not NPCHurtManager.IsAssistPlayer(defObj.GetPlayerID(), atkObj):
        #GameWorld.DebugLog("不能攻击,不反弹")
        return
        ##摸怪次数判断
        #if not CheckAttackNPCByCnt(defObj, atkObj, False):
        #    GameWorld.DebugLog("不能攻击,不反弹")
        #    return
        #杀怪次数判断
        if not CheckKillNPCByCnt(defObj, atkObj, False) and not NPCHurtManager.IsAssistPlayer(defObj.GetPlayerID(), atkObj):
            #GameWorld.DebugLog("不能攻击,不反弹")
            return
    
    #没有反弹退出
    defObj_DamageBackRate = defObj.GetDamageBackRate()
    defObj_DamageBackRate = GameObj.GetDamageBackRate(defObj)
    defObj_DamageBackRate += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(defObj, None, None, ChConfig.TriggerType_BounceHPPer)
    defObj_DamageBackRate += PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_BounceHPPerByAttacker)
    
@@ -2570,6 +2582,9 @@
    bounceHP  = int(bounceHP + PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(defObj, None, None, ChConfig.TriggerType_BounceHP))
    if bounceHP <= 0:
        return
    skillID = curSkill.GetSkillID() if curSkill else 0
    GameWorld.DebugLog("        反弹: defID=%s,atkID=%s,skillID=%s,hurtValue=%s,defObj_DamageBackRate=%s,bounceHP=%s"
                       % (defObj.GetID(), atkObj.GetID(), skillID, hurtValue, defObj_DamageBackRate, bounceHP))
    
    bounceHP = bounceHP if bounceHP < GameObj.GetHP(atkObj) else GameObj.GetHP(atkObj) - 1
    
@@ -2597,7 +2612,7 @@
        if defObjType == IPY_GameWorld.gotPlayer:
            OnPVPDamage(defObj, bounceHP, atkObj, "Player bounce Player") 
        
    ChangeHPView(atkObj, defObj, 0, bounceHP, ChConfig.Def_HurtType_BounceHurt)
    ChangeHPView(atkObj, defObj, skillID, bounceHP, ChConfig.Def_HurtType_BounceHurt)
    return
@@ -2656,12 +2671,12 @@
    suckHPTotal = suckHPByPer + suckHP
    if suckHPTotal <= 0:
        return
    skillID = curSkill.GetSkillID() if curSkill else 0
    GameObj.SetHP(atkObj, min(GameObj.GetMaxHP(atkObj), GameObj.GetHP(atkObj) + suckHPTotal), False)    
    
    ChangeHPView(atkObj, None, 0, suckHPTotal, ChConfig.Def_HurtTYpe_Recovery)
    GameWorld.DebugLog("        吸血: atkID=%s,defID=%s,最终比例=%s(%s-%s),伤血=%s,总吸血=%s(%s+%s),HP=%s"
                       % (atkObj.GetID(), defObj.GetID(), suckHPPerFinal, suckHPPer, suckHPDefPer, hurtValue, suckHPTotal, suckHPByPer, suckHP, GameObj.GetHP(atkObj)))
    ChangeHPView(atkObj, None, skillID, suckHPTotal, ChConfig.Def_HurtTYpe_Recovery)
    GameWorld.DebugLog("        吸血: atkID=%s,defID=%s,最终比例=%s(%s-%s),伤血=%s,总吸血=%s(%s+%s),HP=%s,skillID=%s"
                       % (atkObj.GetID(), defObj.GetID(), suckHPPerFinal, suckHPPer, suckHPDefPer, hurtValue, suckHPTotal, suckHPByPer, suckHP, GameObj.GetHP(atkObj), skillID))
    return
## 攻击者回蓝逻辑
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/BaseAttack.py
@@ -1708,6 +1708,9 @@
        # TriggerType_AttackOver 和 TriggerType_AttackOverPassive 根据触发的被动buff效果顺序而定
        PassiveBuffEffMng.OnPassiveSkillTrigger(attacker, defender, curSkill, ChConfig.TriggerType_AttackOverPassive, tick)
        
        if curSkill and curSkill.GetXP():
            PassiveBuffEffMng.OnPassiveSkillTrigger(attacker, defender, curSkill, ChConfig.TriggerType_XPAttackOver, tick)
    else:
        PassiveBuffEffMng.OnPassiveSkillTrigger(attacker, defender, curSkill, ChConfig.TriggerType_SkillOverNoAttack, tick)
    
@@ -1717,7 +1720,18 @@
    
    if PetControl.IsPetNPC(attacker):
        petOwner = PetControl.GetPetNPCOwner(attacker)
        petOwner.SetDict("useSkillPetID", attacker.GetID())
        PassiveBuffEffMng.OnPassiveSkillTrigger(petOwner, defender, curSkill, ChConfig.TriggerType_SkillSuccessPet, tick)
        if isAtkSkill:
            PassiveBuffEffMng.OnPassiveSkillTrigger(petOwner, defender, curSkill, ChConfig.TriggerType_AttackOverPet, tick)
        # 更新状态放最后
        attacker.SetDict(ChConfig.Def_Obj_Dict_TurnSkillSuccessPetState, 1)
        petOwner.SetDict(ChConfig.Def_Obj_Dict_TurnSkillSuccessPetState, 1)
        if isAtkSkill:
            attacker.SetDict(ChConfig.Def_Obj_Dict_TurnAttackOverPetState, 1)
            petOwner.SetDict(ChConfig.Def_Obj_Dict_TurnAttackOverPetState, 1)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
@@ -395,15 +395,6 @@
        return
    return GameWorld.FindNPCByID(tagID)
def GetEnemyCureDefPer(gameObj):
    ## 获取敌对方弱化治疗值
    tagObj = GetEnemyObj(gameObj)
    if not tagObj:
        return 0
    cureDefPer = GameObj.GetCureDefPer(tagObj)
    #其他的...
    return cureDefPer
def GetRebornTypeInfo(gameObj):
    ''' 获取可复活的方式信息
    @return: None-代表不可复活
@@ -527,6 +518,8 @@
    gameObj.SetDict(ChConfig.Def_Obj_Dict_TurnRebornCount, 0)
    gameObj.SetDict(ChConfig.Def_Obj_Dict_TurnTotalHurt, 0)
    gameObj.SetDict(ChConfig.Def_Obj_Dict_TurnTotalHurtEx, 0)
    gameObj.SetDict(ChConfig.Def_Obj_Dict_TurnSkillSuccessPetState, 0)
    gameObj.SetDict(ChConfig.Def_Obj_Dict_TurnAttackOverPetState, 0)
    SetTimeline(gameObj, 1, 0)
    faction = GameObj.GetFaction(gameObj)
    GameObj.SetHPFull(gameObj, True)
@@ -575,9 +568,11 @@
    return
def __logGameObjAttr(gameObj):
    GameWorld.DebugLog("    HP=%s/%s,atk=%s~%s,Def=%s,atkSpeed=%s,XP=%s/%s"
    GameWorld.DebugLog("    HP=%s/%s,atk=%s~%s,Def=%s,atkSpeed=%s"
                       % (GameObj.GetHP(gameObj), GameObj.GetMaxHP(gameObj), gameObj.GetMinAtk(), gameObj.GetMaxAtk(),
                          gameObj.GetDef(), GameObj.GetAtkSpeed(gameObj), GameObj.GetXP(gameObj), GameObj.GetMaxXP(gameObj)))
                          gameObj.GetDef(), GameObj.GetAtkSpeed(gameObj)))
    if not gameObj.GetDictByKey(ChConfig.Def_Obj_Dict_TurnFightMainRolePlace):
        return
    GameWorld.DebugLog("    闪(%s,%s),暴(%s,%s),晕(%s,%s),连(%s,%s),反(%s,%s),吸(%s,%s)" 
                       % (GameObj.GetMissRate(gameObj), GameObj.GetMissDefRate(gameObj),
                          GameObj.GetSuperHitRate(gameObj), GameObj.GetSuperHitRateReduce(gameObj),
@@ -586,6 +581,9 @@
                          GameObj.GetAtkBackRate(gameObj), GameObj.GetAtkBackDefRate(gameObj),
                          GameObj.GetSuckHPPer(gameObj), GameObj.GetSuckHPDefPer(gameObj),
                          ))
    GameWorld.DebugLog("    XP=%s/%s,强疗=%s,弱疗=%s,强灵=%s,弱灵=%s"
                       % (GameObj.GetXP(gameObj), GameObj.GetMaxXP(gameObj), GameObj.GetCurePer(gameObj), GameObj.GetCureDefPer(gameObj),
                          GameObj.GetPetStrengthenPer(gameObj), GameObj.GetPetWeakenPer(gameObj)))
    return
def TurnFightObjPerTurnStart(gameObj, tagObj, turnNum, tick):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -79,7 +79,7 @@
Def_BuffValue_Count = 3     # buff记录的value个数
#游戏对象属性--------------------------------------------
Def_Calc_AllAttrType_MAX = 172
Def_Calc_AllAttrType_MAX = 174
#基本属性BUFF计算,顺序与 ObjProperty_AttrByIndex 对应,同时也为buff效果ID同步通知策划
TYPE_Calc_AttrList = (
TYPE_Calc_Metal,                        # 金 1
@@ -265,6 +265,8 @@
TYPE_Calc_SuckHPPer,                     # 吸血比率
TYPE_Calc_SuckHPDefPer,                  # 抗吸血比率 170
TYPE_Calc_CureDefPer,                    # 弱化对方治疗效果
TYPE_Calc_PetStrengthenPer,              # 强化灵兽
TYPE_Calc_PetWeakenPer,                  # 弱化灵兽
) = range(1, Def_Calc_AllAttrType_MAX)
## 支持大数值属性,超过20E
@@ -3094,6 +3096,8 @@
Def_Obj_Dict_TurnAtkAddXPCount = 'TurnAtkAddXPCount' # 每回合攻击已增加XP次数
Def_Obj_Dict_TurnXPFullTimeline = 'TurnXPFullTimeline' # XP满时的回合时间点
Def_Obj_Dict_TurnXPUseState = 'TurnXPUseState' # XP使用状态;0-不可用;1-可用;2-已用
Def_Obj_Dict_TurnSkillSuccessPetState = 'TurnSkillSuccessPetState' # 回合制灵宠是否已使用过技能,主人及灵宠均有该值,独立算
Def_Obj_Dict_TurnAttackOverPetState = 'TurnAttackOverPetState' # 回合制灵宠是否已攻击过,主人及灵宠均有该值,独立算
#---NPC字典-------
#每道龙卷风最终坐标
@@ -4548,6 +4552,8 @@
AttrName_SuckHPDefPer = "SuckHPDefPer"  # 抗吸血比率
AttrName_CurePer = "CurePer"  # 强化治疗
AttrName_CureDefPer = "CureDefPer"  # 弱化治疗
AttrName_PetStrengthenPer = "PetStrengthenPer"  # 强化灵兽
AttrName_PetWeakenPer = "PetWeakenPer"  # 弱化灵兽
#物品效果(ID或指定类型)对应的属性计算信息 {效果(ID/指定类型):[[属性索引, ...], 是否基础属性,(非)线性]}
#对应 Def_Calc_AllAttrType_MAX
@@ -4748,6 +4754,8 @@
    AttrName_SuckHPDefPer:[[TYPE_Calc_SuckHPDefPer], False, TYPE_Linear],
    ShareDefine.Def_Effect_CurePer:[[TYPE_Calc_CurePer], False, TYPE_Linear],
    ShareDefine.Def_Effect_CureDefPer:[[TYPE_Calc_CureDefPer], False, TYPE_Linear],
    ShareDefine.Def_Effect_PetStrengthenPer:[[TYPE_Calc_PetStrengthenPer], False, TYPE_Linear],
    ShareDefine.Def_Effect_PetWeakenPer:[[TYPE_Calc_PetWeakenPer], False, TYPE_Linear],
    
    #战斗非线性
    ShareDefine.Def_Effect_SuperHitPer:[[TYPE_Calc_SuperHit], False, TYPE_NoLinear],
@@ -5120,7 +5128,10 @@
TriggerType_AtkBackBef, # 反击前触发 94
TriggerType_AtkBackAft, # 反击后触发 95
TriggerType_SkillSuccessPet, # 灵宠技能释放成功都可触发 96
) = range(1, 97)
TriggerType_AttackOverPet, # 灵宠攻击(对敌技能)后被动技能被触发 97
TriggerType_XPAttackAddSkillPer,  # 道法攻击增加伤害百分比 98
TriggerType_XPAttackOver,  # 道法攻击后触发99
) = range(1, 100)
#不可以佩戴翅膀的地图
@@ -5775,6 +5786,14 @@
Def_BattleRelationType_CommNoBoss,   # 除了(指定)BOSS,可对其释放技能,但是无实际效果
) = range(0, 4)
#IPY_GameWorld.ghtPhy
# 攻击类型
(
ghtPhy, # 物理攻击 1
ghtMag, # 魔法攻击 2
ghtEx, # 额外攻击 3
) = range(1, 1 + 3)
# 经验倍率限制类型
(
ExpRateLimitType_Recover, # 资源找回
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameObj.py
@@ -232,6 +232,9 @@
    SetAtkBackHP(gameObj, 0)
    SetCurePer(gameObj, 0)
    SetCureDefPer(gameObj, 0)
    SetPetStrengthenPer(gameObj, 0)
    SetPetWeakenPer(gameObj, 0)
    SetDamageBackRate(gameObj, 0)
    return
def GetPetDamPer(gameObj): return gameObj.GetDictByKey(ChConfig.Def_PlayerKey_AttrPetDamPer)
@@ -405,6 +408,33 @@
        PlayerControl.SendPropertyRefresh(gameObj, ShareDefine.CDBPlayerRefresh_CureDefPer, value)
    return
def GetPetStrengthenPer(gameObj): return gameObj.GetDictByKey(ChConfig.AttrName_PetStrengthenPer)
def SetPetStrengthenPer(gameObj, value):
    ## 强化灵兽
    gameObj.SetDict(ChConfig.AttrName_PetStrengthenPer, value)
    if gameObj.GetGameObjType() == IPY_GameWorld.gotPlayer:
        PlayerControl.SendPropertyRefresh(gameObj, ShareDefine.CDBPlayerRefresh_PetStrengthenPer, value)
    return
def GetPetWeakenPer(gameObj): return gameObj.GetDictByKey(ChConfig.AttrName_PetWeakenPer)
def SetPetWeakenPer(gameObj, value):
    ## 弱化灵兽
    gameObj.SetDict(ChConfig.AttrName_PetWeakenPer, value)
    if gameObj.GetGameObjType() == IPY_GameWorld.gotPlayer:
        PlayerControl.SendPropertyRefresh(gameObj, ShareDefine.CDBPlayerRefresh_PetWeakenPer, value)
    return
def GetDamageBackRate(gameObj):
    if gameObj.GetGameObjType() == IPY_GameWorld.gotPlayer:
        return gameObj.GetDamageBackRate()
    return gameObj.GetDictByKey(ChConfig.AttrName_DamBackPer)
def SetDamageBackRate(gameObj, value):
    ## 反弹伤害
    if gameObj.GetGameObjType() == IPY_GameWorld.gotPlayer:
        gameObj.SetDamageBackRate(value)
    else:
        gameObj.SetDict(ChConfig.AttrName_DamBackPer, value)
    return
def NotifyObjInfoRefresh(gameObj, refreshType, value):
    ##0418通知对象属性刷新
    sendPack = ChNetSendPack.tagObjInfoRefresh()
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -4201,6 +4201,8 @@
        GameObj.SetSuckHPDefPer(curNPC, PropDict.get("SuckHPDefPer", 0))
        GameObj.SetCurePer(curNPC, PropDict.get("CurePer", 0))
        GameObj.SetCureDefPer(curNPC, PropDict.get("CureDefPer", 0))
        GameObj.SetPetStrengthenPer(curNPC, PropDict.get("PetStrengthenPer", 0))
        GameObj.SetPetWeakenPer(curNPC, PropDict.get("PetWeakenPer", 0))
        GameObj.SetFinalHurtPer(curNPC, PropDict.get("FinalHurtPer", 0))
        GameObj.SetFinalHurtReducePer(curNPC, PropDict.get("FinalHurtReducePer", 0))
        
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerViewCacheTube.py
@@ -231,6 +231,8 @@
    curPlayerPropDict["PVPAtkBackHP"] = PlayerControl.GetPVPAtkBackHP(curPlayer) # PVP攻击回血
    curPlayerPropDict["CurePer"] = GameObj.GetCurePer(curPlayer) # 强化治疗
    curPlayerPropDict["CureDefPer"] = GameObj.GetCureDefPer(curPlayer) # 弱化治疗
    curPlayerPropDict["PetStrengthenPer"] = GameObj.GetPetStrengthenPer(curPlayer) # 强化灵兽
    curPlayerPropDict["PetWeakenPer"] = GameObj.GetPetWeakenPer(curPlayer) # 弱化灵兽
    
    #-----------
    #扩展属性缓存
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -701,6 +701,8 @@
Def_Effect_SuckHPDefPer = 214 # 抗吸血比率
Def_Effect_CurePer = 215 # 强化治疗
Def_Effect_CureDefPer = 216 # 弱化治疗
Def_Effect_PetStrengthenPer = 217 # 强化灵兽
Def_Effect_PetWeakenPer = 218 # 弱化灵兽
#增加%d物理伤害值,其中a值为伤害值
Def_Effect_AddAtk = 1005
@@ -1077,7 +1079,9 @@
CDBPlayerRefresh_Xiantao, # 仙桃  254
CDBPlayerRefresh_CurePer, # 强化治疗 255
CDBPlayerRefresh_CureDefPer, # 弱化治疗 256
) = range(146, 257)
CDBPlayerRefresh_PetStrengthenPer, # 弱化灵兽 257
CDBPlayerRefresh_PetWeakenPer, # 弱化灵兽 258
) = range(146, 259)
TYPE_Price_Gold_Paper_Money = 5    # 金钱类型,(先用礼券,再用金子)
TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py
@@ -91,7 +91,7 @@
   [lambda curObj:PlayerControl.GetMaxProDef(curObj), lambda curObj, value:PlayerControl.SetMaxProDef(curObj, value), ShareDefine.CDBPlayerRefresh_MaxProDef, 1, 0],  # 最大防护值
   [lambda curObj:PlayerControl.GetProDefHPPer(curObj), lambda curObj, value:PlayerControl.SetProDefHPPer(curObj, value), ShareDefine.CDBPlayerRefresh_ProDefHPPer, 1, 0], # 生命上限换算为防护值的百分比
   [lambda curObj:PlayerControl.GetProDefAbsorb(curObj), lambda curObj, value:PlayerControl.SetProDefAbsorb(curObj, value), ShareDefine.CDBPlayerRefresh_ProDefAbsorb, 1, 0],            # 防护值吸收伤害比率
   [lambda curObj:curObj.GetDamageBackRate(), lambda curObj, value:curObj.SetDamageBackRate(value), IPY_PlayerDefine.CDBPlayerRefresh_DamageBackRate, 1, 0],                                    # 反伤百分比
   [lambda curObj:GameObj.GetDamageBackRate(curObj), lambda curObj, value:GameObj.SetDamageBackRate(curObj, value), IPY_PlayerDefine.CDBPlayerRefresh_DamageBackRate, 1, 0],                                    # 反伤百分比
   [lambda curObj:PlayerControl.GetDamChanceDef(curObj), lambda curObj, value:PlayerControl.SetDamChanceDef(curObj, value), ShareDefine.CDBPlayerRefresh_DamChanceDef, 1, 0],            # 20%的概率抵御伤害比率
   [lambda curObj:PlayerControl.GetShieldMPCostRate(curObj), lambda curObj, value:PlayerControl.SetShieldMPCostRate(curObj, value), 0, 0, 0],    # 魔法盾伤害吸收蓝耗比率
   [lambda curObj:GameObj.GetFaintRate(curObj), lambda curObj, value:GameObj.SetFaintRate(curObj, value), ShareDefine.CDBPlayerRefresh_FaintRate, 1, 0],                  # 触发击晕
@@ -211,6 +211,8 @@
   [lambda curObj:GameObj.GetSuckHPPer(curObj), lambda curObj, value:GameObj.SetSuckHPPer(curObj, value), ShareDefine.CDBPlayerRefresh_SuckHPPer, 1, 0],    # 吸血比率
   [lambda curObj:GameObj.GetSuckHPDefPer(curObj), lambda curObj, value:GameObj.SetSuckHPDefPer(curObj, value), ShareDefine.CDBPlayerRefresh_SuckHPDefPer, 1, 0],    # 抗吸血比率
   [lambda curObj:GameObj.GetCureDefPer(curObj), lambda curObj, value:GameObj.SetCureDefPer(curObj, value), ShareDefine.CDBPlayerRefresh_CureDefPer, 1, 0],          # 弱化对方治疗
   [lambda curObj:GameObj.GetPetStrengthenPer(curObj), lambda curObj, value:GameObj.SetPetStrengthenPer(curObj, value), ShareDefine.CDBPlayerRefresh_PetStrengthenPer, 1, 0],          # 强化灵兽
   [lambda curObj:GameObj.GetPetWeakenPer(curObj), lambda curObj, value:GameObj.SetPetWeakenPer(curObj, value), ShareDefine.CDBPlayerRefresh_PetWeakenPer, 1, 0],          # 弱化灵兽
]
## 通过索引获得属性值
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -1253,11 +1253,7 @@
        # 禁止治疗
        return
    
    # 治疗加成
    curePer = GameObj.GetCurePer(curObj) + ChConfig.Def_MaxRateValue
    curePerReduce = TurnAttack.GetEnemyCureDefPer(curObj) # 弱化治疗,取对方的
    curePerFinal = max(0, curePer - curePerReduce)
    addValueFianl = int(addValue*curePerFinal*1.0/ChConfig.Def_MaxRateValue)
    addValueFianl = addValue
    
    maxHP = GameObj.GetMaxHP(curObj)
    
@@ -1292,8 +1288,8 @@
    if isNotify:
        AttackCommon.ChangeHPView(curObj, curObj, skillTypeID, addValueFianl, ChConfig.Def_HurtTYpe_Recovery)
        
    GameWorld.DebugLog("        治疗: curID=%s,skillTypeID=%s,curePerFinal=%s(%s-%s),addValue=%s,addValueFianl=%s,HP=%s"
                       % (curObj.GetID(), skillTypeID, curePerFinal, curePer, curePerReduce, addValue, addValueFianl, remainHP))
    GameWorld.DebugLog("        治疗: curID=%s,skillTypeID=%s,addValue=%s,addValueFianl=%s,HP=%s"
                       % (curObj.GetID(), skillTypeID, addValue, addValueFianl, remainHP))
    return addValueFianl
## 直接扣血不走公式
@@ -1974,11 +1970,21 @@
    
    return
def GetBattleType(curSkill):
    ## 攻击类型
    if not curSkill:
        return ChConfig.ghtPhy
    battleType = curSkill.GetHurtType() / 10
    if not battleType:
        # 没有配置,默认物理攻击
        return ChConfig.ghtPhy
    return battleType
def GetSkillBattleType(curSkill):
    if not curSkill:
        return ChConfig.Def_BattleRelationType_Comm
    #0通哟  1 PVP类型  2PVE类型  
    return curSkill.GetHurtType()
    return curSkill.GetHurtType() % 10
## 检查技能是否为被动技能, 用于控制不可释放技能
def isPassiveSkill(curSkill):
@@ -2245,21 +2251,47 @@
    #获得技能的计算参数值
    if cureType == ChConfig.Def_Cure_PHY:
        # 根据敏捷,力量差值及效果系数计算恢复比例
        skillPer = max(0, userObj.GetPHY() - userObj.GetSTR()) / float(curSkill.GetEffect(0).GetEffectValue(0))
        skillPer = max(0, userObj.GetPHY() - userObj.GetSTR()) / float(curSkill.GetEffect(0).GetEffectValue(0)) * ChConfig.Def_MaxRateValue
        GameWorld.DebugLog("英勇复苏: 敏=%s,力=%s,skillPer=%s" % (userObj.GetPHY(), userObj.GetSTR(), skillPer))
    else: 
        skillPer = curSkill.GetEffect(0).GetEffectValue(0) / float(ChConfig.Def_MaxRateValue)
        skillPer = curSkill.GetEffect(0).GetEffectValue(0)
    #技能附加
    skillValue = curSkill.GetEffect(0).GetEffectValue(1)
    
    skillPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(userObj, None, curSkill, ChConfig.TriggerType_AddHP)/float(ChConfig.Def_MaxRateValue)
    skillPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(userObj, None, curSkill, ChConfig.TriggerType_AddHP)
    # 回合制
    curePer = 0 # 治疗加成、强化灵兽
    cureDefPer = 0 # 敌方的弱化治疗、弱化灵兽
    if userObj.GetDictByKey(ChConfig.Def_Obj_Dict_TurnFightTimeline):
        isPetNPC = PetControl.IsPetNPC(userObj)
        enemyObj = None
        if isPetNPC:
            petOwner = PetControl.GetPetNPCOwner(userObj)
            enemyObj = TurnAttack.GetEnemyObj(petOwner)
            curePer += GameObj.GetCurePer(petOwner)
            curePer += GameObj.GetPetStrengthenPer(petOwner) # 强化灵兽
        else:
            enemyObj = TurnAttack.GetEnemyObj(userObj)
            curePer += GameObj.GetCurePer(userObj)
        if enemyObj:
            cureDefPer += GameObj.GetCureDefPer(enemyObj)
            if isPetNPC:
                cureDefPer += GameObj.GetPetWeakenPer(enemyObj) # 弱化灵兽
    skillPer += (curePer - cureDefPer) # 可能负值
    #公式计算治疗值 
    cureHP = int((cureBaseValue * skillPer + skillValue + addExValue) * curePercent)
    cureHP = int((cureBaseValue * skillPer / float(ChConfig.Def_MaxRateValue) + skillValue + addExValue) * curePercent)
    if not largeNum:
        cureHP = min(cureHP, ChConfig.Def_UpperLimit_DWord)
    cureHP = max(1, cureHP) # 保底1点
    
    #GameWorld.DebugLog("获取治疗值(%s):cureType=%s,cureBaseValue=%s,skillPer=%s,skillValue=%s"
    #                   % (cureHP, cureType, cureBaseValue, skillPer, skillValue))
    #GameWorld.DebugLog("获取治疗值(%s):skillID=%s,cureType=%s,cureBaseValue=%s,skillPer=%s,skillValue=%s,curePer=%s,cureDefPer=%s"
    #                   % (cureHP, curSkill.GetSkillID(), cureType, cureBaseValue, skillPer, skillValue, curePer, cureDefPer))
    return cureHP
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_46.py
@@ -9,7 +9,7 @@
# @date 2024-02-01
# @version 1.0
#
# 详细描述: 命令第一位置灵兽立即使用一次技能(具体效果由灵兽技能决定),回合制适用
# 详细描述: 命令第一位置灵兽立即使用一次技能(具体效果由灵兽技能决定),效果1: A值-灵兽技能是否重新进入技能CD,回合制适用
#
#-------------------------------------------------------------------------------
#"""Version = 2024-02-01 15:30"""
@@ -26,7 +26,7 @@
    if not attacker.GetDictByKey(ChConfig.Def_Obj_Dict_TurnFightTimeline):
        return
    
    # 默认第一位置灵兽强制使用技能1,并重新进入CD
    # 默认第一位置灵兽强制使用技能1
    curPet = PetControl.GetFightPet(attacker, 1)
    if not curPet:
        return
@@ -34,6 +34,10 @@
    tagObj = TurnAttack.GetEnemyObj(attacker)
    if not tagObj:
        return
    skillEffect = curSkill.GetEffect(0)
    isCD = skillEffect.GetEffectValue(0) # 是否重新进入冷却时间
    remainTime = None
    
    useSkill = None
    skillManager = curPet.GetSkillManager()
@@ -51,6 +55,7 @@
        if SkillCommon.isPassiveSkill(skill):
            continue
        
        remainTime = skill.GetRemainTime()
        skill.SetRemainTime(0)
        useSkill = skill
        break
@@ -60,5 +65,15 @@
    
    BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)    
    tagDist = 0
    return AICommon.DoNPCUseSkill(curPet, tagObj, useSkill, tagDist, tick)
    isOK = AICommon.DoNPCUseSkill(curPet, tagObj, useSkill, tagDist, tick)
    if isOK:
        # 不重新进入CD的话,还原原剩余时间
        if not isCD and remainTime != None:
            skill.SetRemainTime(remainTime)
    else:
        # 释放失败,还原原剩余时间
        if remainTime != None:
            skill.SetRemainTime(remainTime)
    return isOK
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_47.py
New file
@@ -0,0 +1,32 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Skill.GameSkills.SkillModule_47
#
# @todo:恢复妖气
# @author hxp
# @date 2024-03-26
# @version 1.0
#
# 详细描述: 恢复妖气 效果1: A值-恢复百分比,B值-恢复固定值
#
#-------------------------------------------------------------------------------
#"""Version = 2024-03-26 19:00"""
#-------------------------------------------------------------------------------
import GameObj
import GameWorld
def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick):
    skillEffect = curSkill.GetEffect(0)
    addPer = skillEffect.GetEffectValue(0)
    addValue = skillEffect.GetEffectValue(1)
    maxXP = GameObj.GetMaxXP(attacker)
    curXP = GameObj.GetXP(attacker)
    updXP = min(curXP + int(maxXP * addPer / 10000.0) + addValue, maxXP)
    GameObj.SetXP(attacker, updXP)
    GameWorld.DebugLog("        恢复妖气: curXP=%s,addPer=%s,addValue=%s,updXP=%s,curID=%s" % (curXP, addPer, addValue, updXP, attacker.GetID()))
    return True # 不通知使用成功
    #return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_48.py
New file
@@ -0,0 +1,34 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Skill.GameSkills.SkillModule_48
#
# @todo:扣除目标妖气
# @author hxp
# @date 2024-03-26
# @version 1.0
#
# 详细描述: 扣除妖气 效果1: A值-扣除百分比,B值-扣除固定值
#
#-------------------------------------------------------------------------------
#"""Version = 2024-03-26 19:00"""
#-------------------------------------------------------------------------------
import GameObj
import GameWorld
def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick):
    if not defender:
        return
    skillEffect = curSkill.GetEffect(0)
    delPer = skillEffect.GetEffectValue(0)
    delValue = skillEffect.GetEffectValue(1)
    maxXP = GameObj.GetMaxXP(defender)
    curXP = GameObj.GetXP(defender)
    updXP = max(curXP - int(maxXP * delPer / 10000.0) - delValue, 0)
    GameObj.SetXP(defender, updXP)
    GameWorld.DebugLog("        扣除妖气: curXP=%s,delPer=%s,delValue=%s,updXP=%s,atkID=%s,curID=%s" % (curXP, delPer, delValue, updXP, attacker.GetID(), defender.GetID()))
    return True # 不通知使用成功
    #return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_5005.py
@@ -14,6 +14,25 @@
#-------------------------------------------------------------------------------
import GameWorld
import ChConfig
def CheckCanHappen(attacker, defender, effect, curSkill):
    #生效类型(0-每次;1-独立首次,即每只灵宠独立算首次;2-共享首次,即本场战斗本方多只灵宠的情况下仅首次生效)
    effType = effect.GetEffectValue(1)
    if effType == 1:
        # 独立首次,取灵宠自己的状态
        useSkillPetID = attacker.GetDictByKey("useSkillPetID")
        if not useSkillPetID:
            return False
        petObj = GameWorld.FindNPCByID(useSkillPetID)
        if not petObj:
            return False
        if petObj.GetDictByKey(ChConfig.Def_Obj_Dict_TurnSkillSuccessPetState):
            #GameWorld.DebugLog("该灵宠释放过技能! 不再触发独立首次!", useSkillPetID.GetID())
            return False
    elif effType == 2:
        # 共享首次,直接取主人的状态
        if attacker.GetDictByKey(ChConfig.Def_Obj_Dict_TurnSkillSuccessPetState):
            #GameWorld.DebugLog("已经有灵宠释放过技能! 不再触发共享首次!", attacker.GetID())
            return False
    return GameWorld.CanHappen(effect.GetEffectValue(0))
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_5006.py
New file
@@ -0,0 +1,40 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Skill.PassiveBuff.PassiveSkill_5006
#
# @todo:灵宠攻击后触发
# @author hxp
# @date 2024-03-26
# @version 1.0
#
# 详细描述: 灵宠攻击后触发
#
#-------------------------------------------------------------------------------
#"""Version = 2024-03-26 19:00"""
#-------------------------------------------------------------------------------
import GameWorld
import ChConfig
def CheckCanHappen(attacker, defender, effect, curSkill):
    #生效类型(0-每次;1-独立首次,即每只灵宠独立算首次;2-共享首次,即本场战斗本方多只灵宠的情况下仅首次生效)
    effType = effect.GetEffectValue(1)
    if effType == 1:
        # 独立首次,取灵宠自己的状态
        useSkillPetID = attacker.GetDictByKey("useSkillPetID")
        if not useSkillPetID:
            return False
        petObj = GameWorld.FindNPCByID(useSkillPetID)
        if not petObj:
            return False
        if petObj.GetDictByKey(ChConfig.Def_Obj_Dict_TurnAttackOverPetState):
            #GameWorld.DebugLog("该灵宠攻击过! 不再触发独立首次!", useSkillPetID.GetID())
            return False
    elif effType == 2:
        # 共享首次,直接取主人的状态
        if attacker.GetDictByKey(ChConfig.Def_Obj_Dict_TurnAttackOverPetState):
            #GameWorld.DebugLog("已经有灵宠攻击过! 不再触发共享首次!", attacker.GetID())
            return False
    return GameWorld.CanHappen(effect.GetEffectValue(0))
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_5007.py
New file
@@ -0,0 +1,22 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Skill.PassiveBuff.PassiveSkill_5007
#
# @todo:道法攻击增加技能伤害百分比
# @author hxp
# @date 2024-03-26
# @version 1.0
#
# 详细描述: 道法攻击增加技能伤害百分比
#
#-------------------------------------------------------------------------------
#"""Version = 2024-03-26 19:00"""
#-------------------------------------------------------------------------------
def CheckCanHappen(attacker, defender, effect, curSkill):
    return True
def GetValue(attacker, defender, effect):
    return effect.GetEffectValue(0)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_5008.py
New file
@@ -0,0 +1,21 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Skill.PassiveBuff.PassiveSkill_5008
#
# @todo:道法攻击触发技能
# @author hxp
# @date 2024-03-26
# @version 1.0
#
# 详细描述: 道法攻击触发技能
#
#-------------------------------------------------------------------------------
#"""Version = 2024-03-26 19:00"""
#-------------------------------------------------------------------------------
import GameWorld
def CheckCanHappen(attacker, defender, effect, curSkill):
    return GameWorld.CanHappen(effect.GetEffectValue(0))
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_5009.py
New file
@@ -0,0 +1,23 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Skill.PassiveBuff.PassiveSkill_5009
#
# @todo:受到攻击时,反射X%的伤害
# @author hxp
# @date 2024-03-26
# @version 1.0
#
# 详细描述: 受到攻击时,反射X%的伤害
#
#-------------------------------------------------------------------------------
#"""Version = 2024-03-26 19:00"""
#-------------------------------------------------------------------------------
def CheckCanHappen(attacker, defender, effect, curSkill):
    return True
def GetValue(attacker, defender, effect):
    return effect.GetEffectValue(0)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -443,6 +443,10 @@
             5003:ChConfig.TriggerType_AtkBackAft, # 反击后触发 95
             5004:ChConfig.TriggerType_BeAttackOver,   # 被攻击后触发 20
             5005:ChConfig.TriggerType_SkillSuccessPet,   # 灵宠技能释放成功都可触发 96
             5006:ChConfig.TriggerType_AttackOverPet,   # 灵宠攻击(对敌技能)后被动技能被触发 97
             5007:ChConfig.TriggerType_XPAttackAddSkillPer,  # 道法攻击增加伤害百分比 98
             5008:ChConfig.TriggerType_XPAttackOver, # 道法攻击后触发99
             5009:ChConfig.TriggerType_BounceHPPer,   # 受到攻击时,反弹伤害百分比值17
             }
    return tdict.get(effectID, -1) 
    #===========================================================================