hxp
11 小时以前 0ce10692f53e9df632d848368f7081440974091f
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
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Skill.PassiveTrigger.PassiveEff_Attr
#
# @todo:±»¶¯´¥·¢ÊôÐÔ
# @author hxp
# @date 2025-09-16
# @version 1.0
#
# ÏêϸÃèÊö: ±»¶¯´¥·¢ÊôÐÔ
#
#-------------------------------------------------------------------------------
#"""Version = 2025-09-16 14:30"""
#-------------------------------------------------------------------------------
 
def GetHappenValue(attacker, defender, curEffect, effSkill, effBuff, **skillkwargs):
    
    checkInStateList = curEffect.GetEffectValue(2)
    if checkInStateList:
        if not defender.CheckInState(checkInStateList):
            return
        
    onlyOwner = curEffect.GetEffectValue(3) # ÊÇ·ñ½ö¶ÔbuffÊ©·¨ÕßÓÐЧ£¬Ä¬ÈÏ0-·ñ£¬1-ÊÇ
    if onlyOwner:
        if not effBuff:
            return
        if effBuff.GetOwnerID() != defender.GetID():
            return
        
    attrValue = curEffect.GetEffectValue(0)
    calcType = curEffect.GetEffectValue(1)
    if calcType == 2: # ¼õÉÙ£¬ÆäËûĬÈÏÔö¼Ó
        attrValue = -attrValue
        
    return attrValue