From df824550205e9f266f51ebbf4028ac37fe0992bc Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 20 三月 2019 14:01:27 +0800
Subject: [PATCH] 2683 子 天赋技能和新增双职业各两个技能 / 【后端】天赋技能

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_801.py            |   54 -----------------
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py             |    2 
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4074.py |   30 ++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4075.py |   27 +++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_44.py     |   32 ++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py     |    9 +--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py                            |    9 +-
 7 files changed, 100 insertions(+), 63 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 2be3515..c491fef 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
@@ -1761,17 +1761,14 @@
                 # 用于回血
                 findBuff.SetValue(int(findBuff.GetValue() + absortValue))
 
+    if defObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbValue):
+        defObj.SetDict(ChConfig.Def_PlayerKey_AbsorbValue, 0) #吸收的单次伤害,单次伤害必须清空
     if defObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShieldValue):
         # 麒麟护盾吸收伤害,将抵消的伤害存储
         absortValue = int(defObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShieldValue)/float(ShareDefine.Def_MaxRateValue)*hurtValue)   
         hurtValue -= absortValue
+        defObj.SetDict(ChConfig.Def_PlayerKey_AbsorbValue, absortValue) #吸收的单次伤害
         
-        # 吸收至指定血量比例值
-        absorbHurt = defObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShield)
-        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)    # 记录护盾吸收的伤害用于爆炸
-
     # 天罡护法,将期间受到的伤害总值用于回血,不改变伤害
     curEffect, plusValue, skillID2 = BuffSkill.FindBuffEffectPlusByEffectID(buffManager, ChConfig.Def_Skill_Effect_StoreBlood)
     if skillID2:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index f9a2064..0987a05 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -570,7 +570,7 @@
 
 #写死的技能效果ID---------------------------------------------------------------------
 Def_Skill_Effect_AddAtkByHP = 503  # 每损失XX血量增加攻击XX,最高攻击加成XX
-Def_Skill_Effect_AbsorbShield = 801  # A值记录吸收伤害值,B值记录吸收值上限为xx%血量上限值 C值为释放的爆炸技能ID 如麒麟盾
+Def_Skill_Effect_AbsorbShield = 801  # A值记录吸收伤害值
 Def_Skill_Effect_AbsorbShieldXMZJ = 802    # 须弥真界 神兵技能吸收伤害 百分比
 Def_Skill_Effect_BoomSeedHurt = 804 # BUFF种子单层伤害
 Def_Skill_Effect_StoreBlood = 809 # 将期间受到的伤害总值,用于最后回血,不影响伤害
@@ -580,6 +580,7 @@
 Def_Skill_Effect_MasterBuff = 1012 # 主从技能(同步buff持续时间)
 Def_Skill_Effect_SummonAttr = 1013 # 召唤兽属性
 Def_Skill_Effect_BoomSeedID = 1014 # 引爆BUFF种子
+Def_Skill_Effect_ReCD = 1016 # 重置CD
 Def_Skill_Effect_RandWarn = 1061 # 随机预警
 Def_Skill_Effect_AttackReplaceByNPCSeries = 1062 # 对指定系的伤害
 Def_Skill_Effect_AvgHurtFMCnt = 1064 # NPC技能按仙盟成员数均摊伤害  
@@ -3046,8 +3047,7 @@
 Def_PlayerKey_MoreHurtValue = "MoreHurtValue"     # 额外的伤害值,一般用于不走公式
 Def_PlayerKey_BloodShiledHurt = "BSHurt"     # 伤害值用于血盾抵消
 Def_PlayerKey_AbsorbShieldValue = "AbsorbShieldValue"     # 麒麟盾吸收减免伤害百分比
