| | |
| | | self._AffectBuffDict = {} # 被动buff {(触发方式, 有效来源):{buffID:[effID, ...], ...}, ...}
|
| | | return
|
| | |
|
| | | def GetPassiveEffByTrigger(self, triggerWay, connSkill=None, connSkillTypeID=0):
|
| | | def GetPassiveEffByTrigger(self, triggerWay, connSkill=None, connSkillTypeID=0, connBuff=None):
|
| | | '''获取可触发的效果列表,技能跟buff根据触发优先级按顺序触发,优先级越高越先执行,相同时技能优先
|
| | | 优先级之后有需要再扩展
|
| | | @return: [["skill/buff", skillID/buffID, effIDList], ...]
|
| | | '''
|
| | | effList = []
|
| | |
|
| | | if not connSkillTypeID and connSkill:
|
| | | connSkillTypeID = connSkill.GetSkillTypeID()
|
| | | |
| | | if connSkill and self._batObj.GetID() == connSkill.GetObjID():
|
| | | if not connSkillTypeID:
|
| | | if connSkill:
|
| | | connSkillTypeID = connSkill.GetSkillTypeID()
|
| | | elif connBuff:
|
| | | skillData = connBuff.GetSkillData()
|
| | | connSkillTypeID = skillData.GetSkillTypeID()
|
| | | |
| | | # SkillData 对象暂时没有 GetObjID
|
| | | if connSkill and hasattr(connSkill, "GetObjID") and self._batObj.GetID() == connSkill.GetObjID():
|
| | | skillID = connSkill.GetSkillID()
|
| | | skillManager = self._batObj.GetSkillManager()
|
| | | # 非对象身上的技能,读取本技能被动触发的效果,一般是主技能拆分的子技能
|
| | |
| | | triggerSrc = effect.GetTriggerSrc()
|
| | | if not triggerWay:
|
| | | continue
|
| | | if triggerWay == ChConfig.TriggerWay_CurSkillEff:
|
| | | if triggerWay in ChConfig.TriggerWayNoLoadList:
|
| | | continue
|
| | | if triggerSrc != ChConfig.TriggerSrc_SkillSelf:
|
| | | # 仅添加本技能的
|
| | |
| | | triggerSrc = effect.GetTriggerSrc()
|
| | | if not triggerWay:
|
| | | return
|
| | | if triggerWay == ChConfig.TriggerWay_CurSkillEff:
|
| | | if triggerWay in ChConfig.TriggerWayNoLoadList:
|
| | | return
|
| | | if triggerSrc in [ChConfig.TriggerSrc_Buff, ChConfig.TriggerSrc_BuffSelf]:
|
| | | # buff有效的不加进来
|
| | |
| | | triggerSrc = effect.GetTriggerSrc()
|
| | | if not triggerWay:
|
| | | return
|
| | | if triggerWay == ChConfig.TriggerWay_CurSkillEff:
|
| | | if triggerWay in ChConfig.TriggerWayNoLoadList:
|
| | | return
|
| | | if triggerSrc in [ChConfig.TriggerSrc_Skill, ChConfig.TriggerSrc_SkillSelf]:
|
| | | # 技能有效的不加进来
|
| | |
| | | def GetTriggerWay(self): return self._triggerWay
|
| | | def GetTriggerSrc(self): return self._triggerSrc
|
| | | #def GetTriggerParams(self, index): return self._triggerParams[index] if len(self._triggerParams) > index else 0
|
| | | |
| | | EmptyEffect = SkillEffect(0, [])
|
| | |
|
| | | class SklllData():
|
| | |
|
| | |
| | | def GetHappenRate(self): return self._ipyData.GetHappenRate() # 触发概率
|
| | | def GetEffect(self, index): return self._effList[index] if len(self._effList) > index else 0
|
| | | def GetEffectCount(self): return len(self._effList)
|
| | | def GetEffectByID(self, effID, triggerWay=0): return self._effDict.get((effID, triggerWay), EmptyEffect)
|
| | | def GetEffectByID(self, effID, triggerWay=0): return self._effDict.get((effID, triggerWay), None)
|
| | | def GetConnSkill(self): return self._ipyData.GetConnSkill()
|
| | | def GetCoolDownTime(self): return self._ipyData.GetCoolDownTime()
|
| | | def GetIgnoreStates(self): return self._ipyData.GetIgnoreStates() # 无视限制列表
|
| | |
| | | self._tagObjList = [] # 本次技能目标列表 [BatObj, ...]
|
| | | self._hurtList = [] # 本次伤血列表,可能同一个对象有多个伤害,如弹射等 [HurtObj, ...]
|
| | | self._bySkill = None # 由哪个技能触发的
|
| | | self._byBuff = None # 由哪个buff触发的
|
| | | self._afterLogicList = [] # 技能释放后需要处理逻辑 [[logicType, logicParams], ...]
|
| | |
|
| | | # 连击相关
|
| | |
| | | self._batType = 0
|
| | | self._tagObjList = []
|
| | | self._bySkill = None
|
| | | self._byBuff = None
|
| | | self._afterLogicList = []
|
| | | self.ClearHurtObj()
|
| | | return
|
| | |
| | | def SetBatType(self, batType): self._batType = batType
|
| | | def GetBySkill(self): return self._bySkill
|
| | | def SetBySkill(self, bySkill): self._bySkill = bySkill
|
| | | def GetByBuff(self): return self._byBuff
|
| | | def SetByBuff(self, byBuff): self._byBuff = byBuff
|
| | | def GetTagObjList(self): return self._tagObjList # 技能目标列表
|
| | | def SetTagObjList(self, tagObjList): self._tagObjList = tagObjList
|
| | | def GetAfterLogicList(self): return self._afterLogicList
|