#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#
|
#
|
##@package Buff_803
|
# @todo: Ѫħ»¤¶Ü ×ÔÉí´¦ÓÚ¼Ó¹¥×´Ì¬£¬¸øÓèÔö¼Ó120%¹¥»÷Á¦»¤¶Ü£¬³ÖÐø5Ã룬»¤¶Üʱ¼ä½áÊøÊ±£¬Èç¹ûÉúÃüµÍÓÚ15%£¬»¤¶Üû±»»÷ÆÆ£¬Ôò»Ö¸´200%»¤¶ÜÉúÃü£¬CD100Ãë
|
#
|
# @author Alee
|
# @date 2017-10-31 14:10
|
# @version 1.0
|
#
|
#---------------------------------------------------------------------
|
"""Version = 2017-10-31 14:10"""
|
|
|
import IPY_GameWorld
|
import GameWorld
|
import ChConfig
|
import GameObj
|
import SkillCommon
|
|
|
|
# @param attacker ¹¥»÷ÕßʵÀý
|
# @param curSkill ¼¼ÄÜʵÀý
|
# @param curEffect µ±Ç°¼¼ÄÜЧ¹û1
|
# @return ×ÜÖµ
|
def CalcBuffValue(attacker, defender, curSkill, changeBuffValueDict):
|
curEffect = curSkill.GetEffect(0)
|
return [int(float(curEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue*attacker.GetMaxAtk())]
|
|
def OnBuffDisappear(curObj, curSkill, curBuff, findEffect, tick):
|
# Ê£Ó໤¶ÜÖµÓÃÓÚ»ØÑª
|
if curBuff.GetBuffValue() == 0:
|
return
|
|
restoreValue = int(float(findEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue*curObj.GetMaxAtk())
|
if GameObj.GetHP(curObj)*ChConfig.Def_MaxRateValue/GameObj.GetMaxHP(curObj) >= findEffect.GetEffectValue(1):
|
return
|
|
restoreValue = int(restoreValue*float(findEffect.GetEffectValue(2))/ChConfig.Def_MaxRateValue)
|
SkillCommon.SkillAddHP(curObj, 0, restoreValue, True)
|
|
return
|