#!/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