#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
##@package Skill.PassiveTrigger.PassiveEff_6037
|
#
|
# @todo:Ôö¼Ó·´µ¯É˺¦Íò·Ö±È£¨¸ù¾Ýbuff²ã¼¶£©
|
# @author hxp
|
# @date 2026-01-04
|
# @version 1.0
|
#
|
# ÏêϸÃèÊö: Ôö¼Ó·´µ¯É˺¦Íò·Ö±È£¨¸ù¾Ýbuff²ã¼¶£©
|
#
|
#-------------------------------------------------------------------------------
|
#"""Version = 2026-01-04 19:00"""
|
#-------------------------------------------------------------------------------
|
|
import GameWorld
|
|
def GetHappenValue(attacker, defender, curEffect, effSkill, effBuff, connSkill, **skillkwargs):
|
layerPer = curEffect.GetEffectValue(0) # ÿ²ãÔö¼ÓµÄÍò·Ö±È
|
buffStateList = curEffect.GetEffectValue(1) # buff״̬ [״̬1, ״̬2, ...]
|
checkTag = curEffect.GetEffectValue(2) # buff¼ì²é×Ô¼º»¹ÊǶԷ½£º 0-×Ô¼º£¬1-¶Ô·½
|
if not buffStateList:
|
return
|
|
layerTotal = 0
|
buffObj = defender if checkTag else attacker
|
buffMgr = buffObj.GetBuffManager()
|
for buffState in buffStateList:
|
for buff in buffMgr.FindBuffListByState(buffState)[::-1]:
|
layerTotal += buff.GetLayer()
|
|
if layerTotal <= 0:
|
return
|
|
addPer = layerTotal * layerPer
|
GameWorld.DebugLog(" ·´µ¯Ê±buff״̬²ãÊý: %s,addPer=%s,buffStateList=%s,buffObjID=%s" % (layerTotal, addPer, buffStateList, buffObj.GetID()))
|
return addPer
|