-Def_PlayerKey_AbsorbShieldMax = "AbsorbShieldMax"     # 麒麟盾吸收最大伤害量
-Def_PlayerKey_AbsorbShield = "AbsorbShield"     # 麒麟盾吸收的伤害量用于爆炸
+Def_PlayerKey_AbsorbValue = "AbsorbValue"     # 麒麟盾吸收的单次伤害
 Def_PlayerKey_StartEquipCnt = "StartEquipCnt"     # 珍品数量
 Def_PlayerKey_TJGPackFullAfterEat = "TJGFullEat"     # 脱机挂吞噬后背包依然满的情况
 Def_PlayerKey_TJGStartTime = "TJGStartTime"     # 脱机挂结算时间起点
@@ -4544,7 +4544,8 @@
 TriggerType_SuperHitSubLayer, # 暴击减层 67
 TriggerType_SuperHitSkipCD, # 暴击无冷却 68
 TriggerType_BuffHurtCnt, # 当持续buff伤害第X次时触发技能 69
-) = range(1, 70)
+TriggerType_4074PerValue, # 特殊效果的加成 70
+) = range(1, 71)
 
 
 # NPC功能类型定义
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_801.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_801.py
index 6fb38ab..90ba847 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_801.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_801.py
@@ -3,7 +3,7 @@
 #
 #
 ##@package Buff_801
-# @todo: 麒麟盾,吸收XX%伤害,护盾吸收伤害达到血量上限的xx%值或者3秒后爆发所吸收的伤害
+# @todo: 麒麟盾,吸收XX%伤害
 #
 # @author Alee
 # @date 2017-10-31 14:10
@@ -21,31 +21,6 @@
 import PySkillManager
 import GameObj
 
-#===============================================================================
-# ## 根据释放方的属性添加效果
-# #  @param defender Buff承受者
-# #  @param curEffect 技能效果
-# #  @param calcDict 技能效果累加总表
-# #  @return None
-# def OnCalcBuffEx(curObj, curEffect, calcDict, curBuff):
-#    GameWorld.DebugLog("801 前 OnCalcBuffEx-------------%s"%curEffect.GetEffectValue(0))
-#    buffValue = curEffect.GetEffectValue(0) + PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(
-#                                            curObj, None, curBuff.GetSkill(), ChConfig.TriggerType_AbsorbShield)
-#    GameWorld.DebugLog("801 前 OnCalcBuffEx------buffValue-------%s"%buffValue)
-#    # 吸收伤害比率, SetAtkAbsorb记录已吸收伤害值
-#    curObj.SetDefanceAbsorb(buffValue)
-#    maxValue = int(curEffect.GetEffectValue(1)/float(ChConfig.Def_MaxRateValue)*GameObj.GetMaxHP(curObj))
-#    curObj.SetAtkAbsorb(maxValue)
-#    return
-# 
-# 
-# ## 返回buff类型,线性与否
-# #  @param None
-# #  @return 线性
-# #  @remarks 函数详细说明.
-# def GetCalcType():
-#    return ChConfig.TYPE_Linear
-#===============================================================================
 
 ## 添加BUFF后的逻辑
 #  @param None
@@ -55,9 +30,6 @@
                                             curObj, None, addBuff.GetSkill(), ChConfig.TriggerType_AbsorbShield)
     # 战斗属性 在刷新的时候会清空,不能用在此函数中
     curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldValue, buffValue)  # 吸收的伤害百分比
-    maxValue = int(curEffect.GetEffectValue(1)/float(ChConfig.Def_MaxRateValue)*GameObj.GetMaxHP(curObj))
-    curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldMax, maxValue)  # 吸收上限值
-    
     return
 
 ##吸收伤害百分比
@@ -72,29 +44,5 @@
     return [changeBuffValueDict.get(i, 0) for i in range(ChConfig.Def_BuffValue_Count)]
 
 def OnBuffDisappear(curObj, curSkill, curBuff, curEffect, tick):
