| | |
| | | colNumList.insert(0, specInColNum)
|
| | |
|
| | | GameWorld.DebugLogEx("纵排: colNumList=%s,specObjID-PosNum=%s-%s", colNumList, specObjID, specObjPosNum)
|
| | | posObjIDDict = batLineup.getPosObjIDDict()
|
| | | for col in colNumList:
|
| | | for row in range(1, 1 + ChConfig.TurnFightRows):
|
| | | pNum = (row - 1) * ChConfig.TurnFightCols + col
|
| | | #GameWorld.DebugLogEx(" col=%s,row=%s,pNum=%s", col, row, pNum)
|
| | | if pNum not in batLineup.posObjIDDict:
|
| | | if pNum not in posObjIDDict:
|
| | | continue
|
| | | tagObjID = batLineup.posObjIDDict[pNum]
|
| | | tagObjID = posObjIDDict[pNum]
|
| | | tagBatObj = batObjMgr.getBatObj(tagObjID)
|
| | | if not __skillTagFilter(curBatObj, tagBatObj, tagAffect, isNoSelf):
|
| | | continue
|
| | |
| | |
|
| | | GameWorld.DebugLogEx("全部: colNumList=%s,specObjID-PosNum=%s-%s", colNumList, specObjID, specObjPosNum)
|
| | | # 按前排优先原则
|
| | | posObjIDDict = batLineup.getPosObjIDDict()
|
| | | for row in range(1, 1 + ChConfig.TurnFightRows):
|
| | | for col in colNumList:
|
| | | pNum = (row - 1) * ChConfig.TurnFightCols + col
|
| | | #GameWorld.DebugLogEx(" col=%s,row=%s,pNum=%s", col, row, pNum)
|
| | | if pNum not in batLineup.posObjIDDict:
|
| | | if pNum not in posObjIDDict:
|
| | | continue
|
| | | tagObjID = batLineup.posObjIDDict[pNum]
|
| | | tagObjID = posObjIDDict[pNum]
|
| | | tagBatObj = batObjMgr.getBatObj(tagObjID)
|
| | | if not __skillTagFilter(curBatObj, tagBatObj, tagAffect, isNoSelf):
|
| | | continue
|
| | |
| | | batObjMgr = BattleObj.GetBatObjMgr()
|
| | | for num in lineupNumList:
|
| | | batLineup = batFaction.getBatlineup(num)
|
| | | for tagID in batLineup.posObjIDDict.values():
|
| | | for tagID in batLineup.getBatHeroObjIDList():
|
| | | tagObj = batObjMgr.getBatObj(tagID)
|
| | | if tagObj.IsAlive() and tagObj.CheckInState(checkInStates):
|
| | | return lineupNum, changeTagSet
|
| | |
| | |
|
| | | GameWorld.DebugLogEx("前后排: rowNumList=%s,colNumList=%s,specObjID-PosNum=%s-%s", rowNumList, colNumList, specObjID, specObjPosNum)
|
| | | aimObjList = []
|
| | | posObjIDDict = batLineup.getPosObjIDDict()
|
| | | for row in rowNumList:
|
| | | for col in colNumList:
|
| | | pNum = (row - 1) * ChConfig.TurnFightCols + col
|
| | | #GameWorld.DebugLogEx(" row=%s,col=%s,pNum=%s", row, col, pNum)
|
| | | if pNum not in batLineup.posObjIDDict:
|
| | | if pNum not in posObjIDDict:
|
| | | continue
|
| | | tagObjID = batLineup.posObjIDDict[pNum]
|
| | | tagObjID = posObjIDDict[pNum]
|
| | | tagBatObj = batObjMgr.getBatObj(tagObjID)
|
| | | if not __skillTagFilter(curBatObj, tagBatObj, tagAffect, isNoSelf):
|
| | | continue
|
| | |
| | | batObjMgr = BattleObj.GetBatObjMgr()
|
| | | batLineup = tagObj.GetTFBatLineup()
|
| | | aimObjList = []
|
| | | posObjIDDict = batLineup.getPosObjIDDict()
|
| | | for col in colNumList:
|
| | | pNum = (row - 1) * ChConfig.TurnFightCols + col
|
| | | if pNum not in batLineup.posObjIDDict:
|
| | | if pNum not in posObjIDDict:
|
| | | continue
|
| | | tagObjID = batLineup.posObjIDDict[pNum]
|
| | | tagObjID = posObjIDDict[pNum]
|
| | | tagBatObj = batObjMgr.getBatObj(tagObjID)
|
| | | if not tagBatObj.IsAlive():
|
| | | continue
|
| | |
| | | batObjMgr = BattleObj.GetBatObjMgr()
|
| | | batLineup = tagObj.GetTFBatLineup()
|
| | | aimObjList = []
|
| | | posObjIDDict = batLineup.getPosObjIDDict()
|
| | | for row in range(1, 1 + ChConfig.TurnFightRows):
|
| | | pNum = (row - 1) * ChConfig.TurnFightCols + col
|
| | | if pNum not in batLineup.posObjIDDict:
|
| | | if pNum not in posObjIDDict:
|
| | | continue
|
| | | tagObjID = batLineup.posObjIDDict[pNum]
|
| | | tagObjID = posObjIDDict[pNum]
|
| | | tagBatObj = batObjMgr.getBatObj(tagObjID)
|
| | | if not tagBatObj.IsAlive():
|
| | | continue
|
| | |
| | | colNumList.insert(0, inColNum)
|
| | |
|
| | | # 按前排优先原则
|
| | | posObjIDDict = batLineup.getPosObjIDDict()
|
| | | for row in range(ChConfig.TurnFightRows):
|
| | | for col in colNumList:
|
| | | pNum = row * ChConfig.TurnFightCols + col
|
| | | if pNum not in batLineup.posObjIDDict:
|
| | | if pNum not in posObjIDDict:
|
| | | continue
|
| | | tagObjID = batLineup.posObjIDDict[pNum]
|
| | | tagObjID = posObjIDDict[pNum]
|
| | | tagBatObj = batObjMgr.getBatObj(tagObjID)
|
| | | if not __skillTagFilter(curBatObj, tagBatObj, tagAffect, isNoSelf=True):
|
| | | continue
|
| | |
| | | # 优先处理afterLogic,可再预先汇总一些会触发被动的信息
|
| | | relatedSkillID = useSkill.GetSkillID()
|
| | | delBuffAfterEffList = [] # buff消失后要触发的被动,一般用于后置处理的逻辑
|
| | | beControlledHardDict = {} # 受控目标 {objID:buff, ...}
|
| | | afterLogicList = useSkill.GetAfterLogicList()
|
| | | for logicType, logicData in afterLogicList:
|
| | | if logicType == ChConfig.AfterLogic_DelBuff:
|
| | |
| | | buffObj = logicData[0]
|
| | | buff = logicData[1]
|
| | | TurnBuff.SyncBuffRefresh(turnFight, buffObj, buff, relatedSkillID)
|
| | | |
| | | # 统计添加buff需要触发的被动
|
| | | elif logicType == ChConfig.AfterLogic_TriggerAddBuff:
|
| | | triggerType, batObj, buff, buffOwner = logicData
|
| | | if buffOwner.GetID() == curID:
|
| | | if triggerType == ChConfig.TriggerWay_BeControlledHard:
|
| | | beControlledHardDict[batObj.GetID()] = buff
|
| | |
|
| | | # 统计击杀
|
| | | killObjList = [] # 击杀其他阵营目标列表
|
| | |
| | | batFaction = turnFight.getBatFaction(faction)
|
| | | for lineupNum in batFaction.lineupDict.keys():
|
| | | batLineup = batFaction.getBatlineup(lineupNum)
|
| | | for lineupObjID in batLineup.posObjIDDict.values():
|
| | | for lineupObjID in batLineup.getBatHeroObjIDList():
|
| | | lineupObj = batObjMgr.getBatObj(lineupObjID)
|
| | | if not lineupObj.IsAlive():
|
| | | continue
|
| | |
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, curObj, ChConfig.TriggerWay_Stun, tagObj, connSkill=useSkill)
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, tagObj, ChConfig.TriggerWay_BeStun, curObj, connSkill=useSkill)
|
| | |
|
| | | # 控制
|
| | | if tagID in beControlledHardDict:
|
| | | buff = beControlledHardDict[tagID]
|
| | | if buff.GetCurBuffState() == ChConfig.BatObjState_Frozen:
|
| | | if curMGObj:
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, curMGObj, ChConfig.TriggerWay_Frozen, tagObj, connSkill=useSkill, byBatObj=curObj)
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, tagObj, ChConfig.TriggerWay_BeControlledHard, curObj, connSkill=useSkill, connBuff=buff)
|
| | | |
| | | # 暴击
|
| | | if tagID in superHitObjIDList:
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, curObj, ChConfig.TriggerWay_SuperHit, tagObj, connSkill=useSkill)
|
| | |
| | |
|
| | |
|
| | | # 敌友方
|
| | | if isAttackDirect or batType in [ChConfig.TurnBattleType_Combo, ChConfig.TurnBattleType_Pursue] or isDotHurt:
|
| | | for lineupObjID in curBatLineup.posObjIDDict.values():
|
| | | if isAttackDirect or batType in [ChConfig.TurnBattleType_Combo, ChConfig.TurnBattleType_Pursue] or isDotHurt or tagID in beControlledHardDict:
|
| | | for lineupObjID in curBatLineup.getBatHeroObjIDList():
|
| | | lineupObj = batObjMgr.getBatObj(lineupObjID)
|
| | | if not lineupObj.IsAlive():
|
| | | continue
|
| | |
| | | elif isDotHurt:
|
| | | if not triggerOne:
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, lineupObj, ChConfig.TriggerWay_FriendDotHurt, tagObj, connSkill=useSkill, byFriendObj=curObj)
|
| | | |
| | | # 敌方被控时
|
| | | if tagID in beControlledHardDict and lineupObj.GetFaction() != tagObj.GetFaction():
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, lineupObj, ChConfig.TriggerWay_EnemyBeControlledHard, tagObj, connSkill=useSkill)
|
| | |
|
| | | # 连击
|
| | | if batType == ChConfig.TurnBattleType_Combo:
|
| | |
| | | if not batFaction:
|
| | | return
|
| | | batLineup = batFaction.getBatlineup(1)
|
| | | if ChConfig.HeroID_Dongbai not in batLineup.heroObjIDDict:
|
| | | return
|
| | | dongbaiObj = BattleObj.GetBatObjMgr().getBatObj(batLineup.heroObjIDDict[ChConfig.HeroID_Dongbai])
|
| | | dongbaiObj = batLineup.getHeroObj(ChConfig.HeroID_Dongbai)
|
| | | if not dongbaiObj or dongbaiObj.IsAlive():
|
| | | return
|
| | | skill = dongbaiObj.GetSkillManager().FindSkillByID(ChConfig.SkillID_DongbaiRevive)
|
| | |
| | | faction, lineupNum, hurtValueDict, immuneHurtDict)
|
| | | # 按优先级顺序处理拥有分摊效果的武将
|
| | | for effHeroID in effHeroIDList:
|
| | | if effHeroID not in batLineup.heroObjIDDict:
|
| | | continue
|
| | | objID = batLineup.heroObjIDDict[effHeroID]
|
| | | batObj = batObjMgr.getBatObj(objID)
|
| | | batObj = batLineup.getHeroObj(effHeroID)
|
| | | if not batObj or not batObj.IsAlive():
|
| | | continue
|
| | | objID = batObj.GetID()
|
| | | buffMgr = batObj.GetBuffManager()
|
| | |
|
| | | inHurt = objID in hurtValueDict # 光环里的人员是否有受伤
|