From d37ff1be4e18dee345942f1cac676c616636cb61 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 18 一月 2024 15:57:41 +0800
Subject: [PATCH] 10019 【砍树】回合战斗(每次攻击触发精怪技能支持)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
index d6d7cb4..eea964f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
@@ -103,12 +103,14 @@
 
     return layerMaxCnt
 
+## 是否非叠加属性层级
+def IsLayerNoPlusAttr(effect): return effect.GetEffectValue(1)/10 == 1
 def IsLayerPlusAttr(curBuff):
     ## 是否叠加属性层级buff,可叠加时,属性=单层属性*层级,默认叠加
     hasEffect = SkillCommon.GetSkillEffectByEffectID(curBuff.GetSkill(), ChConfig.Def_Skill_Effect_LayerCnt)
     if not hasEffect:
         return False
-    if hasEffect.GetEffectValue(1)/10 == 1:
+    if IsLayerNoPlusAttr(hasEffect):
         # 配置不叠加,直接返回False
         return False
     return True
@@ -182,11 +184,13 @@
     # buff层级
     layerMaxCnt = 0
     layerCalc = 0
+    layerPlusAttr = False # 层级是提升属性的
     hasEffect = SkillCommon.GetSkillEffectByEffectID(curSkill, ChConfig.Def_Skill_Effect_LayerCnt)
     if hasEffect:
         layerMaxCnt = hasEffect.GetEffectValue(0)   # 能叠加的最大上限
         layerCalc = hasEffect.GetEffectValue(1)%10     # 增加层级还是减少层级 Def_BuffLayer_Add
-
+        layerPlusAttr = not IsLayerNoPlusAttr(hasEffect)
+    turnFightTimeline = curObj.GetDictByKey(ChConfig.Def_Obj_Dict_TurnFightTimeline)
     
     #1 检查是否有相同的BUFF,如果有相同的就刷新时间
     for i in range( 0, buffCount ):
@@ -231,6 +235,10 @@
                 plusValueList[0] = min(buffValue + plusValueList[0], ChConfig.Def_UpperLimit_DWord)
                 
         if buffSkillLV == curSkillLV:
+            if layerMaxCnt and curBuff.GetLayer() >= layerMaxCnt and turnFightTimeline and layerPlusAttr:
+                #GameWorld.DebugLog("回合制下属性层级达到最大层不再添加! curID=%s,skillID=%s,Layer=%s" % (curObj.GetID(), curSkillID, curBuff.GetLayer()))
+                return False
+            
             changeLayer = False
             if layerMaxCnt and curBuff.GetLayer() < layerMaxCnt:
                 if layerCalc == ChConfig.Def_BuffLayer_Add:

--
Gitblit v1.8.0