#!/usr/bin/python # -*- coding: GBK -*- # ##@package # # @todo: ÎüÊÕ¶Ô·½ÊôÐÔ£¬ÓÐÄ¿±ê¼¼ÄÜ£¨41£©, ÔöÒæbuff # # @author: Alee # @date 2019-3-15 ÏÂÎç04:05:05 # @version 1.0 # # @note: # #--------------------------------------------------------------------- import ChConfig import BaseAttack import BuffSkill import IPY_GameWorld import SkillCommon import EffGetSet def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick): if not defender: return if defender.GetGameObjType() != IPY_GameWorld.gotPlayer: return addBuffValueList = [] # Ч¹ûID | ÊôÐÔÏÍò·ÖÂÊ # ×î¶àÎüÊÕÄ¿±ê3ÖÖÊôÐÔ ´æÈëbuffvalue for i in range(3): attrIndex = curSkill.GetEffect(i).GetEffectValue(0) if not attrIndex: break curValue = EffGetSet.GetValueByEffIndex(defender, attrIndex) curValue = int(curValue * curSkill.GetEffect(i).GetEffectValue(1) / ChConfig.Def_MaxRateValue) addBuffValueList.append(curValue) buffType = SkillCommon.GetBuffType(curSkill) BuffSkill.DoAddBuff(attacker, buffType, curSkill, tick, addBuffValueList, attacker) #´¦Àí¼¼ÄÜ´¥·¢ºÍ¹¥»÷³É¹¦Âß¼­ return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)