-    if not curObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShield):
-        curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldValue, 0)  # 吸收的伤害百分比
-        curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldMax, 0)  # 吸收上限值
-        curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShield, 0)
-        return
-    
-    #效果值 第三个值为技能ID
-    boomID = curEffect.GetEffectValue(2)
-    skillData = GameWorld.GetGameData().GetSkillBySkillID(boomID)
-    if not skillData:
-        curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldValue, 0)  # 吸收的伤害百分比
-        curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldMax, 0)  # 吸收上限值
-        curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShield, 0)
-        return
-    
-    # 存储起来用于伤害
-    curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, 
-                   curObj.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbShield))
-    
-    SkillShell.Trigger_UseSkill(curObj, None, skillData, tick, curObj.GetPosX(), curObj.GetPosY())
-    curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, 0)
-    
     curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldValue, 0)  # 吸收的伤害百分比
-    curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldMax, 0)  # 吸收上限值
-    curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShield, 0)
     return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_44.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_44.py
new file mode 100644
index 0000000..1a25054
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_44.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+##@package
+#
+# @todo: 取消指定技能的CD
+#
+# @author: Alee
+# @date 2019-3-20 下午12:09:33
+# @version 1.0
+#
+# @note: 
+#
+#---------------------------------------------------------------------
+
+import ChConfig
+import BaseAttack
+import BuffSkill
+import IPY_GameWorld
+import SkillCommon
+import EffGetSet
+
+
+def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick):
+    skillEffect = SkillCommon.GetSkillEffectByEffectID(curSkill, ChConfig.Def_Skill_Effect_ReCD)
+    curPlayerSkill = attacker.GetSkillManager().FindSkillBySkillTypeID(skillEffect.GetEffectValue(0))
+    if not curPlayerSkill:
+        return
+    curPlayerSkill.SetRemainTime(0)
+    curSkill.Sync_Skill()
+    #处理技能触发和攻击成功逻辑
+    return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4074.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4074.py
new file mode 100644
index 0000000..d898027
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4074.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+##@package
+#
+# @todo: 反弹麒麟佑身吸收的伤害
+#
+# @author: Alee
+# @date 2019-3-20 上午11:47:44
+# @version 1.0
+#
+# @note: 
+#
+#---------------------------------------------------------------------
+import ChConfig
+import GameWorld
+import ItemControler
+import PlayerControl
+import PassiveBuffEffMng
+
+# 目标某个状态时触发
+def CheckCanHappen(attacker, defender, effect, curSkill):
+    return True if attacker.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbValue) else False #吸收的单次伤害
+    
+
+def GetValue(attacker, defender, effect):
+    value = attacker.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbValue)
+    
+    perValue = effect.GetEffectValue(0) + PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(attacker, None, None, ChConfig.TriggerType_4074PerValue)
+    return value * perValue / ChConfig.Def_MaxRateValue
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4075.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4075.py
new file mode 100644
index 0000000..ab1a9d4
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4075.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+##@package
+#
+# @todo: 反弹麒麟佑身吸收的伤害 4074的特殊加成
+#
+# @author: Alee
+# @date 2019-3-20 上午11:47:44
+# @version 1.0
+#
+# @note: 
+#
+#---------------------------------------------------------------------
+import ChConfig
+import GameWorld
+import ItemControler
+import PlayerControl
+import PassiveBuffEffMng
+
+# 目标某个状态时触发
+def CheckCanHappen(attacker, defender, effect, curSkill):
+    return True if attacker.GetDictByKey(ChConfig.Def_PlayerKey_AbsorbValue) else False #吸收的单次伤害
+    
+
+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 8c38c83..438f357 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -354,6 +354,8 @@
              4071:ChConfig.TriggerType_Buff_SuckBloodPer,   # 攻击 百分比吸血
              4072:ChConfig.TriggerType_SuperHitSkipCD, # 暴击无冷却 68
              4073:ChConfig.TriggerType_BuffHurtCnt, # 当持续buff伤害第X次时触发技能 69
+             4074:ChConfig.TriggerType_BounceHP,   # 反弹伤害固定值14, 记录值
+             4075:ChConfig.TriggerType_4074Value,   # 增加4074的反弹比例
              }
     return tdict.get(effectID, -1) 
     #===========================================================================

--
Gitblit v1.8.0