From 80cec3121d7ea24123404d2b0dc95c603b780bcd Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 20 五月 2019 21:40:52 +0800
Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py
index 9b42979..f0e8fc5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4519.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#
-# @todo: 进入濒死状态 血量为1, 不触发技能
+# @todo: 进入濒死状态 血量为1
#
# @author: Alee
# @date 2017-12-9 下午09:41:44
@@ -15,15 +15,30 @@
import GameWorld
import SkillCommon
import BuffSkill
+import IPY_GameWorld
def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
+ if attacker.GetPlayerAction() == IPY_GameWorld.paDie:
+ # 当前已经被处理为死亡,那么就不触发
+ return False
+
+ zhanshaState = attacker.GetDictByKey(ChConfig.Def_PlayerKey_Zhansha)
+
+ if zhanshaState:
+ # 按位判断,1为斩杀情况下,此技能不可被触发,2为终极斩杀不触发,3为任何斩杀都不触发
+ if (passiveEffect.GetEffectValue(2) & pow(2, zhanshaState-1)) != 0:
+ return False
+
attacker.SetHP(1)
-
- return False
+
+ # False 可用于多次触发不死的作用
+ return True if passiveEffect.GetEffectValue(1) else False
def GetSkillData(passiveEffect):
- return
+ skillID = passiveEffect.GetEffectValue(1)
+
+ return GameWorld.GetGameData().GetSkillBySkillID(skillID)
def AfterUsePassiveSkill(attacker, defender, passiveEffect, tick):
return
--
Gitblit v1.8.0