| | |
| | | def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
|
| | | if not defender:
|
| | | return
|
| | | |
| | | useSkill = skillkwargs.get("useSkill", None)
|
| | | if useSkill:
|
| | | if useSkill.GetSkillTypeID() == skillID:
|
| | | # 自己不加时长
|
| | | return
|
| | | |
| | | findBuff = SkillCommon.FindBuffByOwner(attacker, skillID, defender.GetID(), defender.GetGameObjType())
|
| | | if not findBuff:
|
| | | return False
|
| | | |
| | | curValue = findBuff.GetValue2()
|
| | | if curValue >= passiveEffect.GetEffectValue(1):
|
| | | return False
|
| | | |
| | | remainTime = findBuff.GetRemainTime()
|
| | | |
| | | findBuff.SetRemainTime(remainTime + passiveEffect.GetEffectValue(0))
|
| | | curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
|
| | | BuffSkill.PYSync_RefreshBuff(attacker, findBuff, SkillCommon.GetBuffType(curSkill), notifyAll=False, owner = defender)
|
| | |
|
| | | findBuff.SetValue2(curValue + 1)
|
| | | return False
|
| | |
|
| | |
|
| | | def GetSkillData(passiveEffect):
|
| | | return None
|
| | |
|
| | | def GetValue(attacker, defender, passiveEffect):
|
| | | return 0
|
| | |
|
| | |
|