| | |
| | | byFriendObj = kwargs.pop("byFriendObj") # 直接取出,防止传递
|
| | |
|
| | | passiveSkillID = curEffect.GetEffectValue(0) # 技能ID,为0时释放本技能
|
| | | byHeorID = curEffect.GetEffectValue(1) # 仅友军武将ID时有效(验证用,不一定是技能目标)
|
| | | byFriendRule = curEffect.GetEffectValue(1) # 友军验证规则[验证方式, 验证值]
|
| | | tagRule = curEffect.GetEffectValue(2) # 指定目标 0-按技能,1-对击杀方,2-对来源友军,3-对关联对象
|
| | |
|
| | | friendHeroID = byFriendObj.GetHeroID()
|
| | | if friendHeroID != byHeorID:
|
| | | GameWorld.DebugLogEx("5509非友军触发来源不处理! friendHeroID=%s != %s", friendHeroID, byHeorID)
|
| | | return
|
| | | |
| | | if byFriendRule:
|
| | | checkType = byFriendRule[0]
|
| | | # 验证方式 1 - 按武将ID, 值-武将ID
|
| | | if checkType == 1:
|
| | | byHeorID = byFriendRule[1] if len(byFriendRule) > 1 else 0
|
| | | friendHeroID = byFriendObj.GetHeroID()
|
| | | if friendHeroID != byHeorID:
|
| | | GameWorld.DebugLogEx("5509友军武将非触发来源不处理! friendHeroID=%s != %s", friendHeroID, byHeorID)
|
| | | return
|
| | | |
| | | # 验证方式 2 - 按国家, 值-国家
|
| | | elif checkType == 2:
|
| | | byCountry = byFriendRule[1] if len(byFriendRule) > 1 else 0
|
| | | friendCountry = byFriendObj.GetCountry()
|
| | | if friendCountry != byCountry:
|
| | | GameWorld.DebugLogEx("5509友军国家非触发来源不处理! friendCountry=%s != %s", friendCountry, byCountry)
|
| | | return
|
| | | |
| | | if not passiveSkillID:
|
| | | passiveSkillID = effSkill.GetSkillID()
|
| | | if not passiveSkillID:
|
| | |
| | |
|
| | | effectID = curEffect.GetEffectID()
|
| | | effSkillID = effSkill.GetSkillID()
|
| | | return TurnSkill.OnUsePassiveSkill(turnFight, batObj, byFriendObj, passiveSkillID, connSkill, effSkillID, effectID, connBuff, **kwargs)
|
| | | toTagObj = None
|
| | | if tagRule == 1:
|
| | | toTagObj = byFriendObj.GetKiller()
|
| | | elif tagRule == 2:
|
| | | toTagObj = byFriendObj
|
| | | elif tagRule == 3:
|
| | | toTagObj = tagObj
|
| | | |
| | | return TurnSkill.OnUsePassiveSkill(turnFight, batObj, toTagObj, passiveSkillID, connSkill, effSkillID, effectID, connBuff, **kwargs)
|