| | |
| | | ownerID = buffOwner.GetID()
|
| | |
|
| | | skillType = buffSkill.GetSkillType()
|
| | | #无敌免疫持续减益buff、控制类buff
|
| | | if skillType in [ChConfig.Def_SkillType_LstDepBuff, ChConfig.Def_SkillType_Action] \
|
| | | and batObj.CheckInState(ChConfig.BatObjState_Wudi):
|
| | | GameWorld.DebugLogEx("无敌状态下免疫该buff: curID=%s,skillID=%s,ownerID=%s,relatedSkillID=%s", curID, skillID, ownerID, relatedSkillID)
|
| | | return
|
| | | |
| | | #免疫减益buff、控制类buff
|
| | | if skillType in [ChConfig.Def_SkillType_LstDepBuff, ChConfig.Def_SkillType_DepBuff, ChConfig.Def_SkillType_Action]:
|
| | | if batObj.CheckInState(ChConfig.BatObjState_Wudi):
|
| | | GameWorld.DebugLogEx("无敌状态下免疫该buff: curID=%s,skillID=%s,ownerID=%s,relatedSkillID=%s", curID, skillID, ownerID, relatedSkillID)
|
| | | return
|
| | | if TurnPassive.GetTriggerEffectValue(turnFight, batObj, buffOwner, ChConfig.PassiveEff_ImmuneControlDepBuff, buffSkill):
|
| | | return
|
| | | |
| | | #被动触发免疫控制buff
|
| | | if skillType == ChConfig.Def_SkillType_Action:
|
| | | if TurnPassive.GetTriggerEffectValue(turnFight, batObj, buffOwner, ChConfig.PassiveEff_ImmuneControlBuff, buffSkill):
|
| | |
| | | #受控时
|
| | | if curBuffState and IsControlledHardState(curBuffState):
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, batObj, ChConfig.TriggerWay_BeControlledHard, tagObj=buffOwner, connSkill=buffSkill, connBuff=buff)
|
| | | |
| | | batObjMgr = BattleObj.GetBatObjMgr()
|
| | | ownerBatLineup = buffOwner.GetBatLineup()
|
| | | for lineupObjID in ownerBatLineup.posObjIDDict.values():
|
| | | lineupObj = batObjMgr.getBatObj(lineupObjID)
|
| | | if not lineupObj.IsAlive():
|
| | | continue
|
| | | # 敌方被控时
|
| | | if lineupObj.GetFaction() != batObj.GetFaction():
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, lineupObj, ChConfig.TriggerWay_EnemyBeControlledHard, batObj, connSkill=buffSkill)
|
| | | |
| | | return buff
|
| | |
|
| | | def IsControlledHardState(state):
|
| | |
| | |
|
| | | if refreshType and buffSkill and buffOwner:
|
| | | TurnPassive.OnTriggerPassiveEffect(turnFight, buffOwner, ChConfig.TriggerWay_BuffAddByOwner, tagObj=batObj, connSkill=buffSkill, connBuff=curBuff)
|
| | | # 判断是否有额外属性的
|
| | | if not isRefreshAttr:
|
| | | effExDict = curBuff.GetEffectExDict()
|
| | | for effCalcInfo in effExDict.keys():
|
| | | effID = effCalcInfo[0]
|
| | | if effID in ChConfig.AttrIDList:
|
| | | isRefreshAttr = True
|
| | | break
|
| | | |
| | | |
| | | # 判断是否有额外属性的
|
| | | if not isRefreshAttr:
|
| | | effExDict = curBuff.GetEffectExDict()
|
| | | for effCalcInfo in effExDict.keys():
|
| | | effID = effCalcInfo[0]
|
| | | if effID in ChConfig.AttrIDList:
|
| | | isRefreshAttr = True
|
| | | break
|
| | | |
| | | if isRefreshAttr:
|
| | | RefreshBuffAttr(batObj)
|
| | |
|
| | |
| | | effID = effect.GetEffectID()
|
| | | if effID not in ChConfig.AttrIDList:
|
| | | continue
|
| | | if effect.GetTriggerWay():
|
| | | # 有需要触发才生效的属性在buff中不生效,由触发规则决定
|
| | | continue
|
| | | if not (not effect.GetTriggerSrc() or effect.GetTriggerBuffEnable()):
|
| | | # buff时,不配默认有效,或仅buff有效
|
| | | continue
|