#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # ##@package Skill.PassiveTrigger.PassiveEff_6029 # # @todo:ÌáÉý¼¼ÄÜÕ½¶·É˺¦£¨¸ù¾ÝÉíÉÏbuff״̬²ãÊý£© # @author hxp # @date 2025-12-19 # @version 1.0 # # ÏêϸÃèÊö: ÌáÉý¼¼ÄÜÕ½¶·É˺¦£¨¸ù¾ÝÉíÉÏbuff״̬²ãÊý£© # #------------------------------------------------------------------------------- #"""Version = 2025-12-19 18:00""" #------------------------------------------------------------------------------- import TurnBuff #import GameWorld def GetHappenValue(attacker, defender, curEffect, effSkill, effBuff, connSkill, **skillkwargs): if "turnFight" not in skillkwargs: return turnFight = skillkwargs["turnFight"] buffState = curEffect.GetEffectValue(0) # buff״̬ addPerList = curEffect.GetEffectValue(1) # [1²ãÌáÉýÍò·Ö±È, 2²ã, ...] isDelBuff = curEffect.GetEffectValue(2) # ´¥·¢Ð§¹ûºóÊÇ·ñ¿Û³ýbuff if not addPerList: return addPer = 0 layerTotal = 0 buffMgr = attacker.GetBuffManager() for buff in buffMgr.FindBuffListByState(buffState): layerTotal += max(1, buff.GetLayer()) if len(addPerList) >= layerTotal: addPer = addPerList[layerTotal - 1] else: addPer = addPerList[-1] if isDelBuff: TurnBuff.DoBuffDel(turnFight, attacker, buff, connSkill) #GameWorld.DebugLogEx("6029Õ½¶·ÔöÉË: buffState=%s,layerTotal=%s,addPer=%s", buffState, layerTotal, addPer) return addPer