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
  | #!/usr/bin/python  
 |  # -*- coding: GBK -*-  
 |  #  
 |  ##@package  
 |  #  
 |  # @todo: Ä¿±êÖ¸¶¨buffÏ£¬´óÓÚµÈÓڲ㼶Ìá¸ß¼¼Ä̶ܹ¨ÖµÉ˺¦  
 |  #  
 |  # @author: Alee  
 |  # @date 2019-6-1 ÏÂÎç10:16:30  
 |  # @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)  
 |    
 |  
  |