hxp
8 天以前 11567f95682fc68fae07fbea58fb29a4173e68b6
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
40
41
42
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Skill.PassiveTrigger.PassiveEff_5024
#
# @todo:¶îÍâÔö¼Ó/¼õÉÙbuffЧ¹ûID/ÊôÐÔIDÖµ£¨¸ù¾Ýbuff²ã¼¶£©
# @author hxp
# @date 2025-12-16
# @version 1.0
#
# ÏêϸÃèÊö: ¶îÍâÔö¼Ó/¼õÉÙbuffЧ¹ûID/ÊôÐÔIDÖµ£¨¸ù¾Ýbuff²ã¼¶£©
#
#-------------------------------------------------------------------------------
#"""Version = 2025-12-16 16:00"""
#-------------------------------------------------------------------------------
 
import GameWorld
 
def DoSkillEffectLogic(turnFight, batObj, tagObj, effSkill, curEffect, connSkill, connBuff, **kwargs):
    buffState = curEffect.GetEffectValue(0)
    effEx = curEffect.GetEffectValue(1) # Ö§³Ö¶à¸öÊôÐÔ
    sameCountryExValue = curEffect.GetEffectValue(2)
    
    if not isinstance(effEx, list) or len(effEx) != 3:
        return
    
    curBuff = batObj.GetBuffManager().FindBuffByState(buffState)
    if not curBuff:
        return
    buffLayers = max(1, curBuff.GetLayer())
    
    attrID, attrValue, calcType = effEx
    totalValue = attrValue * buffLayers
    GameWorld.DebugLogEx("¶îÍâbuffЧ¹ûID/ÊôÐÔIDÖµ¸ù¾Ýbuff²ã¼¶: attrID=%s,attrValue=%s,calcType=%s,buffState=%s,layers=%s,totalValue=%s", 
                         attrID, attrValue, calcType, buffState, buffLayers, totalValue)
    if sameCountryExValue and batObj.GetCountry() == tagObj.GetCountry():
        totalValue += (sameCountryExValue * buffLayers)
        GameWorld.DebugLogEx("    Ïàͬ¹ú¼Òÿ²ã¶îÍâÔö¼ÓÖµ: %s,totalValue=%s", sameCountryExValue, totalValue)
        
    connBuff.AddEffectValueEx(attrID, totalValue, calcType)
    return True