From da600c48b92c65ec78edea08544c6ca9a50b1143 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 29 四月 2019 16:20:58 +0800
Subject: [PATCH] 3450 【BUG】【2.0】莲台升星错误

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_801.py |   43 ++++++++++++++++++++++++-------------------
 1 files changed, 24 insertions(+), 19 deletions(-)

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 90ba847..48e2308 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%伤害
+# @todo: 增加可吸收受到伤害的10%护盾,护盾存在上限为生命20%血量,持续6秒,护盾破裂或者6秒后对周围目标造成吸收伤害值200%的伤害
 #
 # @author Alee
 # @date 2017-10-31 14:10
@@ -13,12 +13,10 @@
 """Version = 2017-10-31 14:10"""
 
 
-import IPY_GameWorld
 import GameWorld
 import ChConfig
 import SkillShell
-import PassiveBuffEffMng
-import PySkillManager
+import SkillCommon
 import GameObj
 
 
@@ -26,23 +24,30 @@
 #  @param None
 #  @return None
 def DoAddBuffOver(curObj, addBuff, curEffect, tick):
-    buffValue = curEffect.GetEffectValue(0) + PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(
-                                            curObj, None, addBuff.GetSkill(), ChConfig.TriggerType_AbsorbShield)
-    # 战斗属性 在刷新的时候会清空,不能用在此函数中
-    curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldValue, buffValue)  # 吸收的伤害百分比
+    # SetValue1用于当前吸收值
+    addBuff.SetValue(GameObj.GetMaxHP(curObj)*curEffect.GetEffectValue(0)/ChConfig.Def_MaxRateValue) # 吸收上限
     return
 
-##吸收伤害百分比
-# @param attacker 攻击者实例
-# @param curSkill 技能实例
-# @param curEffect 当前技能效果1
-# @return 总值
-def CalcBuffValue(attacker, defender, curSkill, changeBuffValueDict):
-    if not changeBuffValueDict:
-        return []
-    
-    return [changeBuffValueDict.get(i, 0) for i in range(ChConfig.Def_BuffValue_Count)]
+
 
 def OnBuffDisappear(curObj, curSkill, curBuff, curEffect, tick):
-    curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldValue, 0)  # 吸收的伤害百分比
+    boomValue = curBuff.GetValue1()
+    # 剩余护盾值用于爆炸
+    if boomValue == 0:
+        return
+    
+    skillData = GameWorld.GetGameData().GetSkillBySkillID(curEffect.GetEffectValue(2))
+    if not skillData:
+        return
+    # 存储起来用于伤害
+    skillEffect = SkillCommon.GetSkillEffectByEffectID(skillData, ChConfig.Def_Skill_Effect_Attack)
+    if not skillEffect:
+        return
+    boomValue = boomValue*skillEffect.GetEffectValue(2)/ChConfig.Def_MaxRateValue
+    if boomValue == 0:
+        return
+    curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, boomValue)
+    
+    SkillShell.Trigger_UseSkill(curObj, None, curSkill, tick, curObj.GetPosX(), curObj.GetPosY())
+    curObj.SetDict(ChConfig.Def_PlayerKey_MoreHurtValue, 0)
     return

--
Gitblit v1.8.0