| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #  | 
| # @todo: Ìá¸ßÎäÆ÷»ù´¡ÊôÐÔ(Èç¹¥»÷)µÄ°Ù·Ö±ÈµÄÖµ£¬Íâ²ã¼ÆË㣬Ч¹ûÖµ¾ö¶¨ÊôÐÔÏî  | 
| #  | 
| # @author: Alee  | 
| # @date 2018-1-20 ÏÂÎç02:50:26  | 
| # @version 1.0  | 
| #  | 
| # @note:   | 
| #  | 
| #---------------------------------------------------------------------  | 
| #µ¼Èë  | 
| import ChConfig  | 
| import PlayerControl  | 
| #---------------------------------------------------------------------  | 
|   | 
| ## buffÏßÐÔÔö¼ÓÊôÐÔ  | 
| #  @param defender Buff³ÐÊÜÕß  | 
| #  @param curEffect ¼¼ÄÜЧ¹û  | 
| #  @param calcDict ¼¼ÄÜЧ¹ûÀÛ¼Ó×Ü±í  | 
| #  @return None  | 
| def OnCalcBuffEx(defender, curEffect, calcDict, curBuff):  | 
|     attrList = PlayerControl.GetCalcAttrListValue(defender, ChConfig.Def_CalcAttrFunc_EquipBaseWeapon)  | 
|     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:  | 
|         value = int(attrList[2].get(tmpType, 0)*curEffect.GetEffectValue(0)*1.0/ChConfig.Def_MaxRateValue)  | 
|         calcDict[tmpType] = calcDict.get(tmpType, 0) + value  | 
|           | 
|     return  | 
|   | 
|   | 
| ## ·µ»ØbuffÀàÐÍ£¬ÏßÐÔÓë·ñ  | 
| #  @param   | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.    | 
| def GetCalcType():  | 
|     return ChConfig.TYPE_Linear  | 
|   | 
|   |