#!/usr/bin/python # -*- coding: GBK -*- # ##@package # # @todo: ¶ÔµÚһĿ±êÖØ»÷´¥·¢¼¼ÄÜ --ÌØÊâЧ¹ûתΪ¸½¼ÓЧ¹û´¥·¢£¬ÇÒÐèÖ÷Ч¹û²»Ê¹±»¶¯¼¼ÄܽøÈëCD²Å¿É´¥·¢ # # @author: Alee # @date 2019-4-25 ÏÂÎç01:57:16 # @version 1.0 # # @note: # #--------------------------------------------------------------------- import GameWorld import SkillShell import GameObj def CheckCanHappen(attacker, defender, effect, curSkill): if effect.GetEffectValue(1): # תΪ¸½¼ÓЧ¹û´¥·¢£¬ÇÒÐèÖ÷Ч¹û²»Ê¹±»¶¯¼¼ÄܽøÈëCD²Å¿É´¥·¢ useSkill = GameWorld.GetGameData().GetSkillBySkillID(effect.GetEffectValue(1)) if not useSkill: return False SkillShell.UsePassiveTriggerSkill(attacker, useSkill, defender, GameWorld.GetGameWorld().GetTick(), True) return False if effect.GetEffectValue(2): if not GameObj.GetPyPlayerState(attacker, effect.GetEffectValue(2)): #GameWorld.DebugLog("״̬´¥·¢----%s"%effect.GetEffectValue(1)) return False return GameWorld.CanHappen(effect.GetEffectValue(0))