#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # ##@package Skill.PassiveBuff.PassiveSkill_5005 # # @todo:Áé³èÊͷż¼Äܺ󴥷¢ # @author hxp # @date 2024-02-01 # @version 1.0 # #------------------------------------------------------------------------------- #"""Version = 2024-02-01 15:30""" #------------------------------------------------------------------------------- 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_TurnSkillSuccessPetState): #GameWorld.DebugLog("¸ÃÁé³èÊͷŹý¼¼ÄÜ! ²»ÔÙ´¥·¢¶ÀÁ¢Ê״Σ¡", useSkillPetID) return False elif effType == 2: # ¹²ÏíÊ״Σ¬Ö±½ÓÈ¡Ö÷È˵Ä״̬ if attacker.GetDictByKey(ChConfig.Def_Obj_Dict_TurnSkillSuccessPetState): #GameWorld.DebugLog("ÒѾ­ÓÐÁé³èÊͷŹý¼¼ÄÜ! ²»ÔÙ´¥·¢¹²ÏíÊ״Σ¡", attacker.GetID()) return False return GameWorld.CanHappen(effect.GetEffectValue(0))