| | |
| | |
|
| | | # 主线战斗
|
| | | self.mainFight = TurnAttack.MainFight(playerID)
|
| | | |
| | | self._lastBatBufferInfo = [] # 最后一场战斗临时回放 ["guid", "buffer"]
|
| | | return
|
| | |
|
| | | def OnClear(self):
|
| | |
| | |
|
| | | GameWorld.DebugLog("武将物品养成更新索引: %s, 影响阵容:%s" % (itemIndexList, effLineupIDList), self.playerID)
|
| | | return effLineupIDList
|
| | | |
| | | def GetLastBatBuffer(self): return self._lastBatBufferInfo
|
| | | def SetLastBatBuffer(self, guid, batBuffer):
|
| | | self._lastBatBufferInfo = [guid, batBuffer]
|
| | | return
|
| | |
|
| | | class OnlineMgr():
|
| | | ## 准在线玩家管理
|
| | |
| | | elif skinIDList:
|
| | | skinID = skinIDList[0]
|
| | |
|
| | | starMax = PlayerHero.GetHeroStarMax(heroItem)
|
| | | InitAddPer += qualityIpyData.GetInitAddPer()
|
| | | LVAddPer += qualityIpyData.GetLVAddPer() * heroLV
|
| | | LVAddPer += qualityIpyData.GetLVAddPer() * max(0, heroLV - 1)
|
| | | BreakLVAddPer += qualityIpyData.GetBreakLVAddPer() * breakLV
|
| | | StarAddPer += qualityIpyData.GetStarAddPer() * star
|
| | | StarAddPer += qualityIpyData.GetStarAddPer() * min(star, starMax)
|
| | |
|
| | | lineupHero = lineup.GetLineupHero(posNum)
|
| | | #if False:
|
| | |
| | | selfAttrDict[int(k)] = v
|
| | | heroSelfAttrInfo[heroID] = selfAttrDict
|
| | |
|
| | | # 星级天赋
|
| | | starTalentAttrDict = {}
|
| | | idCount = heroItem.GetUserAttrCount(ShareDefine.Def_IudetHeroTalentID)
|
| | | lvCount = heroItem.GetUserAttrCount(ShareDefine.Def_IudetHeroTalentIDLV)
|
| | | for aIndex in range(min(idCount, lvCount)):
|
| | | talentID = heroItem.GetUserAttrByIndex(ShareDefine.Def_IudetHeroTalentID, aIndex)
|
| | | talentLV = heroItem.GetUserAttrByIndex(ShareDefine.Def_IudetHeroTalentIDLV, aIndex)
|
| | | stIpyData = IpyGameDataPY.GetIpyGameData("HeroTalent", talentID)
|
| | | if not stIpyData:
|
| | | continue
|
| | | attrID = stIpyData.GetAttrID()
|
| | | attrValue = stIpyData.GetAttrValue() * talentLV
|
| | | starTalentAttrDict[attrID] = starTalentAttrDict.get(attrID, 0) + attrValue
|
| | | heroStarTalentInfo[heroID] = starTalentAttrDict
|
| | | |
| | | # 突破潜能
|
| | | breakAttrDict = {}
|
| | | breakIpyDataList = IpyGameDataPY.GetIpyGameDataList("HeroBreak", heroID)
|
| | |
| | | heroBreakAttrInfo[heroID] = breakAttrDict
|
| | |
|
| | | # 觉醒天赋
|
| | | maxUnlockSlot = IpyGameDataPY.GetFuncCfg("HeroStarTalent", 1) # 常规天赋槽个数
|
| | | awakeTalentAttrDict = {}
|
| | | awakeIpyDataList = IpyGameDataPY.GetIpyGameDataList("HeroAwake", heroID)
|
| | | awakeIpyDataList = IpyGameDataPY.GetIpyGameDataListNotLog("HeroAwake", heroID)
|
| | | if awakeIpyDataList:
|
| | | for awakeIpyData in awakeIpyDataList:
|
| | | if awakeIpyData.GetAwakeLV() > awakeLV:
|
| | | break
|
| | | unlockTalentSlot = awakeIpyData.GetUnlockTalentSlot()
|
| | | maxUnlockSlot = max(maxUnlockSlot, unlockTalentSlot)
|
| | | attrIDList = awakeIpyData.GetAttrIDList()
|
| | | attrValueList = awakeIpyData.GetAttrValueList()
|
| | | for aIndex in range(min(len(attrIDList), len(attrValueList))):
|
| | |
| | | if skillID:
|
| | | lineupHero.heroSkillIDList.append(skillID)
|
| | | heroAwakeTalentInfo[heroID] = awakeTalentAttrDict
|
| | | |
| | | # 星级天赋
|
| | | starTalentAttrDict = {}
|
| | | idCount = heroItem.GetUserAttrCount(ShareDefine.Def_IudetHeroTalentID)
|
| | | lvCount = heroItem.GetUserAttrCount(ShareDefine.Def_IudetHeroTalentIDLV)
|
| | | for aIndex in range(min(idCount, lvCount, maxUnlockSlot)): # 重生导致已觉醒槽位失效时属性也无效
|
| | | talentID = heroItem.GetUserAttrByIndex(ShareDefine.Def_IudetHeroTalentID, aIndex)
|
| | | talentLV = heroItem.GetUserAttrByIndex(ShareDefine.Def_IudetHeroTalentIDLV, aIndex)
|
| | | stIpyData = IpyGameDataPY.GetIpyGameData("HeroTalent", talentID)
|
| | | if not stIpyData:
|
| | | continue
|
| | | attrID = stIpyData.GetAttrID()
|
| | | attrValue = stIpyData.GetAttrValue() * talentLV
|
| | | starTalentAttrDict[attrID] = starTalentAttrDict.get(attrID, 0) + attrValue
|
| | | heroStarTalentInfo[heroID] = starTalentAttrDict
|
| | |
|
| | | # 羁绊统计
|
| | | for fetterID in heroIpyData.GetFetterIDList():
|
| | |
| | | GameWorld.DebugLog("主阵容变化,重新开始战斗", playerID)
|
| | | if mainTurnFight.mapID == ChConfig.Def_FBMapID_Main:
|
| | | TurnAttack.__doMainLevelWave(curPlayer, True)
|
| | | elif mainTurnFight.mapID == ChConfig.Def_FBMapID_MainBoss:
|
| | | TurnAttack.__doMainBossStart(curPlayer)
|
| | |
|
| | | # 否则只重新设置战斗属性
|
| | | else:
|