local FuncNode_HaveBattleProp = class("FuncNode_HaveBattleProp") --[[ 初始化 --]] function FuncNode_HaveBattleProp:initialize(entity) self.LimitChildCount = 1 self.Type = LuaConst.ConditionFuncType.HaveBattleProp end --[[ 执行 --]] function FuncNode_HaveBattleProp:Run(conditionDataNode, entity, missile) local battlePropID = FP.tonumberV1(conditionDataNode.FirstNode:Run(entity, missile)) local count = 0 if battlePropID == 0 then -- 任意一个 count = entity.components.battleProp:GetBattlePropTotalNum() else-- 指定的一个 count = entity.components.battleProp:GetBattlePropNum(battlePropID) end if count > 0 then return FP.Const.One end return FP.Const.Zero end return FuncNode_HaveBattleProp