local FuncNode = class("FuncNode") --[[ 初始化 --]] function FuncNode:initialize(entity) self.LimitChildCount = 3 self.Type = LuaConst.ConditionFuncType.TargetIsUsingSkillType end --[[ 执行 --]] function FuncNode:Run(conditionDataNode, entity, missile) local monsterID local targetType if conditionDataNode.SecondNode then targetType = FP.tonumberV1(conditionDataNode.SecondNode:Run(entity, missile)) if targetType == 2 then monsterID = FP.tonumberV1(conditionDataNode.ThirdNode:Run(entity, missile)) end end local target = nil if monsterID then for i,_entity in ipairs(LogicUpdateManager.EntityList_Normal) do if _entity:IsMonster() and _entity:GetCharacterID() == monsterID then target = _entity break end end else if targetType == 3 then target = entity:GetMasterEntity() else target = entity.components.target.Target end end if not target then return FP.Const.Zero end local skillBaseComponent = target.components.skillBase if skillBaseComponent.CanSwitchAll then return FP.Const.Zero end if skillBaseComponent.CurSkillData and FP.Equals(conditionDataNode.FirstNode:Run(entity, missile), skillBaseComponent.CurSkillData.AiSkillType) then return FP.Const.One end return FP.Const.Zero end return FuncNode