| | |
| | | import GameWorld
|
| | | import ChConfig
|
| | | import GameObj
|
| | | import IPY_GameWorld
|
| | | import PassiveBuffEffMng
|
| | | #---------------------------------------------------------------------
|
| | | #全局变量
|
| | | #---------------------------------------------------------------------
|
| | |
| | | curBuffSkillID = curBuff.GetSkill().GetSkillTypeID()
|
| | |
|
| | | SkillCommon.SkillLostHP(defender, curBuffSkillID, buffOwner, singleDecHP, tick, hurtType=ChConfig.Def_HurtType_Bleed)
|
| | | if curEffect.GetEffectValue(2) and buffOwner:
|
| | | SkillCommon.SkillAddHP(buffOwner, curBuffSkillID, singleDecHP)
|
| | |
|
| | | OnPassiveSkillByHurtCount(defender, curBuff, curEffect, buffOwner)
|
| | | return
|
| | |
|
| | |
|
| | | def OnPassiveSkillByHurtCount(defender, curBuff, curEffect, buffOwner):
|
| | | if not buffOwner:
|
| | | return
|
| | | if buffOwner.GetGameObjType() != IPY_GameWorld.gotPlayer:
|
| | | return
|
| | | # 执行次数。 当汲灵对目标造成3次伤害时,可降低目标20%的防御
|
| | | curBuff.SetValue1(curBuff.GetValue1() + 1)
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | |
| | | defender.SetDict(ChConfig.Def_PlayerKey_BuffHurtCnt, curBuff.GetValue1())
|
| | | PassiveBuffEffMng.OnPassiveSkillTrigger(buffOwner, defender, curBuff.GetSkill(), ChConfig.TriggerType_BuffHurtCnt, tick)
|
| | | defender.SetDict(ChConfig.Def_PlayerKey_BuffHurtCnt, 0)
|
| | | |
| | | return
|
| | |
|
| | |
|
| | | ## 持续性Buff消失
|
| | | # @param defender 承受者
|
| | |
| | | buffOwner = SkillCommon.GetBuffOwner(curBuff)
|
| | |
|
| | | SkillCommon.SkillLostHP(defender, curSkill.GetSkillTypeID(), buffOwner, buffValue, tick, hurtType=ChConfig.Def_HurtType_Bleed)
|
| | | |
| | | # 执行次数
|
| | | OnPassiveSkillByHurtCount(defender, curBuff, curEffect, buffOwner)
|
| | | return
|
| | |
|
| | |
|