| | |
| | | import NetPackCommon
|
| | | import PassiveBuffEffMng
|
| | | import PlayerGeTui
|
| | | import IpyGameDataPY
|
| | | #---------------------------------------------------------------------
|
| | | g_skillHurtList = IPY_GameWorld.IPY_HurtList()
|
| | |
|
| | |
| | | if attacker.GetGameObjType() != IPY_GameWorld.gotPlayer:
|
| | | return
|
| | |
|
| | | faintRate = PlayerControl.GetFaintRate(attacker)
|
| | | if not faintRate:
|
| | | #GameWorld.DebugLog("没有击晕概率!", attacker.GetID())
|
| | | return
|
| | | |
| | | if curSkill:
|
| | | useSkillData = attacker.GetUseSkill()
|
| | | # 非主动性技能不触发
|
| | |
| | | tagFaintRate = PlayerControl.GetFaintDefRate(defender) if defender.GetGameObjType() == IPY_GameWorld.gotPlayer else 0
|
| | |
|
| | | # 添加最高60%击晕效果
|
| | | rate = min(max(PlayerControl.GetFaintRate(attacker) - tagFaintRate, 0), 6000)
|
| | | maxRate = IpyGameDataPY.GetFuncCfg("PassiveSkillFaint", 1)
|
| | | rate = min(max(faintRate - tagFaintRate, 0), maxRate)
|
| | | if not GameWorld.CanHappen(rate):
|
| | | return
|
| | |
|
| | | faintCD = IpyGameDataPY.GetFuncCfg("PassiveSkillFaint", 2) * 1000
|
| | | if faintCD:
|
| | | lastTick = attacker.GetDictByKey(ChConfig.Def_PlayerKey_AttrFaintCD)
|
| | | remainTick = faintCD - (tick - lastTick)
|
| | | if remainTick > 0:
|
| | | GameWorld.DebugLog("击晕CD中! rate=%s,剩余tick=%s" % (rate, remainTick), attacker.GetID())
|
| | | return
|
| | | attacker.SetDict(ChConfig.Def_PlayerKey_AttrFaintCD, tick)
|
| | | GameWorld.DebugLog("触发击晕! rate=%s" % rate, attacker.GetID())
|
| | | |
| | | SkillCommon.AddBuffBySkillType(defender, ChConfig.Def_SkillID_AtkerFaint, tick)
|
| | | return
|
| | |
|