From a999dbe12739d00e67e05c4306abcce82ffc4615 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期六, 11 五月 2019 17:14:18 +0800
Subject: [PATCH] 3564 【BUG】【2.0】五行专精使用后没有显示战力提升特效
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameBuffs/Buff_801.py | 84 ++++++++++--------------------------------
1 files changed, 20 insertions(+), 64 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 6fb38ab..bc55b14 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: 增加可吸收受到伤害的10%护盾,护盾存在上限为生命20%血量,持续6秒,护盾破裂或者6秒后对周围目标造成吸收伤害值200%的伤害
#
# @author Alee
# @date 2017-10-31 14:10
@@ -13,88 +13,44 @@
"""Version = 2017-10-31 14:10"""
-import IPY_GameWorld
import GameWorld
import ChConfig
import SkillShell
-import PassiveBuffEffMng
-import PySkillManager
+import SkillCommon
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
# @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) # 吸收的伤害百分比
- maxValue = int(curEffect.GetEffectValue(1)/float(ChConfig.Def_MaxRateValue)*GameObj.GetMaxHP(curObj))
- curObj.SetDict(ChConfig.Def_PlayerKey_AbsorbShieldMax, maxValue) # 吸收上限值
-
+ # 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):
- 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)
+ skillID = curEffect.GetEffectValue(2)
+ if not skillID:
+ return
+ boomValue = curBuff.GetValue1()
+ # 剩余护盾值用于爆炸
+ if boomValue == 0:
return
- #效果值 第三个值为技能ID
- boomID = curEffect.GetEffectValue(2)
- skillData = GameWorld.GetGameData().GetSkillBySkillID(boomID)
+ skillData = GameWorld.GetGameData().GetSkillBySkillID(skillID)
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))
+ 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, skillData, tick, curObj.GetPosX(), curObj.GetPosY())
+ SkillShell.Trigger_UseSkill(curObj, None, curSkill, 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
--
Gitblit v1.8.0