1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/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