#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
##@package Skill.PassiveTrigger.PassiveEff_6026
|
#
|
# @todo:Ôö¼õ5505Ч¹ûÑéÖ¤ÉúÃü°Ù·Ö±È£¨¸ù¾ÝÄ¿±êÉíÉÏbuff״̬²ãÊý£©
|
# @author hxp
|
# @date 2025-12-16
|
# @version 1.0
|
#
|
# ÏêϸÃèÊö: Ôö¼õ5505Ч¹ûÑéÖ¤ÉúÃü°Ù·Ö±È£¨¸ù¾ÝÄ¿±êÉíÉÏbuff״̬²ãÊý£©
|
#
|
#-------------------------------------------------------------------------------
|
#"""Version = 2025-12-16 19:30"""
|
#-------------------------------------------------------------------------------
|
|
def GetHappenValue(attacker, defender, curEffect, effSkill, effBuff, connSkill, **skillkwargs):
|
buffStateList = curEffect.GetEffectValue(0) # Ä¿±êbuff [״̬1, ״̬2, ...]
|
addPer = curEffect.GetEffectValue(1) # ÿ²ã±ä»¯°Ù·Ö±È£¨²»ÐèÒªÑé֤״̬ÔòΪ¹Ì¶¨Öµ£©
|
calcType = curEffect.GetEffectValue(2) # ±ä»¯ÊÇÔö»¹ÊǼõ£º 1-Ôö£»2-¼õ
|
|
if buffStateList:
|
layerTotal = 0
|
buffMgr = defender.GetBuffManager()
|
for buffState in buffStateList:
|
for buff in buffMgr.FindBuffListByState(buffState):
|
layerTotal += buff.GetLayer()
|
addTotal = layerTotal * addPer
|
else:
|
addTotal = addPer
|
|
if calcType == 2:
|
addTotal = -addTotal
|
|
return addTotal
|