From 929aebd1119d3b28d6640460cbbe0c656f5b9528 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 28 十一月 2025 14:20:18 +0800
Subject: [PATCH] 16 卡牌服务端(去除砍价人次限制,由砍价表配置的人次上限决定;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py |   33 +++++++++++++++++++--------------
 1 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
index 1108741..fb773af 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/TurnAttack.py
@@ -234,6 +234,8 @@
         self.tagViewCache = tagViewCache
         return
     
+    def getPVPPlayerID(self): return self.tagPlayerID # 获取PVP目标玩家ID,也可用于判断是否PVP
+    
     def isFBMap(self):
         ## 是否副本地图中,非主线的均视为副本
         return self.mapID not in [ChConfig.Def_FBMapID_Main, ChConfig.Def_FBMapID_MainBoss]
@@ -574,7 +576,7 @@
     olPlayer = PlayerOnline.GetOnlinePlayer(curPlayer)
     lineup = olPlayer.GetLineup(lineupID)
     if lineup.IsEmpty():
-        GameWorld.DebugLog("玩家没有目标阵容默认取主阵容! lineupID=%s" % lineupID)
+        GameWorld.DebugLog("玩家没有目标阵容默认取主阵容! lineupID=%s" % lineupID, curPlayer.GetPlayerID())
         lineup = olPlayer.GetLineup(ShareDefine.Lineup_Main)
     return lineup
 
@@ -1141,10 +1143,12 @@
     tagViewCache = PlayerViewCache.FindViewCache(tagPlayerID)
     if not tagViewCache:
         GameWorld.DebugLog("目标玩家没有缓存数据! tagPlayerID=%s" % tagPlayerID, playerID)
-        return {}
+        PlayerControl.NotifyCode(curPlayer, "TagNoViewCache")
+        return
     defLineupInfo = GetCacheLineupInfo(tagViewCache, defLineupID)
     if not defLineupInfo:
         GameWorld.DebugLog("目标玩家没有该阵容数据! tagPlayerID=%s,defLineupID=%s" % (tagPlayerID, defLineupID), playerID)
+        PlayerControl.NotifyCode(curPlayer, "TagNoLineup")
         return
     
     turnMax = GetTurnMax(mapID)
@@ -1253,15 +1257,13 @@
 def __doSetFightPoint(curPlayer, fightPoint):
     ## 设置消耗倍值
     GameWorld.DebugLog("设置战锤消耗倍值: %s" % fightPoint)
-    if fightPoint == 1:
-        pass
-    elif fightPoint == 2:
-        # 条件验证
-        pass
-    elif fightPoint == 3:
-        # 条件验证
-        pass
-    else:
+    needTreeLVList = IpyGameDataPY.GetFuncEvalCfg("AutoGuaji", 1)
+    if fightPoint < 1 or fightPoint > len(needTreeLVList):
+        return
+    needTreeLV = needTreeLVList[fightPoint - 1]
+    treeLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreeLV)
+    if treeLV < needTreeLV:
+        GameWorld.DebugLog("祝福树等级不足: treeLV=%s < %s" % (treeLV, needTreeLV))
         return
     curPlayer.SetFightPoint(fightPoint)
     return
@@ -1549,6 +1551,7 @@
             batObj = batObjMgr.getBatObj(objID)
             turnFight.ResetOneActionUseSkillCnt()
             TurnPassive.OnTriggerPassiveEffect(turnFight, batObj, ChConfig.TriggerWay_FightStart)
+            TurnPassive.OnTriggerPassiveEffect(turnFight, batObj, ChConfig.TriggerWay_InBattlefield)
             
     turnFight.enterLogic = True
     return True
@@ -1913,8 +1916,12 @@
     turnFight.costTime = time.time() - turnFight.startTime
     winFaction = turnFight.winFaction
     turnFight.isWin = (winFaction == ChConfig.Def_FactionA)
+    mapID = turnFight.mapID
+    funcLineID = turnFight.funcLineID
     GameWorld.DebugLog("--- 战斗结束处理 ---, winFaction=%s, costTime=%ss, %s" % (winFaction, turnFight.costTime, guid))
-    
+    if mapID != ChConfig.Def_FBMapID_Main:
+        GameWorld.Log("战斗耗时: %ss, mapID=%s,funcLineID=%s" % (turnFight.costTime, mapID, funcLineID))
+        
     # 统计明细
     batObjMgr = BattleObj.GetBatObjMgr()
     statInfo = {}
@@ -1949,8 +1956,6 @@
                 
     overMsg = {"winFaction":winFaction, "statInfo":statInfo}
     curPlayer = turnFight.curPlayer
-    mapID = turnFight.mapID
-    funcLineID = turnFight.funcLineID
     
     FBLogic.OnTurnFightOver(curPlayer, turnFight, mapID, funcLineID, overMsg)
     

--
Gitblit v1.8.0