From c2bc7f00ca8508e767f478109970f1707fb590fe Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 21 九月 2018 18:08:30 +0800
Subject: [PATCH] 1 礼包卡以权限分应用
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py | 8 +++++++-
1 files changed, 7 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 60ee246..967058e 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
@@ -1547,7 +1547,6 @@
# 血盾
hurtValue = CalcBloodShield(atkObj, defObj, hurtValue)
-
remainHP = min(dMaxHP, max(0, dHP - hurtValue)) # 剩余血量
remainHP = int(remainHP) #防范
@@ -1569,6 +1568,12 @@
else:
GameWorld.ErrLog('计算伤血值时,防守方类型错误:defObjType = %s' % (defObjType))
return resultHurtType
+
+ if GameObj.GetHP(defObj) > 0:
+ # 被攻击者将部分伤害转化为血量, 返回转化的百分比(小数点)
+ changePer = PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(defObj, atkObj, None, ChConfig.TriggerType_ChangeHurtToHP)
+ if changePer:
+ SkillCommon.SkillAddHP(defObj, 0, int(changePer*hurtValue))
lostValue = dHP - GameObj.GetHP(defObj) # 实际掉血量
resultHurtType.LostHP = lostValue
@@ -2084,6 +2089,7 @@
atkBackHP += PlayerControl.GetPVPAtkBackHP(atkObj)
# 百分比吸血
atkBackHPPer = PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(atkObj, None, None, ChConfig.TriggerType_Buff_SuckBloodPer)
+ atkBackHPPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, None, None, ChConfig.TriggerType_Buff_SuckBloodPer)
atkBackHP += int(hurtValue * atkBackHPPer*1.0 / ChConfig.Def_MaxRateValue)
suckHP += atkBackHP
--
Gitblit v1.8.0