#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#
|
# @todo: Ôö¼ÓÕ䯷·À¾ßÔö¼ÓµÄÉúÃüÖµ300%
|
#
|
# @author: Alee
|
# @date 2018-1-20 ÏÂÎç02:50:26
|
# @version 1.0
|
#
|
# @note:
|
#
|
#---------------------------------------------------------------------
|
#µ¼Èë
|
import ChConfig
|
import BuffSkill
|
import IPY_GameWorld
|
import PlayerControl
|
import ShareDefine
|
#---------------------------------------------------------------------
|
|
## buffÏßÐÔÔö¼ÓÊôÐÔ
|
# @param defender Buff³ÐÊÜÕß
|
# @param curEffect ¼¼ÄÜЧ¹û
|
# @param calcDict ¼¼ÄÜЧ¹ûÀÛ¼Ó×ܱí
|
# @return None
|
def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
|
|
totalHP = 0
|
equipPack = defender.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
for i in xrange(equipPack.GetCount()):
|
curEquip = equipPack.GetAt(i)
|
|
if curEquip.IsEmpty():
|
continue
|
if i not in ChConfig.EquipPlace_BaseArmor:
|
continue
|
if not curEquip.GetItemQuality():
|
continue
|
#»ù´¡ÊôÐÔЧ¹û
|
for i in range(0, curEquip.GetEffectCount()):
|
equipEffect = curEquip.GetEffectByIndex(i)
|
if not equipEffect:
|
break
|
|
effectID = equipEffect.GetEffectID()
|
if effectID == 0:
|
#×îºóÒ»¸ö
|
break
|
if effectID != ShareDefine.Def_Effect_MaxHP:
|
continue
|
totalHP += equipEffect.GetEffectValue(0)
|
|
totalHP = int(totalHP*float(curEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue)
|
|
calcDict[ChConfig.TYPE_Calc_AttrMaxHP] = calcDict.get(ChConfig.TYPE_Calc_AttrMaxHP, 0) + totalHP
|
return
|
|
|
## ·µ»ØbuffÀàÐÍ£¬ÏßÐÔÓë·ñ
|
# @param
|
# @return None
|
# @remarks º¯ÊýÏêϸ˵Ã÷.
|
def GetCalcType():
|
return ChConfig.TYPE_Linear
|
|
|