| | |
| | | deadCnt += 1
|
| | | return deadCnt
|
| | |
|
| | | def GetBeFrozenCnt(self):
|
| | | ## 获取本阵容累计被冰冻次数
|
| | | totalCnt = 0
|
| | | batObjMgr = BattleObj.GetBatObjMgr()
|
| | | for objID in self._batHeroObjIDList:
|
| | | batObj = batObjMgr.getBatObj(objID)
|
| | | if not batObj:
|
| | | continue
|
| | | totalCnt += batObj.GetBeFrozenCnt()
|
| | | return totalCnt
|
| | | |
| | | class BatFaction():
|
| | | ## 战斗阵营
|
| | |
|
| | |
| | | lineupInfo["MGSkillIDList"] = mgSkillIDList
|
| | | return lineupInfo
|
| | |
|
| | | def GetPlayerHeroBatViewLineupInfo(curPlayer, heroID, skinIndex):
|
| | | ## 获取玩家战斗预览阵容信息
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | heroIpyData = IpyGameDataPY.GetIpyGameData("Hero", heroID)
|
| | | if not heroIpyData:
|
| | | return
|
| | | skinIDList = heroIpyData.GetSkinIDList()
|
| | | skinID = skinIDList[skinIndex] if len(skinIDList) > skinIndex else 0
|
| | | |
| | | heroBatAttrDict = IpyGameDataPY.GetFuncEvalCfg("HeroBatView", 1, {})
|
| | | heroViewInfo = IpyGameDataPY.GetFuncEvalCfg("HeroBatView", 2) # 预览时的武将 站位|等级|星级|突破等级|觉醒等级
|
| | | posNum = heroViewInfo[0] if len(heroViewInfo) > 0 else 2
|
| | | heroLV = heroViewInfo[1] if len(heroViewInfo) > 1 else 100
|
| | | star = heroViewInfo[2] if len(heroViewInfo) > 2 else 0
|
| | | breakLV = heroViewInfo[3] if len(heroViewInfo) > 3 else 0
|
| | | awakeLV = heroViewInfo[4] if len(heroViewInfo) > 4 else 0
|
| | | fightPower = 0
|
| | | |
| | | skillIDlist = GetNPCHeroSkillIDList(heroID, heroIpyData, breakLV, awakeLV)
|
| | | |
| | | heroDict = {}
|
| | | heroDict[str(posNum)] = {
|
| | | "HeroID":heroID,
|
| | | "SkinID":skinID,
|
| | | "LV":heroLV,
|
| | | "Star":star,
|
| | | "BreakLV":breakLV,
|
| | | "AwakeLV":awakeLV,
|
| | | "FightPower":fightPower,
|
| | | "AttrDict":{str(k):v for k, v in heroBatAttrDict.items() if v > 0},
|
| | | "SkillIDList":skillIDlist,
|
| | | }
|
| | | return {"PlayerID":playerID, "Hero":heroDict}
|
| | |
|
| | | def GetNPCLineupInfo(lineupID, strongerLV=0, difficulty=0, isLog=True, viewNPCID=0):
|
| | | ## 获取NPC阵容信息
|
| | | # @param lineupID: 阵容ID
|
| | |
| | | playerServerID = GameWorld.GetPlayerServerID(curPlayer)
|
| | | guid = GameWorld.GetGUID()
|
| | |
|
| | | atkBatPresetType = ChConfig.MapAtkBatPresetTypeDict.get(mapID, ShareDefine.BatPreset_Main)
|
| | | atkLineupInfo = GetPlayerLineupInfo(curPlayer, atkBatPresetType, exclusiveMapID=mapID)
|
| | | if mapID == ChConfig.Def_FBMapID_HeroBatView:
|
| | | if not valueList:
|
| | | return
|
| | | heroID = valueList[0]
|
| | | skinIndex = valueList[1] if len(valueList) > 1 else 0
|
| | | atkLineupInfo = GetPlayerHeroBatViewLineupInfo(curPlayer, heroID, skinIndex)
|
| | | else:
|
| | | atkBatPresetType = ChConfig.MapAtkBatPresetTypeDict.get(mapID, ShareDefine.BatPreset_Main)
|
| | | atkLineupInfo = GetPlayerLineupInfo(curPlayer, atkBatPresetType, exclusiveMapID=mapID)
|
| | | if not atkLineupInfo:
|
| | | GameWorld.DebugLogEx("玩家没有主线阵容数据! mapID=%s", mapID, playerID)
|
| | | return
|
| | |
| | | if skillData.GetSkillType() in ChConfig.Def_LstBuff_List:
|
| | | #GameWorld.DebugLogEx(" 持续类buff由触发时机决定剩余时间! curID=%s,index=%s,skillID=%s,buffID=%s", curID, index, skillID, buffID)
|
| | | continue
|
| | | if skillData.GetSkillType() == ChConfig.Def_SkillType_Halo and buff.GetOwnerID() != curID:
|
| | | if skillData.GetSkillType() in ChConfig.Def_HaloSkill_List and buff.GetOwnerID() != curID:
|
| | | GameWorld.DebugLogEx(" 光环buff非光源不处理! curID=%s,index=%s,skillID=%s,buffID=%s", curID, index, skillID, buffID)
|
| | | continue
|
| | |
|
| | |
| | | if skillData.GetSkillType() in ChConfig.Def_LstBuff_List:
|
| | | #GameWorld.DebugLogEx(" 持续类buff由触发时机决定剩余时间! curID=%s,index=%s,skillID=%s,buffID=%s", curID, index, skillID, buffID)
|
| | | continue
|
| | | if skillData.GetSkillType() == ChConfig.Def_SkillType_Halo and buff.GetOwnerID() != curID:
|
| | | if skillData.GetSkillType() in ChConfig.Def_HaloSkill_List and buff.GetOwnerID() != curID:
|
| | | GameWorld.DebugLogEx(" 光环buff非光源不处理! curID=%s,index=%s,skillID=%s,buffID=%s", curID, index, skillID, buffID)
|
| | | continue
|
| | | remainTime = buff.GetRemainTime()
|