From cda5ffad727e202510e3cd11017040f2488d6d34 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 09 二月 2023 17:55:13 +0800
Subject: [PATCH] 9762 【BT8】【后端】藏宝阁(9767 【BT8】新增古宝特效效果)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py |  132 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 132 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
index 160fea1..aff637e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
@@ -16,10 +16,12 @@
 #-------------------------------------------------------------------------------
 
 import GameWorld
+import PlayerRune
 import ItemCommon
 import PlayerControl
 import IpyGameDataPY
 import ChPyNetSendPack
+import PlayerGatherSoul
 import NetPackCommon
 import IPY_GameWorld
 import PlayerHorse
@@ -221,6 +223,8 @@
         return
     effType = ipyData.GetGubaoEffType()
     effCond = ipyData.GetEffCond()
+    effCond2 = ipyData.GetEffCond2()
+    effCond3 = ipyData.GetEffCond3()
     attrID = ipyData.GetEffAttrID()
     effAttrValue = ipyData.GetEffAttrValue()
     if effAttrValue <= 0:
@@ -332,6 +336,134 @@
         if attrID > 0 and addAttrValue > 0:
             effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
             
+    #22    天星塔每通关x层+xx属性                    x层
+    elif effType == 22:
+        skyTowerFloor = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerFloor)
+        addAttrValue = int(skyTowerFloor / effCond * effAttrValue)
+        #GameWorld.DebugLog("    effID=%s,effType=%s,effCond=%s,skyTowerFloor=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, skyTowerFloor, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #23    符印塔每通关x层+xx属性                    x层
+    elif effType == 23:
+        trialTowerPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV)
+        addAttrValue = int(trialTowerPassLV / effCond * effAttrValue)
+        #GameWorld.DebugLog("    effID=%s,effType=%s,effCond=%s,trialTowerPassLV=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, trialTowerPassLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #24    符印等级每每x级+xx属性                   x级
+    elif effType == 24:
+        runeTotalLV = PlayerRune.GetRuneTotalLV(curPlayer)
+        addAttrValue = int(runeTotalLV / effCond * effAttrValue)
+        #GameWorld.DebugLog("    effID=%s,effType=%s,effCond=%s,runeTotalLV=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, runeTotalLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #25    聚魂等级每每x级+xx属性                   x级
+    elif effType == 25:
+        soulTotalLV = PlayerGatherSoul.GetGatherSoulTotalLV(curPlayer)
+        addAttrValue = int(soulTotalLV / effCond * effAttrValue)
+        #GameWorld.DebugLog("    effID=%s,effType=%s,effCond=%s,soulTotalLV=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, soulTotalLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #26    x阶装备强化每x级+xx属性                x阶        x级
+    elif effType == 26:
+        customAttrDictPlus = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Plus)[2]
+        classPlusLVDict = customAttrDictPlus.get("classPlusLVDict", {})
+        classLV = effCond
+        #GameWorld.DebugLog("    effID=%s,effType=%s,classLV=%s,classPlusLVDict=%s" % (effID, effType, classLV, classPlusLVDict))
+        if classLV not in classPlusLVDict:
+            return
+        totalPlusLV = classPlusLVDict[classLV]
+        addAttrValue = int(totalPlusLV / effCond2 * effAttrValue)
+        #GameWorld.DebugLog("        effCond=%s,effCond2=%s,totalPlusLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalPlusLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #27    x阶装备宝石每x级+xx属性                x阶        x级
+    elif effType == 27:
+        customAttrDictStone = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Stone)[2]
+        classStoneLVDict = customAttrDictStone.get("classStoneLVDict", {})
+        classLV = effCond
+        #GameWorld.DebugLog("    effID=%s,effType=%s,classLV=%s,classStoneLVDict=%s" % (effID, effType, classLV, classStoneLVDict))
+        if classLV not in classStoneLVDict:
+            return
+        totalStoneLV = classStoneLVDict[classLV]
+        addAttrValue = int(totalStoneLV / effCond2 * effAttrValue)
+        #GameWorld.DebugLog("        effCond=%s,effCond2=%s,totalStoneLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalStoneLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #28    x阶装备升星每x星+xx属性                x阶        x星
+    elif effType == 28:
+        customAttrDictStar = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Star)[2]
+        classStarLVDict = customAttrDictStar.get("classStarLVDict", {})
+        classLV = effCond
+        #GameWorld.DebugLog("    effID=%s,effType=%s,classLV=%s,classStarLVDict=%s" % (effID, effType, classLV, classStarLVDict))
+        if classLV not in classStarLVDict:
+            return
+        totalStarLV = classStarLVDict[classLV]
+        addAttrValue = int(totalStarLV / effCond2 * effAttrValue)
+        #GameWorld.DebugLog("        effCond=%s,effCond2=%s,totalStarLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalStarLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #29    x阶装备洗练每x级+xx属性                x阶        x级
+    elif effType == 29:
+        customAttrDictWash = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Wash)[2]
+        classWashLVDict = customAttrDictWash.get("classWashLVDict", {})
+        classLV = effCond
+        #GameWorld.DebugLog("    effID=%s,effType=%s,classLV=%s,classWashLVDict=%s" % (effID, effType, classLV, classWashLVDict))
+        if classLV not in classWashLVDict:
+            return
+        totalWashLV = classWashLVDict[classLV]
+        addAttrValue = int(totalWashLV / effCond2 * effAttrValue)
+        #GameWorld.DebugLog("        effCond=%s,effCond2=%s,totalWashLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalWashLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #30    x阶装备附魔每x级+xx属性                x阶        x级
+    elif effType == 30:
+        customAttrDictEnchant = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Enchant)[2]
+        classEnchantLVDict = customAttrDictEnchant.get("classEnchantLVDict", {})
+        classLV = effCond
+        #GameWorld.DebugLog("    effID=%s,effType=%s,classLV=%s,classEnchantLVDict=%s" % (effID, effType, classLV, classEnchantLVDict))
+        if classLV not in classEnchantLVDict:
+            return
+        totalEnchantLV = classEnchantLVDict[classLV]
+        addAttrValue = int(totalEnchantLV / effCond2 * effAttrValue)
+        #GameWorld.DebugLog("        effCond=%s,effCond2=%s,totalEnchantLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalEnchantLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #31    x阶装备x件x品质装备+xx属性            x阶        x件        x品质
+    elif effType == 31:
+        customAttrDictEquip = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Equip)[2]
+        classEquipColorDict = customAttrDictEquip.get("classEquipColorDict", {})
+        classLV = effCond
+        #GameWorld.DebugLog("    effID=%s,effType=%s,classLV=%s,classEquipColorDict=%s" % (effID, effType, classLV, classEquipColorDict))
+        if classLV not in classEquipColorDict:
+            return
+        equipColorDict = classEquipColorDict[classLV]
+        equipColorCnt = 0
+        for itemColor in equipColorDict.values():
+            if itemColor >= effCond3:
+                equipColorCnt += 1
+        addAttrValue = int(equipColorCnt / effCond2 * effAttrValue)
+        #GameWorld.DebugLog("        effCond=%s,effCond2=%s,effCond3=%s,equipColorCnt=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, effCond3, equipColorCnt, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #32    获得x点灵根点+xx属性                        x点
+    elif effType == 32:
+        totalLingGenPoint = PlayerControl.GetTotalLingGenPoint(curPlayer)
+        addAttrValue = int(totalLingGenPoint / effCond * effAttrValue)
+        #GameWorld.DebugLog("    effID=%s,effType=%s,effCond=%s,totalLingGenPoint=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, totalLingGenPoint, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
     return
 
 def __addStarEffFuncAttr(ipyData, effAttrInfo, funcAttrInfo, effAttrValue):

--
Gitblit v1.8.0