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
| #!/usr/bin/python
| # -*- coding: GBK -*-
| #
| ##@package
| #
| # @todo: ¹¥»÷Ö¸¶¨buffϵÄÍæ¼Òºó´¥·¢±»¶¯¼¼ÄÜ
| #
| # @author: Alee
| # @date 2019-5-7 ÏÂÎç08:06:30
| # @version 1.0
| #
| # @note:
| #
| #---------------------------------------------------------------------
|
| import ChConfig
| import GameWorld
| import GameObj
| import SkillCommon
|
|
| def CheckCanHappen(attacker, defender, effect, curSkill):
| if not defender:
| return False
| buff = SkillCommon.FindBuffByOwner(defender, effect.GetEffectValue(0), attacker.GetID(), attacker.GetGameObjType())
| if not buff:
| return False
|
| if buff.GetLayer() < effect.GetEffectValue(1):
| return False
|
| return True
|
|