#!/usr/bin/python
|
# -*- coding: GBK -*-
|
#-------------------------------------------------------------------------------
|
#
|
##@package Skill.PassiveBuff.PassiveSkill_5006
|
#
|
# @todo:Áé³è¹¥»÷ºó´¥·¢
|
# @author hxp
|
# @date 2024-03-26
|
# @version 1.0
|
#
|
# ÏêϸÃèÊö: Áé³è¹¥»÷ºó´¥·¢
|
#
|
#-------------------------------------------------------------------------------
|
#"""Version = 2024-03-26 19:00"""
|
#-------------------------------------------------------------------------------
|
|
import GameWorld
|
import ChConfig
|
|
def CheckCanHappen(attacker, defender, effect, curSkill):
|
#ÉúЧÀàÐÍ£¨0-ÿ´Î£»1-¶ÀÁ¢Ê״Σ¬¼´Ã¿Ö»Áé³è¶ÀÁ¢ËãÊ״Σ»2-¹²ÏíÊ״Σ¬¼´±¾³¡Õ½¶·±¾·½¶àÖ»Áé³èµÄÇé¿öϽöÊ×´ÎÉúЧ£©
|
effType = effect.GetEffectValue(1)
|
if effType == 1:
|
# ¶ÀÁ¢Ê״Σ¬È¡Áé³è×Ô¼ºµÄ״̬
|
useSkillPetID = attacker.GetDictByKey("useSkillPetID")
|
if not useSkillPetID:
|
return False
|
petObj = GameWorld.FindNPCByID(useSkillPetID)
|
if not petObj:
|
return False
|
if petObj.GetDictByKey(ChConfig.Def_Obj_Dict_TurnAttackOverPetState):
|
#GameWorld.DebugLog("¸ÃÁé³è¹¥»÷¹ý! ²»ÔÙ´¥·¢¶ÀÁ¢Ê״Σ¡", useSkillPetID))
|
return False
|
elif effType == 2:
|
# ¹²ÏíÊ״Σ¬Ö±½ÓÈ¡Ö÷È˵Ä״̬
|
if attacker.GetDictByKey(ChConfig.Def_Obj_Dict_TurnAttackOverPetState):
|
#GameWorld.DebugLog("ÒѾÓÐÁé³è¹¥»÷¹ý! ²»ÔÙ´¥·¢¹²ÏíÊ״Σ¡", attacker.GetID())
|
return False
|
return GameWorld.CanHappen(effect.GetEffectValue(0))
|