From a075f7841fb2d0a3b32bf10c8bc2df5bf02d6acb Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期日, 14 十二月 2025 14:24:28 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(贾诩所有技能;5022效果支持配置buff额外属性计算方式;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnPassive.py | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnPassive.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnPassive.py
index 1ac29b3..1609937 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnPassive.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/TurnPassive.py
@@ -17,6 +17,8 @@
import GameWorld
import PassiveTrigger
+import IpyGameDataPY
+import BattleObj
import ChConfig
GameWorld.ImportAll("Script\\Skill\\", "PassiveTrigger")
@@ -27,22 +29,29 @@
passiveEffMgr = batObj.GetPassiveEffManager()
skillEffInfo = passiveEffMgr.RefreshSkillPassiveEffect()
buffEffInfo = passiveEffMgr.RefreshBuffPassiveEffect()
- skillEffInfo and GameWorld.DebugLog(" 被动技能效果: %s" % skillEffInfo)
- buffEffInfo and GameWorld.DebugLog(" 被动Buff效果: %s" % buffEffInfo)
+ skillEffInfo and GameWorld.DebugLogEx(" 被动技能效果: %s", skillEffInfo)
+ buffEffInfo and GameWorld.DebugLogEx(" 被动Buff效果: %s", buffEffInfo)
return
def OnTriggerPassiveEffect(turnFight, batObj, triggerWay, tagObj=None, connSkill=None, connSkillTypeID=0, connBuff=None, **kwargs):
''' 触发被动效果,可能触发技能、buff,需根据优先级触发
'''
if not batObj.IsAlive():
- return
+ if triggerWay not in ChConfig.DeadCanTriggerWayList:
+ return
passiveEffMgr = batObj.GetPassiveEffManager()
effInfoList = passiveEffMgr.GetPassiveEffByTrigger(triggerWay, connSkill, connSkillTypeID, connBuff)
if not effInfoList:
return
- # [["skill/buff", skillID, buffID, effIDList], ...]
+ OnTriggerPassiveEffList(turnFight, batObj, triggerWay, tagObj, effInfoList, connSkill, connBuff, **kwargs)
+ return
+
+def OnTriggerPassiveEffList(turnFight, batObj, triggerWay, tagObj, effInfoList, connSkill=None, connBuff=None, **kwargs):
+ '''触发外部指定的被动效果列表
+ @param effInfoList: [["skill/buff", skillID, buffID, effIDList], ...]
+ '''
tagID = tagObj.GetID() if tagObj else 0
- GameWorld.DebugLog("触发被动: triggerWay=%s,objID=%s,tagID=%s,%s" % (triggerWay, batObj.GetID(), tagID, effInfoList))
+ GameWorld.DebugLogEx("触发被动: triggerWay=%s,objID=%s,tagID=%s,%s", triggerWay, batObj.GetID(), tagID, effInfoList)
for effInfo in effInfoList:
sign = effInfo[0]
skillID, buffID, effIDList = effInfo[1:]
@@ -62,6 +71,7 @@
if not effSkill:
return
+ kwargs["triggerWay"] = triggerWay
for effID in effIDList:
curEffect = effSkill.GetEffectByID(effID, triggerWay)
if not curEffect:
@@ -90,6 +100,7 @@
return
skillData = effBuff.GetSkillData()
+ kwargs["triggerWay"] = triggerWay
for effID in effIDList:
curEffect = skillData.GetEffectByID(effID, triggerWay)
if not curEffect:
@@ -169,7 +180,7 @@
if effID in ChConfig.PassiveEffHappenValueList:
if value:
- GameWorld.DebugLog("统计被动效果值: calcEffID=%s,objID=%s,tagID=%s,%s,curValue=%s" % (calcEffID, atkObj.GetID(), tagID, effInfoList, value))
+ GameWorld.DebugLogEx("统计被动效果值: calcEffID=%s,objID=%s,tagID=%s,%s,curValue=%s", calcEffID, atkObj.GetID(), tagID, effInfoList, value)
return value
elif effID in ChConfig.PassiveEffValueMaxList:
curValue = max(curValue, value) # 取最大值
@@ -184,6 +195,6 @@
# if curSkill.GetCoolDownTime():
# SkillCommon.SetSkillRemainTime(curSkill, 0, tick, attacker)
- GameWorld.DebugLog("统计被动效果值: calcEffID=%s,objID=%s,tagID=%s,%s,curValue=%s" % (calcEffID, atkObj.GetID(), tagID, effInfoList, curValue))
+ GameWorld.DebugLogEx("统计被动效果值: calcEffID=%s,objID=%s,tagID=%s,%s,curValue=%s", calcEffID, atkObj.GetID(), tagID, effInfoList, curValue)
return curValue
--
Gitblit v1.8.0