#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#  
 | 
# @todo: ÐîÁ¦¼¼ÄÜ castTime ºÍ¼¼ÄÜÉ˺¦  ±íÖµ¶¼ÊÇÖ¸µ¥´Î  
 | 
#  
 | 
# @author: Alee  
 | 
# @date 2017-11-9 ÏÂÎç07:20:28  
 | 
# @version 1.0  
 | 
#  
 | 
# @note:   
 | 
#===============================================================================  
 | 
# #¼¼Äܱí×ֶΠCastTimeÓÐֵ˵Ã÷¾ÍÊÇÓнø¶ÈÌõ¼¼ÄÜ  
 | 
# 1. Ò÷³ªÀ༼ÄÜ  CastTimeÊܹ¥»÷ËÙ¶ÈÓ°Ïì  ½ø¶ÈÌõ½áÊøÊͷż¼ÄÜ  
 | 
# 1. ÐîÁ¦À༼ÄÜ  CastTimeÊܹ¥»÷ËÙ¶ÈÓ°Ïì  Ö¸µ¥´ÎÐîÁ¦Ê±¼ä£¬Ð§¹ûID 1206 AÖµ´ú±íÐîÁ¦¼¸´Î£¬½ø¶ÈÌõ×Üʱ³¤Îª casttime * 1206µÄAÖµ    
 | 
#                                                1010µÄÉ˺¦ÖµÒ²Îªµ¥´ÎÐîÁ¦É˺¦  
 | 
#           ¼¼ÄÜÊÍ·ÅÌõ¼þ£º½ø¶ÈÌõ½áÊøÊͷż¼ÄÜ£¬½ø¶ÈÌõ½øÐÐÖÐÊÕµ½Ïàͬ¼¼ÄÜ·â°üÔòÁ¢¼´Êͷż¼ÄÜ£¬Ä¬ÈÏ1´ÎÐîÁ¦É˺¦  
 | 
#           ½ø¶ÈÌõÆÚ¼äÒò¿ØÖƼ¼ÄÜ´ò¶Ï²»Êͷż¼ÄÜ£¬·ÇÉÏÊö¼¼ÄÜÊÍ·ÅÌõ¼þÒ಻Êͷż¼ÄÜ  
 | 
#                 
 | 
#===============================================================================  
 | 
  
 | 
#---------------------------------------------------------------------  
 | 
import GameMap  
 | 
import ChConfig  
 | 
import GameWorld  
 | 
import BaseAttack  
 | 
import IPY_GameWorld  
 | 
  
 | 
#---------------------------------------------------------------------  
 | 
#È«¾Ö±äÁ¿  
 | 
#---------------------------------------------------------------------  
 | 
  
 | 
#---------------------------------------------------------------------  
 | 
##³åײ  
 | 
# @param attacker ¹¥»÷ÕßʵÀý  
 | 
# @param defender ·ÀÊØÕßʵÀý  
 | 
# @param curSkill ¼¼ÄÜʵÀý  
 | 
# @param tagRoundPosX ÇøÓò×ø±êX  
 | 
# @param tagRoundPosY ÇøÓò×ø±êY  
 | 
# @param isEnhanceSkill ÊÇ·ñΪ¸½¼Ó¼¼ÄÜ  
 | 
# @param tick Ê±¼ä´Á  
 | 
# @return ·µ»ØÖµÎªÕæ, Êͷųɹ¦  
 | 
# @remarks ³åײ  
 | 
def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick):  
 | 
    skillEffect = curSkill.GetEffect(0)  
 | 
    count = attacker.GetDictByKey(ChConfig.Def_PlayerKey_PowerPartCount)  
 | 
    skillPer = skillEffect.GetEffectValue(0) * count / float(ChConfig.Def_MaxRateValue)  
 | 
    skillEnhance = skillEffect.GetEffectValue(1) * count  
 | 
      
 | 
    #---¹¥»÷±éÀúÆðµãÓÅÏȼ¶ 1.ÕÒÖ¸¶¨µã 2.·ÀÊØÕߣ¨°üÀ¨×Ô¼º£©---  
 | 
    if tagRoundPosX == -1 or tagRoundPosY == -1:  
 | 
        #ÆðµãÊǹ¥»÷·½£¬»¹ÊÇÊܺ¦·½£¬»¹ÊÇµãµØ  
 | 
        tagRoundPosX = defender.GetPosX()  
 | 
        tagRoundPosY = defender.GetPosY()  
 | 
  
 | 
      
 | 
    return BaseAttack.AttackerSkillAttackArea(attacker, defender, tagRoundPosX, tagRoundPosY,   
 | 
                                              curSkill, skillPer, skillEnhance, tick, isExSkill=isEnhanceSkill)  
 | 
  
 | 
      
 |