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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.PrintFightPower
#
# @todo:Êä³öÕóÈÝÕ½Á¦
# @author hxp
# @date 2025-07-21
# @version 1.0
#
# ÏêϸÃèÊö: Êä³öÕóÈÝÕ½Á¦
#
#-------------------------------------------------------------------------------
#"""Version = 2025-07-21 14:30"""
#-------------------------------------------------------------------------------
 
import GameWorld
import PlayerPreset
import PlayerControl
import IpyGameDataPY
import PlayerOnline
import ShareDefine
import ChConfig
 
#Âß¼­ÊµÏÖ
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param msgList ²ÎÊýÁбí
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer, msgList):
    
    olPlayer = PlayerOnline.GetOnlinePlayer(curPlayer)
    if not msgList:
        GameWorld.DebugAnswer(curPlayer, "PrintFightPower [Ô¤Éè·½°¸ ×¨ÏíÊôÐÔµØÍ¼ID]")
        GameWorld.DebugAnswer(curPlayer, "Ö÷¹«Õ½Á¦: %s" % PlayerControl.GetFightPower(curPlayer))
        
        batPresetIDList = []
        for batPresetType in ShareDefine.BatPresetList:
            batPresetName = ShareDefine.BatPresetName.get(batPresetType, "")
            batPresetName = "%s(%s)" % (batPresetName, batPresetType)
            batPresetID = PlayerPreset.GetBatPresetID(curPlayer, batPresetType)
            lineup = olPlayer.GetPresetLineup(batPresetID)
            GameWorld.DebugAnswer(curPlayer, "%s-·½°¸(%s)Õ½Á¦: %s" % (batPresetName, batPresetID, lineup.fightPower))
            if batPresetType == ShareDefine.BatPreset_Main:
                for exclusiveMapID in ChConfig.ExclusiveBatAttrMapIDList:
                    exclusiveLineup = olPlayer.GetPresetLineup(batPresetID, exclusiveMapID=exclusiveMapID)
                    GameWorld.DebugAnswer(curPlayer, "    µØÍ¼(%s)Õ½Á¦: %s" % (exclusiveLineup.exclusiveMapID, exclusiveLineup.fightPower))
            if batPresetID not in batPresetIDList:
                batPresetIDList.append(batPresetID)
                
        # ÆäËû
        for batPresetID in olPlayer.GetBatPresetIDList():
            if batPresetID in batPresetIDList:
                continue
            if not PlayerPreset.GetFuncPresetIDState(curPlayer, batPresetID):
                continue
            lineup = olPlayer.GetPresetLineup(batPresetID)
            GameWorld.DebugAnswer(curPlayer, "ÆäËû·½°¸(%s)Õ½Á¦: %s" % (batPresetID, lineup.fightPower))
            
        return
    
    batPresetID = msgList[0]
    exclusiveMapID = msgList[1] if len(msgList) > 1 else 0
    batPresetIDList = olPlayer.GetBatPresetIDList()
    if batPresetID not in batPresetIDList:
        GameWorld.DebugAnswer(curPlayer, "ûÓиÃÕ½¶·Ô¤Éè·½°¸ÊôÐÔ!%s" % batPresetID)
        return
    if exclusiveMapID not in ChConfig.ExclusiveBatAttrMapIDList:
        exclusiveMapID = 0
    GameWorld.DebugAnswer(curPlayer, "-------------------")
    lineup = olPlayer.GetPresetLineup(batPresetID, exclusiveMapID=exclusiveMapID)    
    GameWorld.DebugAnswer(curPlayer, "¡¾·½°¸ - %s¡¿Õ½Á¦: %s" % (batPresetID, lineup.fightPower))
    if exclusiveMapID:
        GameWorld.DebugAnswer(curPlayer, "µØÍ¼×¨Êô·½°¸µØÍ¼ID:%s" % exclusiveMapID)
        
    for calcIndex in ChConfig.Def_CalcAttrList:
        calcName = ChConfig.CalcAttrName.get(calcIndex, "%s" % calcIndex)
        attrDict = olPlayer.GetCalcAttr(calcIndex)
        attrInfo = ""
        for attrID in ChConfig.AttrIDList:
            attrValue = attrDict.get(attrID, 0)
            if not attrValue:
                continue
            if attrInfo:
                attrInfo += "; "
            attrInfo += "%s-%s" % (attrID, attrValue)
        GameWorld.DebugAnswer(curPlayer, "%s:%s" % (calcName, attrInfo))
        
    posNumList = lineup.GetPosNumList()
    posNumList.sort()
    for posNum in posNumList:
        lineupHero = lineup.GetLineupHero(posNum)
        GameWorld.DebugAnswer(curPlayer, "¡ñλÖÃ:%s,Î佫(%s) Õ½Á¦: %s" % (posNum, lineupHero.heroID, lineupHero.fightPower))
        GameWorld.DebugAnswer(curPlayer, "¼¼ÄÜ:%s,¼¼ÄÜÕ½Á¦:%s" % (lineupHero.heroSkillIDList, lineupHero.skillFightPower))
        attrInfo = ""
        for attrID in ChConfig.AttrIDList:
            attrValue = lineupHero.heroBatAttrDict.get(attrID, 0)
            if not attrValue:
                continue
            if attrInfo:
                attrInfo += "£»"
            attrInfo += "[%s-%s]" % (attrID, attrValue)
        GameWorld.DebugAnswer(curPlayer, "ÊôÐÔ:%s" % attrInfo)
        
    return