From e8dd07d4ed0ffd52c781e1fe8c2eac3ef71adf38 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 24 八月 2018 17:11:05 +0800
Subject: [PATCH] fix:召唤兽基础NPC主人的最终伤害,压制飘血通知由服务端通知

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py                   |    1 +
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py |    7 ++++++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py                        |    6 ++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py |    1 +
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
index 4e8bfc8..adaf06b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -1668,6 +1668,7 @@
     #------- 攻击方
     aMinAtk = atkObj.GetMinAtk()        # 攻击方最小攻击
     aMaxAtk = atkObj.GetMaxAtk()        # 攻击方最大攻击
+    
     aIceAtk = atkObj.GetIceAtk()        # 冰攻, 元素真伤, 玩家及NPC通用
     aIceAtk += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_AddIceAtk)
     #------- 防守方
@@ -1742,7 +1743,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 +1798,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
 
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index ed365f9..bfe3172 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -745,7 +745,8 @@
 Def_HurtType_LuckyHit,       # 会心一击伤害 8
 Def_HurtType_Miss,           # 闪避 9
 Def_HurtType_Immune,           # 免疫 10
-) = range(1, 11)
+Def_HurtType_RealmSupress,     # 境界压制 11
+) = range(1, 12)
 #Def_HurtType_SuckBlood,      # 吸血 
 
 (
@@ -770,7 +771,8 @@
                        Def_HurtType_Parry,          # 格挡 5
                        Def_HurtType_DoubleHit,      # 连击 6
                        Def_HurtType_SuperHit,       # 暴击 7
-                       Def_HurtType_LuckyHit,       # 会心一击伤害 8]
+                       Def_HurtType_LuckyHit,       # 会心一击伤害 8
+                       Def_HurtType_RealmSupress,     # 境界压制 11
                        ]
 
 #---------------------------------------------------------------------
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 91ab5a4..00b6cae 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -113,6 +113,7 @@
 def GetFaction(curNPC): return curNPC.GetCountry()
 def GetSkillAtkRate(curNPC): return curNPC.GetPoisionAtk() # 毒攻代表NPC技能伤害加成万分率
 def GetFinalHurt(curNPC): return curNPC.GetFireAtk() # 火攻代表NPC最终固定伤害加成, 普攻也有效果
+def SetFinalHurt(curNPC, hurt): return curNPC.SetFireAtk(hurt) # 火攻代表NPC最终固定伤害加成, 普攻也有效果
 def GetSkillEnhance(curNPC): return curNPC.GetWindAtk() # 风攻代表NPC 《普攻》 的技能附加伤害固定值
 def GetNPCSeries(curNPC): return curNPC.GetPoisionDef() # 毒防字段代表NPC系,按二进制位区分
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py
index 72df93c..1d4c505 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py
@@ -182,6 +182,7 @@
     summonNPC.SetBaseHit(curNPC.GetHit())
 
     NPCCommon.SetRealmLV(summonNPC, NPCCommon.GetRealmLV(curNPC))   # 继承境界
+    NPCCommon.SetFinalHurt(summonNPC, NPCCommon.GetFinalHurt(curNPC))   # 最终伤害
 
     #summonNPC.SetBaseAtkInterval(500)
     summonNPC.SetBaseMissRate(curNPC.GetMiss())

--
Gitblit v1.8.0