#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
#-------------------------------------------------------------------------------
|
#
|
##@package SKillModule_5
|
#
|
# @todo: ¸øµ¥ÌåÄ¿±êÖÆÔì³ðºÞ
|
# @author Alee
|
# @date 2010-12-16 20:50
|
# @version 1.0
|
#
|
# ÏêϸÃèÊö:¸øµ¥ÌåÄ¿±êÖÆÔì³ðºÞ £¨Èº³°¿ÉÒÔͨ¹ýȺ¹¥´¥·¢£©
|
#
|
#------------------------------------------------------------------------------
|
"""Version = 2010-12-16 20:50"""
|
#------------------------------------------------------------------------------
|
#µ¼Èë
|
import ChConfig
|
import BaseAttack
|
import SkillCommon
|
import NPCCommon
|
import IPY_GameWorld
|
import GameObj
|
|
## ¸øµ¥ÌåÄ¿±êÖÆÔì³ðºÞ
|
# @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):
|
#²»ÊÇNPC²»´¦Àí
|
if defender.GetGameObjType() != IPY_GameWorld.gotNPC:
|
return
|
|
#²»¸øËÀÍöµÄNPCÌí¼Ó³ðºÞ
|
if GameObj.GetHP(defender) <= 0:
|
return False
|
|
#---¼ÆËãÌí¼ÓµÄ³ðºÞÖµ---
|
#Ìí¼Ó³ðºÞЧ¹û
|
angryEffect = curSkill.GetEffect(0)
|
angryPer = angryEffect.GetEffectValue(0) / float(ChConfig.Def_MaxRateValue)
|
angryEnhance = angryEffect.GetEffectValue(1)
|
addAngryValue = int(SkillCommon.GetCureBaseValue(attacker, curSkill) * angryPer + angryEnhance)
|
|
#---¸øNPCÌí¼Ó³ðºÞ---
|
npcControl = NPCCommon.NPCControl(defender)
|
npcControl.AddObjToAngryList(attacker, addAngryValue, True, False)
|
|
#´¦Àí¼¼ÄÜ´¥·¢ºÍ¹¥»÷³É¹¦Âß¼
|
return BaseAttack.DoSkillEx_AttackSucess(attacker, defender, curSkill, tick, isEnhanceSkill)
|
|