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
#
# @todo: Ä¿±êÖ¸¶¨buffÏ£¬´óÓÚµÈÓڲ㼶Ìá¸ß¼¼ÄÜÉ˺¦
#
# @author: Alee
# @date 2019-5-6 ÏÂÎç05:10:52
# @version 1.0
#
# @note: 
#
#---------------------------------------------------------------------
 
import ChConfig
import GameWorld
import SkillCommon
import GameObj
 
# Ä¿±êij¸ö״̬ʱ´¥·¢
def CheckCanHappen(attacker, defender, effect, curSkill):
    if not defender:
        return False
    
    buff = SkillCommon.FindBuffByOwner(defender, effect.GetEffectValue(1), attacker.GetID(), attacker.GetGameObjType())
    if not buff:
        return False
    
    if buff.GetLayer() < effect.GetEffectValue(2):
        return False
    return True
    
 
def GetValue(attacker, defender, effect):
    return effect.GetEffectValue(0)