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
#!/usr/bin/python
# -*- coding: GBK -*-
#
##@package
#
# @todo: NPC¼¼ÄÜ£¬Í¬Ã˾ù̯É˺¦
#
# @author: Alee
# @date 2018-8-28 ÏÂÎç04:24:14
# @version 1.0
#
# @note: 
#
#---------------------------------------------------------------------
 
import ChConfig
import BaseAttack
import SkillShell
import IPY_GameWorld
 
 
def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick):
 
    skillEffect = curSkill.GetEffect(0)
    skillPer = skillEffect.GetEffectValue(0) / float(ChConfig.Def_MaxRateValue)
    skillEnhance = skillEffect.GetEffectValue(1)
    
    #---¹¥»÷±éÀúÆðµãÓÅÏȼ¶ 1.ÕÒÖ¸¶¨µã 2.·ÀÊØÕߣ¨°üÀ¨×Ô¼º£©---
    if tagRoundPosX == -1 or tagRoundPosY == -1:
        #ÆðµãÊǹ¥»÷·½£¬»¹ÊÇÊܺ¦·½£¬»¹ÊÇµãµØ
        tagRoundPosX = defender.GetPosX()
        tagRoundPosY = defender.GetPosY()
        
        
    #ʹÓü¼ÄÜ
    return BaseAttack.AttackerSkillAttackAreaByFamily(attacker, defender, tagRoundPosX, tagRoundPosY, 
                                              curSkill, skillPer, skillEnhance, tick, isEnhanceSkill)