hxp
2024-09-18 d0d6f28bee730ee64bf46adffa4f768d6af6ac0c
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
43
44
45
46
47
48
49
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Skill.PassiveBuff.PassiveSkill_5000
#
# @todo:»ØºÏ´¥·¢
# @author hxp
# @date 2024-01-17
# @version 1.0
#
# ÏêϸÃèÊö: »ØºÏ´¥·¢
#
#-------------------------------------------------------------------------------
#"""Version = 2024-01-17 16:00"""
#-------------------------------------------------------------------------------
 
import ChConfig
 
# ½øÈëXX buff״̬´¥·¢¼¼ÄÜ
def CheckCanHappen(attacker, defender, effect, curSkill):
    #A-»ØºÏ±àºÅ£¨0-ÿ»ØºÏ£¬>=1-x»ØºÏ£©£»B-ÅжϷ½Ê½£¨0-µÈÓÚ£¬1-´óÓÚµÈÓÚ£¬2-СÓÚµÈÓÚ£¬3-ÿx»ØºÏ£©£»C-
    timeLine = attacker.GetDictByKey(ChConfig.Def_Obj_Dict_TurnFightTimeline)
    if not timeLine:
        return False
    
    checkTurnNum = effect.GetEffectValue(0)
    checkType = effect.GetEffectValue(1)
    if checkTurnNum:
        turnNum = timeLine / 100
        if checkType == 0: # µÚx»ØºÏ
            if turnNum != checkTurnNum:
                return False
        elif checkType == 1: # ´óÓÚµÈÓÚx»ØºÏ
            if turnNum < checkTurnNum:
                return False
        elif checkType == 2: # Ð¡ÓÚµÈÓÚx»ØºÏ
            if turnNum > checkTurnNum:
                return False
        elif checkType == 3: # Ã¿x»ØºÏ
            if turnNum % checkTurnNum != 0:
                return False
        else:
            return False
        
    # ÆäËûÂß¼­...
    
    return True