From 1164a6b24c5a7373b1f6a39540b60d039e21adcc Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 20 五月 2019 16:14:29 +0800
Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py             |    1 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1304.py           |   44 ++++++++++++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4104.py |   23 +++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py     |    1 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py                            |    3 +
 5 files changed, 71 insertions(+), 1 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 30b86a8..cf8255e 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
@@ -2009,6 +2009,7 @@
 
     aHit = atkObj.GetHit()
     aHitSuccessRate = PlayerControl.GetHitSucessRate(atkObj) if atkObjType == IPY_GameWorld.gotPlayer else ChConfig.Def_MaxRateValue
+    aHitSuccessRate += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_HitSuccess)
     dMiss = defObj.GetMiss()
     dMiss += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(defObj, atkObj, None, ChConfig.TriggerType_MissPer)
     dMissSuccessRate = PlayerControl.GetMissSucessRate(defObj) if defObjType == IPY_GameWorld.gotPlayer else 0
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 2711992..1ad0984 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -4486,7 +4486,8 @@
 TriggerType_BurnPer,    # 灼烧伤害百分比 80
 TriggerType_BurnDisappear,    # 灼烧消失触发 81
 TriggerType_SkillValue,    # 增加技能伤害固定值 82
-) = range(1, 83)
+TriggerType_HitSuccess,        # 命中成功率 83
+) = range(1, 84)
 
 
 #不可以佩戴翅膀的地图
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1304.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1304.py
new file mode 100644
index 0000000..0234a23
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_1304.py
@@ -0,0 +1,44 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+##@package
+#
+# @todo: 根据上一个技能的命中个数提高属性(个数*基础值)
+#
+# @author: Alee
+# @date 2019-5-20 下午03:43:03
+# @version 1.0
+#
+# @note: 
+#
+#---------------------------------------------------------------------
+
+import GameWorld
+import ChConfig
+
+
+
+## buff线性增加属性
+#  @param defender Buff承受者
+#  @param curEffect 技能效果
+#  @param calcDict 技能效果累加总表
+#  @return None
+def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
+    attrType = curEffect.GetEffectValue(0)
+    
+    calcDict[attrType] = calcDict.get(attrType, 0) + curEffect.GetEffectValue(1)*curBuff.GetValue(0)
+    return
+
+
+## 返回buff类型,线性与否
+#  @param 
+#  @return None
+#  @remarks 函数详细说明.  
+def GetCalcType():
+    return ChConfig.TYPE_Linear
+
+
+
+def CalcBuffValue(attacker, defender, curSkill, changeBuffValueDict):
+    return [GameWorld.GetGameWorld().GetTick()]
+
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4104.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4104.py
new file mode 100644
index 0000000..0c0e67d
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4104.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+##@package
+#
+# @todo: 提高命中成功率
+#
+# @author: Alee
+# @date 2019-5-20 下午03:38:45
+# @version 1.0
+#
+# @note: 
+#
+#---------------------------------------------------------------------
+
+import AttackCommon
+
+def CheckCanHappen(attacker, defender, effect, curSkill):   
+    return True
+    
+
+def GetValue(attacker, defender, effect):
+    return effect.GetEffectValue(0)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
index 1ab21ba..2484859 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -389,6 +389,7 @@
              4101:ChConfig.TriggerType_AttackAddSkillPer,  # 所有攻击伤害(SkillPer)增加,含普攻,计算时 5
              4102:ChConfig.TriggerType_SkillValue,  # 增加技能伤害固定值 82
              4103:ChConfig.TriggerType_Buff_SuckBloodPer,   # 攻击 百分比吸血
+             4104:ChConfig.TriggerType_HitSuccess,  # 命中成功率 83
              }
     return tdict.get(effectID, -1) 
     #===========================================================================

--
Gitblit v1.8.0