From d41a44a9fd316c021c4e85bde9cb0fab4c2e0be1 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期五, 15 三月 2019 17:23:43 +0800 Subject: [PATCH] 2683 子 天赋技能和新增双职业各两个技能 / 【后端】天赋技能 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4053.py | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4053.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4053.py index fcee521..909b4eb 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4053.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4053.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: GBK -*- # -# 对目标的buff层级达到第几层触发技能 +# 对目标的buff层级达到第几层触发技能, 附加效果指定目标为最近一次攻击的玩家 # # @author: Alee # @date 2018-1-9 下午09:39:37 @@ -10,10 +10,30 @@ # @note: # #--------------------------------------------------------------------- - +import SkillShell +import GameWorld +import ChConfig +import IPY_GameWorld def CheckCanHappen(attacker, defender, effect, curSkill): + if defender.GetDictByKey(ChConfig.Def_PlayerKey_AddBuffLayer) != effect.GetEffectValue(0): + return False - return defender.GetDictByKey("addBuffLayer") == effect.GetEffectValue(0) + if effect.GetEffectValue(1): + # 走到此逻辑 中buff和释放buff是同一个人 + #附加效果指定目标为最近一次攻击的玩家 + playerID = attacker.GetDictByKey(ChConfig.Def_PlayerKey_LastAttackerObjID) + if not playerID: + return False + curObj = GameWorld.GetObj(playerID, IPY_GameWorld.gotPlayer) + + #人物需要判断是否为空 + if not curObj: + return False + if curObj.IsEmpty(): + return False - + #强行释放技能 + SkillShell.UsePassiveTriggerSkill(attacker, curSkill, curObj, GameWorld.GetGameWorld().GetTick(), True) + return False + return True \ No newline at end of file -- Gitblit v1.8.0