#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#
|
##@package
|
#
|
# @todo: ³ÖÐø¼õÒæ¸ù¾ÝÖµ¼Ó³É£¬¼õ·¨£¨ÏßÐÔ£©
|
#
|
# @author: Alee
|
# @date 2019-4-29 ÏÂÎç02:32:15
|
# @version 1.0
|
#
|
# @note:
|
#
|
#---------------------------------------------------------------------
|
#µ¼Èë
|
import PlayerControl
|
import NPCCommon
|
import IPY_GameWorld
|
import GameWorld
|
import ChConfig
|
#---------------------------------------------------------------------
|
#È«¾Ö±äÁ¿
|
#---------------------------------------------------------------------
|
|
#---------------------------------------------------------------------
|
def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):
|
|
attrType = curEffect.GetEffectValue(0)
|
value = curEffect.GetEffectValue(1)*curBuff.GetValue()
|
calcDict[attrType] = calcDict.get(attrType, 0) - value
|
|
return
|
|
|
## ·µ»ØbuffÀàÐÍ£¬ÏßÐÔÓë·ñ
|
# @param
|
# @return None
|
# @remarks º¯ÊýÏêϸ˵Ã÷.
|
def GetCalcType():
|
return ChConfig.TYPE_Linear
|
|
def ProcessBuff(defender, curBuff, curEffect, processBuffTick, tick):
|
# ´¥·¢¼Ó³É ÊôÐÔË¢ÐÂ
|
value = curBuff.GetValue()
|
if value >= curEffect.GetEffectValue(2):
|
return
|
|
curBuff.SetValue(value+1)
|
#Ë¢ÐÂÊôÐÔ
|
curObjType = defender.GetGameObjType()
|
#Íæ¼Ò
|
if curObjType == IPY_GameWorld.gotPlayer:
|
#Ë¢ÐÂÍæ¼ÒÊôÐÔ
|
playerControl = PlayerControl.PlayerControl(defender)
|
#playerControl.CalcPassiveBuffAttr()
|
playerControl.RefreshPlayerAttrByBuff()
|
#NPC
|
elif curObjType == IPY_GameWorld.gotNPC:
|
npcControl = NPCCommon.NPCControl(defender)
|
npcControl.RefreshNPCAttrState()
|
return
|
|