From fbf3fe5655d97c67db3bf07706ab5af232dcc9a5 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 18 九月 2025 19:17:48 +0800 Subject: [PATCH] 129 【战斗】战斗系统-服务端(甘夫人技能;增加连击、追击增伤减伤属性;) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 96 +++++++++--------------------------------------- 1 files changed, 18 insertions(+), 78 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py index 611abb5..3e62f1a 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py @@ -17,7 +17,6 @@ import PlayerControl import ItemCommon import GameMap -import EventShell import NPCCommon import ReadChConfig import BuffSkill @@ -34,7 +33,6 @@ import PlayerSuccess import GameFuncComm import PyGameData -import PlayerVip import GameObj import FBLogic import ChConfig @@ -168,20 +166,16 @@ def IsFBPass(curPlayer, mapID, lineID): ## 副本线路是否已过关 passLineID = 0 - if mapID == ChConfig.Def_FBMapID_RealmTower: - passLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_RealmTowerFloor) - elif mapID == ChConfig.Def_FBMapID_SkyTower: - passLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerFloor) - elif mapID == ChConfig.Def_FBMapID_TrialTower: - passLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV) + if mapID == ChConfig.Def_FBMapID_Main: + return PlayerControl.IsMainLevelPass(curPlayer, lineID) + + ipyData = IpyGameDataPY.GetIpyGameDataNotLog('FBGeneralTrain', mapID, lineID) + if ipyData: + passLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FBPassLineID % mapID) else: - ipyData = IpyGameDataPY.GetIpyGameDataNotLog('FBGeneralTrain', mapID, lineID) - if ipyData: - passLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FBPassLineID % mapID) - else: - grade = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [mapID]) - if grade: - return True + grade = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [mapID]) + if grade: + return True if passLineID >= lineID: return True @@ -249,13 +243,6 @@ if not maxTimes: return True, "" - # 首次进入免费 - if mapID in [ChConfig.Def_FBMapID_PersonalBoss]: - curfbStar = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [mapID]) - if not curfbStar: - GameWorld.DebugLog("OnEnterFBEvent 首次进入该副本线路免费!mapID=%s,lineID=%s" % (mapID, lineID)) - return True, "" - #playerID = curPlayer.GetPlayerID() enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % mapID) maxCnt = GetEnterFBMaxCnt(curPlayer, mapID) @@ -407,17 +394,6 @@ gameFB.SetGameFBDict(ChConfig.Def_FB_NPCStrengthenMaxLV, maxLV) GameWorld.Log("NPC成长动态等级变更: isLeave=%s,totalLV=%s,playerCnt=%s,averageLV=%s,maxLV=%s" % (isLeave, totalLV, playerCnt, averageLV, maxLV), playerID) - # 上古战场特殊处理 - if mapID == ChConfig.Def_FBMapID_ElderBattlefield: - lineID = GameWorld.GetGameWorld().GetPropertyID() - 1 - fbLineIpyData = GetFBLineIpyData(mapID, lineID) - lvLimitMin = 0 if not fbLineIpyData else fbLineIpyData.GetLVLimitMin() - robotLVDiff = IpyGameDataPY.GetFuncCfg("ElderBattlefieldCfg", 5) - robotLVMin, robotLVMax = averageLV - robotLVDiff, averageLV - robotLVMin = max(lvLimitMin, robotLVMin) - gameFB.SetGameFBDict(ChConfig.Def_FB_NPCStrengthenMaxLV, robotLVMax) - gameFB.SetGameFBDict(ChConfig.Def_FB_NPCStrengthenMinLV, robotLVMin) - GameWorld.Log(" 更新上古机器人等级范围: lineID=%s,robotLVDiff=%s,robotLV=(%s~%s)" % (lineID, robotLVDiff, robotLVMin, robotLVMax)) return True def UpdFBLineNPCStrengthenPlayerCnt(playerID, isLeave): @@ -670,8 +646,8 @@ itemDict['ItemID'] = itemInfo[0] if infolen > 1: itemDict['Count'] = itemInfo[1] - if infolen > 2: - itemDict['IsAuctionItem'] = int(itemInfo[2]) + #if infolen > 2: + # itemDict['IsAuctionItem'] = int(itemInfo[2]) elif isinstance(itemInfo, int): itemDict['ItemID'] = itemInfo elif isinstance(itemInfo, dict): @@ -681,7 +657,7 @@ continue itemDict['ItemID'] = itemInfo.GetItemTypeID() itemDict['Count'] = itemInfo.GetCount() - itemDict['IsAuctionItem'] = ItemControler.GetIsAuctionItem(itemInfo) + #itemDict['IsAuctionItem'] = ItemControler.GetIsAuctionItem(itemInfo) #itemDict['IsSuite'] = int(itemInfo.GetIsSuite()) itemDict['UserData'] = itemInfo.GetUserData() jsonItemList.append(itemDict) @@ -1607,7 +1583,7 @@ mwAddCnt = 0#wmpIpyData.GetEffectValue() if wmpIpyData else 0 extraTimesVIPPriID = fbIpyData.GetExtraTimesVIPPriID() - extraCnt = PlayerVip.GetPrivilegeValue(curPlayer, extraTimesVIPPriID) + extraCnt = 0 buyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_BuyFbCntDay % mapID) recoverFbCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_RecoverFbCnt % mapID) itemAddCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ItemAddFbCnt % mapID) @@ -1631,7 +1607,7 @@ mwAddCnt = 0#wmpIpyData.GetEffectValue() if wmpIpyData else 0 maxTimes += mwAddCnt #法宝增加的次数加到基础次数里 extraTimesVIPPriID = fbIpyData.GetExtraTimesVIPPriID() - extraCnt = PlayerVip.GetPrivilegeValue(curPlayer, extraTimesVIPPriID) + extraCnt = 0 buyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_BuyFbCntDay % mapID) recoverFbCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_RecoverFbCnt % mapID) itemAddCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ItemAddFbCnt % mapID) @@ -1648,7 +1624,7 @@ #未买次数 buyTimesVIPPriID = fbIpyData.GetBuyTimesVIPPriID() - canBuyCnt = PlayerVip.GetPrivilegeValue(curPlayer, buyTimesVIPPriID) + canBuyCnt = 0 noBuyCnt = max(0, canBuyCnt - buyCnt) return [[rCommonCnt, rRegainFbCnt, rExtraCnt, rBuyCnt, rItemAddCnt, noBuyCnt], [maxTimes, maxRegainFbCnt, extraCnt, canBuyCnt, 10000, canBuyCnt]] @@ -1880,13 +1856,6 @@ ipyData = ipyDataMgr.GetFBFuncByIndex(i) mapID = ipyData.GetDataMapID() - # 有真实助战次数奖励限制的 - if ipyData.GetDayHelpCountMax(): - helpCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FBRealHelpCount % mapID) - if helpCount: - PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FBRealHelpCount % mapID, 0) - GameWorld.DebugLog("重置日助战奖励次数限制!mapID=%s" % mapID) - dayTimes = ipyData.GetDayTimes() # 没有日次数限制的不处理 if not dayTimes and not ipyData.GetBuyTimesVIPPriID() and not ipyData.GetExtraTimesVIPPriID() and not ipyData.GetExtraTimesMWPriID(): @@ -1930,14 +1899,7 @@ GameWorld.DebugLog(" 重置:mapID=%s,dayTimes=%s,buyCnt=%s,recoverCnt=%s,itemAddCnt=%s,regainFBCnt=%s,maxCnt=%s,enterCnt=%s" % (mapID, dayTimes, buyCnt, recoverCnt, itemAddCnt, regainFBCnt, maxCnt, enterCnt)) - if mapID == ChConfig.Def_FBMapID_ZhuXianBoss: - if GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_ZhuXianBoss): - curCnt = min(maxCnt - enterCnt + IpyGameDataPY.GetFuncCfg('ZhuXianBossCntCfg'), IpyGameDataPY.GetFuncCfg('ZhuXianBossCntCfg', 2)) - if curCnt > dayTimes: - PlayerControl.NomalDictSetProperty(curPlayer, itemAddCntKey, curCnt - dayTimes) - elif curCnt < dayTimes: - PlayerControl.NomalDictSetProperty(curPlayer, enterCntKey, dayTimes - curCnt) - + mapIDInfo.append(mapID) if mapIDInfo: @@ -1996,9 +1958,6 @@ if not ipyData: return canBuyCnt = 0 - buyTimesVIPPriID = ipyData.GetBuyTimesVIPPriID() - if buyTimesVIPPriID: - canBuyCnt += PlayerVip.GetPrivilegeValue(curPlayer, buyTimesVIPPriID) canBuyCnt += PlayerGoldInvest.GetAddFBBuyCnt(curPlayer, mapID) GameWorld.DebugLog("购买副本进入次数: mapID=%s,canBuyCnt=%s" % (mapID, canBuyCnt)) if canBuyCnt <= 0: @@ -2012,11 +1971,9 @@ if mapID == ChConfig.Def_FBMapID_SealDemon and maxDayTimes and maxCnt - enterCnt >= maxDayTimes: GameWorld.DebugLog('当前次数已满,无需购买。。') return - if mapID == ChConfig.Def_FBMapID_ZhuXianBoss and maxCnt - enterCnt >= IpyGameDataPY.GetFuncCfg('ZhuXianBossCntCfg', 2): - return if hasBuyCnt >= canBuyCnt: - GameWorld.DebugLog("购买次数已经用完mapID=%s,buyTimesVIPPriID=%s,hasBuyCnt=%s >= canBuyCnt=%s" % (mapID, buyTimesVIPPriID, hasBuyCnt, canBuyCnt)) + GameWorld.DebugLog("购买次数已经用完mapID=%s,hasBuyCnt=%s >= canBuyCnt=%s" % (mapID, hasBuyCnt, canBuyCnt)) return costGoldDict = IpyGameDataPY.GetFuncEvalCfg('BuyFBCntCost', 1, {}) costGold = costGoldDict.get(str(mapID), '0') @@ -2047,9 +2004,6 @@ paramList = [curPlayer.GetPlayerName()] PlayerControl.SendMailByKey("BuyLoveFBCntCoupleMail", [coupleID], addItemList, paramList) return - -def DoFuncOpen_RunDaily(curPlayer): return EventReport.WriteFuncCMEAcceptable(curPlayer, ShareDefine.GameFuncID_RunDaily) -def DoFuncOpen_RunFamily(curPlayer): return EventReport.WriteFuncCMEAcceptable(curPlayer, ShareDefine.GameFuncID_RunFamily) #--------------------------------------------------------------------- ## 副本开启提示(几分钟) @@ -2188,11 +2142,7 @@ return encourageCost = eval(ipyData.GetMoneyCount()) - if curMapID == ChConfig.Def_FBMapID_SealDemon: - isDouble = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FMTDouble) - if isDouble: #封魔坛双倍挑战则鼓舞双倍花费 - encourageCost *= 2 - + costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, encourageType, encourageCost) if not costMoneyList: return @@ -2229,7 +2179,6 @@ SendFBEncourageInfo(player, encourageLV+1, ownerID) if player.GetID() == curPlayer.GetID(): PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FBEncourage, 1, [curMapID]) - EventShell.EventRespons_FBEncourage(curPlayer, curMapID) else: BuffSkill.DoAddBuff(curPlayer, buffType, skillBuff, tick) @@ -2237,7 +2186,6 @@ SendFBEncourageInfo(curPlayer, encourageLV+1, ownerID) #成就 PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FBEncourage, 1, [curMapID]) - EventShell.EventRespons_FBEncourage(curPlayer, curMapID) return True ## 添加副本鼓舞buff,一般用于玩家掉线后,在规定时间内重新上线回到副本时重新上buff @@ -2654,14 +2602,6 @@ totalZhenQi = gameWorld.GetGameWorldDictByKey(ChConfig.Map_Player_AreaReward_GetZhenQiTotal%playerID) totalZhenQi += addZhenQi gameWorld.SetGameWorldDict(ChConfig.Map_Player_AreaReward_GetZhenQiTotal%playerID, totalZhenQi) - - if "TechPoint" in rewardFormatDict: - addTechPoint = eval(rewardFormatDict["TechPoint"]) - PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, addTechPoint, True, ShareDefine.Def_AddFAVReason_FamilyInvade, True) - - techPoint = gameWorld.GetGameWorldDictByKey(ChConfig.Map_Player_AreaReward_GetTechPoint%playerID) - techPoint += addTechPoint - gameWorld.SetGameWorldDict(ChConfig.Map_Player_AreaReward_GetTechPoint%playerID, techPoint) #GameWorld.DebugLog(" 战场福利 倍区=%s,reLV=%s,reExp=%s,addExp=%s,addZQ=%s,totalExp=%s,totalZQ=%s" # % (multiple, reLV, reExp, addExp, addZhenQi, totalExp, totalZhenQi), playerID) -- Gitblit v1.8.0