hch
2019-06-06 c5bf012252c2f379745bf07f6e55a214326f2652
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: ÈºÌå¹¥»÷°Ù·Ö±ÈµôѪ£¬±»¹¥»÷Õ߸÷×Ô¼ÆËã°Ù·Ö±È
#
# @author: Alee
# @date 2018-4-24 ÏÂÎç11:06:25
# @version 1.0
#
# @note: 
#
#---------------------------------------------------------------------
import ChConfig
import BaseAttack
import GameObj
#------------------------------------------------------------------------------ 
 
 
#------------------------------------------------------------------------------ 
 
## ÈºÌå¹¥»÷°Ù·Ö±ÈµôѪ£¬±»¹¥»÷Õ߸÷×Ô¼ÆËã°Ù·Ö±È
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.AttackAreaByHPPer(attacker, defender, tagRoundPosX, tagRoundPosY, 
                                              curSkill, skillPer, skillEnhance, tick,
                                              isExSkill = isEnhanceSkill)