xdh
2019-04-08 49038c57437f730ac77154eb1969d46be614416d
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4028.py
@@ -15,9 +15,21 @@
import GameWorld
import GameObj
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时,屏蔽过多逻辑