From 10f29653d4cf13514f319c8445ae01c36de9926a Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期六, 01 六月 2019 11:07:48 +0800 Subject: [PATCH] 860312 套装技能战斗力 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py | 26 +++++++++----------------- 1 files changed, 9 insertions(+), 17 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py index 6397dc3..b2f21cd 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4501.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: GBK -*- # -# @todo: 攻击有xx%几率附加xx%技能伤害,持续xx秒 +# @todo: 攻击有xx%几率附加xx%技能伤害,持续xx秒, 附加目标处于XX状态 # # @author: Alee # @date 2018-1-30 下午05:11:45 @@ -13,26 +13,18 @@ import ChConfig import GameWorld -import PassiveBuffEffMng +import GameObj import SkillCommon def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs): - curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID) - if not curSkill: - return - buffType = SkillCommon.GetBuffType(curSkill) - buffTuple = SkillCommon.GetBuffManagerByBuffType(attacker, buffType) - #通过类型获取目标的buff管理器为空,则跳出 - if buffTuple == (): - return - - buffManager = buffTuple[0] - buff = buffManager.FindBuff(skillID) - if not buff: - return - return GameWorld.CanHappen(buff.GetValue()) + if passiveEffect.GetEffectValue(2) and defender: + if not GameObj.GetPyPlayerState(defender, passiveEffect.GetEffectValue(2)): + #GameWorld.DebugLog("状态触发----%s"%effect.GetEffectValue(1)) + return False + + return GameWorld.CanHappen(passiveEffect.GetEffectValue(1)) def GetValue(attacker, defender, passiveEffect): - return float(passiveEffect.GetEffectValue(0))/ChConfig.Def_MaxRateValue + return passiveEffect.GetEffectValue(0) -- Gitblit v1.8.0