#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # #------------------------------------------------------------------------------- # ##@package Buff_NoLinePlus # @todo: buff·ÇÏßÐÔÔö¼ÓÊôÐÔ # @author: wdb # @date: 2013-06-05 # @version 1.2 # # @note # @change: "2013-10-31 14:45" Alee ÎäÆ÷µÄ¼¼ÄÜÔöǿЧ¹û # @change: "2014-05-30 00:40" Alee Ì××°buffÊôÐÔ°Ù·Ö±ÈÌí¼Ó²ã¼¶¼ÆËã #--------------------------------------------------------------------- """Version = 2014-05-30 00:40""" #------------------------------------------------------------------------------ #µ¼Èë import ChConfig import BuffSkill import IPY_GameWorld #--------------------------------------------------------------------- ## buff·ÇÏßÐÔÔö¼ÓÊôÐÔ # @param defender Buff³ÐÊÜÕß # @param curEffect ¼¼ÄÜЧ¹û # @param calcDict ¼¼ÄÜЧ¹ûÀÛ¼Ó×ܱí # @return None def OnCalcBuffEx(defender, curEffect, calcDict, curBuff): if curEffect.GetEffectID() in ChConfig.TYPE_NPCAttr_Calc and defender.GetGameObjType() != IPY_GameWorld.gotNPC: return effect = curEffect.GetEffectValue(0) if curBuff and curBuff.GetLayer() and BuffSkill.IsLayerPlusAttr(curBuff): # ²ã¼¶µþ¼ÓЧ¹û effect = effect*curBuff.GetLayer() # ÊôÐÔbuffЧ¹ûid¶ÔÓ¦¼ÆËãÄ£¿é×Öµä{Ч¹ûid:(¼ÆËãÄ£¿éÃûºó׺, [ÊôÐÔÀàÐÍ])} suffixName, attrTypeList = BuffSkill.FindBuffAttrByEffectID(curEffect) if attrTypeList == []: attrTypeList = ChConfig.Def_Skill_BuffEffectOutside.get(curEffect.GetEffectID(), ("", []))[1] for attrType in attrTypeList: calcDict[attrType] = calcDict.get(attrType, 0) + effect return ## ·µ»ØbuffÀàÐÍ£¬ÏßÐÔÓë·ñ # @param # @return None # @remarks º¯ÊýÏêϸ˵Ã÷. def GetCalcType(): return ChConfig.TYPE_NoLinear ##¼ÆËãÔöǿֵ # @param attacker ¹¥»÷ÕßʵÀý # @param curSkill ¼¼ÄÜʵÀý # @param curEffect µ±Ç°¼¼ÄÜЧ¹û1 # @return ×ÜÖµ def CalcBuffValue(attacker, defender, curSkill, changeBuffValueDict): if not changeBuffValueDict: return [] return [changeBuffValueDict.get(i, 0) for i in range(ChConfig.Def_BuffValue_Count)]