| | |
| | | effectID = effect.GetEffectID()
|
| | | if effectID == 0:
|
| | | continue
|
| | | triggerWay = effect.GetTriggerWay()
|
| | | triggerSrc = effect.GetTriggerSrc()
|
| | | if not triggerWay:
|
| | | tWay = effect.GetTriggerWay()
|
| | | tSrc = effect.GetTriggerSrc()
|
| | | if not tWay:
|
| | | continue
|
| | | if triggerWay in ChConfig.TriggerWayNoLoadList:
|
| | | if tWay in ChConfig.TriggerWayNoLoadList:
|
| | | continue
|
| | | if triggerSrc != ChConfig.TriggerSrc_SkillSelf:
|
| | | if tSrc != ChConfig.TriggerSrc_SkillSelf:
|
| | | # 仅添加本技能的
|
| | | continue
|
| | | if tWay == ChConfig.TriggerWay_CalcEffValue:
|
| | | tWay = "%s_%s" % (tWay, effectID)
|
| | | if tWay != triggerWay:
|
| | | continue
|
| | | effIDList.append(effectID)
|
| | | if effIDList:
|
| | |
| | | return
|
| | | buffID = buffIDList[0]
|
| | | return self._buffIDDict.get(buffID, None)
|
| | | def FindBuffListByState(self, state):
|
| | | ## 查找某种buff状态的buff列表
|
| | | buffIDList = self._buffStateDict.get(state, [])
|
| | | buffs = []
|
| | | for buffID in buffIDList:
|
| | | if buffID not in self._buffIDDict:
|
| | | continue
|
| | | buffs.append(self._buffIDDict[buffID])
|
| | | return buffs
|
| | |
|
| | | def AddBuffState(self, state, buffID):
|
| | | ## 添加buff影响的状态,ChConfig.BatObjStateList
|
| | |
| | | self._remainTime = 0
|
| | | self._batType = 0 # 战斗类型,普通、连击、反击、追击等
|
| | | self._tagObjList = [] # 本次技能目标列表 [BatObj, ...]
|
| | | self._killObjList = [] # 本次技能击杀目标列表 [BatObj, ...]
|
| | | self._hurtList = [] # 本次伤血列表,可能同一个对象有多个伤害,如弹射等 [HurtObj, ...]
|
| | | self._bySkill = None # 由哪个技能触发的
|
| | | self._byBuff = None # 由哪个buff触发的
|
| | |
| | | def ResetUseRec(self):
|
| | | self._batType = 0
|
| | | self._tagObjList = []
|
| | | self._killObjList = []
|
| | | self._bySkill = None
|
| | | self._byBuff = None
|
| | | self._afterLogicList = []
|
| | |
| | | def SetByBuff(self, byBuff): self._byBuff = byBuff
|
| | | def GetTagObjList(self): return self._tagObjList # 技能目标列表
|
| | | def SetTagObjList(self, tagObjList): self._tagObjList = tagObjList
|
| | | def GetKillObjList(self): return self._killObjList # 击杀目标列表
|
| | | def SetKillObjList(self, killObjList): self._killObjList = killObjList
|
| | | def GetAfterLogicList(self): return self._afterLogicList
|
| | | def AddAfterLogic(self, logicType, logicData):
|
| | | '''添加技能释放后需要处理额外逻辑
|