From 7577e420ae88bc68662eb7eee72153d260a07f4f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 17 五月 2019 09:48:14 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(有地图ID时才进行自定义场景通用判断)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4028.py | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4028.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4028.py
index a4d4399..a652780 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4028.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4028.py
@@ -14,20 +14,37 @@
import ChConfig
import GameWorld
import GameObj
-import PlayerControl
-
+import SkillCommon
+import IPY_GameWorld
def CheckCanHappen(attacker, defender, effect, curSkill):
+ if attacker.GetPlayerAction() == IPY_GameWorld.paDie:
+ # 当前已经被处理为死亡,那么就不触发
+ return False
+ zhanshaState = attacker.GetDictByKey(ChConfig.Def_PlayerKey_Zhansha)
+
+ if zhanshaState:
+ # 按位判断,1为斩杀情况下,此技能不可被触发,2为终极斩杀不触发,3为任何斩杀都不触发
+ if (effect.GetEffectValue(2) & pow(2, zhanshaState-1)) != 0:
+ return False
+
+
result = GameWorld.CanHappen(effect.GetEffectValue(0))
if result:
GameObj.SetHP(attacker, 1) # 为了避免生命为0时,屏蔽过多逻辑
+ # 提前触发CD, 不然外层无法触发技能的话就不进入CD, 如和平模式
+ if curSkill.GetCoolDownTime():
+ SkillCommon.SetSkillRemainTime(curSkill, 0, GameWorld.GetGameWorld().GetTick(), attacker)
return True
if effect.GetEffectValue(1):
#不死血量1,但不触发技能
if GameWorld.CanHappen(effect.GetEffectValue(1)):
GameObj.SetHP(attacker, 1)
+ # 提前触发CD, 不然外层无法触发技能的话就不进入CD, 如和平模式
+ if curSkill.GetCoolDownTime():
+ SkillCommon.SetSkillRemainTime(curSkill, 0, GameWorld.GetGameWorld().GetTick(), attacker)
return False
return False
--
Gitblit v1.8.0