#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # ##@package Skill.PassiveBuff.PassiveSkill_5013 # # @todo:Áé³è¹¥»÷ʱ´¥·¢ÌáÉý¶îÍâÉ˺¦°Ù·Ö±È # @author hxp # @date 2024-04-12 # @version 1.0 # # ÏêϸÃèÊö: Áé³è¹¥»÷ʱ´¥·¢ÌáÉý¶îÍâÉ˺¦°Ù·Ö±È # #------------------------------------------------------------------------------- #"""Version = 2024-04-12 15: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("¸ÃÁé³è¹¥»÷¹ý! ²»ÔÙ´¥·¢¶ÀÁ¢Ê״Σ¡ effID=%s,useSkillPetID=%s" % (effect.GetEffectID(), useSkillPetID)) return False elif effType == 2: # ¹²ÏíÊ״Σ¬Ö±½ÓÈ¡Ö÷È˵Ä״̬ if attacker.GetDictByKey(ChConfig.Def_Obj_Dict_TurnAttackOverPetState): #GameWorld.DebugLog("ÒѾ­ÓÐÁé³è¹¥»÷¹ý! ²»ÔÙ´¥·¢¹²ÏíÊ״Σ¡ effID=%s,atkID=%s" % (effect.GetEffectID(), attacker.GetID())) return False return True def GetValue(attacker, defender, effect): return effect.GetEffectValue(0)