#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
##@package Skill.GameSkills.SkillModule_45
|
#
|
# @todo:´ò³ö¹¥»÷Õßij¸öÊôÐÔµÄX%¸½¼ÓYÖµ£¬µ¥Ìå¹¥»÷
|
# @author hxp
|
# @date 2024-01-18
|
# @version 1.0
|
#
|
#-------------------------------------------------------------------------------
|
#"""Version = 2024-01-18 16:00"""
|
#-------------------------------------------------------------------------------
|
|
import ChConfig
|
import SkillCommon
|
import EffGetSet
|
|
def UseSkill(attacker, defender, curSkill, tagRoundPosX, tagRoundPosY, isEnhanceSkill, tick):
|
if not defender:
|
return
|
|
skillEffect = curSkill.GetEffect(0)
|
skillPer = skillEffect.GetEffectValue(0) / float(ChConfig.Def_MaxRateValue)
|
skillEnhance = skillEffect.GetEffectValue(1)
|
attrIndex = skillEffect.GetEffectValue(2)
|
|
attrValue = EffGetSet.GetValueByEffIndex(attacker, attrIndex)
|
hurtValue = int(attrValue * skillPer + skillEnhance)
|
return SkillCommon.SkillLostHP(defender, curSkill, attacker, hurtValue, tick, isDoAttackResult=False)
|