From 95e5cc37cc097f506004f31cdfff1118953296f6 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 16 十二月 2025 15:58:24 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(董白全部技能; 增加效果5024 5504;buff持续规则字段支持配置每大回合-1层;动态属性ID变化增加计算方式11-根据自己已损失血量百分比;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_Attr.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_Attr.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_Attr.py
index 44cf30a..ceaae8d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_Attr.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveTrigger/PassiveEff_Attr.py
@@ -36,6 +36,15 @@
             attrValue = maxValue
         GameWorld.DebugLog("按对方buff层级增加属性: attrID=%s,attrValue=%s,buffStateList=%s,layerTotal=%s,maxValue=%s" 
                            % (attrID, attrValue, buffStateList, layerTotal, maxValue))
+    # 11-根据自己已损失血量百分比
+    elif calcType == 11:
+        curHP = attacker.GetHP()
+        maxHP = attacker.GetMaxHP()
+        lostPer = int((maxHP - curHP) / float(maxHP) * 100) # 只算取整
+        attrValue = lostPer * attrValue
+        GameWorld.DebugLog("按自身已损失生命百分比增加属性: attrID=%s,attrValue=%s,curHP=%s/%s,lostPer=%s" 
+                           % (attrID, attrValue, curHP, maxHP, lostPer))
+        
     else:
         checkInStateList = curEffect.GetEffectValue(2)
         if checkInStateList:

--
Gitblit v1.8.0