| | |
| | |
|
| | | #光环技能,默认施法者身上也必须有,时长与施法者身上的同步
|
| | | haloSrcBuff = None # 光源buff
|
| | | if skillType == ChConfig.Def_SkillType_Halo and ownerID != curID:
|
| | | if skillType in ChConfig.Def_HaloSkill_List and ownerID != curID:
|
| | | haloSrcBuff = buffOwner.GetBuffManager().FindBuffBySkillID(skillID, ownerID)
|
| | | if not haloSrcBuff:
|
| | | GameWorld.ErrLog("添加光环技能时找不到光源! skillID=%s,ownerID=%s" % (skillID, ownerID))
|
| | |
| | | if curBuffState:
|
| | | buffMgr.AddBuffState(curBuffState, buffID)
|
| | |
|
| | | if skillType == ChConfig.Def_SkillType_Halo:
|
| | | if skillType in ChConfig.Def_HaloSkill_List:
|
| | | __addHaloBuffEffObjID(curID, buff, skillID, ownerID, haloSrcBuff)
|
| | |
|
| | | if afterLogic and buffSkill:
|
| | |
| | | RefreshBuffAttr(batObj)
|
| | |
|
| | | if refreshType in [1, 2] and skillData.GetCurBuffState() == ChConfig.BatObjState_Frozen:
|
| | | batObj.SetBeFrozenCnt(batObj.GetBeFrozenCnt() + 1) # 后面加的通用逻辑,原司马懿的暂不动代码
|
| | | __smyRecordEnemyFrozen(turnFight, batObj, curBuff)
|
| | | return
|
| | |
|
| | |
| | | curBuff.SetRemainTime(remainTime)
|
| | | SyncBuffRefresh(turnFight, batObj, curBuff)
|
| | |
|
| | | if skillType == ChConfig.Def_SkillType_Halo and ownerID == buffObjID:
|
| | | if skillType in ChConfig.Def_HaloSkill_List and ownerID == buffObjID:
|
| | | haloObjIDList = curBuff.GetHaloObjIDList()
|
| | | GameWorld.DebugLogEx("光环buff回合变更同步其他有效目标该光环: skillID=%s,ownerID=%s,haloObjIDList=%s", skillID, ownerID, haloObjIDList)
|
| | | batObjMgr = BattleObj.GetBatObjMgr()
|
| | |
| | | if isRefreshAttr and not noRefreshAttr:
|
| | | RefreshBuffAttr(batObj)
|
| | |
|
| | | if skillType == ChConfig.Def_SkillType_Halo and ownerID == buffObjID:
|
| | | if skillType in ChConfig.Def_HaloSkill_List and ownerID == buffObjID:
|
| | | haloObjIDList = curBuff.GetHaloObjIDList()
|
| | | GameWorld.DebugLogEx("光环buff删除同步删除其他有效目标该光环: skillID=%s,ownerID=%s,haloObjIDList=%s", skillID, ownerID, haloObjIDList)
|
| | | batObjMgr = BattleObj.GetBatObjMgr()
|
| | |
| | |
|
| | | if isRefreshAttr:
|
| | | RefreshBuffAttr(batObj)
|
| | | |
| | | # 重新添加本阵营有效光环
|
| | | |
| | | # 重新添加有效光环
|
| | | batObjMgr = BattleObj.GetBatObjMgr()
|
| | | batLineup = batObj.GetTFBatLineup()
|
| | | for tagObjID in batLineup.getAllPosObjIDList():
|
| | | tagObj = batObjMgr.getBatObj(tagObjID)
|
| | | if not tagObj.IsAlive():
|
| | | continue
|
| | | tagBuffMgr = tagObj.GetBuffManager()
|
| | | for index in range(tagBuffMgr.GetBuffCount()):
|
| | | buff = tagBuffMgr.GetBuffByIndex(index)
|
| | | haloObjIDList = buff.GetHaloObjIDList()
|
| | | if not haloObjIDList or objID not in haloObjIDList:
|
| | | for faction, num in turnFight.actionSortList:
|
| | | batFaction = turnFight.getBatFaction(faction)
|
| | | batLineup = batFaction.getBatlineup(num)
|
| | | for tagObjID in batLineup.getAllPosObjIDList():
|
| | | tagObj = batObjMgr.getBatObj(tagObjID)
|
| | | if not tagObj.IsAlive():
|
| | | continue
|
| | | if buff.GetOwnerID() != tagObjID:
|
| | | # 非光源
|
| | | continue
|
| | | haloSkillID = buff.GetSkillID()
|
| | | GameWorld.DebugLogEx("复活后重新添加本阵营光环: objID=%s,ownerID=%s,haloSkillID=%s", objID, tagObjID, haloSkillID)
|
| | | haloSkill = tagObj.GetSkillManager().FindSkillByID(haloSkillID)
|
| | | if not haloSkill:
|
| | | DoAddBuffBySkillID(turnFight, batObj, haloSkillID, buffOwner=tagObj)
|
| | | continue
|
| | | OnAddBuff(turnFight, batObj, haloSkill, buffOwner=tagObj)
|
| | | tagBuffMgr = tagObj.GetBuffManager()
|
| | | for index in range(tagBuffMgr.GetBuffCount()):
|
| | | buff = tagBuffMgr.GetBuffByIndex(index)
|
| | | haloObjIDList = buff.GetHaloObjIDList()
|
| | | if not haloObjIDList or objID not in haloObjIDList:
|
| | | continue
|
| | | if buff.GetOwnerID() != tagObjID:
|
| | | # 非光源
|
| | | continue
|
| | | haloSkillID = buff.GetSkillID()
|
| | | GameWorld.DebugLogEx("复活后重新添加光环: objID=%s,ownerID=%s,haloSkillID=%s", objID, tagObjID, haloSkillID)
|
| | | haloSkill = tagObj.GetSkillManager().FindSkillByID(haloSkillID)
|
| | | if not haloSkill:
|
| | | DoAddBuffBySkillID(turnFight, batObj, haloSkillID, buffOwner=tagObj)
|
| | | continue
|
| | | OnAddBuff(turnFight, batObj, haloSkill, buffOwner=tagObj)
|
| | |
|
| | | # 光源重新添加有效光环,根据光源是否还有效规则优化,待处理
|
| | | return
|
| | |
| | | buff = buffMgr.GetBuffByIndex(index)
|
| | | layer = max(1, buff.GetLayer())
|
| | | skillData = buff.GetSkillData()
|
| | | |
| | | skillType = skillData.GetSkillType()
|
| | | if skillType == ChConfig.Def_SkillType_HaloDep:
|
| | | if buff.GetOwnerID() == objID:
|
| | | #GameWorld.DebugLogEx(" 减益光环对自己无效! buffSkillID=%s", skillData.GetSkillID(), objID)
|
| | | continue
|
| | | |
| | | effExDict = buff.GetEffectExDict()
|
| | | for effCalcInfo, effValueEx in effExDict.items():
|
| | | effID, calcType = effCalcInfo
|