hxp
3 天以前 19956b8576f2c2c68c4c4d811acbc3e2af3d97b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GameWorldLogic.FBProcess.GameLogic_Zhanchui
#
# @todo:°×¹ÇÓ¯Ò°/Õ½´¸Ãؾ³
# @author hxp
# @date 2025-09-30
# @version 1.0
#
# ÏêϸÃèÊö: °×¹ÇÓ¯Ò°/Õ½´¸Ãؾ³
#
#-------------------------------------------------------------------------------
#"""Version = 2025-09-30 10:30"""
#-------------------------------------------------------------------------------
 
import GameWorld
import ItemControler
import FBCommon
 
def OnTurnFightRequest(curPlayer, mapID, funcLineID, tagType, tagID, valueList):
    ## »ØºÏÕ½¶·ÇëÇó 
    
    if FBCommon.IsFBPass(curPlayer, mapID, funcLineID):
        GameWorld.DebugLog("Òѹý¹ØµÄ²»Äܲ»Öظ´ÌôÕ½! mapID=%s,funcLineID=%s" % (mapID, funcLineID))
        return
    
    return True
 
def OnTurnFightOver(curPlayer, turnFight, mapID, funcLineID, overMsg):
    ## »ØºÏÕ½¶·½áÊø
    
    if not curPlayer:
        return
    
    isWin = turnFight.isWin
    
    if not isWin:
        return
    
    if FBCommon.IsFBPass(curPlayer, mapID, funcLineID):
        GameWorld.DebugLog("Òѹý¹ØµÄ²»Öظ´»ñµÃ¹ý¹Ø½±Àø! mapID=%s,funcLineID=%s" % (mapID, funcLineID))
        return
    
    itemList = FBCommon.GetPassAwardList(mapID, funcLineID)
    GameWorld.DebugLog("¹ý¹Ø½±Àø: mapID=%s,funcLineID=%s,itemList=%s" % (mapID, funcLineID, itemList))
    # Ê×ͨ²»¿Û´ÎÊý
    FBCommon.SetFBPass(curPlayer, mapID, funcLineID)
    ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["Zhanchui", False, {}], isNotifyAward=False)
    overMsg.update({FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList)})
    
    return
 
def OnPlayerFBSweepAsk(curPlayer, mapID, lineID, sweepCnt, dataEx):
    ## ¿É·ñɨµ´
    
    return True
 
def OnPlayerFBSweepResult(curPlayer, mapID, lineID, sweepCnt, dataEx, askRet):
    ## É¨µ´½á¹û£¬´ÎÊýÏûºÄÒÑÔÚÍâ²ã´¦Àí¿Û³ý
    
    itemList = FBCommon.GetSweepAwardList(mapID, lineID, sweepCnt)
    GameWorld.DebugLog("°×¹ÇӯҰɨµ´: mapID=%s,lineID=%s,sweepCnt=%s" % (mapID, lineID, sweepCnt))
    
    ItemControler.GivePlayerItemOrMail(curPlayer, itemList, event=["Zhanchui", False, {}], isNotifyAward=False)
    
    isPass = 1
    overDict = {FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(itemList), FBCommon.Over_isSweep:1}
    FBCommon.NotifyFBOver(curPlayer, mapID, lineID, isPass, overDict)
    
    return True