From 63f6f44ec2a38eaec9f39bbe26edb07daed49b49 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 16 九月 2025 17:36:50 +0800 Subject: [PATCH] 129 【战斗】战斗系统-服务端(王元姬技能,弹射待处理;支持被动变更伤害倍值;) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py | 87 +++++++------------------------------------ 1 files changed, 15 insertions(+), 72 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 32d0998..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 @@ -33,7 +33,6 @@ import PlayerSuccess import GameFuncComm import PyGameData -import PlayerVip import GameObj import FBLogic import ChConfig @@ -167,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 @@ -248,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) @@ -406,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): @@ -1606,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) @@ -1630,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) @@ -1647,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]] @@ -1879,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(): @@ -1929,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: @@ -1995,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: @@ -2011,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') @@ -2046,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) #--------------------------------------------------------------------- ## 副本开启提示(几分钟) @@ -2187,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 @@ -2651,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