#!/usr/bin/python # -*- coding: GBK -*- # ##@package # # @todo: È«Éí·À¾ßÆÕͨÌ××°´ïµ½X½×£¬ËùÓм¼ÄܵÄÉ˺¦ÌáÉýXXX% # # @author: Alee # @date 2018-11-6 ÏÂÎç03:26:05 # @version 1.0 # # @note: # #--------------------------------------------------------------------- #µ¼Èë import ChConfig import PlayerControl import ChEquip import IPY_GameWorld #--------------------------------------------------------------------- def OnCalcBuffEx(defender, curEffect, calcDict, curBuff): if defender.GetGameObjType() != IPY_GameWorld.gotPlayer: return suitsLV = ChEquip.GetEquipSuitsLVByType(defender, ChConfig.EquipSuitType_Normal, ChConfig.EquipGroupType_Armor) if suitsLV < curEffect.GetEffectValue(2): return attrType = curEffect.GetEffectValue(1) attrTypeList = [attrType] # ¹¥»÷Á¦ÓÐ×î´ó×îС ÌØÊâ´¦Àí if attrType in [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax]: attrTypeList = [ChConfig.TYPE_Calc_AttrATKMin, ChConfig.TYPE_Calc_AttrATKMax] for tmpType in attrTypeList: calcDict[tmpType] = calcDict.get(tmpType, 0) + curEffect.GetEffectValue(0) return ## ·µ»ØbuffÀàÐÍ£¬ÏßÐÔÓë·ñ # @param # @return None # @remarks º¯ÊýÏêϸ˵Ã÷. def GetCalcType(): return ChConfig.TYPE_Linear